Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Apache caching

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Apache cache Apache installation software and common toolkits

Link: https://pan.baidu.com/s/11X5CEWoVemxlGuNQqn9cuA

Extraction code: jn6l

After copying this content, open the Baidu network disk mobile phone App, which is more convenient to operate.

Remotely obtain the shared [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 / / remote mount software on the Linux virtual machine Package to / mnt directory [root@lamp ~] # cd / mnt / / enter / mnt directory [root@lamp mnt] # ls / / View the obtained source package apr-1.6.2.tar.gz install_lamp.shapr-util-1.6.0.tar.gz mysql-5.6.26.tar.gzDiscuz_X2.5_SC_UTF8.zip Php-5.6.11.tar.bz2httpd-2.4.29.tar.bz21 、 Compile and install Apache, 1.1. First extract the source code package to the / opt directory [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 / / enter the / opt directory [root@lamp opt] # ls / / to view the extracted file apr-1.6.2 apr-util-1.6.0 httpd-2.4.29 rh1.2. Move the httpd package and install the compilation tool [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# essential software package [root@lamp opt] # yum-y install\ > gcc \ > gcc-c++\ > make\ > pcre-devel\ > zlib-devel\ > expat-devel\ > pcre\ > perl 1.3. Configure the installation directory and module [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-cgi1.4. Compile and install [root@lamp httpd-2.4.29] # make / / generate executable binaries. [root@lamp httpd-2.4.29] # make install / / copy binaries to the system, configure application environment .1.5, configure Apache configuration file [root@localhost httpd-2.4.29] # vim / usr/local/httpd/conf/httpd.conf

Add the following at the end of the line

IfModule mod_expires.c > ExpiresActive On ExpiresDefault "access plus 50 seconds"

After the configuration is complete, check to see if the syntax is correct And start the service [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 / / start the service to view the Apache port [root@localhost bin] # netstat-ntap | | grep 80tcp 0 0 192.168.45.135 80 0.0.0.0 * LISTEN 35250/httpd |

Turn off firewall and security features

[root@localhost bin] # systemctl stop firewalld.service [root@localhost bin] # setenforce 0

Verification module

[root@localhost bin] #. / apachectl-t-D DUMP_MOOULES | grep "expire" Syntax OK opens a win10 for testing

Open the software fiddre to grab the package

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report