Results 1 to 8 of 8
I'M working my way through a python book and it's got me writing a small python script for a web page display on my own system. I'M assuming I'll need ...
- 07-22-2011 #1Just Joined!
- Join Date
- Dec 2010
- Posts
- 66
installing apache
I'M working my way through a python book and it's got me writing a small python script for a web page display on my own system. I'M assuming I'll need to download apache to get this to work but I don't know how. After going to apache.org > downloads I'M presented with what looks like a web based file system, something I've never understood. Also, I get to many results from the Ubuntu Software Center to know what I should download. Thanks for any and all replies.
- 07-22-2011 #2Linux Guru
- Join Date
- Oct 2007
- Location
- Tucson AZ
- Posts
- 1,939
Don't do that. It will be much easier to use the Ubuntu package manager. I don't use the Software Center, usually use synaptic and you should be able to download apache there and get all the dependencies you may need resolved. Just open Synaptic and scroll down to apache or search for it or use the Software Center. Are you going to be using mysql database and/or php/perl? You should be able to find LAMP option somewhere in the software center or Synaptic.After going to apache.org > downloads
Might be helpful if you indicated the specific purposes for installing apache.
- 07-23-2011 #3Just Joined!
- Join Date
- Dec 2010
- Posts
- 66
Thanks. But take another look at my thread concerning the reason. I reading a book on python and I've come to a chapter on web programming. I know nothing about servers and I have a thousand questions.
- 07-23-2011 #4
Ubuntu should have a package called "apache2" which automatically select everything you need for the basic Apache web server. Then there is "libapache2-mod-python" which you may need to run python.
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 07-23-2011 #5Just Joined!
- Join Date
- Dec 2010
- Posts
- 66
Thanks. Well I got apache installed but now I can't figure out how to start it. Typing apache or apahce2 in the command terminal doesn't work. It's also not listed in any of the gnome applications menu.
The python book I'M reading also had me to create a small .cgi python script with the first line being #!/usr/bin/env python
I don't understand that file path. What is env python? There's no / between the two so it looks like that one file to me. My file system does not have a env python file or an env directory under bin. And on my system the python files have 2.6 and 3 behind them.
- 07-23-2011 #6
Apache is a server application and as such it runs as a service. This means there will be no entries in the menus. To check if it is running open a terminal and run the following command
If you get no processes shown, then you can start the service by running the commandCode:ps ax | grep apache
This is a tutorial on setting up vhosts for development. It is for LMDE but should also work for Ubuntu.Code:/etc/init.d/apache2 start
I don't know much about Python but that looks like Python's way of saying where the interperator is.If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 07-23-2011 #7Just Joined!
- Join Date
- Dec 2010
- Posts
- 66
$ ps ax | grep apache
2735 ? Ss 0:35 /usr/sbin/apache2 -k start
2846 ? S 0:00 /usr/sbin/apache2 -k start
14696 ? Z 0:00 [apache2] <defunct>
14697 ? Z 0:00 [apache2] <defunct>
14698 ? Z 0:00 [apache2] <defunct>
14700 pts/0 S+ 0:00 grep --color=auto apache
Was the output I got.
- 07-24-2011 #8Linux Guru
- Join Date
- May 2011
- Posts
- 1,838
It appears that the Apache daemon is hung. You can try to stop it:
/etc/init.d/apache2 stop
but I doubt that'll zap the zombies (defunct processes). you'll probably have to reboot to get rid of them. Before you reboot, make sure the apache daemon is enable to auto-start. i'm not sure about Ubuntu, but maybe something like:
chkconfig apache2 on
Regarding the /usr/bin/env question, env is used to search your PATH for python. It is convention used to make scripts more portable by not tying the interpreter down to a specific path.


Reply With Quote