您好,登錄后才能下訂單哦!
鏈接: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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。