[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] A Decent how to install PHP 4.2.3 on a Raq 4. in 10 steps
- Subject: [cobalt-users] A Decent how to install PHP 4.2.3 on a Raq 4. in 10 steps
- From: BSmith@xxxxxxxxxxx
- Date: Thu Nov 21 09:09:00 2002
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
Preface:
I am NOT, nor will I ever be a god on Linux / Unix or even Cobalt. This
comes to you with this 1 warning
message. If you try this at home, and it cripples your RAQ 4, there is NO
ONE, and I mean NO ONE
to blame but yourself. I have successfully tried this on 2 Cobalt Raq 4's,
with the majority of the updates
(minus the last two). I do NOT know how it will re-act to your RAQ. So, if
it breaks, oh well ... You have
been warned.
This guide will show you how to install PHP 4.2.3 on a Cobalt Raq 4. It is
NOT intended for someone who
does not know what ls -lat mean. So, if you think you know Linux, give it a
try. If it does NOT compile for
you, then you have nothing to fear.
This does NOT use PHP's auto-install ... blah. I like to know where my
files are going. Don't you?
Step #1
Make a "temp install" directory.
mkdir /root/php_install
Go into said directory
cd /root/php_install
Step #2
Download PHP 4.2.3 from www.php.net.
Step #3
Extract the files from the archive.
tar xfvpz php-4.2.3.tar.gz
Step #4
Go into the PHP directory
cd php-4.2.3
Step #5
This is where it get's tricky. In order to use some features, such
as "libpng & libjpeg", you need to
make symbolic links. These two links should work for you.
ln -s /usr/lib/libjpeg.so.62 /usr/lib/libjpeg.so
ln -s /usr/lib/libpng.so.3.1.2.1 /usr/lib/libpng.so
Step #5
This is where you need to pay attention. If it fails this part, do
NOT continue. I would recommend
doing some research to why it had failed. Post to here, maybe
someone will know.
(just copy & paste it, then hit enter)
./configure --disable-debug --enable-ftp --enable-magic-quotes
--enable-mbstr-enc-trans --enable-mbstring \
--enable-safe-mode --enable-mm=shared --enable-track-vars
--enable-xml --prefix=/usr --enable-wddx=shared \
--enable-sockets --with-apxs=/usr/sbin/apxs
--with-config-file-path=/etc/httpd/4.2.3/ \
--with-exec-dir=/usr/bin --with-gettext=/usr --with-imap
--with-interbase=shared \
--with-iconv --with-ldap --with-mysql=shared --with-pgsql=shared
--with-jpeg-dir=/usr --with-png-dir=/usr \
--with-regex=system --with-zlib --with-libdir=/usr/lib --with-ttf
--with-pdflib=shared
You should see a whole bunch of stuff flying on your screen. Go
smoke, eat a donut, or drink coffee!!
Step #7
If the above step goes good, you will see the following messages (I
cut ALOT out, but you should get the point)
*** WARNING ***
You chose to compile PHP with the built-in MySQL support. If you
are compiling a server module, and intend to use other server
modules that also use MySQL (e.g, mod_auth_mysql, PHP 3.0,
mod_perl) you must NOT rely on PHP's built-in MySQL support, and
instead build it with your local MySQL support files, by adding
--with-mysql=/path/to/mysql to your configure line.
blah, blah, blah and some more garbage! This is good, that means it
worked!!!!
Now, the hard part. To compile your software. The following
command, and then hit enter.
make
(Yep, just 4 little words). This should take about 5 minutes or so.
Once again, you deserve a break, because
your a hardworking system admin. Go enjoy it
Step #8
By now, hopefully the system compiled properly. If not, once again,
it is time to do some serious research.
The "make" should have create a bunch more files. Now it is time to
do the install
(follow the commands, line by line. You should be fine!!)
mkdir /usr/lib/apache/php/4.2.3
mkdir /etc/httpd/4.2.3
cd modules
cp * /usr/lib/apache/php/4.2.3
cd ../.libs/
cp libphp4.so /etc/httpd/modules/libphp4.2.3.so
cd ..
cp php.ini-dist /etc/httpd/4.2.3/php.ini
Okay, that should have installed everything into the proper place.
Step #9
Now you need to edit your httpd.conf file. For this, you will need
to edit 1 file, and make 1 change.
Using your favorite editor:
pico /etc/httpd/conf/httpd.conf
Search for the following line.
LoadModule php4_module modules/libphp4.so
Comment out that line (in case you have problems with your new php)
#LoadModule php4_module modules/libphp4.so
Add a line underneath it that looks like this:
LoadModule php4_module modules/libphp4.2.3.so
Save the file.
Step #10
Restart your apache server. Watch for any errors. If it doesn't
start, then your web server is done, all you
need to do is comment out the new line, and uncomment out the old
line. See, that is why I made you do
that.
/etc/rc.d/init.d/httpd restart
That is it, your all done. Now you will need to test it, to make
sure that it works.
In a site that has PHP enabled, Make a test PHP file, with the
following line in it. It will tell you
if 4.2.3 is working
<?php phpinfo(); ?>
Save it, and then test it in your web browser.
That is all. Have a great day. If you like this, and want to send me lots
of $$$$. Cool, and if not. Oh well. That
is life. Maybe some day I will sit there and turn it into a PKG. But, if
you want to, it is almost already done!
Enjoy!
Brian Smith
CCNA, NCSA
Network Support Engineer
SOLUSERVE
www.solunet.com
1571 Robert J. Conlan Blvd., Suite 110
Palm Bay, FL 32905
(888)449-5766
fax: (321)-676-1287