[这个贴子最后由南非蜘蛛在 2002/12/17 07:33pm 编辑]
安装完系统后需要做的一些事
作者:南非蜘蛛 zhedou@sohu.com
个人主页:http://www.douzhe.com
转载请保留作者信息
今天又安装了一边系统,我也记不得安装过多少遍了,我想没有一万,也应该有八千了吧(我被一顿暴打%^&*$)
我安装的是solaris9 sparc,似乎暂时9就这一个版本,经过一阵听哐的安装,总算安装好了,和8没有什么区别,似乎就是做的更大了
我是OEM完全安装,为了研究而用,/usr需要2G多,看来没有好的设备,用solaris9是比较痛苦了,对了,似乎SunScreen和proxy也做的更好了
不管了,那些功能我都用不到,我还是讲讲我的一些新系统的一些操作吧。
1:加个用户
#adduser test
#passwd test
#mkdir /home/test
#chown test test
ping了一些我的机器的ip,能够通,剩下的工作到自己的笔记本上做去了.
2:加本地域名解析
#vi /etc/resolv.conf
domain **.com
nameserver **.**.**.**
#vi /etc/nsswitch.conf
改成这样hosts:files dns
3:先把默认的登陆shell换了,我讨厌默认的shell,结果如下
#vi /etc/passwd
root
:0:1:Super-User:/:bin/bash
......
test
:100:1::/home/ghost:/bin/bash
感觉爽多了,能够用上下键找历史命令了,按backspace也不会不删字符了
4:删除多余的服务,我装机器不喜欢用机器已安装好的应用软件,我喜欢到应用软件的网站上下载比较安全和稳定的版本,所以我一般都把任何服务关掉,只留telnet和ftp,(telnet一会安装好ssh后,我也会删除)
#cp /etc/inetd.conf inetd.bak
#vi /etc/inetd.conf
只留telnet和ftp
似乎solaris9的telnet和ftp都用的tcp6了,向下兼容tcp4
/etc/rc2.d和/etc/rc3.d下,没用的也都删除,我的机器只留了这些,仅供参考
#cd /etc/rc2.d
#ls
README S05RMTMPFILES S72inetsvc S74xntpd S75savecore S89PRESERVE
S01MOUNTFSYS S69inet S74syslog S75cron S88utmpd S99audit
rc3.d下什么也没有,记得先备份
5:solari9暂时还没有patch,这步略过
6:下载常用工具和软件
gcc-3.1-sol9-sparc-localtar-1.13.19-sol9-sparc-local gzip-1.3[1]nmap-2.54BETA28.tar httpd-2.0.39.tar proftpd-1.2.5.tar ssh-3.0.1.tarmake-3.79.1-sol9-sparc-local
wget-1.8.1-sol9-sparc-localmemconf-1.46-sol9-sparc-local tcp_wrappers-7.6-sol9-sparc-local
#pkgadd -d gzip*
#/usr/local/bin/gzip -d *.gz
#pkgadd -d make*
#pkgadd -d wget*
#pkgadd -d gcc*
#pkgadd -d tar*
#pkgadd -d memconf*
#pkgadd -d tcp_wrappers*
#bash
#PATH=/bin:/sbin:/usr/bin:/usr/sbin:/etc:/usr/local/bin:/usr/ccs/bin;export PATH
上面这步很重要,不能少
#tar xvf ssh*
#cd /home/test/ssh-3.0.1
#./configure;make;make install;
然后
vi /etc/rc2.d/S10ssh
if [ -x /usr/local/sbin/sshd ]; then
/usr/local/sbin/sshd
echo "sshd2 startup.."
fi
nmap,proftpd,apache方法相同,这里就不说了
7:删除多余的驱动
# pkginfo | grep -i pcmcia
system SUNWpcelx 3COM EtherLink III PCMCIA Ethernet Driver
system SUNWpcmci PCMCIA Card Services, (Root)
system SUNWpcmcu PCMCIA Card Services, (Usr)
system SUNWpcmem PCMCIA memory card driver
system SUNWpcser PCMCIA serial card driver
system SUNWpsdpr PCMCIA ATA card driver
If there is no PCMCIA in the sytem, just remove them:
# pkgrm SUNWpcelx SUNWpcmci SUNWpcmcu SUNWpcmem SUNWpcser SUNWpsdpr
8:时间同步
#vi /etc/inet/ntp.conf
# fall back on local clock when no server available
server 127.127.1.0
# SURFnet stratum 2 servers:
server 这里给同步时间的ip
# Local peers
# driftfile
driftfile /etc/ntp.drift
还能够根据自己的需要调整一下系统参数,我这里就不说了,好了,就先写这么多,有什么问题,能够和我联系




