Forum Moderators: bakedjake
Now i have to start all over again so i want to install all the latest versions of apache php en mysql. Usualy i just installed the software comming from the SLES9 DVD so i never had any configuration problems. Just go to Yast select the software and install. Now when i'm installing apache 2.0.55 it works. But trying to install php is a whole different cookie :) i dont really know HowTO. I got a lot of RPM's and they did install but after that my knowledge stops.
Long story short, does anybody knows where to find a HowTo for installing AND configuring a Apache2 (latest version) webserver, PHP4 (or if possible PHP5) and MySQL. I did find the install docs at php.net en apache.org en mysql.org but i think it's to mutch information for just installing the server. I'm not a Linux n00b, but no veteran either ;-)
Thanks for the info in advance.
Erik.
---------------------------------------------------
To begin with:
- You need all usual developer tools (compiler, make etc.)
- You have to de-install all Apache-, PHP- and MySQL packages (for example with YaST or with rpm -e).
-------
Installation MySQL 4.1.3
download these RPMs from [mysql.com...]
MySQL-server-4.1.3-1
MySQL-devel-4.1.3-1
MySQL-client-4.1.3-1
MySQL-shared-4.1.3-1
install them with rpm -i MySQL*.rpm
-------
Download these files (or newer versions) to /usr/local/src
zlib-1.2.1.tar.gz from [gzip.org...]
libxml2-2.6.10.tar.gz from [xmlsoft.org...]
php-5.0.1.tar.bz2 from [php.net...]
httpd-2.0.50.tar.gz from [httpd.apache.org...]
-------
Decompress the files
cd /usr/local/src
tar xzf zlib-1.2.1.tar.gz
tar xzf libxml2-2.6.10.tar.gz
tar xzf httpd-2.0.50.tar.gz
tar xjf php-5.0.1.tar.bz2
-------
compile zlib, install to /usr/local/lib
cd zlib-1.2.1/
./configure
make
make install
cd ..
-------
compile libxml2, install to /usr/local/lib
cd libxml2-2.6.10
./configure
make
make install
cd ..
-------
compile apache2, install to /usr/local/apache2
cd httpd-2.0.50
./configure --prefix=/usr/local/apache2 --enable-so
make
make install
cd ..
to start / stop Apache execute:
/usr/local/apache2/bin/apachectl start
/usr/local/apache2/bin/apachectl stop
Apache config directory:
/usr/local/apache2/conf/
htdocs directory:
/usr/local/apache2/htdocs/
-------
compile PHP5, install to /usr/local/php5
cd php-5.0.1
./configure --prefix=/usr/local/php5 \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-libxml-dir=/usr/local/lib --with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-mysql=/usr --with-mysqli=/usr/bin/mysql_config \
--with-gd --enable-soap --enable-sockets \
--with-jpeg-dir=/usr --enable-exif
make
.. gave me lots of 'multiple defined' error for libmysql;
these errors go away if you drop either --with-mysql or
--with-mysqli;
if you want to use both the old mysql and the new mysqli
interface, load the Makefile into your editor and search
for the line beginning with EXTRA_LIBS; it includes
-lmysqlclient twice; remove the second instance
make
make install
cd ..
location of php.ini:
/usr/local/php5/lib/
per default, php.ini does not exist; you find sample ini
files in /usr/src/php-5.0.1
-------
change Apache's httpd.conf to make it use PHP
the command make install of the PHP build automatically
adds the following line to /usr/local/apache2/conf/httpd.conf:
LoadModule php5_module modules/libphp5.so
however, you have to add another line:
AddType application/x-httpd-php .php
-------
test it all
restart Apache
/usr/local/apache2/bin/apachectl start
/usr/local/apache2/bin/apachectl stop
create the file
/usr/local/apache2/htdocs/test.php
with this content
<?php phpinfo();?>
load the page with your web browser
[localhost...] an
-------
start Apache automatically (Init-V)
if Apache should start automatically when you start
your system, you have to add a init Script; if you use
SUSE, copy /etc/init.d/skeleton to /etc/init.d/apache2
and adapt it according to your needs; the following lines
summarize the most important parts
#! /bin/sh
# /etc/init.d/apache2
...
case "$1" in
start)
echo -n "Starting apache2"
/usr/local/apache2/bin/apachectl start
rc_status -v
;;
stop)
echo -n "Shutting down apache2"
/usr/local/apache2/bin/apachectl stop
rc_status -v
;;
restart)
$0 stop
$0 start
rc_status
;;
*)
echo "Usage: $0 {start¦stop¦restart}"
exit 1
;;
esac
...
-------
for even more details see:
[php.net...]
[php.net...]
[builder.com.com...]
[howto.pointbeing.net...]
[protonicdesign.com...]