apache+php+mysql
时间:2007-06-26 来源:dorainm
有些天没有来发文章了,贴个配置安装的东西吧,看我做什么就可以了
install mysql
# ./configure --prefix=/usr/local/mysql --with-unix-socket-path=/tmp/mysql.sock --with-mysqld-user=mysql
# make
# make install
# scripts/mysql_install_db
# /usr/sbin/groupadd -g 80 mysql
# /usr/sbin/useradd -u 80 -g 80 -d /usr/local/mysql/var/mysql -b /sbin/nologin mysql
# chown -Rc mysql /usr/local/mysql/var
# cp -R /usr/local/mysql/include /usr/include
# cp -R /usr/local/mysql/lib /usr/lib
(start mysql)
# /usr/local/mysql/share/mysql/mysql.server start
install apache
# ./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite --enable-info --enable-cgid --enable-mime-magic --enable-vhost-alias --enable-deflate --enable-expires --with-mpm=prefork --enable-ssl
# make
# make install
install php
# ./configure --prefix=/usr/local/php --with-apxs=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/lib --enable-track-vars --with-xml --with-mysql
(maybe some options to configure will be not find the librarys)
# make
# make install
# cp php.ini-dist /usr/local/lib/php.ini
# vi /usr/local/apache2/conf/httpd.conf
//(add these rows to mod_mime's settings)
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
//(disable SELinux, maybe something wrong will append on httpd start)
# /usr/local/apache2/bin/httpd -k start
install mysql
# ./configure --prefix=/usr/local/mysql --with-unix-socket-path=/tmp/mysql.sock --with-mysqld-user=mysql
# make
# make install
# scripts/mysql_install_db
# /usr/sbin/groupadd -g 80 mysql
# /usr/sbin/useradd -u 80 -g 80 -d /usr/local/mysql/var/mysql -b /sbin/nologin mysql
# chown -Rc mysql /usr/local/mysql/var
# cp -R /usr/local/mysql/include /usr/include
# cp -R /usr/local/mysql/lib /usr/lib
(start mysql)
# /usr/local/mysql/share/mysql/mysql.server start
install apache
# ./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite --enable-info --enable-cgid --enable-mime-magic --enable-vhost-alias --enable-deflate --enable-expires --with-mpm=prefork --enable-ssl
# make
# make install
install php
# ./configure --prefix=/usr/local/php --with-apxs=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/lib --enable-track-vars --with-xml --with-mysql
(maybe some options to configure will be not find the librarys)
# make
# make install
# cp php.ini-dist /usr/local/lib/php.ini
# vi /usr/local/apache2/conf/httpd.conf
//(add these rows to mod_mime's settings)
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
//(disable SELinux, maybe something wrong will append on httpd start)
# /usr/local/apache2/bin/httpd -k start
相关阅读 更多 +