[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] Installing PHP4+MySQL



+Sent: Tuesday, February 20, 2001 6:18 AM
+To: Cobalt-Users@List. Cobalt. Com
+Subject: [cobalt-users] Installing PHP4+MySQL
+
+
+Which why is the best way to install MySQL and PHP4? Please explain in
+detail how I install thouse programs.

If one doesn't like to use the archives one should definitely keep a mail
folder
with the current months posts. I have monthly Cobalt folders for the past
2.5 years.

Detailed install instructions are posted regularly.

This is one of the better ones just posted on 2/12 by Steve Bassi:

============================================================================
======
Hi,
Try ths :-
login as root
mkdir usr/local/download
cd /usr/local/downoad
wget http://www.mysql.com/Downloads/MySQL-3.23/mysql-3.23.32.tar.gz
echo "mysql:x:101:103:MySql User:/usr/local/mysql:">>/etc/passwd
echo "mysql:x:103:">>/etc/group
tar zxvf mysql-3.23.32.tar.gz
cd mysql-3.23.32
./configure --prefix=/usr/local/mysql --with-unix-socket-path=/tmp/mysql.soc
k --with-mysqld-user=mysql
make
make install
chown mysql.mysql /usr/local/mysql
scripts/mysql_install_db
chown -R mysql.mysql /usr/local/mysql/var
mkdir /var/lib/mysql
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
rm -f /usr/bin/mysql
ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
chmod 755 /usr/local/mysql/var
/usr/local/mysql/bin/safe_mysqld &
/usr/local/mysql/bin/mysqladmin -u root password 'YOURPASSWORDHERE'
cp support-files/mysql.server /etc/rc.d/init.d/mysql
chmod 755 /etc/rc.d/init.d/mysql
echo "/etc/rc.d/init.d/mysql start">>/etc/rc.d/rc.sysinit

Then for PHP4

Logged in as 'root' perform the following commands

cd /usr/local/download
wget http://php.net/distributions/php-4.0.4pl1.tar.gz
tar -xvzf php-4.0.4pl1.tar.gz
cd php-4.0.4pl1
mkdir /usr/local/php
mv * /usr/local/php
cd /usr/local/php
rmdir /usr/local/download/php-4.0.4pl1
./configure --with-mysql --with-apxs --enable-track-vars
make
make install
cp php.ini-dist /usr/local/lib/php.ini

pico -w /etc/httpd/conf/httpd.conf
(Change the line:)
LoadModule    php4_module    lib/apache/libphp4.so
to
LoadModule    php4_module    /usr/lib/apache/libphp4.so)

pico -w /etc/httpd/conf/srm.conf

Find the following line in srm.conf
#AddType application/x-httpd-php .phtml
After this line, add the line
AddType application/x-httpd-php .php .php4 .phtml
This associates the .php file extension with PHP4

(If you want index.php to be served by default you need also to add this as
well in the section UserDir web of the same file)

# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index.  Separate multiple entries with spaces.

DirectoryIndex index.html index.htm index.shtml home.html home.htm index.php
index.php4 index.p$


Still logged in as 'root' perform the following commands to stop and restart
the HTTP server
/etc/rc.d/init.d/httpd stop
/etc/rc.d/init.d/httpd start

Hope that helps
Rgds
Steve Bassi