- 论坛徽章:
- 0
|
关于系统安装:
1.安装系统原则: 最少化安装
2基本系统安装步骤:
2.1 安装语言选择. english
2.2 SWAP 分区一般设为内存的两倍大小.
2.3 先不打开防火墙 选择No firewall
2.4 语言包选择中文简繁体包
2.5 时区一定要选择正确.所有服务器一定要选同样的时区.
2.6 选择自定义安装包:
桌面选项:均不选
() X窗口系统
() GNOME桌面环境
() KDE桌面环境
应用程序选项:选择EDITORS,其他均不选
( ) 工程和科学
( ) 图形化互联网
( ) 基于文本的互联网
( ) 办公/生产率
服务器选项:
(√) 服务器配置工具 (选取全部)
( ) 万维网服务器
( ) Windows文件服务器
( ) DNS服务器
开发选项:
(√) 开发工具 (选择全部)
系统选项:
(√) 管理工具 (选取默认)
( ) 打印支持 (选取默认)
杂项选项:
全部不要选择;
选择EDITORS;server configuration tools ; development tools ;
kernel developmet ; administration tools ; system tools;
一般的服务器安装这些包就足够了. 特殊服务器的安装会特别注明其它的安装包.
2.7 要注意的是在安装过程中.一定要设定root 密码
2.8 系统安装完之后. 远程SSH 登录... 并检查网络配置是否正常.
2.9 vi /etc/hosts 添加 BB监控服务器的记录
例: X.X.X.X mgmt.chinabankpay.net.cn
3 监测工具安装
3.1 上传BBSVR-redhatES3.0-bb3.10-bbpe.tar 包. 并解压进行安装.
groupadd bb
useradd -g bb bb
passwd bb // 添加BB 组和用户
tar xvf BBSVR-redhatES3.0-bb3.10-bbpe.tar
mv bb3.10-bbpe /usr/bb
chown -R bb:bb /usr/bb
cd /usr/bb/install
./bbconfig
一路回车.. 到
Please enter a fully qualified domain name for [hostname]:
#填入完整的域名.. 如: test.chinabankpay.net.cn
What host will be the BBDISPLAY [test.chinabankpay.net.cn]:
#填入BB 监控服务器的域名 : mgmt.chinabankpay.net.cn
What host will be the BBPAGER [jacktest.test.com]:
#填入BB 监控服务器的域名 : mgmt.chinabankpay.net.cn 或直接回车也可
一路回车... 到安装结束.
cd /usr/bb/etc
scp -rp
[email=root@mgmt.chinabankpay.net.cn:/usr/bb/etc/bb-hosts]root@mgmt.chinabankpay.net.cn:/usr/bb/etc/bb-hosts[/email]
* .
#拷贝BB监控服务器上的主机配置文件到本地.
chmod o=rw /var/log/messages
#赋给BB 能读 日志的权限
su - bb -c "cd /usr/bb;./runbb.sh start"
#启动BB 服务
过几分钟.. 查看监控服务器的页面有没有 新服务器的信息.
4. SNMP 服务安装
4.1上传 net-snmp-5.2.1.tar.tar 包. 并解压进行安装
tar zxvf net-snmp-5.2.1.tar.tar
cd net-snmp-5.2.1
./configure #过程中切记设定默认版本为2
make
make install
打开默认的/etc/snmp/snmpd.conf文件,更改如下配置:
1. 查找以下字段:
代码:
# sec.name source community
com2sec notConfigUser default public
将"comunity"字段改为我们设置的密码."public".
将“default”改为CACTI 服务器的地址.
2. 查找以下字段:代码:
####
# Finally, grant the group read-only access to the systemview view.
# group context sec.model sec.level prefix read write notif
access notConfigGroup "" any noauth exact all none none
将"read"字段改为all.(systemview)
代码:
#access notConfigGroup "" any noauth exact systemview none none
3. 查找以下字段:代码:
## incl/excl subtree mask
#view all included .1 80
将该行前面的"#"去掉.
运行/etc/init.d/snmpd start命令或 service snmpd start .启动snmpd服务
运行netstat -ln查看161端口是否打开了.
修改防火墙策略,打开UDP 161端口给CACTI 服务器访问。
5. 设定NTP 时间服务..
5.1 crontab -e
添加
*/30 * * * * /usr/sbin/ntpdate 192.168.1.210
6. 设定SSH 服务
6.1 修改SSH 配置文件
vi /etc/ssh/sshd_config
设置
PermitRootLogin no //禁止“root”用户登录
保存退出..
service sshd restart
7登录时不显示系统相关信息
7.1 vi /etc/rc.d/rc.local // 在下面这些行的前面加上 #
# This will overwrite /etc/issue at every boot. So, make any changes you
# want to make to /etc/issue here or you will lose them when you reboot.
#echo “” > /etc/issue
#echo “$R” >> /etc/issue
#echo “Kernel $(uname -r) on $a $(uname -m)” >> /etc/issue
#
#cp -f /etc/issue /etc/issue.net
#echo >> /etc/issue
7.2 删除“/etc”目录下的“issue.net”和“issue”文件:
rm -f /etc/issue
rm -f /etc/issue.net
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/25840/showart_255564.html |
|