Symantec Management Platform (Notification Server)

 View Only

How to Install Altiris Agent on Ubuntu 

Apr 25, 2008 12:29 PM

The following article describes my experience installing the Altiris Agent on Ubuntu Linux. The Altiris Agent for Linux does not currently support Ubuntu, anyway, it can be installed and it works(with some tweaking). While I'm an experienced Linux user, I know it's hard for the new ones... so I tried to explain with full details what's going on and how to proceed with each issue.

Disclaimer: Altiris does not warrant that their software will run on Ubuntu using the Unix Agent version 6.2, which as of publication of this article, is the latest release. The methods described in this article are provided as "USE AT YOUR OWN RISK." If you should run into issues with the ideas and / or methods mentioned in this article, please do not call Altiris support for assistance, as they will not be able to help you.

It works, it works !!!, but ... wait a second, currently Ubuntu is not a supported operating system by Altiris, besides it can still be installed and Inventory can function correctly.

Note: This procedure is based on my own experience and testing, it's not my intention to describe "how it must be done", just comment what have worked for me. It's my understanding that the whole process can be simplified and improved.

Some Basics

For those used to SuSE and RedHat based distributions, Ubuntu is Debian based, it means some things are a little bit different.

Some remarkable differences we can find in a Ubuntu system that impact in the Altiris NS Agent installation process are:

  • "root" account is disabled by default.
  • "SSH" service is disabled by default.
  • Ubuntu is not RPM based system (Altiris Agent for Linux installer is RPM based), RPM installers are not compatible (I'll explain a trick later).
  • Different runlevel system behavior, /etc/init.d folders structure is different.

Dealing With the Differences

The fact that the root account and the SSH service are disabled by default means that push installation from the NS console won't work.

  • Ubuntu users are required to use the sudo command in front of any action that require "root" access. The sudo command allows a user to execute a command with "root" privileges. Personally, I prefer to enable the root account (besides Security concerns), at least while the installation is being performed.
  • In order to get the installer on the local system, there are several options, enable SSH and use a tool to perform a file copy thru SSH (for Windows only users, Win SCP is the ideal free tool for this action).
  • Having my fingers tired of so much typing I preferred to install Midnight Commander (yes, it's the fantastic Norton Commander, but for Linux), just to make my life easier. Other choices, wget, ftp, smb mount, removable storage, or any other way you could imagine to get a file into a Linux system.

Besides the problem of getting the NS Agent installer copied to the system, the NS Agent for linux installer is RPM based. So even if we were allowed to push the installer, it won't work because Ubuntu does not know how to deal with this file type. I had to find my way for "extracting" the agent files from the rpm file and place them in correct place. I made use of two tools just to be sure of getting all files in place. Additional testing could confirm if two tools are needed or if a single command works.) The first tool was "alien", a special application which allows non-rpm based systems to work with rpm files. It converts between rpm, deb, slp, tgz and pkg file formats. The second tool is a standard command line tool available in most platforms, rpm2cpio, which extracts cpio archive from rpm (cpio is a tool for creating and extracting archives, or copying files from one place to another). In other words, I extracted the contents of the NS Agent for Linux rpm installer and put the files in their default folder.

Because Ubuntu uses a different runlevels folder structure (runlevel, for those very new to Unix/Linux world refers to the set of services/processes enabled at startup. Commonly, runlevel 3 is used when no X Windows graphical interface is desired, just console. And runlevel 5 means fully loaded with graphical windows interface, this runlevel is represented by folders and files in those folders which represent services to startup on boot). It was needed to add some files and links to have the Altiris Agent running on startup automatically.

Step-by-Step

Note: As I previously mentioned, this document refers to "what I did to make it work", and not exactly "what you must do". In addition, these notes were taken from my first try, I understand the process could be modified, some steps removed or others actions required to make it work for you. My main goal is to provide you with some ideas of what needs to happen, and you could do in case it does not work.

Open a console session (CTRL+ALT+F1/F2/F3...)

Remember that the "root" account in Ubuntu is not enabled by default.

Enable "root" user.

I performed this action just because I did not want to use "sudo" in front of all the commands which required elevated privileges.

Enter #sudo passwd root and then type the password for your user first and then for the root user.

Login as "root".

Once "root" account is enabled, exit or open a new console and login as root.

Install Midnight Commander

Optional, but recommended if you are not comfortable with Linux console.

If your system does not have MC installed (by default it has not), you can run apt-get install mc to download and install it automatically.

Once you got it downloaded and installed, run mc.

Verify Name Resolution

Make sure your NS server name is properly resolved.

My server name is "testiris.altlab.com.ar", ping testiris.altlab.com.ar will let me know if name resolution is working.

Tip: NIC interfaces are setup in /etc/network/interfaces (DHCP/Static).

If you make a change to this file, restart the network running /etc/init.d/networking restart.

If you have problems with name resolution, you have two basic options. You can edit the name resolution setup file "/etc/resolv.conf" to define your domain and dns server if not provided by DHCP and/or customize the hosts file "/etc/hosts" to force name resolution to your NS server.

Get Altiris Agent for Linux

Create a folder to store the installer

mkdir /root/nsclient

The Altiris Agent for Linux is located on the Altiris Server, available by several different methods as shown below:


  • C:\Program Files\Altiris\Notification Server\NSCap\Bin\Unix\Agent\Linux\x86
  • \\testiris\NSCap\Bin\Unix\Agent\Linux\x86
  • http://testiris.altlab.com.ar/Altiris/NS/NSCap/Bin/Unix/Agent/Linux/x86/
  • http://testiris/Altiris/UnixAgent/AltirisUnixAgentDownload.aspx?Id=56

Use your preferred method to get the file and copy it to /root/nsclient using one of the following methods:

  • From the Ubuntu graphical interface, open Firefox and access to the Unix Agent download page on the NS http://testiris/Altiris/UnixAgent/AltirisUnixAgentDownload.aspx?Id=56. At the bottom of the page you will find a link to access the contents of the package directory.
  • From the Ubuntu console, Midnight Commander provides a feature to mount a SMB link (or FTP) (SMB allows access to Windows shares). Select SMB Link, type <server>/nscap, provide proper credentials and that's all.
  • The smbclient command allows ftp style commands. Use the get command to download the file in your present working directory.
  • More options (Linux has plenty of options!), use smbfs (smbmount) tools to mount the Windows share. If not installed by default, type apt-get install smbfs -y (-y means "no prompts")
    • To mount the nscap share, type smbmount //testiris/nscap /mnt/ -o username=Administrator,password=yourpassword
    • To copy the installer from the mount point to the local folder, type cp /mnt/Bin/Unix/Agent/Linux/x86/aex-nsclt-6.2-1378.i386.rpm /root/nsclient/

Here are some screenshots with some of the different ways to copy the installer...

Run the installer.

Now I have the installer in place, the next thing I need to do is install it. As I said before, Ubuntu does not know how to handle RPM files. I need to "simulate" the installation by extracting the contents and going thru the installation scripts. I have found two tools to help me with this procedure, alien (it must be installed, more details later, converts between rpm, debian and other file formats), and rpm2cpio, which extracts cpio archive from rpm (cpio is a tool for creating and extracting archives, or copying files from one place to another). The goal is to copy all the files in place from the installer into the system folders structure as the installer would do if rpm were supported.

First, let's extract the files from the rpm and place them in place. The following command will do this:

rpm2cpio aex-nsclt-6.2-1378.i386.rpm | cpio -vid

If rpm2cpio is not available, run apt-get install rpm

We can see that this command extracted the contents of the RPM into the present working directory, so let's move the folder to the root.

Type mv opt/ / and make sure it has been done properly by listing /opt/ folder
Type ls /opt/ you should see an altiris folder beneath it.

Install alien by typing apt-get install alien -y (this action asked me for the Ubuntu CD on the cd-rom drive).

Notes about alien: alien is (and will probably always be) rather experimental software. It has been used by many people for many years, but there are still many bugs and limitations.

Installing alien thru apt-get requires the Ubuntu CD on the drive, I ran into an issue here, some contents require access to the Ubuntu CD rather than downloading the files from the internet. The fix is to disable installing updates from the CD-ROM and enabling the installation of updates from all Internet sources. This is done in the Preferences section of Add/Remove Applications. Afterwards, when installing alien, the patch is downloaded from the Internet and the installation is successful.

Alternatively, edit /etc/apt/sources.list and put a # in front of the first line which must begin with deb cdrom:[Ubuntu-.... This will make apt-get to go directly to Internet to look up for sources.

Now alien is installed and files have been extracted with rpm2cpio, let's try to mimic the rpm installation scripts with alien and see the results.

Type alien -i aex-nsclt-6.2-1378.i386.rpm --scripts

Disregard the error about unable to find aex-configure, as it will be solved manually a little later.

Configuring and Testing the Agent

Now I'm going to try to configure the Altiris Agent by running aex-configure -iconfigure.

Type cd /opt/altiris/notification/nsagent/bin
Type ./aex-configure -iconfigure

It will result in a missed library error.

This error is thrown as the system is unable to find the Altiris libraries.

Let's add the Altiris Agent lib folder to the library path and try again.

Type export LD_LIBRARY_PATH=/opt/altiris/notification/nsagent/lib/:$LD_LIBRARY_PATH
Type ./aex-configure.bin -iconfigure

Now it works!

This variable will be lost at restart, we need to set it fixed somehow, so that it's present every time Ubuntu starts. There are several ways of doing this (a simple way could be just copying all the lib/* to /lib).

I prefer the following method, create a file /etc/ld.so.conf.d/altiris.conf with the following content:

  • # Altiris default configuration
  • /opt/altiris/notification/nsagent/lib

Save and run ldconfig. Then restart the system and try again to run aex-configure.bin -iconfigure.

If aex-configure complains about missing library, something is wrong with your lib path.

Altiris Agent Configuration

Next step is to setup the Altiris Agent.

Type cd /opt/altiris/notification/nsagent/bin
Type ./aex-configure.bin -iconfigure

Each configuration item has an example and should not be a problem what the script is asking for. The first item is the most important one. Make sure the correct server name is entered (usually this is the Fully Qualified Domain Name).

Then it's all next, next, next.... With the only exception being I like to setup the logging (in testing systems) to debug.

Say yes to final question if you want to start the agent (I guess you can't wait for it!)

But I have bad news for you... Altiris Agent is not running yet.

Type ps -ef, you won't find any process related with Altiris agent (aex*).
Type /etc/init.d/altiris status, you will get an error message about it can't open /etc/rc.d/init.d/functions.

Remember I told you Ubuntu has a different runlevel folders structure, that's the problem.

The way of solving it is creating some links, the folder rc.d and init.d do not exist in Ubuntu. These folders are needed by the agent to run.

Type mkdir /etc/rc.d
Type mkdir /etc/rc.d/init.d
Type ln -s /lib/lsb/init-functions /etc/rc.d/init.d/functions
Type ln -s /etc/init.d/altiris /etc/rc2.d/S99altiris (This line starts the altiris agent in runlevel 2)
(My Ubuntu system boots on runlevel 2)
Type ln -s /etc/init.d/altiris /etc/rc3.d/S99altiris (This line starts the altiris agent in runlevel 3)
Type ln -s /etc/init.d/altiris /etc/rc5.d/S99altiris (This line starts the altiris agent in runlevel 5)

Start the altiris agent.

Type /etc/init.d/altiris start

Do not worry about the message "101: success not found"

Check if altiris agent is running typing ps -ef | grep aex

If you have the Inventory Tasks for Linux enabled, the Ubuntu system should run Inventory soon.

Requesting Altiris Agent Configuration

Type ./aex-refreshpolicies in the ./bin directory

Send Basic Inventory

Type ./aex-sendbasicinv in the ./bin directory

Show Agent Tasks

Type ./aex-swdapm in the ./bin directory

Monitor Agent Log

Type tail -f /opt/altiris/notification/nsagent/var/aex-client.log

Resource Manager

Note: Since Ubuntu does not use the RPM format (and was mentioned previously Ubuntu si not officially supported by Altiris) some information could not be collected. These issues could be solved by creating custom inventories to collect those special items. Ubuntu does not use 'bash' shell by default, it uses dash, which causes issues with Inventory. In order to solve these issues, see article 41612 at http://kb.altiris.com

Statistics
0 Favorited
10 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
pdf file
Installing Altiris Agent on Ubuntu_.pdf   842 KB   1 version
Uploaded - Feb 25, 2020

Tags and Keywords

Comments

May 03, 2012 08:21 AM

Hello,

I have to thank you because this how to "run installer" helped me to install agent 7.1 to linux mint 12 (lisa)

So i would say great walktrough

Mar 16, 2010 10:53 AM

Hello,

it seems that the link tha was originaly on Juice was lost in the move to Connect.

I found an article that seems to be the one...

https://www-secure.symantec.com/connect/downloads/installing-altiris-deployment-agent-ubuntu-linux-script

RJ

May 05, 2008 03:38 PM

I saw that a user requested a script to install the agent. I have created a simple script with instructions on how to run the script within it. Please check out
http://juice.altiris.com/download/3704/installing-altiris-deployment-agent-ubuntu-linux-script
If you have any questions, you can find me in the Altiris Chat Room almost always. My name is MtBiker.

May 01, 2008 04:25 PM

It'd be nice to script the installation so it would be simple for end users... aka. Click on this link.... execute this bin file.

Apr 26, 2008 04:43 PM

Jesse, I've found the article you mention a good article, but strangely a customer was not able to make it works. So I decided to start from scratch and to have my own experience, I preferred to add a lot of details just because there is not two identical Linux systems in the world(regardless Ubuntu and other distributions efforts), it's so much customizable and it has so many components and distributions, and so many ways to get the same goal, not to mention that not everybody has enough knowledge of Linux, my intention was to provide a guide which could be used in case "simple instructions" does not work and you need alternatives. The original article is perfect, but for those who prefer or need more details and help to understand what is needed to do, and why, I think this article provides enough information for those people.
Additionally, all these instructions and command lines are the basic to build a script to perform "automated installation" of Altiris Agent on these systems, even creating a sort of pushing method could be possible.
Thank you for your comments.

Apr 25, 2008 04:25 PM

In case you missed them, here are some other user-contributed articles that feature Ubuntu: http://juice.altiris.com/search/node/ubuntu
JM

Apr 25, 2008 01:29 PM

there are already other posts that make this process simpler to follow. just curious as to why we need a duplicate post? note: this post is linked as releated resources
Jonathan Jesse
Director of Training
ITS Partners

Related Entries and Links

No Related Resource entered.