Building Apache on Linux (understood in super detail in seconds)

♥️Author : Xiao Liu at Station C

♥️Personal homepage:  Xiao Liu’s homepage 

♥️Efforts may not necessarily pay off, but there will definitely be gains! Come on! Work hard together and live a better life together!

♥️Learn the operation and maintenance experience summarized in two years, as well as the full set of network experiment tutorials on the Cisco simulator. Column: Cloud Computing Technology

♥️You can ask Xiao Liu in private messages as long as you know how to do it and you won’t be stingy. Thank you CSDN for letting you and I meet!

mirror

URL: www.centos.org download point. The article contains two mirrors. You can privately chat with the blogger to get them. If you don’t understand, you can send a private message and like it. Thank you everyone! ! !

Table of contents

1. Preparation work

2. Start building

1. Check whether httpd is installed

2. Jump path and pop up the image

3. Remount the image and enter the installation path

4.Install the required files

5. Replace the httpd mirror

6. Unzip the package

7. Enable the function and use make and make install to compile and install

8. Close barriers

9. Start the service with absolute path

10. The last browser access loopback address: 127.0.0.1


1. Preparation work

The VMware version used is 17.0.1

The system is centos7

The source code package is used to install and build the Apache environment.

2. Start building

1. Check whether httpd is installed

rpm -qa | grep httpd

Effect:

There is no httpd installed

2. Jump path and pop up the image

cd
eject

Effect:

No results. Check the virtual machine settings and find that it has popped up.

3. Remount the image and enter the installation path

mount /dev/sr0   /media/
cd /media/Packages

Effect:

After entering, you can install the source code.

4.Install the required files

rpm -ivh apr-1.4.8-3.el7.x86 64.rpm
rpm -ivh apr-devel-1.4.8-3.el7.x86 64.rpm
rpm -ivh cyrus-sasl-devel-2.1.26-20.el7 2.x86 64.rpm
rpm -ivh expat-devel-2.1.0-8.el7.x86 64.rpm
rpm -ivh libdb-devel-5.3.21-19.el7.x86 64.rpm
rpm -ivh openldap-devel-2.4.40-13.el7.x86 64.rpm
rpm -ivh apr-util-devel-1.5.2-6.el7.x86 64.rpm
rpm -ivh apr-util-1.5.2-6.el7.x86 64.rpm
rpm -ivh pcre-devel-8.32-15.el7 2.1.x86 64.rpm
rpm -ivh pcre-8.32-15.el7 2.1.x86 64.rpm

Effect

Execute all the above commands one by one.

5. Replace the httpd mirror

cd
eject
mount /dev/sr0 /media
cd /media
ls

Effect

tar zxf http

You can see that our image is mounted, and there is also a compressed package below.

6. Unzip the package

tar zxf httpd-2.4.25.tar.gz -C  /usr/src

Effect:

Extract the httpd file to /usr/src

7. Enable the function and use make and make install to compile and install

cd /usr/src/httpd-2.4.25.tar.gz
./configure --prefix=/usr/local/httpd --enable-so --enable-rewrite --enable-charset-lite --enable-cgi && make && make install

Effect:

8. Close barriers

1. Firewall

2.SELinux

systemctl stop firewalld.service  //关闭防火墙
setenforce 0     //关闭SELinux

9. Start the service with absolute path

/usr/local/httpd/bin/apachectl start

Effect

10. The last browser access loopback address: 127.0.0.1

success! ! ! !

♥️Attention is the motivation for my creation

♥️Like is the greatest recognition for me

♥️This is Xiao Liu, inspiring and working hard on every article, thank you all

Guess you like

Origin blog.csdn.net/lzl10211345/article/details/133032326
Recommended