LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   "apt-get install apache" is not working (https://www.linuxquestions.org/questions/linux-newbie-8/apt-get-install-apache-is-not-working-652600/)

silvapearl 06-30-2008 11:07 AM

"apt-get install apache" is not working
 
I am new to Linux and i have been trying to setup a LAMP server,however anytime i try these commands:

apt-get install apache
apt-get install mysql
apt-get install php

i get a message that says -bash: apt-get: command not found
pls wat do i do??

nx5000 06-30-2008 11:09 AM

Which linux did you install?
apt-get is for debian-based systems, like ubuntu, mepis,...

Maybe you have the command rpm ?

silvapearl 06-30-2008 11:29 AM

im running red-hat,so if this command wont work,how do i install the apache,php,etc packages? Thanx for ur quick reply

nx5000 06-30-2008 11:41 AM

Which red-hat ? It's like saying I run window$ ..

You'll probably have to use rpm. Read a bit this:

http://www.tfug.org/helpdesk/linux/rpm.html

I'm not redhat frequent user so I can't help further..

If you have a recent redhat, you should use yum.

silvapearl 06-30-2008 12:00 PM

nx5000,thanx alot for all ur responses.I have Ubuntu installed on another laptop and when type the apt-get install command i get this message:

reading package list, building dependency tree,etc...couldnt find any package matching apache,no packages will be installed,upgraded,etc..wat does dat mean? n wat do i do from ere? thanx for ur anticipated response

alan_ri 06-30-2008 12:12 PM

You could start by using Synaptic,it's in System-Administration.Just search for "apache" and whatever you want.
Under "Settings" in Synaptic click on Repositories and add which ever you want.
When you want to install something with apt-get,be sure that the name of the package that you want to install is correct.You should regularly update your database of packages with apt-get update command or in Synaptic with Reload button.

kcorupe 06-30-2008 12:23 PM

do a man on apt-get too see all its uses... you can use apt-cache search to search for the package name you want.

What you are looking for is probably apt-get install httpd * it could be called that instead.

mrrangerman 06-30-2008 01:24 PM

Quote:

silvapearl

I have Ubuntu installed on another laptop and when type the apt-get install command i get this message:

reading package list, building dependency tree,etc...couldnt find any package matching apache,no packages will be installed,upgraded,etc..wat does dat mean? n wat do i do from ere? thanx for ur anticipated response
If you didn't know with the Ubuntu's you need to prefix the command with sudo so the command would be sudo apt-get install whatever

farslayer 06-30-2008 01:54 PM

apache... Move on into 2008 and try apache2 :)

Code:

it-etch:~# aptitude search apache
i  apache2              - Next generation, scalable, extendable web server                 
p  apache2-dbg          - Apache debugging symbols                                         
v  apache2-dev          -                                                                   
p  apache2-doc          - documentation for apache2                                         
v  apache2-mpm          -                                                                   
p  apache2-mpm-event    - Event driven model for Apache HTTPD                               
p  apache2-mpm-itk      - multiuser MPM for Apache 2.2                                     
p  apache2-mpm-perchild  - Transitional package - please remove                             
p  apache2-mpm-prefork  - Traditional model for Apache HTTPD                               
i A apache2-mpm-worker    - High speed threaded model for Apache HTTPD                       
p  apache2-prefork-dev  - development headers for apache2                                   
p  apache2-src          - Apache source code                                               
p  apache2-threaded-dev  - development headers for apache2                                   
i A apache2-utils        - utility programs for webservers                                   
i  apache2.2-common      - Next generation, scalable, extendable web server                 
p  apachetop            - Realtime Apache monitoring tool   
.
.
.
.
etc..

Better try that search for mysql and php as well.. you'll find their names are a bit more specific too..

lazlow 06-30-2008 03:35 PM

On Redhat systems it would be httpd (for apache). On most systems it would be:

Quote:

yum install httpd
as root of course.


All times are GMT -5. The time now is 10:02 PM.