Help Center > > User Guide> Enabling HSS> Step 2: Install an Agent> Installing an Agent on the Linux OS

Installing an Agent on the Linux OS

Updated at:Oct 23, 2020 GMT+08:00

You can enable HSS only after an HSS agent is installed on the server. This topic describes how to install the agent on a server running a Linux OS. For details about how to install an agent on the Windows OS, see Installing an Agent on the Windows OS.

WTP and HSS can use the same agent on a server.

HSS can protect both HUAWEI CLOUD servers and non-HUAWEI CLOUD servers.
  • HUAWEI CLOUD server

    Ensure you have purchased HSS in your server region and have used the installation package or installation command in the region to install HSS agents on your servers.

  • Non-HUAWEI CLOUD server

    After the agent is installed, you can search for a server in the protected server list by the public IP address of the server.

    Purchase an HSS quota in the AP-Hong Kong region. Connect the server to the region by performing the installation procedure for non-HUAWEI CLOUD servers.

  • For better compatibility and service experience, you are advised to use HUAWEI CLOUD servers.
  • When installing the agent, clear application processes and configuration information that may interfere with the installation on the servers to prevent installation failure.

Default Installation Path

The agent installation path on servers running the Linux OS cannot be customized. The default path is:

/usr/local/hostguard/

Prerequisites

  • An EIP has been bound to the server on which the agent is to be installed.
  • A remote management tool, such as Xftp, SecureFX, and WinSCP, has been installed on your PC.
  • The Security-Enhanced Linux (SELinux) firewall has been disabled. The firewall affects agent installation and should remain disabled until the agent is installed.

Installing an Agent Using Commands

This procedure involves logging in to the server and running commands.

  1. Log in to the management console.
  2. In the upper left corner of the page, select a region, click , and choose Security > Host Security Service.

    Figure 1 Accessing HSS

  3. In the navigation pane on the left, choose Installation and Configuration. On the Install Agent tab, copy the required installation command.

    Figure 2 Copying the command for installing the agent

  4. Remotely log in to the server where the agent is to be installed.

    • HUAWEI CLOUD server
      • Log in to the ECS console, locate the target server, and click Remote Login in the Operation column to log in to the server. For details, see Login Using VNC.
      • If your server has an EIP bound, you can also use a remote management tool, such as Xftp, SecureFX, or WinSCP, to log in to the server and install the agent on the server as user root.
    • Non-HUAWEI CLOUD server

      Use Xftp, SecureFX, or WinSCP to log in to the server for installing the agent as user root.

  5. Paste the copied installation command and press Enter to install the agent on the server.

    If information similar to the following is displayed, the agent is successfully installed:

    Preparing...                  ########################## [100%]
    1:hostguard                   ########################## [100%]
    Hostguard is running.
    Hostguard installed.

  6. Run the service hostguard status command to check the running status of the agent.

    If the following information is displayed, the agent is running properly:

    Hostguard is running

(For HUAWEI CLOUD Servers) Installing an Agent Using an Installation Package

Download the agent installation package, upload it to the server where the agent is to be installed, and run the installation command on the server to install the agent.

  1. Log in to the management console.
  2. In the navigation pane on the left, choose Installation and Configuration. On the Install Agent tab, download the agent package.

    Figure 3 Downloading the agent installation package

  3. Download the agent to be installed based on the server OS version.
  4. Use a file transfer tool, such as Xftp, SecureFX, or WinSCP, to upload the agent installation package to the server.
  5. Remotely log in to the server where the agent is to be installed.

    • Log in to the ECS console, locate the target server, and click Remote Login in the Operation column to log in to the server. For details, see Login Using VNC.
    • If your server has an EIP bound, you can also use a remote management tool, such as Xftp, SecureFX, or WinSCP, to log in to the server and install the agent on the server as user root.

  6. Run cd Installation_package_directory to access the directory.
  7. Run the following command to install the agent on the server:

    • For an .rpm package, run rpm -ivh Package_name.

      To forcibly install the agent, run the rpm -ivh --force Package_name command.

    • For a .deb package, run dpkg -i Package_name.
      If information similar to the following is displayed, the agent is successfully installed:
      Preparing...                  ########################## [100%]
      1:hostguard                   ########################## [100%]
      Hostguard is running.
      Hostguard installed.

  8. Run the service hostguard status command to check the running status of the agent.

    If the following information is displayed, the service is running properly:

    Hostguard is running

Follow-Up Procedure

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel