Configuring the Operating System
Configuring the Server Time Zone and Time
The server time is closely related to NE data collection, scheduled task handling, and database information backup. Therefore, the accuracy of the server time is important to the proper running of the system. After installing the server, you need to verify the server time.
Procedure
- Log in to the eSight server as the root user.
- Run the following command to query the operating system version:
#lsb_release -a
The following version information is displayed:
Description: SUSE Linux Enterprise Server 12 SP4
This section uses SUSE Linux Enterprise Server 12 SP4 as an example to describe how to configure the time zone and time.
- Correct the time zone for the server operating system.
Run the following command to view the time zone used by the operating system:
# date -R
The following information is displayed, indicating that the current time zone is GMT+8:
Tue, 17 Sep 2019 16:35:22 +0800
If the displayed time zone is inconsistent with the actual time zone, perform the following steps to correct the time zone and time:
- Run the following command to enter the setting page:
# yast2
- Click Date and Time. The Clock and Time Zone page is displayed.
- In the Region area on the Clock and Time Zone page, select a continent or an ocean. In the Time Zone area, select a country or region.
- Click Other Settings.... The Change Date and Time page is displayed.
- On the Change Date and Time page, select Manually and set Current Time and Current Date.
- Click Accept to return to the Clock and Time Zone page.
- Click OK.
- Run the following command to enter the setting page:
- Correct the time for the server operating system.
- Run the following command to view the current operating system time:
# date
The eSight server time is displayed.
Thu Apr 14 15:42:39 CST 2011
- Run the following command to set the system time:
For example, run the following command to set the system time to 2011-4-14 15:49:30:
# date -s "2011-4-14 15:49:30"
The following output will be displayed:
Thu Apr 14 15:49:30 CST 2011
- Run the following command to view the current operating system time:
- Run the following commands to restart the server:
# sync;sync;sync;sync;sync
# reboot
Configuring the Network and Host Name
Before installing eSight, you need to configure the host name and IP address of the eSight server operating system as planned.
Procedure
- Log in to the Linux server as the root user.
- Run the following command in the command terminal. The YaST2 Control Center window is displayed.
# yast2
If the tool window cannot be displayed in the Linux operating system, see What Can I Do If the Tool Window Is Not Displayed in the SUSE Linux Operating System.
- Choose System > Network Settings.
- In the Network Settings window, click the Hostname/DNS tab and change the eSight server host name based on the plan.
- On the Overview tab page, select the IP address to be changed and click Edit.
- Click the Address tab, change the IP address, enter the host name, and click Next.
- Click the Routing tab and set the default gateway as planned.
- Click OK.
- Configure the mapping between the local IP address and host name.
- Open the /etc/hosts file.
# vi /etc/hosts
- Press i to enter the editing mode.
- If two IP address and host name records exist, comment out the incorrect record and keep only one correct IP address and host name record.
- If only one IP address and host name record exists, change it to the correct IP address and host name.
192.168.1.100 eSightServer.site eSightServer
eSightServer indicates the host name of the server. Replace it based on the site requirements.
- Press Esc to exit the editing mode, and run the :wq command to save and exit the file.
- Run the hostname -i command to check whether the IP address is correct.
- Open the /etc/hosts file.
Verifying the Configuration
- Log in to another computer that is connected to the network where the eSight server resides.
- Choose Start > Run.
The Run dialog box is displayed.
- Enter cmd and click OK.
The CLI is displayed.
Enter ping eSight server IP address (for example, ping 192.168.1.100) and press Enter.
If the following information is displayed, the network is configured successfully:
Pinging 192.168.1.100 with 32 bytes of data: Reply from 192.168.1.100: bytes=32 time=16ms TTL=252 Reply from 192.168.1.100: bytes=32 time<1ms TTL=252 Reply from 192.168.1.100: bytes=32 time<1ms TTL=252 Reply from 192.168.1.100: bytes=32 time<1ms TTL=252 Ping statistics for 10.137.63.1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss); Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 16ms, Average = 4ms
- Enter exit.
Follow-up Procedure
For details about how to bind two NICs, see How Do I Bind Two Network Adapters on SUSE 12.
Configuring the Mapping Between the Host Name and IP Address
The mapping between the host name and IP address is correct. The following operations need to be performed on both the active and standby eSight servers.
Procedure
- Log in to the eSight node as the root user.
- Run the following commands to check the host names. The host names of the active and standby servers must be different.
# hostname
eSightServer
To change the host names, perform the following operations:- Log in to the eSight server as the root user.
- Run the following command to change the host name on the operating system:
# hostnamectl set-hostname --static esight-102
Replace esight-102 in the command with the host name planned in Collecting Information.
- Run the following commands to check whether the host name is successfully changed:
# hostname
esight-102
- Check and configure the mapping relationship between the local IP address and host name.
- Run the following command to check whether the local host IP address and host name are configured in the /etc/hosts file:
# cat /etc/hosts | grep `hostname`
If information similar to the following is displayed, the configuration is correct: Otherwise, go to 3.b and add the mapping relationship between the local IP address and host name to the /etc/hosts file.
10.120.39.213 eSightServer
- (Optional) Add the IP address and host name of the local host to the /etc/hosts file.
- Open the hosts file.
# vi /etc/hosts
- Press i to enter the editing mode, and then enter the IP address and host name of the local host.
ipAddress hostName
ipAddress: IP address of the local host
hostName: host name The host name and IP address are separated by space characters.
- Press Esc to exit the editing mode, and run the :wq command to save and exit the file.
- Open the hosts file.
- Run the following command to check whether the local host IP address and host name are configured in the /etc/hosts file: