标签:
二、Linux服务管理
[root@centos ~]# vi /etc/rc.local      1 #!/bin/sh      2 #      3 # This script will be executed *after* all the other init scripts.      4 # You can put your own initialization stuff in here if you don‘t      5 # want to do the full Sys V style init stuff.      6       7 touch /var/lock/subsys/local      8 /etc/rc.d/init.d/httpd start       [root@centos init.d]# lsabrt-ccpp         cpuspeed      iptables      netfs        psacct       rsyslog    udev-postabrtd             crond         irqbalance    network      quota_nld    sandbox    winbindabrt-oops         cups          kdump         nfs          rdisc        saslauthd  ypbindacpid             functions     killall       nfslock      restorecond  singleatd               haldaemon     lvm2-lvmetad  ntpd         rngd         smartdauditd            halt          lvm2-monitor  ntpdate      rpcbind      sshdautofs            htcacheclean  mdmonitor     oddjobd      rpcgssd      sssdblk-availability  httpd         messagebus    portreserve  rpcidmapd    sysstatcertmonger        ip6tables     netconsole    postfix      rpcsvcgssd   tomcat61、RPM包安装服务独立的服务启动: ① /etc/rc.d/init.d/httpd start 推荐② service httpd start自启动:① chkconfig --level 2345 httpd on|off② vi /etc/rc.local 推荐/etc/rc.d/init.d/httpd start基于xinetd的服务(越来越少了,不讲了)2、源码包服务启动: /usr/local/apache2/bin/apachect1 start自启动: vi /etc/rc.local/usr/local/apache2/bin/apachect1 start
源码包的安装位置:/usr/local/RPM包的安装位置:/etc/rc.d/init.d
[root@localhost ~]# ps aux |grep crondroot      1364  0.0  0.1   7148  1284 ?        Ss   17:34   0:01 crondroot      1592  0.0  0.0   5980   728 pts/0    S+   18:16   0:00 grep crond标签:
原文地址:http://www.cnblogs.com/lxw89/p/4683082.html