centos7安装httpd服务编译安装apache要注意的事情
2021-03-05 21:26
标签:org fir link expires centos7安装 注意 systemctl rem ali Pcre 下载地址 yum install gcc gcc-c++ -y 这个必须要安装,否则会报错 [root@yeshuai ~]# tar zxf apr-util-1.5.4.tar.gz Apache 安装过程 1.下载apache 历史版本下载: [root@yeshuai ~]# wget http://archive.apache.org/dist/httpd/httpd-2.4.33.tar.gz --enable-expires \ [root@yeshuai httpd-2.4.33]# make && make install [root@yeshuai ~]# /usr/local/apache2.4.33/bin/apachectl 这里会发现 centos图形界面能打开网站,其他主机却打不开,这里是因为防火墙未关闭 [root@yeshuai conf]# systemctl stop firewalld.service centos7安装httpd服务编译安装apache要注意的事情 标签:org fir link expires centos7安装 注意 systemctl rem ali 原文地址:https://blog.51cto.com/duanyexuanmu/2495817
http://archive.apache.org/dist
wget http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz
wget http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz
wget https://ftp.pcre.org/pub/pcre/pcre-8.38.tar.gz
[root@yeshuai ~]# ll
总用量 3876
-rw-------. 1 root root 1227 10月 1 2019 anaconda-ks.cfg
-rw-r--r--. 1 root root 1031613 4月 29 2015 apr-1.5.2.tar.gz
-rw-r--r--. 1 root root 874044 9月 20 2014 apr-util-1.5.4.tar.gz
-rw-r--r--. 1 root root 2053336 7月 21 2017 pcre-8.38.tar.gz
[root@yeshuai ~]#
[root@yeshuai ~]# tar zxf apr-1.5.2.tar.gz
[root@yeshuai ~]# cd apr-1.5.2
[root@yeshuai ~]# ./configure --prefix=/usr/local/apr
[root@yeshuai ~]# make && make install
[root@yeshuai ~]# cd apr-util-1.5
[root@yeshuaiapr-util-1.5.4]#./configure --prefix=/usr/local/web/apr-util -with-apr=/usr/local/apr
[root@yeshuai apr-util-1.5.4]# make && make install
[root@yeshuai ~]# tar zxf pcre-8.38.tar.gz
[root@yeshuai ~]# cd pcre-8.38
[root@yeshuai pcre-8.38]# ./configure --prefix=/usr/local/pcre
[root@yeshuai pcre-8.38]# make && make install
http://archive.apache.org/dist/httpd/
[root@yeshuai ~]# tar zxf httpd-2.4.33.tar.gz
[root@yeshuai ~]# cd httpd-2.4.33
[root@yeshuaihttpd-2.4.33]#./configure --prefix=/usr/local/apache2.4.33\
--enable-headers \
--enable--modules=most \
--enable-so \
--enable-rewrite \
--with-mpm=worker \
--with-apr=/usr/local/apr \
--with-apr-util=/usr/local/web/apr-util \
--with-pcre=/usr/local/pcre
AH00558: httpd: Could not reliably determine the server‘s fully qualified domain name, using fe80::20b7:18c6:149e:92fd. Set the ‘ServerName‘ directive globally to suppress this message
Vi /usr/local/apache2.4.33/conf
把httpd.conf中的#ServerName www.example.com:80 注释取消掉
[root@yeshuai conf]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@yeshuai conf]#
下一篇:Laravel 上传文件到阿里云
文章标题:centos7安装httpd服务编译安装apache要注意的事情
文章链接:http://soscw.com/index.php/essay/60616.html