On Mon, 2005-03-07 at 21:32 +0100, Rene Bon Ciric (Renich) wrote:
Pre-Requisites:
- Login as root
- Connect to the internet (i assume you already are)
- run:
[root@fedora3 SRPMS]#yum update
I don't know if you really need the above, but you'll thank me! Remember you
should update udev (
http://fedora.redhat.com/docs/udev/)
An additional pre-requisite is that you have the development tools
installed, plus the development packages for all the libraries that your
builds use.
(snip)
2- Go to /usr/src/redhat/SRPMS and run:
[root@fedora3 SRPMS]# rpmbuild --rebuild sqlite3*.rpm
2.1- Go to /usr/src/redhat/RPMS/i386 and run:
[root@fedora3 i386]# rpm -Uhv sqlite3*.rpm
2.2- Return to /usr/src/redhat/SRPMS and run:
[root@fedora3 SRPMS]# rpmbuild --rebuild pcre*.rpm
2.3- Go to /usr/src/redhat/RPMS/i386 and run:
[root@fedora3 i386]# rpm -Uhv pcre*.rpm
2.4- Return to /usr/src/redhat/SRPMS and run:
[root@fedora3 SRPMS]# rpmbuild --rebuild *.rpm
Go get something to eat, spend time with your family or make some
excercise 'cause this is gonna take some time.
This stage would take slightly less time if you had moved the SRPMs for
sqlite3 and pcre out of the way so that you weren't rebuilding them
again.
(snip)
6.- Go to /usr/src/redhat/SRPMS and install the PHP5 source code
with:
[root@fedora3 SRPMS]# rpm -i php*.rpm
6.1- Go to /usr/src/redhat/SOURCES and copy the file php-5.0.3-2.tar.gz to the
directory BUILD with:
[root@fedora3 SOURCES]# cp php-5.0.3-2.tar.gz /usr/src/redhat/BUILD/
And go there.
6.2- UnGzip with
[root@fedora3 BUILD]# gzip -d php-5.0.3-2.tar.gz
6.3- UnTar with
[root@fedora3 BUILD]# tar -xvf php-5.0.3-2.tar
These two steps can be combined as one:
[root@fedora3 BUILD]# tar xfz php-5.0.3-2.tar.gz
6.4- Go to /usr/src/redhat/BUILD/PHP5.0.3-2/ext/mysqli and run:
[root@fedora3 mysqli]# phpize
[root@fedora3 mysqli]# ./configure --enable-embedded-mysqli \
--enable-static \
--with-mysqli=/usr/bin/mysl_config \
--with-php-config=/usr/bin/php-config
Note:
Each time you type a "\" press enter once, it wont start, it will give you a
new line so
your command doesn't look like this:
./configure --enable-embedded-mysqli --enable-static
--with-mysqli=/usr/bin/mysl_config
--with-php-config=/usr/bin/php-config
6.5- Keep your fingers crossed and pray, concentrante, think positive, sing... do
something
so the command works!
6.6- If no error message apears just run:
[root@fedora3 mysqli]# make install
6.7- Now go to /etc/php.d and make a copy of the mysql.ini file so we can use it as the
mysqli.ini file with:
[root@fedora3 SRPMS]# cp mysql.ini mysqli.ini
6.8- Edit this file with nano mysqli.ini and make shure the file looks like this:
; Enable mysqli extension module
extension=mysqli.so
6.8.1- Save the changes with ctrl+o and exit with ctrl+x
A nice addition would be to package this extension as an RPM... I
personally don't like having any software installed by non-RPM means.
THE END
Be happy and I hope it works as well for you as for me.
Remember to create the mysql user and password (# mysqladmin -u root password
"whatever") and to put an index.php in /var/www/html/ with a <?php phpinfo();
?> to check if everything is ok.
Very good!
A useful tweak to this procedure would be to build the RPMs as a user
other than root, which is not a good thing to be doing really. Ideally
you should only use root to install the packages, not to build them.
Paul.
--
Paul Howarth <paul(a)city-fan.org>