linux yum安装的httpd设置自启动
yum自动安装的httpd设置开机启动
使用chkconfig httpd on命令直接添加
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2022-04-12 23:30:52 CST; 1min 59s ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 903 (httpd)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
Tasks: 6
Memory: 6.2M
CGroup: /system.slice/httpd.service
├─ 903 /usr/sbin/httpd -DFOREGROUND
├─1038 /usr/sbin/httpd -DFOREGROUND
├─1039 /usr/sbin/httpd -DFOREGROUND
├─1040 /usr/sbin/httpd -DFOREGROUND
├─1041 /usr/sbin/httpd -DFOREGROUND
└─1042 /usr/sbin/httpd -DFOREGROUND
Apr 12 23:30:52 iZi5c01zlzty3fa2c2ftpiZ systemd[1]: Starting The Apache HTTP Server...
Apr 12 23:30:52 iZi5c01zlzty3fa2c2ftpiZ httpd[903]: [Tue Apr 12 23:30:52.580517 2022] [so:warn] [pid 903] ...ping
Apr 12 23:30:52 iZi5c01zlzty3fa2c2ftpiZ httpd[903]: [Tue Apr 12 23:30:52.580595 2022] [so:warn] [pid 903] ...ping
Apr 12 23:30:52 iZi5c01zlzty3fa2c2ftpiZ httpd[903]: [Tue Apr 12 23:30:52.580603 2022] [so:warn] [pid 903] ...ping
Apr 12 23:30:52 iZi5c01zlzty3fa2c2ftpiZ httpd[903]: [Tue Apr 12 23:30:52.580610 2022] [so:warn] [pid 903] ...ping
Apr 12 23:30:52 iZi5c01zlzty3fa2c2ftpiZ httpd[903]: [Tue Apr 12 23:30:52.580616 2022] [so:warn] [pid 903] ...ping
Apr 12 23:30:52 iZi5c01zlzty3fa2c2ftpiZ httpd[903]: AH00558: httpd: Could not reliably determine the serve...sage
Apr 12 23:30:52 iZi5c01zlzty3fa2c2ftpiZ systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.
为什么要手动安装?
1、系统自带版本太低,但是有外网情况下,可以删除后查看yum源中httpd版本,内网只能手动安装。 2、教程好多都是手动安装,随大流了。 3、高手嫌弃自动安装找不到文件。
手动安装httpd
参考 手动安装httpd
|