您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
链接:https://pan.baidu.com/s/11X5CEWoVemxlGuNQqn9cuA
提取码:jn6l
[root@localhost ~]# mkdir /abc //创建挂载点
[root@localhost ~]# mount.cifs //192.168.100.3/LAMP-C7 /abc //挂载
Password for root@//192.168.100.3/LAMP-C7:
[root@localhost ~]# cd /abc
[root@localhost abc]# ls //查看其中的包
apr-1.6.2.tar.gz Discuz_X2.5_SC_UTF8.zip mysql-5.6.26.tar.gz
apr-util-1.6.0.tar.gz fiddler.exe php-5.6.11.tar.bz2
awstats-7.6.tar.gz httpd-2.4.29.tar.bz2
cronolog-1.6.2-14.el7.x86_64.rpm LAMP-php5.6.txt
[root@localhost abc]# tar zvxf apr-1.6.2.tar.gz -C /opt
[root@localhost abc]# tar zvxf apr-util-1.6.0.tar.gz -C /opt
[root@localhost abc]# tar jxvf httpd-2.4.29.tar.bz2 -C /opt
[root@localhost abc]# cd /opt/
[root@localhost opt]# mv apr-1.6.2 httpd-2.4.29/srclib/apr
[root@localhost opt]# mv apr-util-1.6.0 httpd-2.4.29/srclib/apr-util
[root@localhost opt]# yum clean all //清除yum缓存
[root@localhost opt]# yum list //重新加载yum
//安装必要编译工具
[root@localhost opt]# yum -y install \
> gcc \
> gcc-c++ \
> make \
> pcre-devel \
> zlib-devel \
> expat-devel \
> pcre \
> perl
[root@localhost opt]# cd /opt/httpd-2.4.29/
[root@localhost httpd-2.4.29]# ./configure \
> --prefix=/usr/local/httpd \
> --enable-so \
> --enable-deflate \
> --enable-expires \
> --enable-rewrite \
> --enable-charset-lite \
> --enable-cgi
[root@localhost httpd-2.4.29]# make
[root@localhost httpd-2.4.29]# make install
[root@localhost httpd-2.4.29]# vim /usr/local/httpd/conf/httpd.conf
到末行,填入下列内容
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml text/jpg text/javascript text/png
DeflateCompressionLevel 9
SetOutputFilter DEFLATE
</IfModule>
[root@localhost httpd-2.4.29]# /usr/local/httpd/bin/apachectl -t
Syntax OK
[root@localhost httpd-2.4.29]# /usr/local/httpd/bin/apachectl start
查看监听端口
[root@localhost httpd-2.4.29]# netstat -ntap | grep 80
tcp 0 0 192.168.45.135:80 0.0.0.0:* LISTEN 36794/httpd
关闭防火墙,和安全功能
[root@localhost httpd-2.4.29]# systemctl stop firewalld.service
[root@localhost httpd-2.4.29]# setenforce 0
[root@localhost htdocs]# cd /usr/local/httpd/bin/
[root@localhost bin]# ./apachectl -t -D DUMP_MODULES | grep "deflate"
deflate_module (shared)
打开fiddre软件进行抓包查看
查看自己共享文件夹中的图片,然后复制到网页文件目录下
[root@localhost bin]# cd /abc/
[root@localhost abc]# cp 123.jpg /usr/local/httpd/htdocs/
将图片添加到网页中
[root@localhost abc]# cd /usr/local/httpd/htdocs/
[root@localhost htdocs]# ls
123.jpg index.html
[root@localhost htdocs]# vim index.html
<html><body><h2>It works!</h2>
<img src="123.jpg" />
</body></html>
进行抓包,可以看到,图片也被抓到,并且在上传过程中,图片被压缩
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。