linux+apache+mysql+php的安装
linux+apache+mysql+php的安装
步骤:
一.mysql
1.解压mysql到指定目录
2.建立用户groupadd mysql &&useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql
3.运行./scripts/mysql_install_db
4.更改./data所有者chown mysql:mysql -R data
5.按照./support-files/mysql.server配置
6.指定密码./bin/mysqladmin -u root password
二.apahce
1.解压apache到指定目录
2.建立用户useradd -c mysql -d /dev/null -g mysql -s /bin/false
3.配置:./configure --prefix=/opt/web/bin/httpd --enable-so --enable-mods-shared="proxy
proxy_http proxy_ftp proxy_connect headers"(反向代理模块)
4.make&&make install
三.php5
1.解压php到指定目录
2.安装libxml2-2.6.12和zlib-1.2.3(对xml和jpg的支持)
3.配置: ./configure --prefix=/opt/web/bin/php --with-mysql=/opt/web/bin/mysql
--with-apxs2=/opt/web/bin/httpd/bin/apxs --with-libxml-dir=/usr/local/lib --with-gd
4.make&&make install
四.设置开机启动
1.mysql: cp ./support-files/mysql.server /etc/init.d/mysql
2.在/etc/init.d/下建立httpd脚本。(具体内容在网上很容搜到)
3.设置开机启动 chkconfig --level 35 httpd on&&chkconfig --level 35 mysql on