tar -zxvf php-4.0b3.tar.gz
tar -zxvf mysql-3.23.9-alpha.tar.gz
tar -zxvf apache_1.3.11.tar.gz
将phpmyadmin下载到/server下
同样运行
tar -zxvf phpMyAdmin_2.0.5.tar.gz
cd /usr/src/mysql-XXXX
这里XXXX是程序的版本号,下同,系统必需已安装C开发库
./configure -help
./configure -prefix=/server/mysql
make
make install
cd /server/mysql/bin
./mysql_install_db
到这mysql已安装成功!
可以运行mysql数据库
/server/mysql/libexec/mysqld &
可以通过数据库查看程序mysqlshow查看数据库当前的状态
/server/mysql/bin/mysqlshow
第二步 安装apache及php4。
如果系统中已有apache运行先关闭此服务
killall httpd
编译apache及php4, 每一个行号为一行
cd /usr/src/apache_1.3.x
./configure --prefix=/server/apache
cd ../php-4.0.x
./configure --with-mysql=/server/mysql --with-apache=../apache_1.3.x --enable-track-vars
make
make install
cd ../apache_1.3.x
./configure --prefix=/server/apache --activate-module=src/modules/php4/libphp4.a
make
make install
cd ../php-4.0.x
cp php.ini-dist /usr/local/lib/php.ini
apache及php4已安装成功,下面配置apache及php4
Red Hat Linux release 7.2 (i386)
apache 1.3.27
php 4.2.3
j2sdk1.4.2
I followed all the notes in this thread and managed to get it to work for the system described above.
Apache kept hanging until I added pthreads to the apache build.
So all in one place the things u need to get it working for the system noted above.
It follows on from all the hard work/effort from the previous posts (thanks guys!!!),
i take no credit - this just an extra bit of help..
Apache
--------
Apache needs pthreads, you can do it before the configure command, ie:
LDFLAGS=-lpthread ./configure --prefix=/www/web1 \ etc etc
After it is installed, edit apachectl and add at the top somewhere:
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/i386:$JAVA_HOME/jre/lib/i386/server
I tried to add those paths to /etc/ld.so.conf (and running ldconfig -v)
but a test php page with:
echo "<PRE>";
system("ldd /usr/java/j2sdk1.4.2/jre/lib/i386/*")
showed many "not founds"
therefore I stuck with the LD_LIBRARY_PATH
ran it again and all was ok - all the libraries resolved ok.
Setting the LD_LIBRARY_PATH correctly should dissolve all errors such as:
Cannot instantiate non-existent class:
cannot open shared object file:
Unable to load Java Library
PHP
----
Compile with
--with-java=PATH_TO_JAVA_HOME
mine is:
--with-java=/usr/java/j2sdk1.4.2
php.ini settings - mod for your paths/versions
-----------------
[java]
java.class.path=/www/web1/conf/lib/php/php_java.jar
java.home = /usr/java/j2sdk1.4.2
java.library = /usr/java/j2sdk1.4.2/jre/lib/i386/libjava.so
java.library.path = /www/web1/conf/lib/php/extensions/no-debug-non-zts-20020429
extension_dir = /www/web1/conf/lib/php/extensions/no-debug-non-zts-20020429
extension=libphp_java.so
test
-----
make a test php page
just write:
<?phpinfo() ?>
then save and browse to it.
check the java section to see if your php.ini settings are set
hack
-----
Finally, in the java.library.path dir where java.so lives
run the command
ln -s java.so libphp_java.so
edit a test file with the java code in at the top of this thread and all should b ok
any errors in the error_log - check that the LD_LIBRARY_PATH is really set
sorry if i have missed anything out
mail me a slap :O)
but its been an awful day today!
G00dLucK,
ells..