Web Hosting Talk







View Full Version : PHP and MySQL on a RaQ2?


CreedFeed
05-05-2001, 02:46 PM
Ok, I'm pretty much a complete newbie in dealing with Raq's... Just got a RaQ2 (it's not actually mine, but I'm helping out with it) from Rackshack and need to install PHP and MySQL on it. I've done a little searching for installation tips and most of the info I have found deal with RaQ3's and RaQ4's. Is there any kind of easy step-by-step guide for installing PHP and MySQL on a RaQ2?

CreedFeed
05-05-2001, 08:59 PM
I did a little more searching and found these instructions, but they were given for installing MySQL on a Raq3... will it work on a RaQ2 as well?

====================

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

cgisupp
05-05-2001, 09:22 PM
The RAQ2 is a very different beast to the 3 or 4 because it uses a Mipsel processor, if you install MySQL 3.23 you need to compile it from source code, the problem being that the existing glibc libraries won't allow you to compile the code properly.
After some research it is apparent that you need to download the new glibc libraries :

[4] Get the new glibc:
ftp://ftp.cobaltnet.com/pub/experimental/
glibc-profile-2.0.7-29C2.mips.rpm
glibc-debug-2.0.7-29C2.mips.rpm
glibc-devel-2.0.7-29C2.mips.rpm
glibc-2.0.7-29C2.mips.rpm

[5] Install the new glibc:
cd
rpm -Uvh --force --nodeps glibc-*-29C2.mips.rpm

[6] Run ldconfig:
/sbin/ldconfig

[6] Get egcs and libstdc++:
(Alternately you could downnload and compile get gcc 2.95.1 and
libstdc++.)

ftp://ftp.linux.sgi.com/pub/linux/mips/mipsel-linux/RPMS/mipsel/
egcs-1.0.2-9.mipsel.rpm
egcs-c++-1.0.2-9.mipsel.rpm
egcs-g77-1.0.2-9.mipsel.rpm
egcs-objc-1.0.2-9.mipsel.rpm
libstdc++-2.8.0-9.mipsel.rpm
libstdc++-devel-2.8.0-9.mipsel.rpm

[7] Install egcs & libstdc++
rpm -e gcc-objc
rpm -e gcc-c++
rpm -e gcc
rpm -Uvh egcs*-1.0.2-9.mipsel.rpm

rpm -e libg++-devel-2.7.2.8
rpm -i libstdc++*-2.8.0-9.mipsel.rpm

Sounds like alot of work, and not for the faint of heart, so unless you need MySQL 3.23 you might just want to install the 3.22 variant available at :
ftp://ftp.cobaltnet.com/pub/experimental/
Its quite old now but I know it works as I have it working on 3 RAQ2's. If you have any problems let me know.

cgisupp
05-05-2001, 09:26 PM
Also need to mention that the above PHP4 installation probably won't work on a RAQ2 out of the box, because it also needs to have flex-2.5.4 installed.

CreedFeed
05-06-2001, 11:22 PM
About MySQL, does it matter about the older version? I'm using some basic queries on a database. Should that older version make a real difference?

Also, what is flex-2.5.4 ? Where do I find that and is that easy to install?

cgisupp
05-06-2001, 11:38 PM
I have been using MySQL 3.22 for some time and it works fine and is easy to install, other versions will need to be compiled.

You can get flex from the cobalt experimental ftp site also.

Here are the files you will need to install

MySQL-3.22.21-2C1.mips.rpm
MySQL-bench-3.22.21-2C1.mips.rpm
MySQL-client-3.22.21-2C1.mips.rpm
MySQL-devel-3.22.21-2C1.mips.rpm
Mysql-DBI-perl-bin-1.1825-rh50.1.mipsel.rpm
DBI-perl-bin-0.93-rh50.1.mipsel.rpm

CreedFeed
05-08-2001, 12:47 AM
Ok I think I understand how to do this now...

I log into Telnet as admin and execute the following command(s)

rpm -ihv ftp://ftp.cobaltnet.com/pub/experimental/FILENAME

where FILENAME is the files I want to install (the ones you listed in the last post) right?

Now, if I want to install PHP4, I can install that flex file that you named using the above method, just entering the exact file name from the cobalt FTP site???

If I do that, how do I install PHP4? Follow the directions I posted in my second post?

Thanks again for all your help cgisupp :)

cgisupp
05-08-2001, 12:52 AM
Yes install the flex rpm and then see how you go with compiling php4.05 from a src.rpm . Let me know how you go with the compile.

CreedFeed
05-08-2001, 01:06 AM
Sorry, I'm new at this and don't quite understand this... How do I go about compiling php4.05 from a src.rpm? On the Cobalt site is PHP3 src.rpm's and on the PHP.net site is a tar.gz copy of PHP4.05. ??

cgisupp
05-08-2001, 01:21 AM
Either the rpm or the tar.gz is fine as long as it is a source file and not binary.

CreedFeed
05-08-2001, 05:34 AM
When I try to install the MySQL-bench-3.22.21-2C1.mips.rpm file, I get the following error:

MySQL-DBI-perl-bin is needed by MySQL-bench-3.22.21-2C1

But I installed that file, except it is named Mysql-DBI... sql in small letters... on the cobalt site. ???

cgisupp
05-08-2001, 06:11 AM
Did you installl both
Mysql-DBI-perl-bin-1.1825-rh50.1.mipsel.rpm
DBI-perl-bin-0.93-rh50.1.mipsel.rpm

CreedFeed
05-08-2001, 06:14 AM
Yep. I did those two first, then the bench one... and it said I need the MySQL-DBI file...

CreedFeed
05-08-2001, 06:23 AM
Well I installed PHP4.05, and then I stopped and restarted the server. Now I get a DNS error when I try to access the IP # over ther web :(

http://216.40.197.190/

CreedFeed
05-08-2001, 09:25 PM
I got an email which states:

The main web server appears to be down. Make sure that the servers network interface has been
correctly configured in the network control panel. If it all looks correct, try rebooting the
server; if this still does not correct the problem, contact Cobalt Technical Support at
www.cobaltnet.com.

How do you reboot the server?

cgisupp
05-08-2001, 09:37 PM
don't worry about rebooting the server, it is related to the loading of the php module, you need to edit the
httpd.conf located at /etc/httpd/conf/httpd.conf
and comment out the line
LoadModule php4_module /usr/lib/apache/libphp4.so

Then restart apache
/etc/rc.d/init.d/httpd.init restart

CreedFeed
05-08-2001, 10:57 PM
Server works now... but PHP still doesnt :(

CreedFeed
05-10-2001, 04:12 PM
cgisupp,

can i install the PHP3 pkg from the rpm file right now, or would I have to uninstall the PHP4 stuff I attempted to install before?