Linux云计算架构-源码安装最新版apache2.4.46
1. 解决环境依赖
[root@server ~]
apr-1.6.2.tar.gz
apr-util-1.6.0.tar.gz
pcre-8.41.tar.gz
[root@server ~]
[root@server src]
[root@server src]
[root@server src]
[root@server src]
[root@server apr-1.6.2]
30951
[root@server apr-1.6.2]
[root@server apr-1.6.2]
[root@server apr-util-1.6.0]
[root@server apr-util-1.6.0]
[root@server apr-util-1.6.0]
[root@server pcre-8.41]
[root@server pcre-8.41]
2. 源码编译apache
[root@server ~]
[root@server src]
-rw-r--r--. 1 root root 9363314 8月 24 14:20 httpd-2.4.46.tar.gz
[root@server src]
[root@server src]
[root@server httpd-2.4.46]
[root@server httpd-2.4.46]
3. 检查apache并设置开机自启
[root@server ~]
-rw-r--r--. 1 root root 18597 8月 24 17:09 /usr/local/apache/conf/httpd.conf
[root@server ~]
index.html
[root@server ~]
[root@server ~]
[root@server ~]
[Unit]
Description=apache
After=network.target
[Service]
Type=forking
ExecStart=/etc/init.d/apachectl start
ExecReload=/etc/init.d/apachectl restart
ExecStop=/etc/init.d/apachectl stop
PrivateTmp=true
[Install]
WantedBy=multi-user.target
[root@server ~]
[root@server ~]
[root@server ~]
Created symlink from /etc/systemd/system/multi-user.target.wants/apache.service to /usr/lib/systemd/system/apache.service.
[root@server ~]
tcp6 0 0 :::80 :::* LISTEN 62282/httpd
udp 0 0 0.0.0.0:48010 0.0.0.0:* 6202/avahi-daemon:
[root@server ~]
root 62282 0.0 0.2 99468 2576 ? Ss 17:23 0:00 /usr/local/apache/bin/httpd -k start
daemon 62343 0.0 0.2 388380 2364 ? Sl 17:24 0:00 /usr/local/apache/bin/httpd -k start
daemon 62344 0.0 0.2 388380 2364 ? Sl 17:24 0:00 /usr/local/apache/bin/httpd -k start
daemon 62345 0.0 0.2 388380 2368 ? Sl 17:24 0:00 /usr/local/apache/bin/httpd -k start
root 62464 0.0 0.0 112724 984 pts/0 S+ 17:25 0:00 grep --color=auto apache
[root@server ~]
[root@server ~]
166 User apache
167 Group apache
[root@server ~]
[root@server ~]
[root@server ~]
root 62640 0.0 0.2 99468 2576 ? Ss 17:32 0:00 /usr/local/apache/bin/httpd -k start
apache 62679 0.0 0.2 388380 2372 ? Sl 17:33 0:00 /usr/local/apache/bin/httpd -k start
apache 62680 0.0 0.2 388380 2372 ? Sl 17:33 0:00 /usr/local/apache/bin/httpd -k start
apache 62681 0.0 0.2 388380 2372 ? Sl 17:33 0:00 /usr/local/apache/bin/httpd -k start
root 62773 0.0 0.0 112724 984 pts/0 S+ 17:33 0:00 grep --color=auto apache
[root@server ~]
80/tcp