ASE Labs
Welcome Guest. Please register or log in now. There are 275 people online (0 Friends).
  • Home
  • Articles
  • News
  • Forum
  • Register/Login

Apache + PHP + MySQL on Linux Guide

Author
Aron Schatz
Posted
October 11, 2002
Views
166597
A step by step guide to installing apache, php, and MySQL on Linux.
Tags Guides

Page 4: Steps 8-End

<B>Step 8: Compile Apache</B>

Your all set to compile Apache. cd to the source and do it!

<tt># cd /path/to/apache_1.3.20<br/>
# ./configure --prefix=/usr/local/apache --activate-module=src/modules/php4/libphp4.a
# make
# make install</tt>

<B>Step 9: Edit the httpd.conf file</B>

All your compiling is done now! Your next step is to edit a config file for Apache. Open up this file as root (/usr/local/apache/conf/httpd.conf):

<center><img src="http://www.aselabs.com/images/articles/oct02/serverguide/apacheconf.gif"></center>

Add these lines anywhere:

<tt>AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4</tt>

Find the line DirectoryIndex it'll be in like html tags. Inside it add <tt>index.php</tt>. This tells Apache that index.php can be an index in a directory.

<B>Step 10: Copy the php.ini file</B>

From the php source directory, copy one of the php.ini files (they will be named with stuff like 'dist' on the end of it) to /usr/local/lib/php.ini. Change anything you want in the file to suit your needs.

<B>Step 11: Test your server</B>

Start the server:
<tt># /usr/local/apache/bin/apachectl start</tt>

One of the final tasks. Create a file, test.php and put it into the htdocs of the apache directory. This is the directory where the website is.

test.php:
<tt><?PHP phpinfo(); ?></tt>

Now browse to http://localhost/test.php and you should get a page with a whole lot of things. If you see it, you've got your server working! If not, <a href="/viewforum.php?forumid=15">ask for help in our Linux forum</a>.

<B>Step 12: More MySQL stuff</B>

Now we want to make mysql nice and safe and make sure it works also. cd to the mysql directory and then to the 'bin' directory.

<tt># cd /usr/local/mysql/bin
# ./safe_mysqld --user=mysql &
# ./mysqladmin -u root password somepassword</tt> Change to whatever password you want

<B>Step 13: Auto Start up</B>

Last step. This makes MySQL and Apache start up when the OS is loaded.

<tt># echo "/usr/local/mysql/bin/safe_mysqld --user=mysql &" >> /etc/rc.d/rc.local
# echo "/usr/local/apache/bin/apachectl start" >> /etc/rc.d/rc.local</tt>

Now open up a can/bottle of your favorite drink (Diet Pepsi is my Fav) and kick back and do some programming!

<center><big><a href="http://www.aseforums.com">Get all your questions answered in the forums</a>!></center>
« Previous Page  
Page 1
Page 2
Page 3
Page 4
View As Single Page Print This Page Print Entire Article
Related Articles
  • OpenLDAP Installation On Ubuntu
  • DOS USB Bootable Drive
  • RAID Technology Part 2: RAID Levels
  • Cisco IOS: Home Router Configuration
  • RAID Technology Part 1

Title

Medium Image View Large
Login
Welcome Guest. Please register or log in now.
Forgot your password?
Navigation
  • Home
  • Articles
  • News
  • Register/Login
  • Shopping
  • ASE Forums
  • Anime Threads
  • HardwareLogic
  • ASE Adnet
Latest News
  • Kingston HyperX Cloud 2 Pro Gaming Headset Unboxing
  • Synology DS415+ Unboxing
  • D-Link DCS-5020L Wireless IP Pan/Tilt IP Camera
  • Actiontec WiFi Powerline Network Extender Kit Unboxing
  • Durovis Dive Unboxing
  • Bass Egg Verb Unboxing
  • Welcome to the new server
  • Gmail Gets Optional Preview Pane
  • HBO Go on Consoles
  • HP Touchpad Update
Latest Articles
  • D-Link Exo AC2600 Smart Mesh Wi-Fi Router DIR-2660-US
  • HyperX Double Shot PBT Keys
  • Avantree ANC032 Wireless Active Noise Cancelling Headphones
  • ScharkSpark Beginner Drones
  • HyperX Alloy FPS RGB Mechanical Gaming Keyboard
  • D-Link DCS-8300LH Full HD 2-Way Audio Camera
  • Contour Unimouse Wireless Ergonomic Mouse
  • HyperX Cloud Alpha Pro Gaming Headset
  • Linksys Wemo Smart Home Suite
  • Fully Jarvis Adjustable Standing Desk
Latest Topics
  • Hello
  • Welcome to the new server at ASE Labs
  • Evercool Royal NP-901 Notebook Cooler at ASE Labs
  • HyperX Double Shot PBT Keys at ASE Labs
  • Avantree ANC032 Wireless Active Noise Cancelling Headphones at ASE Labs
  • ScharkSpark Beginner Drones at ASE Labs
  • HyperX Alloy FPS RGB Mechanical Gaming Keyboard at ASE Labs
  • D-Link DCS-8300LH Full HD 2-Way Audio Camera at ASE Labs
  • Kingston SDX10V/128GB SDXC Memory at ASE Labs
  • What are you listening to now?
  • Antec Six Hundred v2 Gaming Case at HardwareLogic
  • Sans Digital TR5UTP 5-Bay RAID Tower at HardwareLogic
  • Crucial Ballistix Smart Tracer 6GB PC3-12800 BL3KIT25664ST1608OB at HardwareLogic
  • Cooler Master Storm Enforcer Mid-Tower Gaming Case at HardwareLogic
  • Arctic M571-L Gaming Laser Mouse at ASE Labs
  • Contour Unimouse Wireless Ergonomic Mouse at ASE Labs
Press Release
  • Huntkey Has Launched Its New Power Strips with USB Chargers on Amazon US
  • Inspur Releases TensorFlow-Supported FPGA Compute Acceleration Engine TF2
  • Hot Pepper Introduces Spicy New Smartphones in US Markets
  • Sharp Introduces New Desktop Printers For The Advanced Office
  • DJI Introduces Mavic 2 Pro And Mavic 2 Zoom: A New Era For Camera Drones
  • DJI Introduces Mavic 2 Pro And Mavic 2 Zoom: A New Era For Camera Drones
  • Fujifilm launches "instax SQUARE SQ6 Taylor Swift Edition", designed by instax global partner Taylor Swift
  • Huawei nova 3 With Best-in-class AI Capabilities Goes on Sale Today
  • Rand McNally Introduces Its Most Advanced Dashboard Camera
  • =?UTF-8?Q?My_Size_to_Showcase_Its_MySizeId=E2=84=A2_Mobil?= =?UTF-8?Q?e_Measurement_Technology_at_CurvyCon_NYC?=
Home - ASE Publishing - About Us
© 2010 Aron Schatz (ASE Publishing) [Queries: 14 (8 Cached)] [Rows: 290 Fetched: 33] [Page Generation time: 0.60289287567139]