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

How to implement gzip compression in nginx to improve website speed

Table of contents Why use gzip compression? nginx...

Implementation of react loop data (list)

First, let's simulate the data coming from th...

Some notes on mysql create routine permissions

1. If the user has the create routine permission,...

Example code and method of storing arrays in mysql

In many cases, arrays are often used when writing...

Implementation process of row_number in MySQL

1. Background Generally, in a data warehouse envi...

Pure CSS to achieve the water drop animation button in Material Design

Preface You should often see this kind of special...

Implementation of Nginx operation response header information

Prerequisite: You need to compile the ngx_http_he...

Vue uses OSS to upload pictures or attachments

Use OSS to upload pictures or attachments in vue ...

Detailed explanation of scheduled tasks and delayed tasks under Linux

at at + time at 17:23 at> touch /mnt/file{1..9...

Detailed explanation of how to customize the style of CSS scroll bars

This article introduces the CSS scrollbar selecto...

How to install Django in a virtual environment under Ubuntu

Perform the following operations in the Ubuntu co...

MySQL 8.0.20 installation and configuration detailed tutorial

This article shares with you a detailed tutorial ...

A Brief Analysis of Patroni in Docker Containers

Table of contents Create an image File Structure ...

Weather icon animation effect implemented by CSS3

Achieve results Implementation Code html <div ...

Detailed explanation of new relational database features in MySQL 8.0

Preface The latest version of MySQL 8.0 is 8.0.4 ...