2009年7月19日 星期日

install java1.6,apache22,tomcat6

1.install java6
#whereis jdk16
#cd /usr/ports/java/jdk16
#make install clean

2.install apache22
#whereis apache22
#cd /usr/port/www/apache22
#make install clean

3.install tomcat6
#whereis tomcat6
#cd /usr/port/www/tomcat6
#make install clean

4.install mod_jk
#whereis mod_jk
#cd /usr/port/www/mod_jk
#make install clean

5.testing java,apache22,tomcat
#java -version
#/usr/local/sbin/apachectl start
# /usr/local/apache-tomcat6.0/bin/startup.sh
#telnet localhost 80
#telnet localhost 8180

2009年7月14日 星期二

install chinese input method

1.install scim program
#whereis scim-pinyin
#cd /usr/ports/chinese/scim-pinyin
#make install clean

2.install chinese input method
#whereis scim-tables
#cd /usr/ports/chinese/scim-tables
#make install clean

3.modify .profile
#ee ~/.profile
add lines as below
export XMODIFIERS='@im=SCIM'
export LANG=zh_TW.UTF-8
export LC_CTYPE=zh_TW.Big5
scim -d
alias ls='ls -G'

4.restart x windows


4.

2009年7月12日 星期日

setting ntp daemon

1.single machine use ntpdate at boot time
#ee /etc/rc.conf
add one line as below
ntpdate_enable="YES"

2.most machine use ntpd daemon
#ee /etc/ntp.conf
server asia.pool.ntp.org prefer
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server 3.pool.ntp.org
driftfile /var/db/ntp.drift

3.modify /etc/rc.conf to start ntpd daemon
#ee /etc/rc.conf
add one line as below
ntpd_enable="YES"

4.restart ntpd daemon without reboot machine
#ntpd -p `cat /var/run/ntpd.pid`

setting static ip address

1.confire interface identifier
#ifconfig

2.setting static ip address at boot
#ee /etc/rc.conf
ifconfig_re0="inet 192.168.1.22 netmask 255.255.255.0"
defaultrouter="192.168.1.1"

3.manual setting with command line
#ifconfig re0 down
#ifconfig re0 192.168.1.22 netmask 255.255.255.0
#ifconfig re0 up
#route add default 192.168.1.1

4.modify dns server
#ee /etc/resolv.conf
search domain
nameserver 168.95.1.1
nameserver 168.95.192.1

enable sshd service

1.modify /etc/rc.conf
#ee /etc/rc.conf

add new line as below
sshd_enable="YES"

2.modify syslog.conf to log users login status
#ee /etc/syslog.conf

modify line as below
security.*;auth.info

3.restart sshd and syslogd services
#/etc/rc.d/sshd restart
#/etc/rc.d/syslogd restart

mv mail from /var/ to /home

1.move mail from /var/mail to user's home
#cd /var/mail
#mkdir /home/tommy/mail
#mv /var/mail/tommy /home/tommy/mail

2.create soft link to /var/mail
#ln -s /home/tommy/mail/tommy

check disk setup

1.use mount to check disk status
#mount

2.use swapinfo to check variable swap partition
#swapinfo -h

3.use df to check partitions usage
#df -h

4.show slice of the disk
#fdisk /dev/ad0s1