60系统常用服务启停
问题描述
6.0.60系统常用服务启停
适用范围
linx-6.0.60
linx-6.0.80
linx-6.0.100
解决方案
1. ftp服务
端口:21
服务启停命令
启动:/etc/init.d/proftpd start
停止:/etc/init.d/proftpd stop
重启:/etc/init.d/proftpd restart
查看状态:/etc/init.d/proftpd status
开机自启和关闭命令
开机自启:chkconfig proftpd on
开机不启动:chkconfig proftpd off
端口:22
服务启停命令
启动:/etc/init.d/ssh start
停止:/etc/init.d/ssh stop
重启:/etc/init.d/ssh restart
查看状态:/etc/init.d/ssh status
开机自启和关闭命令
开机自启:chkconfig ssh on
开机不启动:chkconfig ssh off
3. networking网络服务
服务启停命令
启动:/etc/init.d/networking start
停止:/etc/init.d/networking stop
重启:/etc/init.d/networking restart
查看状态:/etc/init.d/networking status
开机自启和关闭命令
开机自启:chkconfig proftpd on
开机不启动:chkconfig proftpd off
4. telnet服务
端口:23
服务启停
停止:sed -i "/^telnet/s/^/#/" /etc/inetd.conf
/etc/init.d/openbsd-inetd restart
开启:sed -i "/^#telnet/s/#//" /etc/inetd.conf
/etc/init.d/openbsd-inetd restart
5. dns服务
端口:23
服务启停
启动:/etc/init.d/bind9 start
停止:/etc/init.d/bind9 stop
重启:/etc/init.d/bind9 restart
查看状态:/etc/init.d/bind9 status
开机自启和关闭命令
开机自启:chkconfig bind9 on
开机不启动:chkconfig bind9 off
6. apache服务
端口:80
服务启停
启动:/etc/init.d/apache2 start
停止:/etc/init.d/apache2 stop
重启:/etc/init.d/apache2 restart
查看状态:/etc/init.d/apache2 status
开机自启和关闭命令
开机自启:chkconfig apache2 on
开机不启动:chkconfig apache2 off
7. tomcat服务
端口:8080
服务启停
启动:/etc/init.d/tomcat6 start
停止:/etc/init.d/tomcat6 stop
重启:/etc/init.d/tomcat6 restart
查看状态:/etc/init.d/tomcat6 status
开机自启和关闭命令
开机自启:chkconfig tomcat6 on
开机不启动:chkconfig tomcat6 off
8. ntp服务
端口:123
服务启停
启动:/etc/init.d/ntp start
停止:/etc/init.d/ntp stop
重启:/etc/init.d/ntp restart
查看状态:/etc/init.d/ntp status
开机自启和关闭命令
开机自启:chkconfig ntp on
开机不启动:chkconfig ntp off
9. samba服务
端口:445
服务启停
启动:/etc/init.d/samba start
停止:/etc/init.d/samba stop
重启:/etc/init.d/samba restart
查看状态:/etc/init.d/samba status
开机自启和关闭命令
开机自启:chkconfig samba on
开机不启动:chkconfig samba off
10. swat服务
端口:901
服务启停
停止:sed -i "/^swat/s/^/#/" /etc/inetd.conf
/etc/init.d/openbsd-inetd restart
开启:sed -i "/^#swat/s/#//" /etc/inetd.conf
/etc/init.d/openbsd-inetd restart
11. gdm3图形服务
服务启停
启动:/etc/init.d/gdm3 start
停止:/etc/init.d/gdm3 stop
重启:/etc/init.d/gdm3 restart
查看状态:/etc/init.d/gdm3 status
12. cron计划任务
服务启停
启动:/etc/init.d/cron start
停止:/etc/init.d/cron stop
重启:/etc/init.d/cron restart
查看状态:/etc/init.d/cron status
13. mysql服务
端口:3306
服务启停
启动:/etc/init.d/mysql start
停止:/etc/init.d/mysql stop
重启:/etc/init.d/mysql restart
查看状态:/etc/init.d/mysql status
开机自启和关闭命令
开机自启:chkconfig mysql on
开机不启动:chkconfig mysql off
14. rsyslog日志服务
服务启停
启动:/etc/init.d/rsyslog start
停止:/etc/init.d/rsyslog stop
重启:/etc/init.d/rsyslog restart
查看状态:/etc/init.d/rsyslog status
15. mcelog日志服务
服务启停
启动:/etc/init.d/mcelog start
停止:/etc/init.d/mcelog stop
重启:/etc/init.d/mcelog restart
查看状态:/etc/init.d/mcelog status
16. cups打印机服务
端口:631
服务启停
启动:/etc/init.d/cups start
停止:/etc/init.d/cups stop
重启:/etc/init.d/cups restart
查看状态:/etc/init.d/cups status
开机自启和关闭命令
开机自启:chkconfig cups on
开机不启动:chkconfig cups off
17. nfs服务
端口:2049
服务启停
启动:/etc/init.d/nfs-common start
/etc/init.d/nfs-kernel-server start
/etc/init.d/portmap start
停止:/etc/init.d/nfs-common stop
/etc/init.d/nfs-kernel-server stop
/etc/init.d/portmap stop
重启:/etc/init.d/nfs-common restart
/etc/init.d/nfs-kernel-server restart
/etc/init.d/portmap restart
查看状态:/etc/init.d/nfs-common status
/etc/init.d/nfs-kernel-server status
/etc/init.d/portmap status
开机自启和关闭命令
开机自启:chkconfig nfs-common on
chkconfig nfs-kernel-server on
chkconfig portmap on
开机不启动:chkconfig nfs-common on
chkconfig nfs-kernel-server on
chkconfig portmap on
18. snmpd服务
端口:161
服务启停
启动:/etc/init.d/snmpd start
停止:/etc/init.d/snmpd stop
重启:/etc/init.d/snmpd restart
查看状态:/etc/init.d/snmpd status
开机自启和关闭命令
开机自启:chkconfig snmpd on
开机不启动:chkconfig snmpd off
19. postfix服务
服务启停
启动:/etc/init.d/postfix start
停止:/etc/init.d/postfix stop
重启:/etc/init.d/postfix restart
查看状态:/etc/init.d/postfix status
开机自启和关闭命令
开机自启:chkconfig postfix on
开机不启动:chkconfig postfix off
20. avahi-daemon服务
服务启停
启动:/etc/init.d/avahi-daemon start
停止:/etc/init.d/avahi-daemon stop
重启:/etc/init.d/avahi-daemon restart
查看状态:/etc/init.d/avahi-daemon status
开机自启和关闭命令
开机自启:chkconfig avahi-daemon on
开机不启动:chkconfig avahi-daemon off