准备工作
- 调整字符集
echo 'export LC_ALL=C' >> /etc/profile source /etc/profile
- 关闭selinux
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config setenforce 0
- 定时时间同步
yum -y install ntp ntpdate /usr/sbin/ntpdate pool.ntp.org echo '#time sync by silly at 20190616'>> /var/spool/cron/root echo '*/10 * * * * /usr/sbin/ntpdate pool.ntp.org >/dev/null 2>&1'>>/var/spool/cron/root crontab -l
- 安装依赖包及工具软件
yum install -y wget httpd php gcc glibc glibc-common gd gd-devel make net-snmp unzip
- 创建用户和组
/usr/sbin/useradd -m nagios /usr/sbin/groupadd nagcmd /usr/sbin/usermod -a -G nagcmd nagios /usr/sbin/usermod -a -G nagcmd apache