I just did this on Slackware 10.2 (su or logged in as root for all this)
99% of the time I manually install via configure, make, make install. Usually I have been following the latest Apache and PHP, and using MySQL 4.1.x. But have decided to make the jump to MySQL 5.0.x
On a new server, I manually installed Apache 2.0.55 (Often use 2.2.x as well)
./configure --prefix=/usr/local/apache2 --enable-so --enable-ssl
make
make install
edit your httpd.conf (Sorry I am not covering this in detail here.)
Then I tried manually compiling MySQL 5.0.20a and also tried the general linux binary, but couldn't get php5 to compile with support for it working. So I broke down and found the slackware package for it.
installed mysql-5.0.20a-i486-1.tgz using pkgtool
then followed these post install instructions:
http://dev.mysql.com/doc/refman/5.0/...tallation.html
Which is basically:
bin/mysql_install_db --user=mysql
bin/mysqld_safe --user=mysql &
check that it's running and connection works:
bin/mysqladmin version
setup a password
/bin/mysqladmin -u root password 'newpassword'
If these steps don't work, you might have to do this:
cd /var/lib/mysql
chown -R root mysql
chown -R myusername mysql
chown -R mysql mysql
Once MySQL 5.0.20a is installed and working from the package install, move on.
PHP 5.1.2 source install:
apachectl stop
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-zlib --with-bz2 --with-openssl --with-https --with-ftps --enable-mbstring
make
make install
edit your php.ini file (sorry I am not covering this in detail here)
apachectl start
Make sure Apache and MySQL are started, do a phpinfo() to make sure you see:
Client API version 5.0.20a Listed in the mysql section
Also make sure it shows the php.ini path you expect and that it shows the correct Apache version and path as well.
And to finish up, I installed phpmyadmin 2.7 (because I don't like the current 2.8 right now) and make sure phpmyadmin can connect and works. This will verify that php5 and mysql5 are working together. --enable-mbstring is so you can properly do utf-8 if you ever need to. And it keeps phpmyadmin from having a notice about mbstring not being enabled.