[root@hexingxing ~]#  chkconfig --list ## 查看所有开机启用服务项
auditd         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
blk-availability 0: 关闭 1: 启用 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
crond           0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
htcacheclean   0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
httpd           0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
ip6tables       0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
iptables       0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
iscsi           0: 关闭 1: 关闭 2: 关闭 3: 启用 4: 启用 5: 启用 6: 关闭
iscsid         0: 关闭 1: 关闭 2: 关闭 3: 启用 4: 启用 5: 启用 6: 关闭
lvm2-monitor   0: 关闭 1: 启用 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
mdmonitor       0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
multipathd     0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
netconsole     0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
netfs           0: 关闭 1: 关闭 2: 关闭 3: 启用 4: 启用 5: 启用 6: 关闭
network         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
nginx           0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
ntpd           0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
ntpdate         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
nyGuardd       0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
nyTerminald     0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
postfix         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
rdisc           0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
restorecond     0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
rsyslog         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
saslauthd       0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
sshd           0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
udev-post       0: 关闭 1: 启用 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
vsftpd         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
[root@hexingxing ~]#  service nginx start ## 开启 nginx 服务
正在启动 nginx:                                           [确定]
[root@hexingxing ~]#  chkconfig nginx on ## 设置 nginx 服务开机启用
[root@hexingxing ~]#  chkconfig --list ## 查看所有开机服务项,此时 nginx 已经开机开启服务
auditd         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
blk-availability 0: 关闭 1: 启用 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
crond           0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
htcacheclean   0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
httpd           0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
ip6tables       0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
iptables       0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
iscsi           0: 关闭 1: 关闭 2: 关闭 3: 启用 4: 启用 5: 启用 6: 关闭
iscsid         0: 关闭 1: 关闭 2: 关闭 3: 启用 4: 启用 5: 启用 6: 关闭
lvm2-monitor   0: 关闭 1: 启用 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
mdmonitor       0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
multipathd     0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
netconsole     0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
netfs           0: 关闭 1: 关闭 2: 关闭 3: 启用 4: 启用 5: 启用 6: 关闭
network         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
nginx           0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
ntpd           0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
ntpdate         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
nyGuardd       0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
nyTerminald     0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
postfix         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
rdisc           0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
restorecond     0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
rsyslog         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
saslauthd       0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
sshd           0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
udev-post       0: 关闭 1: 启用 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
vsftpd         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
[root@hexingxing ~]#  chkconfig httpd on ## 设置 apache 服务开机启用
[root@hexingxing ~]#  chkconfig --list ## 查看所有开机服务项,此时 apache 已经开机开启服务
auditd         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
blk-availability 0: 关闭 1: 启用 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
crond           0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
htcacheclean   0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
httpd           0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
ip6tables       0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
iptables       0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
iscsi           0: 关闭 1: 关闭 2: 关闭 3: 启用 4: 启用 5: 启用 6: 关闭
iscsid         0: 关闭 1: 关闭 2: 关闭 3: 启用 4: 启用 5: 启用 6: 关闭
lvm2-monitor   0: 关闭 1: 启用 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
mdmonitor       0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
multipathd     0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
netconsole     0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
netfs           0: 关闭 1: 关闭 2: 关闭 3: 启用 4: 启用 5: 启用 6: 关闭
network         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
nginx           0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
ntpd           0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
ntpdate         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
nyGuardd       0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
nyTerminald     0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
postfix         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
rdisc           0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
restorecond     0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
rsyslog         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
saslauthd       0: 关闭 1: 关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6: 关闭
sshd           0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
udev-post       0: 关闭 1: 启用 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
vsftpd         0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
[root@hexingxing ~]#  shutdown -r now  ##重启系统
[root@hexingxing ~]#  service nginx start ## 开启 nginx 服务,开启失败,由于现在 apache 和 nginx 已经全部是开机启用并都使用 80 端口,所以有冲突,要启用 nginx 需要停止 apache 服务
正在启动 nginx:nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
[失败]
[root@hexingxing ~]#  service httpd stop ## 停止 apache 服务
停止 httpd:                                               [确定]
[root@hexingxing ~]#  service nginx start ## 开启 nginx 服务,此时可以正常开启 nginx 服务
正在启动 nginx:                                           [确定]
[root@hexingxing ~]#  service httpd status ## 查看 apache 服务状态,已停止
httpd 已停止
[root@hexingxing ~]#  service nginx status ## 查看 nginx 服务状态,正在运行
nginx (pid  2978) 正在运行...
[root@hexingxing ~]#  service nginx stop ## 停止 nginx 服务
停止 nginx:                                               [确定]
[root@hexingxing ~]#  service httpd start ## 开启 apache 服务
正在启动 httpd:                                               [确定]
[root@hexingxing ~]#  ps -ef ## 查看正在运行的所有进程
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 19:16 ?        00:00:01 /sbin/init
root         2     0  0 19:16 ?        00:00:00 [kthreadd]
root         3     2  0 19:16 ?        00:00:00 [migration/0]
root         4     2  0 19:16 ?        00:00:00 [ksoftirqd/0]
root         5     2  0 19:16 ?        00:00:00 [stopper/0]
root         6     2  0 19:16 ?        00:00:00 [watchdog/0]
root         7     2  0 19:16 ?        00:00:00 [migration/1]
root         8     2  0 19:16 ?        00:00:00 [stopper/1]
root         9     2  0 19:16 ?        00:00:00 [ksoftirqd/1]
root        10     2  0 19:16 ?        00:00:00 [watchdog/1]
root        11     2  0 19:16 ?        00:00:02 [events/0]
root        12     2  0 19:16 ?        00:00:02 [events/1]
root        13     2  0 19:16 ?        00:00:00 [events/0]
root        14     2  0 19:16 ?        00:00:00 [events/1]
root        15     2  0 19:16 ?        00:00:00 [events_long/0]
root        16     2  0 19:16 ?        00:00:00 [events_long/1]
root        17     2  0 19:16 ?        00:00:00 [events_power_ef]
root        18     2  0 19:16 ?        00:00:00 [events_power_ef]
root        19     2  0 19:16 ?        00:00:00 [cgroup]
root        20     2  0 19:16 ?        00:00:00 [khelper]
root        21     2  0 19:16 ?        00:00:00 [netns]
root        22     2  0 19:16 ?        00:00:00 [async/mgr]
root        23     2  0 19:16 ?        00:00:00 [pm]
root        24     2  0 19:16 ?        00:00:00 [sync_supers]
root        25     2  0 19:16 ?        00:00:00 [bdi-default]
root        26     2  0 19:16 ?        00:00:00 [kintegrityd/0]
root        27     2  0 19:16 ?        00:00:00 [kintegrityd/1]
root        28     2  0 19:16 ?        00:00:00 [kblockd/0]
root        29     2  0 19:16 ?        00:00:00 [kblockd/1]
root        30     2  0 19:16 ?        00:00:00 [kacpid]
root        31     2  0 19:16 ?        00:00:00 [kacpi_notify]
root        32     2  0 19:16 ?        00:00:00 [kacpi_hotplug]
root        33     2  0 19:16 ?        00:00:00 [ata_aux]
root        34     2  0 19:16 ?        00:00:00 [ata_sff/0]
root        35     2  0 19:16 ?        00:00:00 [ata_sff/1]
root        36     2  0 19:16 ?        00:00:00 [ksuspend_usbd]
root        37     2  0 19:16 ?        00:00:00 [khubd]
root        38     2  0 19:16 ?        00:00:00 [kseriod]
root        39     2  0 19:16 ?        00:00:00 [md/0]
root        40     2  0 19:16 ?        00:00:00 [md/1]
root        41     2  0 19:16 ?        00:00:00 [md_misc/0]
root        42     2  0 19:16 ?        00:00:00 [md_misc/1]
root        43     2  0 19:16 ?        00:00:00 [linkwatch]
root        46     2  0 19:16 ?        00:00:00 [khungtaskd]
root        47     2  0 19:16 ?        00:00:00 [kswapd0]
root        48     2  0 19:16 ?        00:00:00 [ksmd]
root        49     2  0 19:16 ?        00:00:00 [khugepaged]
root        50     2  0 19:16 ?        00:00:00 [aio/0]
root        51     2  0 19:16 ?        00:00:00 [aio/1]
root        52     2  0 19:16 ?        00:00:00 [crypto/0]
root        53     2  0 19:16 ?        00:00:00 [crypto/1]
root        60     2  0 19:16 ?        00:00:00 [kthrotld/0]
root        61     2  0 19:16 ?        00:00:00 [kthrotld/1]
root        62     2  0 19:16 ?        00:00:00 [pciehpd]
root        64     2  0 19:16 ?        00:00:00 [kpsmoused]
root        65     2  0 19:16 ?        00:00:00 [usbhid_resumer]
root        66     2  0 19:16 ?        00:00:00 [deferwq]
root        98     2  0 19:16 ?        00:00:00 [kdmremove]
root        99     2  0 19:16 ?        00:00:00 [kstriped]
root       132     2  0 19:16 ?        00:00:00 [ttm_swap]
root       253     2  0 19:16 ?        00:00:00 [mpt_poll_0]
root       254     2  0 19:16 ?        00:00:00 [mpt/0]
root       255     2  0 19:16 ?        00:00:00 [scsi_eh_0]
root       258     2  0 19:16 ?        00:00:00 [scsi_eh_1]
root       259     2  0 19:16 ?        00:00:00 [scsi_eh_2]
root       379     2  0 19:16 ?        00:00:00 [jbd2/sda3-8]
root       380     2  0 19:16 ?        00:00:00 [ext4-dio-unwrit]
root       418     2  0 19:16 ?        00:00:00 [flush-8:0]
root       471     1  0 19:16 ?        00:00:00 /sbin/udevd -d
root       645     2  0 19:16 ?        00:00:00 [vmmemctl]
root       842     2  0 19:16 ?        00:00:00 [jbd2/sda1-8]
root       843     2  0 19:16 ?        00:00:00 [ext4-dio-unwrit]
root       844     2  0 19:16 ?        00:00:00 [jbd2/sdb1-8]
root       845     2  0 19:16 ?        00:00:00 [ext4-dio-unwrit]
root       881     2  0 19:16 ?        00:00:00 [kauditd]
root      1804     1  0 19:16 ?        00:00:00 auditd
root      1826     1  0 19:16 ?        00:00:00 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
root      1895     1  0 19:16 ?        00:00:00 /usr/sbin/sshd
ntp       1923     1  0 19:16 ?        00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
root      1937     1  0 19:16 ?        00:00:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
root      1947     1  0 19:16 ?        00:00:01 /usr/local/nyTerminald/nyterminal
root      2039     1  0 19:16 ?        00:00:00 /usr/libexec/postfix/master
postfix   2045  2039  0 19:16 ?        00:00:00 pickup -l -t fifo -u
postfix   2046  2039  0 19:16 ?        00:00:00 qmgr -l -t fifo -u
root      2093     1  0 19:16 ?        00:00:01 /usr/local/nyTerminald/nyguard
root      2107     1  0 19:16 ?        00:00:01 crond
root      2820     1  0 19:17 tty1     00:00:00 /sbin/mingetty /dev/tty1
root      2822     1  0 19:17 tty2     00:00:00 /sbin/mingetty /dev/tty2
root      2824     1  0 19:17 tty3     00:00:00 /sbin/mingetty /dev/tty3
root      2828     1  0 19:17 tty4     00:00:00 /sbin/mingetty /dev/tty4
root      2830   471  0 19:17 ?        00:00:00 /sbin/udevd -d
root      2831     1  0 19:17 tty5     00:00:00 /sbin/mingetty /dev/tty5
root      2832   471  0 19:17 ?        00:00:00 /sbin/udevd -d
root      2834     1  0 19:17 tty6     00:00:00 /sbin/mingetty /dev/tty6
root      2872  1895  0 19:19 ?        00:00:00 sshd: root@pts/0
root      2876  2872  0 19:19 pts/0    00:00:00 -bash
root      3232     1  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3234  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3235  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3236  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3237  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3238  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3239  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3240  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3241  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
root      3909  2876  0 20:04 pts/0    00:00:00 ps -ef
[root@hexingxing ~]#  ps -ef | grep apache ## 筛选 apache 的进程
apache    3234  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3235  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3236  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3237  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3238  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3239  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3240  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3241  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
root      3959  2876  0 20:06 pts/0    00:00:00 grep apache
[root@hexingxing ~]#  ps -ef | grep httpd ## 筛选以 httpd 为进程名的 apache 的进程
root      3232     1  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3234  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3235  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3236  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3237  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3238  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3239  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3240  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
apache    3241  3232  0 19:30 ?        00:00:00 /usr/sbin/httpd
root      3927  2876  0 20:05 pts/0    00:00:00 grep httpd
[root@hexingxing ~]#  ps -ef | grep nginx ## 筛选 nginx 的进程,没有在运行的进程,因为前面已经停止了 nginx 的服务
root      3994  2876  0 20:08 pts/0    00:00:00 grep nginx
[root@hexingxing ~]#  kill 3232 ## 终止 3232 PPID 的进程,也就是 apache 的主进程
[root@hexingxing ~]#  kill 3232 ## 再次终止 3232 PPID 的进程,显示没有那个进程,说明已经终止掉了
-bash: kill: (3232) - 没有那个进程
[root@hexingxing ~]#  ps -ef | grep apache ## 筛选 apache 的进程,没有在运行的进程,已经完全终止掉了
root      4062  2876  0 20:13 pts/0    00:00:00 grep apache
[root@hexingxing ~]#  ps -ef ##查看整体的进程也没有了 apache 的进程服务
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 19:16 ?        00:00:01 /sbin/init
root         2     0  0 19:16 ?        00:00:00 [kthreadd]
root         3     2  0 19:16 ?        00:00:00 [migration/0]
root         4     2  0 19:16 ?        00:00:00 [ksoftirqd/0]
root         5     2  0 19:16 ?        00:00:00 [stopper/0]
root         6     2  0 19:16 ?        00:00:00 [watchdog/0]
root         7     2  0 19:16 ?        00:00:00 [migration/1]
root         8     2  0 19:16 ?        00:00:00 [stopper/1]
root         9     2  0 19:16 ?        00:00:00 [ksoftirqd/1]
root        10     2  0 19:16 ?        00:00:00 [watchdog/1]
root        11     2  0 19:16 ?        00:00:02 [events/0]
root        12     2  0 19:16 ?        00:00:03 [events/1]
root        13     2  0 19:16 ?        00:00:00 [events/0]
root        14     2  0 19:16 ?        00:00:00 [events/1]
root        15     2  0 19:16 ?        00:00:00 [events_long/0]
root        16     2  0 19:16 ?        00:00:00 [events_long/1]
root        17     2  0 19:16 ?        00:00:00 [events_power_ef]
root        18     2  0 19:16 ?        00:00:00 [events_power_ef]
root        19     2  0 19:16 ?        00:00:00 [cgroup]
root        20     2  0 19:16 ?        00:00:00 [khelper]
root        21     2  0 19:16 ?        00:00:00 [netns]
root        22     2  0 19:16 ?        00:00:00 [async/mgr]
root        23     2  0 19:16 ?        00:00:00 [pm]
root        24     2  0 19:16 ?        00:00:00 [sync_supers]
root        25     2  0 19:16 ?        00:00:00 [bdi-default]
root        26     2  0 19:16 ?        00:00:00 [kintegrityd/0]
root        27     2  0 19:16 ?        00:00:00 [kintegrityd/1]
root        28     2  0 19:16 ?        00:00:00 [kblockd/0]
root        29     2  0 19:16 ?        00:00:00 [kblockd/1]
root        30     2  0 19:16 ?        00:00:00 [kacpid]
root        31     2  0 19:16 ?        00:00:00 [kacpi_notify]
root        32     2  0 19:16 ?        00:00:00 [kacpi_hotplug]
root        33     2  0 19:16 ?        00:00:00 [ata_aux]
root        34     2  0 19:16 ?        00:00:00 [ata_sff/0]
root        35     2  0 19:16 ?        00:00:00 [ata_sff/1]
root        36     2  0 19:16 ?        00:00:00 [ksuspend_usbd]
root        37     2  0 19:16 ?        00:00:00 [khubd]
root        38     2  0 19:16 ?        00:00:00 [kseriod]
root        39     2  0 19:16 ?        00:00:00 [md/0]
root        40     2  0 19:16 ?        00:00:00 [md/1]
root        41     2  0 19:16 ?        00:00:00 [md_misc/0]
root        42     2  0 19:16 ?        00:00:00 [md_misc/1]
root        43     2  0 19:16 ?        00:00:00 [linkwatch]
root        46     2  0 19:16 ?        00:00:00 [khungtaskd]
root        47     2  0 19:16 ?        00:00:00 [kswapd0]
root        48     2  0 19:16 ?        00:00:00 [ksmd]
root        49     2  0 19:16 ?        00:00:00 [khugepaged]
root        50     2  0 19:16 ?        00:00:00 [aio/0]
root        51     2  0 19:16 ?        00:00:00 [aio/1]
root        52     2  0 19:16 ?        00:00:00 [crypto/0]
root        53     2  0 19:16 ?        00:00:00 [crypto/1]
root        60     2  0 19:16 ?        00:00:00 [kthrotld/0]
root        61     2  0 19:16 ?        00:00:00 [kthrotld/1]
root        62     2  0 19:16 ?        00:00:00 [pciehpd]
root        64     2  0 19:16 ?        00:00:00 [kpsmoused]
root        65     2  0 19:16 ?        00:00:00 [usbhid_resumer]
root        66     2  0 19:16 ?        00:00:00 [deferwq]
root        98     2  0 19:16 ?        00:00:00 [kdmremove]
root        99     2  0 19:16 ?        00:00:00 [kstriped]
root       132     2  0 19:16 ?        00:00:00 [ttm_swap]
root       253     2  0 19:16 ?        00:00:00 [mpt_poll_0]
root       254     2  0 19:16 ?        00:00:00 [mpt/0]
root       255     2  0 19:16 ?        00:00:00 [scsi_eh_0]
root       258     2  0 19:16 ?        00:00:00 [scsi_eh_1]
root       259     2  0 19:16 ?        00:00:00 [scsi_eh_2]
root       379     2  0 19:16 ?        00:00:00 [jbd2/sda3-8]
root       380     2  0 19:16 ?        00:00:00 [ext4-dio-unwrit]
root       418     2  0 19:16 ?        00:00:00 [flush-8:0]
root       471     1  0 19:16 ?        00:00:00 /sbin/udevd -d
root       645     2  0 19:16 ?        00:00:00 [vmmemctl]
root       842     2  0 19:16 ?        00:00:00 [jbd2/sda1-8]
root       843     2  0 19:16 ?        00:00:00 [ext4-dio-unwrit]
root       844     2  0 19:16 ?        00:00:00 [jbd2/sdb1-8]
root       845     2  0 19:16 ?        00:00:00 [ext4-dio-unwrit]
root       881     2  0 19:16 ?        00:00:00 [kauditd]
root      1804     1  0 19:16 ?        00:00:00 auditd
root      1826     1  0 19:16 ?        00:00:00 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
root      1895     1  0 19:16 ?        00:00:00 /usr/sbin/sshd
ntp       1923     1  0 19:16 ?        00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
root      1937     1  0 19:16 ?        00:00:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
root      1947     1  0 19:16 ?        00:00:01 /usr/local/nyTerminald/nyterminal
root      2039     1  0 19:16 ?        00:00:00 /usr/libexec/postfix/master
postfix   2045  2039  0 19:16 ?        00:00:00 pickup -l -t fifo -u
postfix   2046  2039  0 19:16 ?        00:00:00 qmgr -l -t fifo -u
root      2093     1  0 19:16 ?        00:00:01 /usr/local/nyTerminald/nyguard
root      2107     1  0 19:16 ?        00:00:01 crond
root      2820     1  0 19:17 tty1     00:00:00 /sbin/mingetty /dev/tty1
root      2822     1  0 19:17 tty2     00:00:00 /sbin/mingetty /dev/tty2
root      2824     1  0 19:17 tty3     00:00:00 /sbin/mingetty /dev/tty3
root      2828     1  0 19:17 tty4     00:00:00 /sbin/mingetty /dev/tty4
root      2830   471  0 19:17 ?        00:00:00 /sbin/udevd -d
root      2831     1  0 19:17 tty5     00:00:00 /sbin/mingetty /dev/tty5
root      2832   471  0 19:17 ?        00:00:00 /sbin/udevd -d
root      2834     1  0 19:17 tty6     00:00:00 /sbin/mingetty /dev/tty6
root      2872  1895  0 19:19 ?        00:00:00 sshd: root@pts/0
root      2876  2872  0 19:19 pts/0    00:00:00 -bash
root      4063  2876  0 20:13 pts/0    00:00:00 ps -ef
[root@hexingxing ~]#  chkconfig --list | grep httpd  ##查看开机启用的服务,筛选 apache 的服务
httpd           0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
[root@hexingxing ~]#  chkconfig --list | grep nginx ##查看开机启用的服务,筛选 nginx 的服务
nginx           0: 关闭 1: 关闭 2: 启用 3: 启用 4: 启用 5: 启用 6: 关闭
[root@hexingxing ~]#  service httpd start ##开启 apache 服务
正在启动 httpd:                                               [确定]
[root@hexingxing ~]#  service nginx start ##开启 nginx 服务,开启失败,由于前面已经开始了 apache ,所以启用失败
正在启动 nginx:nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
[失败]
[root@hexingxing ~]#  service nginx status ##查看 nginx 服务状态,已经停止
nginx 已停止
[root@hexingxing ~]#  service httpd status ##查看 apache 服务状态,正在运行
httpd (pid  5578) 正在运行...

何星星原创文章仅用于个人学习,当前页面暂不支持复制操作,了解详情或文章转载请 点此 继续!

0 条评论

发表回复

Avatar placeholder

您的电子邮箱地址不会被公开。 必填项已用*标注