我有一个 Amazon Linux 实例,其中 Tomcat 在服务器启动期间启动。我想禁用它。Tomcat 未在chkconfig
或中列出/etc/rc.local
。如何找出它从哪里启动?启动实例时我没有将任何内容作为用户数据传递。我没有使用 opsworks/cloudformation/elasicbeanstalk。
# chkconfig --list
acpid 0:off 1:off 2:on 3:on 4:on 5:on 6:off
atd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
auditd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
blk-availability 0:off 1:on 2:on 3:on 4:on 5:on 6:off
cloud-config 0:off 1:off 2:on 3:on 4:on 5:on 6:off
cloud-final 0:off 1:off 2:on 3:on 4:on 5:on 6:off
cloud-init 0:off 1:off 2:on 3:on 4:on 5:on 6:off
cloud-init-local 0:off 1:off 2:on 3:on 4:on 5:on 6:off
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
ip6tables 0:off 1:off 2:on 3:on 4:on 5:on 6:off
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off
irqbalance 0:off 1:off 2:off 3:on 4:on 5:on 6:off
jexec 0:on 1:on 2:on 3:on 4:on 5:on 6:on
lvm2-monitor 0:off 1:on 2:on 3:on 4:on 5:on 6:off
mdmonitor 0:off 1:off 2:on 3:on 4:on 5:on 6:off
messagebus 0:off 1:off 2:on 3:on 4:on 5:on 6:off
monit 0:off 1:off 2:off 3:off 4:off 5:off 6:off
netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off
netfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
ntpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
ntpdate 0:off 1:off 2:on 3:on 4:on 5:on 6:off
psacct 0:off 1:off 2:off 3:off 4:off 5:off 6:off
racoon 0:off 1:off 2:off 3:off 4:off 5:off 6:off
rdisc 0:off 1:off 2:off 3:off 4:off 5:off 6:off
rsyslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off
saslauthd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off
sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
udev-post 0:off 1:on 2:on 3:on 4:on 5:on 6:off
ps 的输出显示 tomcat 在启动时运行。
ps-ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 15:01 ? 00:00:01 /sbin/init
root 2 0 0 15:01 ? 00:00:00 [kthreadd]
root 3 2 0 15:01 ? 00:00:00 [ksoftirqd/0]
root 4 2 0 15:01 ? 00:00:00 [kworker/0:0]
root 5 2 0 15:01 ? 00:00:00 [kworker/0:0H]
root 6 2 0 15:01 ? 00:00:00 [kworker/u2:0]
root 7 2 0 15:01 ? 00:00:00 [migration/0]
root 8 2 0 15:01 ? 00:00:00 [rcu_bh]
root 9 2 0 15:01 ? 00:00:01 [rcu_sched]
root 10 2 0 15:01 ? 00:00:00 [khelper]
root 11 2 0 15:01 ? 00:00:00 [kdevtmpfs]
root 12 2 0 15:01 ? 00:00:00 [netns]
root 13 2 0 15:01 ? 00:00:00 [kworker/u2:1]
root 19 2 0 15:01 ? 00:00:00 [xenwatch]
root 20 2 0 15:01 ? 00:00:01 [xenbus]
root 108 2 0 15:01 ? 00:00:00 [writeback]
root 110 2 0 15:01 ? 00:00:00 [kintegrityd]
root 111 2 0 15:01 ? 00:00:00 [bioset]
root 112 2 0 15:01 ? 00:00:00 [crypto]
root 114 2 0 15:01 ? 00:00:00 [kblockd]
root 122 2 0 15:01 ? 00:00:00 [xenbus_frontend]
root 126 2 0 15:01 ? 00:00:00 [kworker/0:1]
root 131 2 0 15:01 ? 00:00:00 [md]
root 229 2 0 15:01 ? 00:00:00 [khungtaskd]
root 234 2 0 15:01 ? 00:00:00 [kswapd0]
root 235 2 0 15:01 ? 00:00:00 [ksmd]
root 299 2 0 15:01 ? 00:00:00 [fsnotify_mark]
root 314 2 0 15:01 ? 00:00:00 [kthrotld]
root 321 2 0 15:01 ? 00:00:00 [khvcd]
root 364 2 0 15:01 ? 00:00:00 [deferwq]
root 631 2 0 15:01 ? 00:00:00 [jbd2/xvda1-8]
root 632 2 0 15:01 ? 00:00:00 [ext4-dio-unwrit]
root 667 1 0 15:01 ? 00:00:00 /sbin/udevd -d
root 690 667 0 15:01 ? 00:00:00 /sbin/udevd -d
root 691 667 0 15:01 ? 00:00:00 /sbin/udevd -d
root 841 2 0 15:01 ? 00:00:00 [jbd2/xvdb-8]
root 842 2 0 15:01 ? 00:00:00 [ext4-dio-unwrit]
root 873 2 0 15:01 ? 00:00:00 [kauditd]
root 1066 1 0 15:01 ? 00:00:00 /sbin/dhclient -q -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
root 1106 1 0 15:01 ? 00:00:00 auditd
root 1119 1 0 15:01 ? 00:00:00 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
dbus 1140 1 0 15:01 ? 00:00:00 dbus-daemon --system
root 1227 1 0 15:01 ? 00:00:00 /usr/sbin/sshd
root 1239 2 0 15:01 ? 00:00:00 [kworker/0:1H]
ntp 1246 1 0 15:01 ? 00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
root 1261 1 0 15:01 ? 00:00:00 sendmail: accepting connections
smmsp 1268 1 0 15:01 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
root 1289 1 2 15:01 ? 00:00:06 /usr/java/jdk1.7.0_03/bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-7.0.54/conf/logging.properties -Djava.
root 1295 1 0 15:01 ? 00:00:00 crond
root 1305 1 0 15:01 ? 00:00:00 /usr/sbin/atd
root 1351 1 0 15:01 hvc0 00:00:00 /sbin/agetty hvc0 38400 vt100-nav
root 1353 1 0 15:01 tty1 00:00:00 /sbin/mingetty /dev/tty1
root 1356 1 0 15:01 tty2 00:00:00 /sbin/mingetty /dev/tty2
root 1360 1 0 15:01 tty3 00:00:00 /sbin/mingetty /dev/tty3
root 1362 1 0 15:01 tty4 00:00:00 /sbin/mingetty /dev/tty4
root 1365 1 0 15:01 tty5 00:00:00 /sbin/mingetty /dev/tty5
root 1367 1 0 15:01 tty6 00:00:00 /sbin/mingetty /dev/tty6
root 1409 1227 0 15:06 ? 00:00:00 sshd: ec2-user [priv]
ec2-user 1411 1409 0 15:06 ? 00:00:00 sshd: ec2-user@pts/0
ec2-user 1412 1411 0 15:06 pts/0 00:00:00 -bash
root 1437 1412 0 15:06 pts/0 00:00:00 sudo su -
root 1438 1437 0 15:06 pts/0 00:00:00 su -
root 1439 1438 0 15:06 pts/0 00:00:00 -bash
root 1460 1439 0 15:06 pts/0 00:00:00 ps -ef