View Source

{toc:location=top|maxLevel=3|minLevel=3|type=flat|separator=pipe|style=border:1}


----
h3. 1. Download CDP Agent

See [Obtaining Linux CDP Enterprise Agent].



----
h3. 2. Configure APT Repository

You should also configure an APT repository on Debian and Ubuntu to manage upgrades of CDP Standard Edition (See [Upgrading Enterprise Agent for Linux]), to install the unzip utility, etc.

First, modify your {{/etc/apt/sources.list}} to include the R1Soft repository, and then download the R1Soft {{apt gpg}} key.

{code}# echo deb http://repo.r1soft.com/apt stable main >> /etc/apt/sources.list
# wget http://repo.r1soft.com/r1soft.asc
# apt-key add r1soft.asc
# apt-get update{code}

!install standard 8a.png!

----
h3. 3. Option 1 - Install Agent Using APT
{note:title=Notice}You must be a Linux root user to install CDP Agent.
{note}

Once you have configured the APT repository, you can execute the following command to install CDP Agent:

{code}apt-get install r1soft-cdp-enterprise-agent{code}

!--4-2_ent_agent_inst_deb.png!

----
h3. Option 2 - Install Agent Using DPKG

4.1 Make Sure You Can Unzip the Download

Most Linux distributions come with the *unzip* utility pre-installed. To determine if you have the *unzip* utility, run:

{code}# which unzip{code}

This should return an output similar to the following:

{code}# which unzip
/usr/bin/unzip{code}

!unzip-ad-310.png!

If it returns the following output, you need to install the *unzip* utility first:

{code}unzip: Command not found.{code}

To install *unzip* on Debian or Ubuntu:

{code}# apt-get install unzip{code}

!install standard 1.png!

----
h4. 4.2 Extract the ZIP File

We recommend creating a temporary directory to which you can extract the contents of the ZIP file.


1. Use the {{mkdir}} command to create a temporary directory (in our case, {{cdp-agent}}).

{code}# mkdir cdp-agent{code}

2. Use the {{mv}} command to move the archive to that directory. Note that Linux file names are case sensitive. Make sure you type the name correctly (in our case, "*r1soft-enterprise-agent-linux64-4.2.0.zip*").

{code}# mv r1soft-enterprise-agent-linux64-4.2.0.zip cdp-agent{code}

3. Use the {{cd}} command to go to that directory.

{code}# cd cdp-agent{code}

4. Use the {{unzip}} command to extract the files.

{code}# unzip r1soft-enterprise-agent-linux64-4.2.0.zip{code}

----
h4. 4.3 Install the Packages

{note:title=Notice}You must be a Linux root user to install CDP Agent.
{note}

The archive you have extracted contains two folders: one with {{.deb}} packages (in our case, "*deb-linux64*") and one with {{.rpm}} packages ("*rpm-linux64*"). If you are installing on Debian or Ubuntu, choose the {{.deb}} package.

Each folder contains a set of CDP components:

* {{r1soft-setup}}
* {{r1soft-cdp-enterprise-agent}}
* {{r1soft-cdp-agent}}
* {{r1soft-cdp-async-agent-2-6}}

You will need to install all of them in one step. Use the {{cd}} command to go to the folder with the packages (in our case, "*deb-linux64*") and run the following command:

*DEB 32-bit (x86) /* *DEB 64-bit (x86_64)*

{code}dpkg -i *.deb{code}

!dpkg-agent.png!





----
h3. 5. Install CDP Linux Device Driver

CDP Device Driver is a proprietary, loadable Linux kernel module distributed by R1Soft. It is loadable at run-time without restarting Linux, and you do *not* need to recompile your Linux kernel to use it. R1Soft does not provide prebuilt modules for the popular kernels anymore, so you will have to compile the module from source.
{note:title=Notice}You need to have loadable modules enabled as a feature in your kernel. This is an advanced feature on all popular Linux distributions.
{note}

h4. 45.1 Compiling CDP Kernel Module Against Kernel Headers or Kernel Source Tree

Using a pre-built binary module package is not possible anymore. You will have to compile this module against kernel headers for the current running kernel. In order to do so, we can build using your installed linux-headers package on your Linux server (see section 4.2 on installation of header packages). In order for kernel module compilation to work, you should have Internet connectivity directly from the Linux server you are installing CDP on, to TCP port HTTPS (443), on the host krnlbld.r1soft.com.

In order for kernel module compilation to work, you should have Internet connectivity directly from the Linux server you are installing CDP on, to TCP port HTTPS (443), on the host {{krnlbld.r1soft.com}}.

You can test connectivity with the following command (this may take a minute):

{code}# r1soft-setup --test-connection{code}

!--4-2_r1soft-setup_test-connection_deb.png!

h4. 5.2 Install Kernel Sources

If you are using an unmodified kernel provided by Ubuntu installer, install the kernel-devel package:
{code}# apt-get install linux-headers-`uname -r`{code}

!4-2_inst_linux_headers_deb.png!

h4. 5.3 Verify that the Source Matches Your Running Kernel (Does not apply to Debian or Ubuntu)

Sometimes, the kernel-devel package is newer than the installed and running kernel. If the kernel-devel is too old and not found, please follow the instructions on how to setup access to older yum packages as documented [here|kb3:Finding Old kernel-devel Packages For CentOS].

h4. 5.4 Build the CDP Kernel Module Online (direct Internet connection to R1Soft build server)

To attempt to build the kernel module, run the following command (this may take several minutes):

{code}# r1soft-setup --get-module{code}

!--4-2_r1soft-setup_get-module_deb.png!

If module has been compiled and installed successfully, you will see an output similar to the following:

{code}Saving kernel module to '/lib/modules/r1soft/hcpdriver-cki-2.6.32-220.4.1.el6.x86_64.ko'
Kernel module is now installed.
Use '/etc/init.d/cdp-agent restart' to load the new driver{code}

!--4-2_r1soft-setup_get-module_deb-.png!

h4. 4.5 Build the CDP Kernel Module Offline (without direct Internet connection to R1Soft build server)

If there is no direct Internet connection between your CDP server and R1Soft build server, it is still possible to compile the kernel module. In this case, this will be tree-step process. First, you will have to create tarball file with the kernel headers. When you should copy this tarball file from the server to some other computer which has Internet connection to R1Soft build server. From this computer you should upload the tarball to the R1Soft build server and wait for the compilation to finish. When it is finished, you should download binary module and copy it back to the CDP server. Start with executing the following command:

{code}# r1soft-setup --no-binary --kernel-dir /usr/src/kernels/YOUR_KERNEL_TREE
--tarball-only /tmp/kernel-headers-for-r1soft.tar.gz{code}
After running this command, you will see:

{code}# r1soft-setup --no-binary --kernel-dir /usr/src/kernels/2.6.32-220.4.1.el6.x86_64
--tarball-only /tmp/kernel-headers-for-r1soft.tar.gz
Gathering kernel information
Gathering kernel information complete.
Creating kernel headers package
Checking '/usr/src/kernels/2.6.32-220.4.1.el6.x86_64' for kernel headers
Found headers in '/usr/src/kernels/2.6.32-220.4.1.el6.x86_64'
Compressing...
Header package created '/tmp/kernel-headers-for-r1soft.tar.gz'
visit https://krnlbld.r1soft.com/ to do an offline module build
After it is complete, you will need to copy the module to /lib/modules/r1soft{code}

!-4-2_r1soft-setup_build_kernel_module_without_direct_int.png!

----
h3. Last Step


* Copy the generated {{tar.gz}} file and paste it to a computer with Internet access.
* Go to [https://krnlbld.r1soft.com/] and upload the {{.tar.gz}} file to build a kernel module.
* After the build, you will download a kernel module.
* Copy this module and paste it to your Linux Server and the folder {{/lib/modules/r1soft}}.
* Restart the Server ({{/etc/init.d/cdp-agent restart}}).

!--4-2_cdp-agent_restart_deb.png!


{excerpt:hidden=true}Instructions on how to install CDP Agent 4.2.0 Enterprise Edition on Debian and Ubuntu.{excerpt}