分类:
2005-08-08 09:52:00
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:x:0:1:Super-User:/:bin/bash
......
test:x: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-local
tar-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.tar
make-3.79.1-sol9-sparc-local
wget-1.8.1-sol9-sparc-local
memconf-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