Checking Apache on CentOS
NickName:Garry Ask DateTime:2015-07-09T20:43:02

Checking Apache on CentOS

I am trying to run Apache on my CentOS.(I am having very basic knowledge on linux).

[Apache Start Stop] using this link i tried to run: apachect1 start But I got -bash apachect1: command not found

I also tried to check the status using $ /etc/init.d/nginx status But I got -bash: /etc/init.d/nginx: No such file or directory

Then I tried to check if Apache is installed using : which apache2 But I got /usr/bin/which: no apache2 in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/git/bin:/usr/local/git/bin:/home/bebo/bin)

It seems that Apache is not installed, however I can see httpd directory in etc folder. Does it have any significance?

Is my assumption correct, if yes how can I install/from where to download & install. Else correct where I am going wrong.

Copyright Notice:Content Author:「Garry」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/31317885/checking-apache-on-centos

Answers
Linux Gurus 2020-06-26T12:54:19

These all the steps will be applied for CentOS 7 and CentOS 8\n(Note also apply on RHEL 7/8)\nI recommend running the below command to auto-remove the unused packages.\nStep 1:\nyum autoremove\n\nStep 2: Now run the below command to update the CentOS\n yum update\n\nStep 3: Installing the apache software package\nyum install httpd\n\nStep 4: Starting the apache service\nThe name of the Apache service is httpd. Use the below command to start and enable it at the same time in CentOS 7 or later version.\nsystemctl enable --now httpd\n\nStep 5: Checking the httpd service status\nsystemctl status httpd\n\nStep 6: Firewall configuration\nAs per now, we have to allow the HTTP service in the firewall. So, you can find the below command useful for that.\nfirewall-cmd --permanent --add-service http\nfirewall-cmd --permanent --add-service https\n\nNow reload the firewall service,\nfirewall-cmd --reload\n\nStep 7: Test the Apache server.\nPut the IP address of your computer or the localhost on the web-browser; it will show you the Apache server is running.\nTo read more about Apache installation, you can visit my blog post. The blog post URL, you can find below.\nLAMP stack installation on CentOS/RHEL 7/8\nHow to install the Apache web-server on CentOS 8",


Mark 2015-07-09T12:49:01

The best and easiest way to install apache on Centos is using the yum package manager.\n\nJust run the following:\n\nyum install httpd\n\n\nAfter installation depending on your Centos version you start the Apache service as follows:\n\nCentos 6\n\nservice httpd start\n\n\nCentos 7\n\nsystemctl start httpd\n",


More about “Checking Apache on CentOS” related questions

Checking Apache on CentOS

I am trying to run Apache on my CentOS.(I am having very basic knowledge on linux). [Apache Start Stop] using this link i tried to run: apachect1 start But I got -bash apachect1: command not found...

Show Detail

Compiling issues : Apache headers not found - CentOS 6.x

I am trying to build libwurfl (https://github.com/filosganga/libwurfl) on CentOS. I have installed all the dependent libraries, but I am having issues with running configure for libwurfl. I am cons...

Show Detail

Apache Ant 1.8 on CentOS

I am trying to get apache ant 1.8 to work under CentOS. First, I had this error. Error: Could not find or load main class org.apache.tools.ant.launch.Launcher Then I set the following variables

Show Detail

Docker container CentOs with Apache

I'm toying around with Docker. But i have an issue with Docker when trying to build a Centos and Apache Server in a container. I run Docker on my Windows 10 Machine. The CentOS + Apache container, is

Show Detail

Apache on Centos

I'm trying to setup an Apache according with this tutorial for CentOS 8. By the end of the tutorial, I cannot restart httpd. I get this error: httpd.service - The Apache HTTP Server Loaded: loa...

Show Detail

Apache upgrade in CentOS 7

This is my current version of Apache: httpd -V Server version: Apache/2.4.6 (CentOS) Server built: Apr 24 2019 13:45:48 Server's Module Magic Number: 20120211:24 Server loaded: APR 1.4.8, APR-...

Show Detail

Apache not seeing website - CentOS 7

I have setup a lot of Virtual Hosts in Ubuntu but today I needed to do this on a CentOS 7 server. I installed Apache and setup the VHost config but nothing appears when I view the site. I know that

Show Detail

Installing apache modules on CentOS

I am trying to install apache modules on CentOS 8.1. I have a playbook that is working for Ubuntu and need the same tasks on CentOS. vars: libs: - apache2 - libapache2-mod-php ...

Show Detail

How to set up Apache with Tomcat on CentOS

I currently running a Grails app in a Tomcat container on a CentOS box and I have images taking up to 6 seconds to load on my website. They are roughly 500KB each. I've been told a way to improve

Show Detail

update Apache Ant on CentOS

I need to update Apache Ant on my server. I downloaded the newest Ant, built it, and (I thought) installed it. But when when I check it says the old version is still installed. How do I update/re...

Show Detail