链接:https://pan.baidu.com/s/11X5CEWoVemxlGuNQqn9cuA
提取码:jn6l
复制这段内容后打开百度网盘手机App,操作更方便哦
[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
在行尾添加下列内容
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
关闭防火墙和安全功能
[root@localhost bin]# systemctl stop firewalld.service
[root@localhost bin]# setenforce 0
验证模块
[root@localhost bin]# ./apachectl -t -D DUMP_MOOULES | grep "expire"
Syntax OK
打开软件fiddre进行抓包
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。