Skip to content

Instantly share code, notes, and snippets.

@cerealskill
Created December 19, 2018 18:22
Show Gist options
  • Select an option

  • Save cerealskill/9c5b43c556afca8a5aaf64274b27356f to your computer and use it in GitHub Desktop.

Select an option

Save cerealskill/9c5b43c556afca8a5aaf64274b27356f to your computer and use it in GitHub Desktop.
Deploy Apache 2 ( CentOS 7.4 )
#!/bin/bash
echo "Deploy Apache 2 on CentOS 7.4";
sudo yum install httpd
sudo systemctl start httpd
sudo systemctl enable httpd
sudo systemctl status httpd
sudo firewall-cmd --zone=public --permanent --add-service=http
sudo firewall-cmd --zone=public --permanent --add-service=https
sudo firewall-cmd --reload
@cerealskill

Copy link
Copy Markdown
Author

Complete!
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2018-12-19 18:23:10 UTC; 78ms ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 4044 (httpd)
Status: "Processing requests..."
CGroup: /system.slice/httpd.service
├─4044 /usr/sbin/httpd -DFOREGROUND
├─4045 /usr/sbin/httpd -DFOREGROUND
├─4046 /usr/sbin/httpd -DFOREGROUND
├─4047 /usr/sbin/httpd -DFOREGROUND
├─4048 /usr/sbin/httpd -DFOREGROUND
└─4049 /usr/sbin/httpd -DFOREGROUND

Dec 19 18:23:10 qportalapp01.novalocal systemd[1]: Starting The Apache HTTP Server...
Dec 19 18:23:10 qportalapp01.novalocal systemd[1]: Started The Apache HTTP Server.
success
success
success

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment