How to Install Apache on CentOS 7

 Install Apache on CentOS 7 | Liquid Web


  1. Install Apache:
    1. First, clean-up yum:
      sudo yum clean all
    2. As a matter of best practice we’ll update our packages:
      sudo yum -y update
    3. Installing Apache is as simple as running just one command:
      sudo yum -y install httpd
  2. Allow Apache Through the Firewall
    1. Allow the default HTTP and HTTPS port, ports 80 and 443, through firewalld:
      sudo firewall-cmd --permanent --add-port=80/tcpsudo firewall-cmd --permanent --add-port=443/tcp
    2. And reload the firewall:
      sudo firewall-cmd --reload
  1. Configure Apache to Start on Boot
    1. And then start Apache:
      sudo systemctl start httpd
    2. Be sure that Apache starts at boot:
      sudo systemctl enable httpd
  2. Other useful commands for Apache
    1. To check the status of Apache:
      sudo systemctl status httpd
    2. To stop Apache:
      sudo systemctl stop httpd

Không có nhận xét nào:

StaticImage

  import React , { useEffect , useRef } from "react" import { StaticImage } from "gatsby-plugin-image" impor...