LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-11-2016, 05:09 PM   #1
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Rep: Reputation: 29
am i correct in saying apache is not installed on my server


when i run

systemctl list-units | grep apache (just realized it should be httpd)

nothing comes up but the command line

does this mean that apache is not installed?

if it isnt where/what is the best way to install it?

Last edited by sigint-ninja; 02-11-2016 at 05:10 PM.
 
Old 02-11-2016, 05:22 PM   #2
JockVSJock
Senior Member
 
Registered: Jan 2004
Posts: 1,420
Blog Entries: 4

Rep: Reputation: 164Reputation: 164
More information...what Linux Distro is this?

If its an rpm based Distro, run the following command for Apache

Code:
rpm -qi | grep httpd
 
Old 02-11-2016, 05:23 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Are you certain the package is called "apache" and not "apache2" or "httpd"?
Shouldn't you use 'apt-cache search httpd' or 'rpm -q httpd' or somesuch?
If your distro provides real package management (and I don't mean './configure && make install;') is there any valid reason not to use it?
 
Old 02-11-2016, 05:30 PM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by sigint-ninja View Post
when i run

systemctl list-units | grep apache (just realized it should be httpd)

nothing comes up but the command line

does this mean that apache is not installed?

if it isn't where/what is the best way to install it?
Code:
whereis apache
or
whereis apache2
if you receive a
Code:
apache:
or
apache2:
then it is not installed.

If you receive a path to where apache is then it is installed.

Code:
ls /etc/httpd
or
ls /etc/apache
or
ls /etc/apache2
will work too.


best way to install it is through your repo.

one should only install from source when there repo does not have it, or they want to modify it to their liking before it is installed. (general rule of thumb)

Last edited by BW-userx; 02-11-2016 at 05:37 PM.
 
Old 02-11-2016, 05:53 PM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
CentOS package is http*
Ubus are apache2*
Code:
rpm -qa | grep -e http -e apache
should identify it.

Last edited by Habitual; 02-11-2016 at 05:56 PM.
 
Old 02-11-2016, 05:58 PM   #6
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Original Poster
Rep: Reputation: 29
ok so i did a whereis on apache apache2 and http...no results

i then did sudo yum -y install apache ...nothing to do came up

then

sudo yum -y install apache2 ...nothing to do came up

then

sudo yum -y install httpd ...and it installed

i then did a whereis httpd and it gave me a path

whats the difference between

apache
apache2
httpd?

so systemctl list.services only shows services that are currently running,it doesnt show you what is installed.

Last edited by sigint-ninja; 02-11-2016 at 06:00 PM.
 
Old 02-11-2016, 06:12 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by sigint-ninja View Post
ok so i did a whereis on apache apache2 and http...no results

i then did sudo yum -y install apache ...nothing to do came up

then

sudo yum -y install apache2 ...nothing to do came up

then

sudo yum -y install httpd ...and it installed
I think you should read more carefully ;-p

Quote:
Originally Posted by sigint-ninja View Post
whats the difference between

apache
apache2
httpd?
Ditto.


Quote:
Originally Posted by sigint-ninja View Post
so systemctl list.services only shows services that are currently running,it doesnt show you what is installed.
Try 'systemctl list-all-units;', then 'systemctl enable httpd && systemctl start httpd;'.
 
Old 02-11-2016, 06:18 PM   #8
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Original Poster
Rep: Reputation: 29
why would they be called different names...does it not matter?

what did you mean by read more carefully ...sorry
 
Old 02-11-2016, 07:16 PM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,510

Rep: Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491
Quote:
why would they be called different names...does it not matter?
I guess you would have to find out from the various develpers. Apache has been around for over 20 years and on many systems it is referred to as 'apache' whether it is apache1 or apache2 while on other systems the directories are referred to as apache2 if version 2+ is installed. The apache user:group is usually or at least often apache:apache but not always as Debian/Ubuntu have the user:group www-data:www-data for some reason. You just need to know which for the system you are using.
 
Old 02-12-2016, 06:43 AM   #10
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by sigint-ninja View Post
ok so i did a whereis on apache apache2 and http...no results
fyi about whereis

no results = not installed on system

command not found = whereis not installed on system

Last edited by BW-userx; 02-12-2016 at 07:20 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
My server came with apache and centos 5 installed but need help. shadiadiph Linux - Server 11 07-05-2009 09:25 PM
Access VMWare 2.0 Server with Apache installed he_the_great Linux - Software 10 10-12-2008 10:34 PM
can any one know how to connect to apache server installed in linux from windows satyam Linux - Networking 1 04-28-2008 02:29 AM
AWSTATS for apache server, can;t set correct permissions. Please help. isuck@linux Linux - Software 4 08-02-2006 05:16 PM
Apache server: pointing to the correct file WiWa Linux - Software 4 08-11-2003 07:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration