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

Re: [cobalt-users] Uninstalling PHP4 + MySQL?



> Hi,
>
> I just installed MySQL and PHP4 by following instructions on a website. It
> didn't work so now I wonder how I uninstall thouse two programs? After I
> have uninstalled thouse two progeams I will reinstall them but then with
> other instructions that I think work better.
>
> So my question is: How do I uninstall PHP4 + MySQL?
>
1st >>  http://pkg.nl.cobalt.com/howto/cobalt_uninstall_howto.html

2nd >>How do I install PHP4 on my RAQ3? [Top]
I was able to install PHP4 on my machine as follows. I've not tested it
fully yet, but the web server is now processing basic PHP instructions.

PHP version: 4.0.4pl1

Logged in as 'root' perform the following commands
   cd /home/sites/home/users/admin
   wget
http://www.php.net/do_download.php?download_file=php-4.0.4pl1.tar.gz&source_
site=www.php.net
   tar -xvzf php-4.0.4pl1.tar.gz
   cd php-4.0.4pl1
   ./configure --with-mysql --with-apxs
   make
   make install
PHP4 is now installed on your machine, but you need to hook it in properly
to httpd. Unfortunately, the standard install seems to mis-configure a
little, so you need to make the following change manually to
/etc/httpd/conf/httpd.conf


Change the line
   LoadModule    php4_module    lib/apache/libphp4.so
to
   LoadModule    php4_module    /usr/lib/apache/libphp4.so
You also need to make the following change to /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
This associates the .php file extension with PHP4




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
You can use the following file to test whether the installation has worked.
Save the file with a .php extension and access it from one of your web
sites. If PHP is properly installed, it will print 'Hello World' - if PHP is
misconfigured, it will only print 'Hello'.

   <html>
   <body>
   <p>Hello
   <?echo "World";?>
   </body>
   </html>


3>>  How do I install MySQL on my RAQ?
Notes:


In the following line: ensure that you change 'pass' with a password of your
choice! Keep the single quotes though.

   /usr/local/mysql/bin/mysqladmin -u root password 'pass'
# signifies comments, don't enter these or the following text in the command
line!
Download the file from here:
http://www.mysql.com/Downloads/MySQL-3.22/mysql-3.22.32.tar.gz
Upload it to the raq (pref. root dir or admin's /home/sites/home/web)
Telnet/ssh as root.
Enter the following:

   echo "mysql:x:101:103:MySql User:/usr/local/mysql:">>/etc/passwd
   echo "mysql:x:103:">>/etc/group
   cd /home/sites/home/web          # or wherever you put the file.
   tar zxvf mysql-3.22.32.tar.gz
   cd mysql-3.22.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 'pass'     # enter
password.
   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
The following are perl modules, they can be got from:
http://ftp.cobaltnet.com/ but are not essential:

   rpm -i perl-DBI-1.14-1.i386.rpm
   rpm -i perl-Msql-Mysql-modules-1.2214-1.i386.rpm
That's it!!