Skip to content

Instantly share code, notes, and snippets.

@psenger
Last active July 3, 2023 03:26
Show Gist options
  • Select an option

  • Save psenger/443d0f756cab55f90dd60ca3625f4385 to your computer and use it in GitHub Desktop.

Select an option

Save psenger/443d0f756cab55f90dd60ca3625f4385 to your computer and use it in GitHub Desktop.
[Apache HTTPD] #apache #unix

Apache Installation

yum install httpd -y

Default install directory /var/www/html

Apache Starting

systemctl start httpd

Apache Enable Start at BootUp

[root@ip-xxx-xxx-xxx-xxx ec2-user]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@ip-xxx-xxx-xxx-xxx ec2-user]# 

Apache Status

[root@ip-xxx-xxx-xxx-xxx ec2-user]# systemctl status httpd

● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2023-07-03 03:20:29 UTC; 58s ago
     Docs: man:httpd.service(8)
 Main PID: 2869 (httpd)
   Status: "Total requests: 0; Idle/Busy workers 100/0;Requests/sec: 0; Bytes served/sec:   0 B/sec"
   CGroup: /system.slice/httpd.service
           ├─2869 /usr/sbin/httpd -DFOREGROUND
           ├─2870 /usr/sbin/httpd -DFOREGROUND
           ├─2872 /usr/sbin/httpd -DFOREGROUND
           ├─2884 /usr/sbin/httpd -DFOREGROUND
           ├─2894 /usr/sbin/httpd -DFOREGROUND
           └─2900 /usr/sbin/httpd -DFOREGROUND

Jul 03 03:20:29 ip-xxx-xxx-xxx-xxx.ec2.internal systemd[1]: Starting The Apache HTTP Server...
Jul 03 03:20:29 ip-xxx-xxx-xxx-xxx.ec2.internal systemd[1]: Started The Apache HTTP Server.
[root@ip-xxx-xxx-xxx-xxx ec2-user]#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment