Apache installation configuration (windows and Linux) – handy

Time:2022-4-21

Apache


ApacheApache is the world’s number one web server software. It can run on almost all widely used computer platforms. It is one of the most popular web server-side software because of its cross platform and security. It is fast and reliable, and can be expanded through simple API to compile interpreters such as Perl / Python into the server.

Lamp / LNMP series environment construction:
Student Party White whoring server – no, no, are you still buying a student machine?
Apache installation configuration (windows and Linux) – handy
Linux Installation and configuration MySQL – have you learned to waste?
PHP installation configuration (windows and Linux) – one article is enough
Nginx installation configuration (window and Linux) – package teaching package meeting
Tomcat installation configuration (window and Linux) – Nanny tutorial

I know there are integrated software and pagodas, but I want to know it step by step, know why, and the fear of being dominated.

Apache installation configuration (windows and Linux) - handy

Windows


1. Download

Official website download addresshttps://www.apachehaus.com/cgi-bin/download.plx
Network disk link:https://pan.baidu.com/s/16ewAcY0WXSG38bTVMSHBxg
Extraction code: uju4

Apache installation configuration (windows and Linux) - handy

2. Decompression

Apache installation configuration (windows and Linux) - handy

3. Modify the configuration

Open conf / httpd Conf, change it to your decompression path.
Apache installation configuration (windows and Linux) - handy
Apache installation configuration (windows and Linux) - handy

4. Test whether the configuration file is legal (this step can be skipped)

Win+r enter CMD enter

Httpd -t \t test whether the configuration file is legal

Apache installation configuration (windows and Linux) - handy

5. Install Apache service

httpd -k install -n Apache2. 4 #-n followed by user-defined access name

Apache installation configuration (windows and Linux) - handy

6. Start service

① You can enter a command to start

Httpd - K start # start
Httpd - K stop # stop

Apache installation configuration (windows and Linux) - handy

② It can also be opened manually
Win + R enter services MSc enter
Apache installation configuration (windows and Linux) - handy
③ You can also run exe directly
Double click apachemonitor.com under the run decompression directory / bin exe
Apache installation configuration (windows and Linux) - handy
Click the icon in the lower right corner of the desktop, and then click start
Apache installation configuration (windows and Linux) - handy
Apache installation configuration (windows and Linux) - handy

7. Test

Access in browserhttp://localhost

Apache installation configuration (windows and Linux) - handy
If the above figure appears, congratulations on your Apache installation configuration.

Insert anti climbing information)Blogger address:https://wzlodq.blog.csdn.net/

Linux


Execute the instructions in sequence
Network disk link:https://pan.baidu.com/s/16ewAcY0WXSG38bTVMSHBxg
Extraction code: uju4

1. Download

cd /usr/local/src
wget  http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.46.tar.gz #Download Apache
wget  http://mirrors.cnnic.cn/apache/apr/apr-1.7.0.tar.gz #Download APR
wget  http://mirrors.cnnic.cn/apache/apr/apr-util-1.6.1.tar.bz2 #Download APR util
Yum install - y PCRE devel # install PCRE

2. Decompression

tar zxvf httpd-2.4.46.tar.gz
tar zxvf apr-1.7.0.tar.gz 
tar jxvf apr-util-1.6.1.tar.bz2 

Apache installation configuration (windows and Linux) - handy

3. Installation

#APR	
CD / usr / local / SRC / apr-1.7.0 # switch to the decompression directory
. / configure -- prefix = / usr / local / APR # check environment
Make & & make install # compile install

#APR-util
Yum install expat devel # first aid dependency, enter y when asked
cd /usr/local/src/apr-util-1.6.1
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make && make install

#httpd
cd /usr/local/src/httpd-2.4.46
./configure --prefix=/usr/local/apache2.4 --with-apr=/usr/local/apr  --with-apr-util=/usr/local/apr-util --enable-so  --enable-mods-shared=most
make && make install

Apache installation configuration (windows and Linux) - handy

4. Start service

/usr/local/apache2. 4 / bin / apachectl start # start service
PS aux | grep httpd # view process

Apache installation configuration (windows and Linux) - handy
Set startup and self startup

cp /usr/local/apache2. 4/bin/apachectl /etc/init. D / httpd # replication service
vi /etc/init. D / httpd # configuration supports chkconfig
#Then in/ Add two sentences of code after bin / sh
#chkconfig:345 85 15
#
#description:Start and stop the Apache HTTP Server

Apache installation configuration (windows and Linux) - handy

Chkconfig -- add httpd # add service startup entry
Chkconfig httpd on # auto start
Chkconfig -- List httpd # check

Apache installation configuration (windows and Linux) - handy

5. Test

If not, your server security group should not be set. Open port 80.

Apache installation configuration (windows and Linux) - handy

Original is not easy, please do not reprintThe number of visitors who were not rich made it worse
Blogger homepage:https://wzlodq.blog.csdn.net/
WeChat official account: lo
If the article is helpful to you, remember to click three times ❤