View Full Version : Tutorial on Installing Apache/MySQL/PHP
stephanj
28th March 2005, 05:15 AM
Hi all,
Well I have finally got off by bum and completed a mini tutorial on how to install Apache MySQL 4.1 and PHP on FC3.
There are probably a few typos and errors so feel free to email me with any comments and corrections I need to make.
I'm no guru but I hope this helps someone.................. I have tried it a few times and seems to work fine.
It is currenly sitting on a work server but if it is helpful I could place it on this site....
Tell me what you think? The URL is
http://cit.wta.swin.edu.au/cit/subjects/CITP0186S/LAMP/Installing-LAMP.html
stephanj
stephanj@melbpc.org.au
backroger
28th March 2005, 06:30 AM
nice article!!!
Zigzagcom
28th March 2005, 06:34 AM
stephanj,
thanks for this wonderful tutorial. It is the intergration between the use of the CLI and GUI that makes this truly a bridge for beginners. A great reference work...we certainly need more of this, making use of the screen capture feature.
Dizmatic
30th March 2005, 02:42 PM
Thank you. I really needed this. Appreciate you taking the time out to do this. Makes the Linux learning curve alot easier.
BandC
30th March 2005, 07:57 PM
Great tutorial! Nice job.
gen
31st March 2005, 04:31 AM
Great tutorial! Consolidating the steps was a huge help.
I encountered some quirks during the setup process.
I'll write them here in case anyone has similar problems,
I installed on Fedora Core 3.
My problem occured because Apache did not install PHP
for me and it was not already on my system. This must be because
I compiled and installed apache from source before I found this
guide. Based on your guide, the RPM must install it.
So I installed a PHP 4 package using synaptic and everything seemed fine.
I modified the httpd.conf with the path to the php library. And I was able to
run the php scripts in my web browser. I installed MySQL and that whole setup procedure went fine.
Here's where I hit a wall. When I ran the connect script
nothing happened, although regular php was working fine.
I did some digging on the PHP website and it turns out that in PHP 4,
by default, MySQL support is enabled BUT if the path to the local MySQL
header files are not specified at compile time, PHP 4 will use its own internal
MySQL libraries instead of the ones that Apache is using (the ones you install).
As a result you won't be able to connect to the database.
So I uninstalled all the PHP RPMs and downloaded the source from their website.
Then I compiled with apxs2 support enabled and the local path to the
MySQL headers specified.
Then lo and behold "School Gymnastics Program." Boy was I happy to see that!
For anyone compiling Apache and PHP from source, here are the configure options
I used (and my paths too, they may be different on other people's systems):
For Apache:
Enable Apache's DSO (dynamic shared object) support at configure time:
> configure --enable-so
For PHP 4:
Enable support for the APache eXtenSion tool (apxs) and MySQL
> ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr
Note: On my system the path to the mysql headers were under /usr/include/mysql
but unless I used just /usr it couldn't find the headers.
after installing PHP my httpd.conf was automatically updated with the path
to the PHP shared library. I still had to add the mime types though.
I haven't upgraded to MySQL 4 and PHP 5 yet, but I wanted to get PHP 4 working before
I introduced any new variables into the equation. Apparently PHP 5 no longer
comes with internal MySQL libraries, and from my experience this is a good thing.
Okay hopefully this will help someone out. Thanks again for the guide.
c_07
12th March 2007, 04:03 PM
Excellent, thank you!
goahead
18th March 2007, 11:07 AM
Awesome guide.
Been trying to get mysql and apache to work i100% n windows for weeks but without any luck.
Tried this in fedora and it workd right away.
Cheers
wspeers
22nd March 2007, 01:17 AM
really good job. i would like a little more details on the apache setup but that's a whole nother site i think.
DJWK
8th April 2007, 08:49 PM
Thank you for this article! I see that it was written in 2005 but still works like a charm. Nice to get things working without spending all day on it, now I can concentrate on webdevelopment instead of configuring servers and stuff. Great Job!
Jobla
10th May 2007, 05:26 PM
Hello nice guide!
I’m new on Linux and want to setup LAMP.
Searched the forum and found this guide.
So I downloaded and installed Fedora 3. Started to follow the guide step by step.
But I’m struck at part 3.
The tricky bit is that FC3 has introduced new security content with users' public_html
Directories. So let's change it with the chcon command. Type in the command
below. IF YOU DON'T DO THIS YOU WILL NOT BE ABLE TO VIEW ANY
HTML FILES IN THE USER'S HOME DIRECTORY!l
I have done as it says in the guide http://cit.wta.swin.edu.au/cit/subjects/CITP0186S/LAMP/Installing-LAMP.html :
[root]@dhcppc10 ~]# chcon -R -t httpd_sys_content_t public_html
But I still can’t access my .html files
Did I miss something? Something I should config that is not in the guide?
Any help is appreciated
/Jobla
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.