1.配置root用户SSH登陆
# vi /etc/ssh/sshd_config
ListenAddress 192.168.0.9
PermitRootLogin yes
保存退出;
清空系统提示信息
# > /etc/motd
2.取消几个影响系统启动的TIMEOUT
# vi /etc/bootrc
set boot_timeout 0
保存退出;
# vi /boot/solaris/bootenv.rc
setprop auto-boot-timeout 0
保存退出;
# vi /boot/solaris/strap.rc
Options timeout=0^M
保存退出;
3.取消自动关机
# vi /etc/power.conf
# autoshutdown 30 9:00 9:00 default
保存退出;
4.设置用户的环境变量
修改root用户shell(不建议)
# vi /etc/passwd
root:x:0:1:Super-User:/:/usr/bin/bash
保存退出;
建立root用户的环境变量
# vi /.bashrc
PS1='[\u@\H \W]\$'
PATH=$PATH:/bin:/sbin:/usr/bin:/usr/ucb:/usr/sbin:/etc:/usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/usr/sfw/bin
MANPATH=$MANPATH:/usr/man:/usr/local/man:/opt/sfw/man
LD_LIBRARY_PATH=/usr/lib:/usr/dt/lib:/usr/openwin/lib:/usr/sfw/lib:/usr/local/lib:/usr/local/ssl/lib
CC=gcc
export PS1 PATH MANPATH LD_LIBRARY_PATH CC
umask 022
TMOUT=1800
保存退出
建立profile文件
# vi .bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
保存退出
5.安装常用软件包
GCC工具:
# gzip -d libiconv-1.8-sol9-intel-local.gz
# gzip -d gcc-3.3.2-sol9-intel-local.gz
# pkgadd -d libiconv-1.8-sol9-intel-local
# pkgadd -d gcc-3.3.2-sol9-intel-local
MAKE工具:
# gzip -d make-3.80-sol9-intel-local.gz
# gzip -d automake-1.7.2-sol9-intel-local.gz
# pkgadd -d make-3.80-sol9-intel-local
# pkgadd -d automake-1.7.2-sol9-intel-local
MOZILLA:
# pkgrm SUNWnsb SUNWnsm SUNWnspsm SUNWnsxp
# gzip -d mozilla-i386-pc-solaris2.8-1.6.pkg.tar.gz
# tar -vxf mozilla-i386-pc-solaris2.8-1.6.pkg.tar
# cd mozilla-1.6-x86
# pkgadd -d MOZmozilla.pkg
# gzip -d flash_player_6_solaris_intel.tar.gz
# tar vxf flash_player_6_solaris_intel.tar
# cd install_flash_player_6_solaris
# cp * /usr/local/lib/mozilla-1.6/plugins
# cd /usr/local/lib/mozilla-1.6/plugins
# ln –s /usr/j2se/jre/plugin/i386/ns610/libjavaplugin_oji.so
# /usr/local/bin/mozilla
6.防止堆栈溢出
# cp /etc/system /etc/system.BACKUP
# vi /etc/system
在文件的最后,加上以下两行:
set noexec_user_stack=1
set noexec_user_stack_log=1