日韩黑丝制服一区视频播放|日韩欧美人妻丝袜视频在线观看|九九影院一级蜜桃|亚洲中文在线导航|青草草视频在线观看|婷婷五月色伊人网站|日本一区二区在线|国产AV一二三四区毛片|正在播放久草视频|亚洲色图精品一区

分享

Apache源碼安裝

 怡紅公子0526 2021-01-11

1 下載安裝包

apr-1.7.0.tar.gz
apr-util-1.6.1.tar.gz
pcre-8.43.tar.gz
httpd-2.4.41.tar.gz
https://github.com/purple910/Linux

2 解壓

tar -zxf apr-1.7.0.tar.gz
tar -zxf apr-util-1.6.1.tar.gz
tar -zxf pcre-8.43.tar.gz
tar -zxf httpd-2.4.41.tar.gz

3 添加httpd對于apr,apr-util,pcre的依賴

cp -r apr-1.7.0 httpd-2.4.41/srclib/apr
cp -r util-1.6.1 httpd-2.4.41/srclib/apr-util
cp -r pcre-8.43 httpd-2.4.41/srclib/pcre

4 安裝apr

cd apr-1.7.0
gedit configure(將 $RM "$cfgfile" 注釋掉)
./configure --prefix=/usr/local/src/apr
make && make install

5 安裝apr-util

cd .././apr-util-1.6.1
./configure –prefix=/usr/local/src/apr-util –with-apr=/usr/local/src/apr
make && make install
(如果報錯 缺少expat.h)
yum install -y expat-devel.x86_64

6 安裝prce

cd .././ pcre-8.43
./configure –prefix=/usr/local/src/pcre
make && make install

7 安裝httpd

cd .././ httpd-2.4.41
./configure --with-included-apr --sysconfdir=/etc/httpd --prefix=/usr/local/src/apache2.4 --with-apr=/usr/local/src/apr --with-apr-util=/usr/local/src/apr-util --with-pcre=/usr/local/src/pcre --enable-so --enable-unixd --enable-rewrite
make && make install

8 關(guān)閉防火墻

server firewall stop

9 編輯httpd的配置文件

vim /etc/httpd/httpd.conf
#ServerName www.example.com:80
ServerName 172.0.0.1:80

10 添加apache的快捷方式

cp /usr/local/src/apache2.4/bin/apachectl  /etc/init.d/httpd
ln -s /etc/init.d/httpd /etc/rc.d/S85httpd

11 修改httpd

 vim /etc/rc.d/init.d/httpd
# chkconfig: 345 85 15
# description: Activates/Deactivates Apache Web Server

12 運行httpd

server httpd start
AH00558: httpd: Could not reliably determine the server's fully qualified domain name,using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message

    本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多