The following figure shows the effect after hardware monitoring is deployed on centos7.
The installation steps are as follows:
1. Synchronize the rsync source to the local device.
By default, it is a foreign dell source. It is very slow to install omsa in china. If multiple servers are deployed with hardware monitoring, it is recommended to make it a local yum source.
[Root @ puppet other] # cat rsync_dell_repo.sh
#! /Bin/bash
# Author: Deng Lei
# Email: dl528888@gmail.com
Bwlimit = '000000'
Centos_version = 7
Remote_dir = "rsync: // linux.dell.com/repo/hardware/latest/platform_independent/rh1_centos_version1_0_64 /"
Local_dir = "/mnt/DELL/Centos-$ {centos_version}/x86_64 /"
If [! -D $ rsync_dir]; then
Mkdir-p $ rsync_dir
Fi
Function check (){
If [$? -Eq 0]; then
Echo "'date' + % Y-% m-% d % t' rsync $1 to $2 is success! "
Else
Echo "'date' + % Y-% m-% d % t' rsync $1 to $2 is fail! "
Fi
}
For I in srvadmin-x86_64 srvadmin-x86_64-meta firmware-tools repodata
Do
Rsync-avrt -- delete -- no-iconv -- bwlimit = $ bwlimit $ {remote_dir }$ {I}/$ {local_dir} $ I
Check $ {remote_dir} $ I $ {local_dir} $ I
Done
For ease of use, I directly wrote a shell script. You can modify it as needed. The running method is sh.
Rsync_dell_repo.sh
The result is
[Root @ puppet other] # ll/mnt/DELL/Centos-7/x86_64/
Total 16
Drwxr-xr-x 2 3000044 3000044 4096 Apr 15 firmware-tools
Drwxr-xr-x 2 3000044 3000044 4096 Apr 17 repodata
Drwxr-xr-x 2 3000044 3000044 4096 Apr 17 srvadmin-x86_64
Drwxr-xr-x 2 3000044 3000044 4096 Apr 6 srvadmin-x86_64-meta
There are many official directories, but these four are useful.
2. repo of yum
# Cat CentOS7-Base-ChuKong.repo [root @ puppet repo_list] #
[DELL]
Name = CentOS-Dell-omsa $ basearch
Baseurl = http://yum-server-external.ops.xxx.net/dell/centos-7/?basearch
Enable = 1
Gpgcheck = 0
To prevent information leakage, I changed my domain name to xxx.
3. Install omsa
Yum-y install srvadmin-all
Then wait for the result.
I have encapsulated zabbix here and automatically installed it with one click, as shown below:
I have also written the configuration file of systemd and configured it automatically in my own script, as shown below:
[Root @ ip-10-10-125-8 ~] # Cat/usr/lib/systemd/system/zabbix_agentd.service
[Unit]
Description = Zabbix Agent
After1_syslog.tar get
Afterdomainnetwork.tar get
[Service]
Environment = "CONFFILE =/usr/local/zabbix/conf/zabbix_agentd.conf"
Type = forking
Restart = always
PIDFile =/var/log/zabbix/zabbix_agentd.pid
KillMode = process
ExecStart =/usr/local/zabbix/sbin/zabbix_agentd-c $ CONFFILE
ExecStop =/bin/sh-c "kill-9 'cat $ pidfile'; rm-rf $ PIDFile"
[Install]
Wantedbypolicmulti-user.tar get
Modify the information as needed
To address this problem, we suggest you change the signal set to one level. For database and web applications, the signal set is used a lot. The default 256 is not enough. I generally change it to 2048.
Kernel. sem = 250 32000 32 2048
If you have any questions, please leave a message and I will answer them in time.