連接:https://pan.baidu.com/s/11X5CEWoVemxlGuNQqn9cuA
提取碼:jn6l
複製這段內容後打開百度網盤手機App,操做更方便哦php
[root@lamp ~]# smbclient -L //192.168.100.3/ Sharename Type Comment --------- ---- ------- LAMP-C7 Disk [root@lamp ~]# mount.cifs //192.168.100.3/LAMP-C7 /mnt //遠程掛載軟件包到/mnt目錄 [root@lamp ~]# cd /mnt //進入/mnt目錄 [root@lamp mnt]# ls //查看獲取到的源碼包 apr-1.6.2.tar.gz install_lamp.sh apr-util-1.6.0.tar.gz mysql-5.6.26.tar.gz Discuz_X2.5_SC_UTF8.zip php-5.6.11.tar.bz2 httpd-2.4.29.tar.bz2
[root@lamp mnt]# tar zxvf apr-1.6.2.tar.gz -C /opt/ ... [root@lamp mnt]# tar zxvf apr-util-1.6.0.tar.gz -C /opt/ .... [root@lamp mnt]# tar jxvf httpd-2.4.29.tar.bz2 -C /opt/ ... [root@lamp mnt]# cd /opt //進入/opt目錄 [root@lamp opt]# ls //查看解壓的文件 apr-1.6.2 apr-util-1.6.0 httpd-2.4.29 rh
[root@lamp opt]# mv apr-1.6.2/ httpd-2.4.29/srclib/apr [root@lamp opt]# mv apr-util-1.6.0/ httpd-2.4.29/srclib/apr-util [root@lamp opt]# yum clean all [root@lamp opt]# yum list #安裝環境必要軟件包 [root@lamp opt]# yum -y install \ > gcc \ > gcc-c++ \ > make \ > pcre-devel \ > zlib-devel \ > expat-devel \ > pcre \ > perl
[root@lamp opt]#cd /opt/httpd-2.4.29/ [root@lamp httpd-2.4.29]#../configure \ --prefix=/usr/local/httpd \ --enable-so \ --enable-deflate \ --enable-expires \ --enable-rewrite \ --enable-charset-lite \ --enable-cgi
[root@lamp httpd-2.4.29]# make //生成可執行的二進制文件 ....
[root@lamp httpd-2.4.29]# make install //複製二進制文件到系統,配置應用環境 ...
[root@localhost httpd-2.4.29]#vim /usr/local/httpd/conf/httpd.conf
在行尾添加下列內容mysql
IfModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 50 seconds" </IfModule>
[root@localhost httpd-2.4.29]# pwd /opt/httpd-2.4.29 [root@localhost httpd-2.4.29]# cd /usr/local/httpd/ [root@localhost httpd]# cd bin/ [root@localhost bin]# ./apachectl -t Syntax OK [root@localhost bin]# ./apachectl start //啓動服務
[root@localhost bin]# netstat -ntap | grep 80 tcp 0 0 192.168.45.135:80 0.0.0.0:* LISTEN 35250/httpd
關閉防火牆和安全功能c++
[root@localhost bin]# systemctl stop firewalld.service [root@localhost bin]# setenforce 0
驗證模塊sql
[root@localhost bin]# ./apachectl -t -D DUMP_MOOULES | grep "expire" Syntax OK
打開軟件fiddre進行抓包
apache