# Solved: Mepis and Apache



## AKA Arizona (Jul 22, 2003)

I have decided to try a new project I removed Windows 2003 server from my old server. I have installed Mepis Linux, I have downloaded httpd-2.2.0tar.gz I have the file extracted to a folder in the root folder, now how do I install Apache?


----------



## AKA Arizona (Jul 22, 2003)

** Bump**


----------



## linuxphile (Mar 6, 2003)

I'm not a mepis user myself, however Mepis is Debian based so I believe you could just issue, as root, the following: apt-get install httpd

Unless of course you want to specifically compile from source. Also there will be other packages needed if you want to use php or mysql.


----------



## AKA Arizona (Jul 22, 2003)

Being brand new to Linux......... Huh? I found an install file with these commands
$ ./configure --prefix=PREFIX
$ make
$ make install
$ PREFIX/bin/apachectl start

NOTES: * Replace PREFIX with the filesystem path under which 
Apache should be installed. A typical installation
might use "/usr/local/apache2" for PREFIX (without the
quotes).

but when I try it I get an error telling me it can not run the command?


----------



## linuxphile (Mar 6, 2003)

If you have no reason for building Apache from source use Debian/Mepis's package manager apt. To install httpd and php all you need to do is open a terminal window. Become root by issuing the su command. Issue the command: apt-get install httpd php 

This will download and install the binary packages from the mepis repositories.


----------



## tsunam (Sep 14, 2003)

okie, you are trying to build it yourself from the source. the error you are getting is that you need to define the --prefix=(as a directory, as opposed to just "PREFIX"). As linuxphile mentioned mepis is debian based and has apt-get available.

This document gives a good example of 3 ways you can seemingly install software. I'd personally prefer apt-get, but thats me. Again as linuxphile said, as root (in a console it'll appear as a # instead of a $) you just type in apt-get install httpd, or apache, or zope or whatever http request responder you want to use.


----------



## AKA Arizona (Jul 22, 2003)

Like I said HUH?


----------



## AKA Arizona (Jul 22, 2003)

OK I have the Konsole open and the su root command in


----------



## AKA Arizona (Jul 22, 2003)

still getting errors (error 1) and no such file or directory


----------



## linuxphile (Mar 6, 2003)

It could be that apt-get is not in your path. You can determine the exact location of apt-get by issuing:
whereis apt-get 

Use the full path of apt-get to install the packages. ex: /sbin/apt-get install httpd php 

As tsunam noted httpd might be called apache, in which case you would issue something like /sbin/apt-get install apache php


----------



## Squashman (Apr 4, 2003)

I too would take there suggstion on installing the packages with apt-get. could you possibly post screen shots of what is happening. It would really help. Just saying "HUH" doens't let us know what your don't understand.

When you execute things from the command line in linux and it is not in your path you always have to use a "./" before the command.

/bin/./apachectl start

But you would better off loading this as a service. The packages would probably set that up for you when you install it.


----------



## AKA Arizona (Jul 22, 2003)

linuxphile said:


> It could be that apt-get is not in your path. You can determine the exact location of apt-get by issuing:
> whereis apt-get
> 
> Use the full path of apt-get to install the packages. ex: /sbin/apt-get install httpd php
> ...


I did that now I get this

[email protected][~]# apt-get install httpd php
Reading Package Lists... Done
Building Dependency Tree... Done
W: Couldn't stat source package list ftp://ftp.us.debian.org testing/main Packages (/var/lib/apt/lists/ftp.us.debian.org_debian_dists_testing_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://ftp.us.debian.org testing/contrib Packages (/var/lib/apt/lists/ftp.us.debian.org_debian_dists_testing_contrib_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://ftp.us.debian.org testing/non-free Packages (/var/lib/apt/lists/ftp.us.debian.org_debian_dists_testing_non-free_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://ftp.us.debian.org unstable/main Packages (/var/lib/apt/lists/ftp.us.debian.org_debian_dists_unstable_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://ftp.us.debian.org unstable/contrib Packages (/var/lib/apt/lists/ftp.us.debian.org_debian_dists_unstable_contrib_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://ftp.us.debian.org unstable/non-free Packages (/var/lib/apt/lists/ftp.us.debian.org_debian_dists_unstable_non-free_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://non-us.debian.org testing/non-US/main Packages (/var/lib/apt/lists/non-us.debian.org_debian-non-US_dists_testing_non-US_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://non-us.debian.org testing/non-US/contrib Packages (/var/lib/apt/lists/non-us.debian.org_debian-non-US_dists_testing_non-US_contrib_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://non-us.debian.org testing/non-US/non-free Packages (/var/lib/apt/lists/non-us.debian.org_debian-non-US_dists_testing_non-US_non-free_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://non-us.debian.org unstable/non-US/main Packages (/var/lib/apt/lists/non-us.debian.org_debian-non-US_dists_unstable_non-US_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://non-us.debian.org unstable/non-US/contrib Packages (/var/lib/apt/lists/non-us.debian.org_debian-non-US_dists_unstable_non-US_contrib_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://non-us.debian.org unstable/non-US/non-free Packages (/var/lib/apt/lists/non-us.debian.org_debian-non-US_dists_unstable_non-US_non-free_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://download.videolan.org sid/main Packages (/var/lib/apt/lists/download.videolan.org_pub_videolan_debian_dists_sid_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://2004.mepis.org testing/main Packages (/var/lib/apt/lists/2004.mepis.org_mepis_dists_testing_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://ftp.nerim.net unstable/main Packages (/var/lib/apt/lists/ftp.nerim.net_debian-marillat_dists_unstable_main_binary-i386_Packages) - stat (2 No such file or directory)
W: You may want to run apt-get update to correct these problems
E: Couldn't find package httpd
[email protected][~]#


----------



## AKA Arizona (Jul 22, 2003)

Squashman said:


> I too would take there suggstion on installing the packages with apt-get. could you possibly post screen shots of what is happening. It would really help. Just saying "HUH" doens't let us know what your don't understand.
> 
> When you execute things from the command line in linux and it is not in your path you always have to use a "./" before the command.
> 
> ...


Sorry so vauge but HUH pretty well discribes my issues here apt-get root console never heard of it before 5 minutes ago


----------



## linuxphile (Mar 6, 2003)

The Apache package in mepis, I've just discovered, called apache2 and php is php4.

So try apt-get install apache2 php4


----------



## AKA Arizona (Jul 22, 2003)

explane why you have /bin/ before the ./ command


----------



## AKA Arizona (Jul 22, 2003)

linuxphile said:


> The Apache package in mepis, I've just discovered, called apache2 and php is php4.
> 
> So try apt-get install apache2 php4


Could not find apache2


----------



## linuxphile (Mar 6, 2003)

Try issuing just apt-get update, then if there are no errors, issue apt-get install apache2.

If you receive errors please post them here.


----------



## AKA Arizona (Jul 22, 2003)

linuxphile said:


> Try issuing just *apt-get update*, then if there are no errors, issue apt-get install apache2.
> 
> If you receive errors please post them here.


OK that apt-get update looks like it may have worked at the end it said this

Reading Package Lists... Done
E: Some index files failed to download, they have been ignored, or old ones used instead.


----------



## AKA Arizona (Jul 22, 2003)

OK after running apt-get apache2 I get this

W: You may want to run apt-get update to correct these problems
E: This installation run will require temporarily removing the essential package e2fsprogs due to a Conflicts/Pre-Depends loop. This is often bad, but if you really want to do it, activate the APT::Force-LoopBreak option.
E: Internal Error, Could not early remove e2fsprogs


----------



## Squashman (Apr 4, 2003)

AKA Arizona said:


> explane why you have /bin/ before the ./ command


Just an example. It could be any directory.


----------



## AKA Arizona (Jul 22, 2003)

There where some errors on both installs?


----------



## linuxphile (Mar 6, 2003)

I'm not terribly familiar with the packages installed with Mepis. According to a post at linuxforums.org you can use the following command: apt-get -o APT::Force-LoopBreak=1 install apache2


----------



## AKA Arizona (Jul 22, 2003)

OK when I enter this comand ./configure --prefix=PREFIX and change the PREFIX to /root/apache/running so it looks like this ./configure --prefix=/root/apache/running that should do what?


----------



## AKA Arizona (Jul 22, 2003)

Apache might be installed how do I open it? what is the exe file in Linux?


----------



## AKA Arizona (Jul 22, 2003)

OK after much reading and doing many different things when my system boot one command I see is apache2 starting. With that I see no indicators once the gui is satrted that I can do anything with apache how do gui with apache?


----------



## tsunam (Sep 14, 2003)

gui with apache?? what exactly do you need the gui to do? phpmyadmin or the like in any case is what you are looking for.


----------



## AKA Arizona (Jul 22, 2003)

Unfortunately its my lack of programing experience because of the worlds indoctrination of Windows. I just asume that everything is done through a GUI so how is done?


----------



## linuxphile (Mar 6, 2003)

To configure apache you'll need to edit, with vi, gedit, or an editor of your choosing, httpd.conf. httpd.conf on my system is located in /etc/httpd/conf/httpd.conf. You could also install webmin and use the webmin gui to modify the apache configuration.


----------



## tsunam (Sep 14, 2003)

assuming you still did the ./configure --prefix. it might be in /root/apache/running instead of the /etc/httpd/...every distro does it slightly different. In gentoo its /etc/apache/httpd.conf.


----------



## AKA Arizona (Jul 22, 2003)

after botching something I starting from scratch, I looked in my /etc/ folder and found apache inside that folder is a file called modules.conf.old not sure about that. When I run the apt-get command, does Linux look at mirror sites to find the files download them and then install them?


----------



## tsunam (Sep 14, 2003)

what happens with apt-get, is that you download .rpm files. This is very much like a container you'd have such as zip or rar. However, unlike those containers, the rpm is also the installer for the program.

As far as downloading, its exactly what it does.


----------



## AKA Arizona (Jul 22, 2003)

Still confused about this, so do need to download the tar.gz then extract it with ark then what?


----------



## tsunam (Sep 14, 2003)

a tar.gz or a tar.bz it a source package (IE you can go look at the code that the program is made of, make changes customize it to your needs), apt-get should grab the rpm for you.

There should be almost no reason for you to get a .tar.gz or tar.bz, the exceptions are a) no one has created a rpm for it b) you are masochistic and want to use source in a binary distro


----------



## AKA Arizona (Jul 22, 2003)

OK Im back to this could you explain what I did

[email protected][~]# apt-get install apache2
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
apache2-common apache2-mpm-worker apache2-utils e2fslibs e2fsprogs
initscripts libapr0 libc6 libc6-dev libexpat1 libssl0.9.8 locales lsb-base
openssl ssl-cert
Suggested packages:
apache2-doc lynx www-browser gpart e2fsck-static glibc-doc manpages-dev
ca-certificates
The following NEW packages will be installed:
apache2 apache2-common apache2-mpm-worker apache2-utils libapr0 libssl0.9.8
lsb-base openssl ssl-cert
The following packages will be upgraded:
e2fslibs e2fsprogs initscripts libc6 libc6-dev libexpat1 locales
7 upgraded, 9 newly installed, 0 to remove and 744 not upgraded.
Need to get 17.4MB of archives.
After unpacking 16.6MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 ftp://ftp.us.debian.org testing/main libc6-dev 2.3.5-8 [2684kB]
Get:2 ftp://ftp.us.debian.org testing/main locales 2.3.5-8 [4061kB]
Get:3 ftp://ftp.us.debian.org testing/main libc6 2.3.5-8 [5056kB]
Get:4 ftp://ftp.us.debian.org testing/main e2fslibs 1.38-2 [78.9kB]
Get:5 ftp://ftp.us.debian.org testing/main e2fsprogs 1.38-2 [526kB]
Get:6 ftp://ftp.us.debian.org testing/main lsb-base 3.0-11 [12.2kB]
Get:7 ftp://ftp.us.debian.org testing/main initscripts 2.86.ds1-4 [36.3kB]
Get:8 ftp://ftp.us.debian.org testing/main libssl0.9.8 0.9.8a-3 [2644kB]
Get:9 ftp://ftp.us.debian.org testing/main libexpat1 1.95.8-3 [59.6kB]
Get:10 ftp://ftp.us.debian.org testing/main libapr0 2.0.54-5 [131kB]
Get:11 ftp://ftp.us.debian.org testing/main openssl 0.9.8a-3 [977kB]
Get:12 ftp://ftp.us.debian.org testing/main ssl-cert 1.0-11 [6904B]
Get:13 ftp://ftp.us.debian.org testing/main apache2-utils 2.0.54-5 [91.0kB]
Get:14 ftp://ftp.us.debian.org testing/main apache2-common 2.0.54-5 [800kB]
Get:15 ftp://ftp.us.debian.org testing/main apache2-mpm-worker 2.0.54-5 [206kB]
Get:16 ftp://ftp.us.debian.org testing/main apache2 2.0.54-5 [33.4kB]
Fetched 17.4MB in 1m30s (192kB/s)
W: Couldn't stat source package list ftp://non-us.debian.org testing/non-US/main Packages (/var/lib/apt/lists/non-us.debian.org_debian-non-US_dists_testing_non-US_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://non-us.debian.org testing/non-US/contrib Packages (/var/lib/apt/lists/non-us.debian.org_debian-non-US_dists_testing_non-US_contrib_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://non-us.debian.org testing/non-US/non-free Packages (/var/lib/apt/lists/non-us.debian.org_debian-non-US_dists_testing_non-US_non-free_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://non-us.debian.org unstable/non-US/main Packages (/var/lib/apt/lists/non-us.debian.org_debian-non-US_dists_unstable_non-US_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://non-us.debian.org unstable/non-US/contrib Packages (/var/lib/apt/lists/non-us.debian.org_debian-non-US_dists_unstable_non-US_contrib_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://non-us.debian.org unstable/non-US/non-free Packages (/var/lib/apt/lists/non-us.debian.org_debian-non-US_dists_unstable_non-US_non-free_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list http://2004.mepis.org testing/main Packages (/var/lib/apt/lists/2004.mepis.org_mepis_dists_testing_main_binary-i386_Packages) - stat (2 No such file or directory)
W: Couldn't stat source package list ftp://ftp.nerim.net unstable/main Packages (/var/lib/apt/lists/ftp.nerim.net_debian-marillat_dists_unstable_main_binary-i386_Packages) - stat (2 No such file or directory)
W: You may want to run apt-get update to correct these problems
E: This installation run will require temporarily removing the essential package e2fsprogs due to a Conflicts/Pre-Depends loop. This is often bad, but if you really want to do it, activate the APT::Force-LoopBreak option.
E: Internal Error, Could not early remove e2fsprogs
[email protected][~]#


----------



## tsunam (Sep 14, 2003)

something seems off with mepis's apt-get resolution etc. Basically it seems to be erroring out on the mirrrors... it should be going here ftp://non-us.debian.org/debian-non-US/pool/non-US instead of ftp://non-us.debian.org unstable/non-US

so that's why it's not grabbing them. Lets open up the /etc/apt/sources.list and take a look at whats in there.

after we get the right mirror locations, we should be able to download and install with apt (never had a binary distro come by default with broken mirrors)

mepis-- for that one

edit: sorry for the delay in my reply

Second edit: http://www.mepislovers-wiki.org/index.php?title=Enable_Debian_Sources is probably a easier way. This is what it should end up looking like http://www.mepislovers-wiki.org/index.php?title=Sources.list

oh and yes it does get better


----------



## AKA Arizona (Jul 22, 2003)

OK I opened the file but was unable paste to it, this what it looked like and BTW Im just glad someone has stuck on this long THANKS 

# See sources.list(5) for more information, especialy

# This file may be edited by the MEPIS System Center
# Do not modify the comments manually!
# Change sources only in the section at the end of this file!

# Primary
deb ftp://ftp.us.debian.org/debian testing main contrib non-free
#deb-src ftp://ftp.us.debian.org/debian testing main contrib non-free
deb ftp://ftp.us.debian.org/debian unstable main contrib non-free
#deb-src ftp://ftp.us.debian.org/debian unstable main contrib non-free

# non-us
deb ftp://non-us.debian.org/debian-non-US testing/non-US main contrib non-free
#deb-src ftp://non-us.debian.org/debian-non-US testing/non-US main contrib non-free
deb ftp://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free
#deb-src ftp://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free
deb http://download.videolan.org/pub/videolan/debian sid main

# MEPIS cds
#deb file:/mnt/cdrom testing main

# MEPIS pool - specific packages available on-line
deb http://2004.mepis.org/mepis testing main

# DO NOT EDIT ABOVE THIS LINE
# mplayer
deb ftp://ftp.nerim.net/debian-marillat/ unstable main


----------



## tsunam (Sep 14, 2003)

bingo..debian used to have the testing branch a while ago but they went away from that to code names, as you see from the sources.list on the wiki page its sid and etch. so we need to change the lines not commented out with # to having the proper names.


```
# Primary
deb ftp://ftp.us.debian.org/debian testing main contrib non-free
#deb-src ftp://ftp.us.debian.org/debian testing main contrib non-free
deb ftp://ftp.us.debian.org/debian unstable main contrib non-free
#deb-src ftp://ftp.us.debian.org/debian unstable main contrib non-free
```
should become


```
# Primary
deb ftp://ftp.debian.org/debian etch main contrib non-free
# deb ftp://ftp.debian.org/debian sid main contrib non-free
```
so on so forth throughout the document.

Doing so should allow you to do a apt-get update and then download and install *gasp*!

I'm heading home from work in a few so I'll check back in when I get there ~hour or so


----------



## AKA Arizona (Jul 22, 2003)

OK I replaced the lines in the file to look like this:

# See sources.list(5) for more information, especialy

# This file may be edited by the MEPIS System Center
# Do not modify the comments manually!
# Change sources only in the section at the end of this file!

# Primary
deb ftp://ftp.debian.org/debian etch main contrib non-free
# deb ftp://ftp.debian.org/debian sid main contrib non-free

# non-us
deb ftp://ftp.debian.org/debian etch main contrib non-free
# deb ftp://ftp.debian.org/debian sid main contrib non-free

# MEPIS cds
#deb file:/mnt/cdrom testing main

# MEPIS pool - specific packages available on-line
deb ftp://ftp.debian.org/debian etch main contrib non-free

# DO NOT EDIT ABOVE THIS LINE
# mplayer
deb ftp://ftp.debian.org/debian etch main contrib non-free

I ran apt-get update and got this:

[email protected][~]# apt-get update
Hit ftp://ftp.debian.org etch/main Packages
Hit ftp://ftp.debian.org etch/main Release
Hit ftp://ftp.debian.org etch/contrib Packages
Hit ftp://ftp.debian.org etch/contrib Release
Hit ftp://ftp.debian.org etch/non-free Packages
Hit ftp://ftp.debian.org etch/non-free Release
Hit ftp://ftp.debian.org etch/main Packages
Hit ftp://ftp.debian.org etch/main Release
Hit ftp://ftp.debian.org etch/contrib Packages
Hit ftp://ftp.debian.org etch/contrib Release
Hit ftp://ftp.debian.org etch/non-free Packages
Hit ftp://ftp.debian.org etch/non-free Release
Hit ftp://ftp.debian.org etch/main Packages
Hit ftp://ftp.debian.org etch/main Release
Hit ftp://ftp.debian.org etch/contrib Packages
Hit ftp://ftp.debian.org etch/contrib Release
Hit ftp://ftp.debian.org etch/non-free Packages
Hit ftp://ftp.debian.org etch/non-free Release
Hit ftp://ftp.debian.org etch/main Packages
Hit ftp://ftp.debian.org etch/main Release
Hit ftp://ftp.debian.org etch/contrib Packages
Hit ftp://ftp.debian.org etch/contrib Release
Hit ftp://ftp.debian.org etch/non-free Packages
Hit ftp://ftp.debian.org etch/non-free Release
Reading Package Lists... Done
[email protected][~]#

Did it update this time?


----------



## tsunam (Sep 14, 2003)

yes...yes it did. You didn't get any can not stat files etc. So you should be able to download the rpms for updates etc now as well. They should work as well


----------



## AKA Arizona (Jul 22, 2003)

updates etc? not sure about that one??


----------



## linuxphile (Mar 6, 2003)

You can now download updates and new packages. 

I believe what tsunam was getting at is that you can now continue to install updates with
apt-get upgrade 


or install apache with
apt-get get install apache2


A point of clarity: Debian/Mepis use .deb packages, not rpms, but the idea is very similar.


----------



## AKA Arizona (Jul 22, 2003)

Oh OK


----------



## AKA Arizona (Jul 22, 2003)

Actually stuff looks like its workin now, I am upgrading now.....


----------



## AKA Arizona (Jul 22, 2003)

heheheh it worked it works hehehe  OK now how do I config apache to my websites?


----------



## AKA Arizona (Jul 22, 2003)

Actually Im gona put this one solved and start a new thread about config Thanks


----------



## linuxphile (Mar 6, 2003)

You're going to have to be more specific. How do you mean configure? Do you need to know where to put your html files? If so, I believe the docroot is set to /usr/local/apache/htdocs, but I'm not sure. You can check your httpd.conf to determine where the docroot is set to.


----------



## tsunam (Sep 14, 2003)

glad to see we got you up and running on downloading lots of fun programs, and yeah linuxphile is right its .deb's sorry about that. .deb .rpm same thing to me


----------

