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.
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.