Set the self-installation of Apache servers

zhaozj2021-02-11  207

Set the self-installation of Apache servers

Skill administrator (2000-12-21 15:02) 〖Back〗 〖Forward〗

In the redhat6.2 environment, editing files /etc/rc.d/init.d/functions will: export path = "/ sbin: / usr / sbin: / bin: / usr / bin: / usr / x11r6 / bin" Modify to: export path = "/ sbin: / usr / sbin: / bin: / usr / bin: / usr / local / apache / bin" Among the following / usr / local / apache / bin Create a file for your apache and create a file content in /etc/rc.d/init.d: ​​#! / Bin / sh # # Startup script for the apache Web Server # # chkconfig: 345 85 15 # Description: Apache is a world wide web server. It is buy and cgi # html files and cgi. # Processname: httpd # pidfile: /var/run/httpd.pid # config: /etc/httpd/conf/access.conf # config: /etc/httpd/conf/httpd.conf # config: /etc/httpd/conf/srm.conf # source function library.. /etc/rc.d/init.d/functions # see how wee were called. cas $ 1 "in start) echo -n" starting httpd: "daemon httpd echo touch / var / lock / subsys / httpd ;; stop) echo -n" shutting down http: "KillProc httpd echo rm -f / var / lock / subsys / httpd rm -f /var/run/httpd.pid ;; status) status httpd ;; restart $ 0 START ;; RELOAD) Echo -n "reloading httpd:" KillProc httpd -hup ech o ;; *) Echo "Usage: $ 0 {start | stop | restart | reload | status}" EXIT 1 ESAC EXIT 0 and then modify the execution permission of the file is: chmod x httpd and then pass /etc/rc.d /init.d/httpd start Options if you can start HTTPD correctly, then set the Apache self-start: chkconfig --level 35 httpd ON can be installed, other servers: P

转载请注明原文地址:https://www.9cbs.com/read-3603.html

New Post(0)