How to install Apache service in Linux operating system

How to install Apache service in Linux operating system

Download link:

Operating Environment

CentOS 7.6 in VMware virtual machine

SecureCRT

Xftp (Xmanager)

Demand Analysis

Use Apache service to access http

Procedure

1. Mount the CD

[root@localhost ~]# mount /dev/cdrom /mnt

insert image description here

Check whether it is mounted

[root@localhost ~]# df -Th

insert image description here

2. Compile the installation program from the source package (compile and install)

[root@localhost Packages]# yum -y install gcc gcc-c++ make

insert image description here

3. Install HTTP dependency packages, a total of 7 packages

[root@localhost Packages]# rpm -ivh /mnt/Packages/pcre-devel-8.32-17.el7.x86_64.rpm
[root@localhost Packages]# rpm -ivh /mnt/Packages/apr-devel-1.4.8-3.el7_4.1.x86_64.rpm
[root@localhost Packages]# rpm -ivh /mnt/Packages/expat-devel-2.1.0-10.el7_3.x86_64.rpm
[root@localhost Packages]# rpm -ivh /mnt/Packages/libdb-devel-5.3.21-24.el7.x86_64.rpm
[root@localhost Packages]# rpm -ivh /mnt/Packages/cyrus-sasl-devel-2.1.26-23.el7.x86_64.rpm
[root@localhost Packages]# rpm -ivh /mnt/Packages/openldap-devel-2.4.44-20.el7.x86_64.rpm
[root@localhost Packages]# rpm -ivh /mnt/Packages/apr-util-devel-1.5.2-6.el7.x86_64.rpm

insert image description here

4. Use XFTP software to put the http-2.4.25.tar.gz software package into the Linux system

Open Xmanager Enterprise software

insert image description here

Open the Xftp program

insert image description here

If you use it for the first time, you need to create a new one. Fill in the IP address of the virtual machine for both the name and host, change the protocol to SFTP, enter the username and password, and click Confirm to close.

insert image description here

Select 20.0.0.41 in the session and click Connect

insert image description here

Enter /opt in the path box above, enter the opt file, and drag the httpd-2.4.25.tar.gz compressed package file on the desktop into the opt file

insert image description here

5. tar unpacking

Switch to the /opt directory

[root@localhost ~]# cd /opt

Unzip the compressed package to C/opt

[root@localhost opt]# tar xzvf httpd-2.4.25.tar.gz -C /opt

ll Check it out, it already exists

[root@localhost opt]# ll

insert image description here

6. ./configure configuration

Enter the httpd-2.4.25 directory

[root@localhost opt]# cd httpd-2.4.25/

Configure ./configure, where the installation path is added

[root@localhost httpd-2.4.25]# ./configure --prefix=/usr/local/apache

insert image description here

7. Make compilation

Convert to recognizable binary file

[root@localhost httpd-2.4.25]# make

8. make install

Copy the software's executable program, configuration files, help documents and other related files to the Linux operating system

[root@localhost httpd-2.4.25]# make install

9. Use

Enter the /usr/local/apache/bin/ directory

[root@localhost httpd-2.4.25]# cd /usr/local/apache/bin/

Modify the configuration file

[root@localhost bin]# vi /usr/local/apache/conf/httpd.conf

Press i to enter the edit mode, press :set nu to mark the text with line numbers, press :194 to locate line 194, and delete the first character # in line 194 to enable the 80 service agreement.

insert image description here

To start the apachectl service, type twice! Not successful once

[root@localhost bin]# ./apachectl start
[root@localhost bin]# ./apachectl start

insert image description here

Install the client browser

[root@localhost bin]# rpm -ivh /mnt/Packages/lynx-2.8.8-0.3.dev15.el7.x86_64.rpm

This is the client browsing tool

[root@localhost bin]# lynx 127.0.0.1

insert image description here

Disable virtual machine firewall service

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

insert image description here

Enter the computer webpage and enter the virtual machine IP address

insert image description here

Enter the virtual machine and confirm again

insert image description here

Summarize

This concludes this article on how to install the Apache service under the Linux operating system. For more information about installing the Apache service under Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Linux installation apache server configuration process
  • Steps to build a file server using Apache under Linux
  • Detailed explanation of Apache website service configuration based on Linux
  • A brief analysis of the configuration and management of Apache servers under Linux
  • Deployment and configuration of Apache service under Linux

<<:  6 Practical Tips for TypeScript Development

>>:  MySQL Database Basics: A Summary of Basic Commands

Recommend

Native JS to implement drag position preview

This article shares with you a small Demo that ad...

How to solve the problem that MySQL cannot start because it cannot create PID

Problem Description The MySQL startup error messa...

Summary of common sql statements in Mysql

1. mysql export file: SELECT `pe2e_user_to_compan...

MySQL permission control details analysis

Table of contents 1. Global level 2. Database lev...

Web front-end performance optimization

Web front-end optimization best practices: conten...

Detailed explanation of the process of docker packaging Python environment

The steps of docker packaging Python environment ...

Detailed explanation of JavaScript BOM composition and common events

Table of contents 1. BOM 2. Composition of BOM 2....

Python 3.7 installation tutorial for MacBook

The detailed process of installing python3.7.0 on...

Not all pop-ups are rogue. Tips on designing website pop-ups

Pop-up news is common in domestic Internet servic...

How to set process.env.NODE_ENV production environment mode

Before I start, let me emphasize that process.env...

Docker deploys net5 program to achieve cross-platform functions

Deployment environment: docker container, liunx s...