Linux和Solaris建Apache虚拟根环境(2)
2007-03-11 00:00:00 来源:WEB开发网核心提示: 5.6 在安装了mysql之后,必须清空共享库的cache,Linux和Solaris建Apache虚拟根环境(2)(2),ROOT# /sbin/ldconfig -nv /usr/local/lib5.7 为mysql的所有者编辑PATH变量,并且设定数据库的root密码,$ [ Edit
5.6 在安装了mysql之后,必须清空共享库的cache。
ROOT# /sbin/ldconfig -nv /usr/local/lib
5.7 为mysql的所有者编辑PATH变量,并且设定数据库的root密码。
$ [ Edit shell login script .bash_profile: ]
PATH=$PATH:$HOME/bin:/usr/local/mysql/bin
$ . ~/.bash_profile ## source it!
$ mysqladmin -u root password '2mUch!data' ## pick your own password!
6.编译和安装PHP
6.1 先停止Apache后台程序(daemon)的运行
ROOT#chroot /www /apache/bin/apachectl stop
6.2 你首先要编译PHP
如果你使用的是non-DSO安装,你必须重新编译Apache。(每次要升级non-DSO包中的任何一个软件时,你都要再这样做一遍。)
$ cd /usr/local/src/chr ## I am NOT root!
$ tar zxf /path/to/php-4.02.tar.gz
$ cd php-4.02
non-DSO:
$ ./configure --with-mysql=/usr/local/mysql
--with-apache=../apache_1.3.12 --enable-track-vars
--with-config-file-path=/apache/conf --sharedstatedir=/tmp
DSO:
$ ./configure --with-mysql=/usr/local/mysql
--with-apxs=/apache/bin/apxs --enable-track-vars
--with-config-file-path=/apache/conf --sharedstatedir=/tmp
DSO:
(or add CFLAGS switch when mod_ssl was also configured as a DSO module)
$ CFLAGS=-DEAPI ./configure --with-mysql=/usr/local/mysql
--with-apxs=/apache/bin/apxs --enable-track-vars
--with-config-file-path=/apache/conf --sharedstatedir=/tmp
$ make
non-DSO:
$ make install
DSO:
ROOT# make install
更多精彩
赞助商链接