Get the App
SLTechnology News&Howtos  ›  Servers  › 

Apache caching

Shulou Source: shulou.com Published: 2022-06-03 00:19:06 10月26日 Update

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

Tags: Directories configurations files software compilations binaries content tools modules source code environment software packages services caching on-line security necessity functionality toolkits commonly used Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn MySQL Xiaomi Docker NVidia