How to delete apache in centos: 1. Stop the httpd service through the "#systemctl stop httpd.service" command; 2. Uninstall it through the "rpm -e" or "yum -erase" command.
The operating environment of this article: CentOS 7 system, DELL G3 computer
Can centos apache be deleted?
centos 7 Install and uninstall the apache (httpd) service
We have installed mysql before, install httpd today, and then try to access the following, due to the blog The master has already been installed once, so I will uninstall it first and then install it.
Uninstall
First of all, make sure it has been installed or the system comes with httpd service. Run the following command:
# rpm -qa | grep httpd
or :
# yum list | grep httpd
I have already installed it once, so it will be displayed as follows:
Then I will uninstall it first For httpd, you must first stop the httpd service. The command is as follows:
# systemctl stop httpd.service
Then you can use the rpm -e or yum -erase command. However, when naming rpm -e, you must uninstall the dependent package yourself first, so I use yum - The erase command is used to uninstall. The command is as follows:
# yum erase httpd.x86_64
In the middle, you will be asked if you want to confirm, just y, until Complete! appears, which means the uninstallation is complete.
Installation
If you want to confirm whether the uninstallation is clean, you can use the list command to list the installed ones (the first step of uninstallation). We will not do this here. We directly list the httpd items in the yum warehouse. The command is as follows:
# yum list | grep httpd
Then, see that it is available again After the entry, we enter the following command to install:
# yum install httpd
Enter 'y' several times in the middle, and the installation is complete.
Then we check the running status of httpd through the following command:
# systemctl status httpd.service
If httpd is not started, we can start the service through the following command:
# systemctl start httpd.service
The default www directory is under /var/www/html/, so we write an html file to see what happens. Enter the command to create a file containing the hello world string:
# echo 'hello world' > /var/www/html/index.html
Then, We use curl to access the local:
# curl 127.0.0.1
It is already in normal service!
Recommended: "centos usage tutorial"
The above is the detailed content of Can centos apache be deleted?. For more information, please follow other related articles on the PHP Chinese website!

CentOS is suitable for building powerful and reliable servers. Its advantages include: 1. Stability and reliability, support cycle up to 10 years; 2. Security, built-in SELinux and regular security patches; 3. Compatibility and ecosystem, highly compatible with RHEL, with a rich software warehouse; 4. Performance optimization, suitable for various hardware platforms and providing kernel tuning.

CentOS will continue to evolve in the future, and users should choose alternative distributions. 1) Evaluate the requirements, choose such as RockyLinux or AlmaLinux, and focus on stability and support. 2) Develop a migration plan, use tools such as CentOS2Rocky, and pay attention to testing and verification. 3) Plan early, maintain contact with the open source community, and ensure a smooth transition.

CentOS is widely selected as a server operating system because it is stable, secure and free. 1.CentOS is based on RHEL, providing enterprise-level stability and a life cycle of up to 10 years. 2. It has rich software packages and strong community support. 3. Simple installation, use yum management software package, and intuitive configuration. 4. Improve server management efficiency through command line tools, regular backups and log management. 5. Optimize server performance by adjusting kernel and network parameters.

CentOS will continue to develop through CentOSStream in the future. CentOSStream is no longer a direct clone of RHEL, but is part of RHEL development. Users can experience the new RHEL functions in advance and participate in development.

The transition from development to production in CentOS can be achieved through the following steps: 1. Ensure the consistent development and production environment, use the YUM package management system; 2. Use Git for version control; 3. Use Ansible and other tools to automatically deploy; 4. Use Docker for environmental isolation. Through these methods, CentOS provides powerful support from development to production, ensuring the stable operation of applications in different environments.

CentOSStream is a cutting-edge version of RHEL, providing an open platform for users to experience the new RHEL functions in advance. 1.CentOSStream is the upstream development and testing environment of RHEL, connecting RHEL and Fedora. 2. Through rolling releases, users can continuously receive updates, but they need to pay attention to stability. 3. The basic usage is similar to traditional CentOS and needs to be updated frequently; advanced usage can be used to develop new functions. 4. Frequently asked questions include package compatibility and configuration file changes, and requires debugging using dnf and diff. 5. Performance optimization suggestions include regular cleaning of the system, optimizing update policies and monitoring system performance.

The reason for the end of CentOS is RedHat's business strategy adjustment, community-business balance and market competition. Specifically manifested as: 1. RedHat accelerates the RHEL development cycle through CentOSStream and attracts more users to participate in the RHEL ecosystem. 2. RedHat needs to find a balance between supporting open source communities and promoting commercial products, and CentOSStream can better convert community contributions into RHEL improvements. 3. Faced with fierce competition in the Linux market, RedHat needs new strategies to maintain its leading position in the enterprise-level market.

RedHat shut down CentOS8.x and launches CentOSStream because it hopes to provide a platform closer to the RHEL development cycle through the latter. 1. CentOSStream, as the upstream development platform of RHEL, adopts a rolling release mode. 2. This transformation aims to enable the community to get exposure to new RHEL features earlier and provide feedback to accelerate the RHEL development cycle. 3. Users need to adapt to changing systems and reevaluate system requirements and migration strategies.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
