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

Apache + PHP + MySQL on Linux Guide

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

Page 3: Steps 4-7

<B>Step 4: Compile MySQL</B>

From the command line, you need to cd (change directory) to the mysql source directory. There are three steps usually to compiling programs in Linux.

<tt>./configure
make
make install</tt>

This is what you'll need to do in the mysql source directory. Exact steps:

<tt># cd /path/to/mysql-3.23.43
# ./configure --prefix=/usr/local/mysql --with-mysql-user=mysql
# make
# make install</tt>

Okay, you may run into a problem with ./configure, like this one:

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

Before you start to panic, calm down! This is easily fixed (hopefully). In Lycoris, you'll need the dev tools cd (CD #3). You'll need to install all the rpms off of the cd. If your running Lycoris, the command is this:

<tt>rlinstall /mnt/cdrom/rl/devel/RPMS/*.rpm</tt>

You'll be prompted for the password. In Mandrake it is also simple enough, just select the development package and it'll load everything you need. If you run into trouble, <a href="/viewforum.php?forumid=15">ask for help in our Linux forum</a>. The most common thing is that you don't have a compiler installed. Goto <a href="http://gcc.gnu.org">gcc.gnu.org</a> to get it.

Once you get everything installed then your ready to do it again.

<tt># cd /path/to/mysql-3.23.43
# ./configure --prefix=/usr/local/mysql --with-mysql-user=mysql
# make
# make install</tt>

Once the ./configure is completed you'll see this:

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

Here is the kind of things you'll see when you 'make' the program...:

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

Here is the end of the make phase:

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

The extra part on the ./configure line is to tell the program to stick itself in the /usr/local/mysql directory and to automatically setup a user and group named mysql that can access the databases. Once you compiled MySQL, move on to step 5.

<B>Step 5: Install the database</B>

Your not done with the MySQL installation yet! cd to the newly created directory and install the db using a script given to you.

<tt># cd /usr/local/mysql/bin
# ./mysql_install_db</tt>

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

<B>Step 5a: Change directory ownership</B>

This step is not really needed, but it is good to know and use. The purpose is to make the database program and its databases not avaliable to anyone except the mysql group and root.

<tt># chown -R mysql /usr/local/mysql
# chgrp -R mysql /usr/local/mysql</tt>

<B>Step 6: Configure Apache</B>

In this step, we are only configuring apache NOT COMPILING IT! The process is similar to mysql, but do not do a make, make install yet! cd to the apache source directory and configure it.

<tt># cd /path/to/apache_1.3.20
# ./configure --prefix=/usr/local/apache</tt>

<B>Step 7: Compile PHP</B>

Now that Apache is configure, we will put PHP 'into' Apache. cd to the PHP source directory and compile it. You make need more things on your ./configure, depending on what PHP options you or your server uses.

<tt># cd /path/to/php-4.2.0
./configure --with-mysql=/usr/local/mysql \<br/>
--with-apache=../apache_1.3.20 \<br/>
--with-xml \<br/>
--enable-track-vars
# make
# make install</tt>

You may need to compile support programs for php. I had to compile pspell myself because php said it didn't have it. The above means: configure PHP with mysql in that directory, and then apache in the directory above it and in the apache_1.3.20 directory, then with xml support, then enabled track vars. This is a very basic install. My configure was much longer than this.
« Previous Page   Next 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: 18 (8 Cached)] [Rows: 293 Fetched: 36] [Page Generation time: 0.27857708930969]