Home >Operation and Maintenance >CentOS >Does centos come with Apache?

Does centos come with Apache?

WBOY
WBOYOriginal
2022-04-02 11:16:562626browse

centos comes with Apache; Apache, also known as Apache, is a web server software. Centos can use the "rpm -aq |grep httpd" command to check whether it has the apache software package. Use "rpm -e --nodeps httpd" command to uninstall.

Does centos come with Apache?

The operating environment of this article: centos 7 system, Dell G3 computer.

Does centos come with Apache?

Apache (transliterated as Apache) is the world’s number one web server software. It can run on almost all widely used computer platforms and is one of the most popular web server-side software due to its cross-platform and security features. It is fast, reliable and can be extended through a simple API to compile interpreters such as Perl\python into the server

Next we will do some preparations for installing Apache

Generally, Linux systems come with a built-in version of apache. However, when starting with this built-in version, various problems such as port occupation will occur. Because the built-in apache version is relatively low, so first check whether the built-in apache version has been installed in Linux. If there is a lower version of apache installed, uninstall it first and then install it.

1. Check whether the system comes with installed apache software package

Command:

rpm -aq |grep httpd

Does centos come with Apache?

You can see that it is not installed on my Linux If there are any installed apache software packages, we need to uninstall them one by one. If our user rights cannot be uninstalled, use administrator rights to uninstall (sudo command)

2. Uninstall command

rpm -e --nodeps  httpd

After uninstalling the apache that comes with the system, we can install apache ourselves.

1. Directly use yum install httpd to install

Does centos come with Apache?

Because the installation is too long, not all are listed

2. After the installation is complete, use rpm -aq |grep httpd to check whether the installation is successful

Does centos come with Apache?

3. Then start the apache

command

service httpd start

If an error is reported at startup, go to /etc/httpd/conf/httpd.conf and modify the configuration information

Find #ServerName www.example.com:80 and change it to ServerName localhost:80

You can use / to search

After modification, you can use httpd -t to check if there is an error

After that, restart apache and there will be no error

Next we have to turn off our firewall. Use systemctl stop firewalld to turn off the firewall, and then restart apache. Then open the web page and enter the Linux address. If the following page appears, the Apache installation and configuration is successful;

Does centos come with Apache?

Recommended tutorial: "centos tutorial"

The above is the detailed content of Does centos come with Apache?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn