Linux下Apache+PHP+MYSQL编译步骤
来源:互联网 发布:windows vista与win10 编辑:程序博客网 时间:2024/04/30 13:44
为最近手头上正在做的一个项目编译服务器环境而写:
安装mysql
#cd /usr/local/src
#groupadd mysql
#useradd -g mysql mysql
#wget http://mysql.dataphone.se/Downloads/MySQL-5.0/mysql-5.0.67.tar.gz
#tar zxvf mysql-5.0.67.tar.gz
#cd mysql-5.0.67
#./configure --prefix=/usr/local/mysql --with-mysqld-user=mysql --with-charset=gbk --bindir=/usr/local/bin --sbindir=/usr/local/sbin --enable-shared --enable-static
#make
#make install
#cd /usr/local/mysql
#mysql_install_db
#chown -R mysql:mysql *
#cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysql
#/etc/rc.d/mysql start (加入到/etc/rc.local)
安装apache
#useradd ossh
#cd /usr/local/src
#wget
#tar zxvf httpd-2.2.9.tar.gz
#cd httpd-2.2.9
#./configure --prefix=/usr/local/apache --enable-cgi --enable-ssl --enable-modules="most"
#make
#make install
#vi /usr/local/apache2/etc/httpd.conf
User daemon
Group daemon改为:
User ossh
Group ossh
打开Include conf/extra/httpd-vhosts.conf的注释
在#Include conf/extra/httpd-languages.conf行下面增加一行:
AddDefaultCharset GBK
#vi /usr/local/apache2/conf/extra/httpd-vhosts.conf 清空内容,加入下面的设置:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@snda.com
DocumentRoot "/home/ossh/slightphp/public/cdnms/htdocs"
ServerName localhost
ErrorLog "logs/slightphp-error_log"
CustomLog "logs/slightphp-access_log" common
<IfModule dir_module>
DirectoryIndex index.html index.php index.htm
</IfModule>
Alias /res "/home/ossh/slightphp/public/cdnms/resource"
Alias /client "/home/ossh/slightphp/resource"
ScriptAlias /cgi-bin "/home/ossh/slightphp/public/cdnms/cgi-bin
<Directory "/home/ossh/slightphp/">
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
</VirtualHost>
#ln -s /usr/local/apache2/bin/apachectl /etc/init.d/apachectl
#/etc/init.d/apachectl start (加入到/etc/rc.local)
安装php
#cd /usr/local/src
#tar zxvf php-5.2.6.tar.gz
#cd php-5.2.6
#./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --enable-mbstring --without-pear --disable-cli --with-mysqli=/usr/local/bin/mysql_config --with-ldap --enable-pcntl
#make
#make install
#ln -s /usr/local/php/bin/php-cgi /usr/local/bin/php
#cp php.ini-recommended /usr/local/php/lib/php.ini
#mkdir -p /usr/lib/php/modules
#vi /usr/local/php/lib/php.ini
;error_reporting = E_ALL & ~E_NOTICE改成
error_reporting = E_ALL & ~E_NOTICE
error_reporting = E_ALL改成
;error_reporting = E_ALL
display_errors = Off改成
display_errors = On
short_open_tag = Off改成
short_open_tag = On
magic_quotes_gpc = Off改成
magic_quotes_gpc = On
post_max_size = 8M改成
post_max_size = 50M
upload_max_filesize = 2M改成
upload_max_filesize = 40M
;date.timezone =改成
date.timezone = Asia/Shanghai
extension_dir = "./"改成
extension_dir = "/usr/lib/php/modules/"
安装mysql
#cd /usr/local/src
#groupadd mysql
#useradd -g mysql mysql
#wget http://mysql.dataphone.se/Downloads/MySQL-5.0/mysql-5.0.67.tar.gz
#tar zxvf mysql-5.0.67.tar.gz
#cd mysql-5.0.67
#./configure --prefix=/usr/local/mysql --with-mysqld-user=mysql --with-charset=gbk --bindir=/usr/local/bin --sbindir=/usr/local/sbin --enable-shared --enable-static
#make
#make install
#cd /usr/local/mysql
#mysql_install_db
#chown -R mysql:mysql *
#cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysql
#/etc/rc.d/mysql start (加入到/etc/rc.local)
安装apache
#useradd ossh
#cd /usr/local/src
#wget
#tar zxvf httpd-2.2.9.tar.gz
#cd httpd-2.2.9
#./configure --prefix=/usr/local/apache --enable-cgi --enable-ssl --enable-modules="most"
#make
#make install
#vi /usr/local/apache2/etc/httpd.conf
User daemon
Group daemon改为:
User ossh
Group ossh
打开Include conf/extra/httpd-vhosts.conf的注释
在#Include conf/extra/httpd-languages.conf行下面增加一行:
AddDefaultCharset GBK
#vi /usr/local/apache2/conf/extra/httpd-vhosts.conf 清空内容,加入下面的设置:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@snda.com
DocumentRoot "/home/ossh/slightphp/public/cdnms/htdocs"
ServerName localhost
ErrorLog "logs/slightphp-error_log"
CustomLog "logs/slightphp-access_log" common
<IfModule dir_module>
DirectoryIndex index.html index.php index.htm
</IfModule>
Alias /res "/home/ossh/slightphp/public/cdnms/resource"
Alias /client "/home/ossh/slightphp/resource"
ScriptAlias /cgi-bin "/home/ossh/slightphp/public/cdnms/cgi-bin
<Directory "/home/ossh/slightphp/">
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
</VirtualHost>
#ln -s /usr/local/apache2/bin/apachectl /etc/init.d/apachectl
#/etc/init.d/apachectl start (加入到/etc/rc.local)
安装php
#cd /usr/local/src
#tar zxvf php-5.2.6.tar.gz
#cd php-5.2.6
#./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --enable-mbstring --without-pear --disable-cli --with-mysqli=/usr/local/bin/mysql_config --with-ldap --enable-pcntl
#make
#make install
#ln -s /usr/local/php/bin/php-cgi /usr/local/bin/php
#cp php.ini-recommended /usr/local/php/lib/php.ini
#mkdir -p /usr/lib/php/modules
#vi /usr/local/php/lib/php.ini
;error_reporting = E_ALL & ~E_NOTICE改成
error_reporting = E_ALL & ~E_NOTICE
error_reporting = E_ALL改成
;error_reporting = E_ALL
display_errors = Off改成
display_errors = On
short_open_tag = Off改成
short_open_tag = On
magic_quotes_gpc = Off改成
magic_quotes_gpc = On
post_max_size = 8M改成
post_max_size = 50M
upload_max_filesize = 2M改成
upload_max_filesize = 40M
;date.timezone =改成
date.timezone = Asia/Shanghai
extension_dir = "./"改成
extension_dir = "/usr/lib/php/modules/"
- Linux下Apache+PHP+MYSQL编译步骤
- linux下查看nginx,apache,mysql,php的编译参数
- linux下查看nginx,apache,mysql,php的编译参数
- linux下查看nginx,apache,mysql,php的编译参数
- linux下查看nginx,apache,mysql,php的编译参数
- linux下编译安装开发环境apache+mysql+php-lamp
- linux下apache+php+mysql
- Linux下的mysql apache php rpm安装方法步骤(转载并补充细节)
- linux 下安装mysql,php,ngingx步骤
- windows下安装apache+php+mysql+phpMyAdmin步骤及教训
- windows下apache、php、mysql以及wordpress配置步骤
- apache+mysql+php编译
- Linux下Apache,Php,Mysql配置
- Linux下Apache,Php,Mysql配置
- LINUX下安装php,mysql,apache
- Linux下整合Apache+Tomcat+MySQL+PHP
- Linux下Apache+PHP+MySql的整合
- LINUX下安装php,mysql,apache
- Socket编程知识必学
- 哈佛图书馆自习室墙上的训言
- RHEL5中配置vsftpd
- struts2的checkbox和checkboxlist两个标签的使用
- slab函数分析之free_block
- Linux下Apache+PHP+MYSQL编译步骤
- orcle 5500 em打不开
- ASP/PHP/ASP.net生成静态页大全
- 成功整合IIS+Tomcat服务器
- RHEL5中配置DHCP服务
- 开始写博了
- RHEL5中配置MySQL
- 多角度看 Java 中的泛型
- RHEL5中配置NIS服务