さくらのVPS セットアップ備忘録 (2) - Tomcatインストールの続き

Tomcatインストール・設定の続きから。


$vi /etc/init.d/tomcat
# 作成
$chmod +x /etc/init.d/tomcat
$chkconfig --add tomcat
$chkconfig tomcat on
$chkconfig --list tomcat
$/etc/init.d/tomcat start
Starting tomcat:
Using CATALINA_BASE: _ /usr/local/tomcat
Using CATALINA_HOME: _ /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: ______ /usr/java/jdk1.6.0_21
Using CLASSPATH: _____ /usr/local/tomcat/bin/bootstrap.jar

ブラウザから8080にアクセスして、キモ猫さんに逢えるのを確認。8080ポートのコネクタは後で閉じておく。

現状確認。


$netstat -lanput
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address _____________ Foreign Address State _PID/Program name
tcp _______0 _____0 0.0.0.0:3306 ______________ 0.0.0.0:* ______LISTEN 1764/mysqld
tcp _______0 _____0 127.0.0.1:25 ______________ 0.0.0.0:* ______LISTEN 1523/sendmail: acce
tcp _______0 _____0 ::ffff:127.0.0.1:8005 _____ :::* ___________LISTEN 7623/java
tcp _______0 _____0 :::8009 ___________________ :::* ___________LISTEN 7623/java
tcp _______0 _____0 :::8080 ___________________ :::* ___________LISTEN 7623/java
tcp _______0 _____0 :::80 _____________________ :::* ___________LISTEN 1608/httpd
tcp _______0 _____0 :::22 _____________________ :::* ___________LISTEN 1494/sshd
udp _______0 _____0 59.106.172.187:123 ________ 0.0.0.0:* ____________ 1505/ntpd
udp _______0 _____0 127.0.0.1:123 _____________ 0.0.0.0:* ____________ 1505/ntpd
udp _______0 _____0 0.0.0.0:123 _______________ 0.0.0.0:* ____________ 1505/ntpd
udp _______0 _____0 fe80::5054:ff:fe00:1149:123 :::* _________________ 1505/ntpd
udp _______0 _____0 ::1:123 ___________________ :::* _________________ 1505/ntpd
udp _______0 _____0 :::123 ____________________ :::* _________________ 1505/ntpd
$
$free

_____________total __used ___free shared buffers cached
Mem: _______510532 501664 ___8868 _____0 __25384 351344
-/+ buffers/cache: 124936 _385596
Swap: _____2048276 ____84 2048192
$
$df

Filesystem 1K-blocks ___Used Available Use% Mounted on
/dev/hda2 __18516492 2253716 _15322172 _13% /
/dev/hda1 ____101086 __17847 ____78020 _19% /boot
tmpfs ________255264 ______0 ___255264 __0% /dev/shm