CentOS5.5+Apache2.2.15+Mysql5.1.48+PHP5.2.13 编译安装
画符抓鬼撰聊斋 | CentOS5.5+Apache2.2.15+Mysql5.1.48+PHP5.2.13 编译安装
CentOS5.5+Apache2.2.15+Mysql5.1.48+PHP5.2.13 编译安装
httpd-2.2. mysql-5.1. php-5.2.
请从各自的官方下载 PHP官方有发布新的5.3.2在centos5.5的gcc环境下编译会错误,所以选择比较稳定的5.2.13版本
请从各自的官方下载 PHP官方有发布新的5.3.2在centos5.5的gcc环境下编译会错误,所以选择比较稳定的5.2.13版本
1.yum update 检查系统更新
2.yum install gcc gcc-c++ 软件编译环境
2.yum install gcc gcc-c++ 软件编译环境
3.yum erase httpd 卸载系统自带的httpd (apache2.2.3)
4.yum install zlib-devel libtool ncurses-devel libxml2-devel
(zlib-devel 安装apache需要,否则出错 .libtool安装mysql时候需要.同时附带了autoconf automake imake 编译mysql 5.1.48时候会出错 需要autoconf重新配置一下)
5.编译apache2.2.15
4.yum install zlib-devel libtool ncurses-devel libxml2-devel
(zlib-devel 安装apache需要,否则出错 .libtool安装mysql时候需要.同时附带了autoconf automake imake 编译mysql 5.1.48时候会出错 需要autoconf重新配置一下)
5.编译apache2.2.15
./configure –prefix=/usr/local/apache2 –enable-rewrite=shared –enable-track-vars –enable-cgi –enable-so –enable-mods-shared=all –with-config-file-path=/usr/local/apache2/conf –with-mpm=worker –enable-speling
make
make install
make clean
make
make install
make clean
6.编译f . 去掉#ServerName xxxxxx 前面的# 没有ServerName启动httpd服务会出错. 给LoadModule unique_id_module modules/mod_unique_id.so前面加上注释以取消加载.默认的centos5.5加载这个会启动不了httpd .
7.运行 grep -v “#” /usr/local/apache2/bin/apachectl > /etc/init.d/httpd
8.运行 chmod +x /etc/init.d/httpd (赋予httpd可以运行的权限)
9.编译/etc/init.d/httpd 在起始位置添加
8.运行 chmod +x /etc/init.d/httpd (赋予httpd可以运行的权限)
9.编译/etc/init.d/httpd 在起始位置添加
#!/bin/sh
# chkconfig: 8854 85 15
# description: Apache is a World Wide Web server.
# chkconfig: 8854 85 15
# description: Apache is a World Wide Web server.
10.运行 chkconfig –add httpd
chkconfig –level 35 httpd on
11.编译mysql 5.1.48
groupadd mysql
useradd -g mysql mysql
在源码文件夹目录运行
chkconfig –level 35 httpd on
11.编译mysql 5.1.48
groupadd mysql
useradd -g mysql mysql
在源码文件夹目录运行
autoreconf –force –install
./configure –prefix=/usr/local/mysql –with-charset=utf8 –with-extra-charsets=all –enable-thr
./configure –prefix=/usr/local/mysql –with-charset=utf8 –with-extra-charsets=all –enable-thr
ead-safe-client –enable-assembler –with-readline –with-big-tables –with-plugins=all –with-tcp-port=3310 –with-unix-socket-path=/var/tmp/mysql.sock –with-mysqld-ldflags=-all-static –with-client-ldflags=-all-static
make
make install
make clean
make
make install
make clean
以下命令在mysql安装目录下运行
cd /usr/local/mysql
cp /usr/local/mysql/share/mysql/my-mediumf /etc/myf
cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld怎么安装php
chmod +x /etc/init.d/mysqld
chown -R mysql .
chgrp -R mysql .
scripts/mysql_install_db –user=mysql
cp /usr/local/mysql/share/mysql/my-mediumf /etc/myf
cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld怎么安装php
chmod +x /etc/init.d/mysqld
chown -R mysql .
chgrp -R mysql .
scripts/mysql_install_db –user=mysql
chown -R root .
chown -R mysql var
chown -R mysql var
12.编译安装php-5.2.13 需要先安装如下包
curl-7.16. freetype-2.3. jpegsrc. libpng-1.4. gd-2.0. libmcrypt-2.5. mhash-0.9.9. mcrypt-2.6.
如不到这些包的下载可以回复我…
直接./configure 编译安装curl-7.16. freetype-2.3. jpegsrc. libpng-1.4. libmcrypt-2.5. mhash-0.9.9.
安装gd的时候需要./configure –with-png=/usr/local/lib –with-freetype=/usr/local/lib –with-jpeg=/usr/local/lib
最后编译安装 mcrypt-2.6. 需要指定LD_LIBRARY_PATH路径
LD_LIBRARY_PATH=/usr/local/lib ./configure
编译php开始
安装gd的时候需要./configure –with-png=/usr/local/lib –with-freetype=/usr/local/lib –with-jpeg=/usr/local/lib
最后编译安装 mcrypt-2.6. 需要指定LD_LIBRARY_PATH路径
LD_LIBRARY_PATH=/usr/local/lib ./configure
编译php开始
.
/configure –prefix=/usr/local/php5 –with-gd=/usr/local/lib –with-jpeg-dir=/usr/local/lib –with-zlib –with-png-dir=/usr/local/lib –with-freetype-dir=/usr/local/lib –with-mysql=/usr/local/mysql –with-pdo-mysql=/usr/local/mysql –with-iconv –enable-mbstring –with-pear –with-apxs2=/usr/local/apache2/bin/apxs –with-libxml-dir=/usr/lib –with-curl –with-mcrypt=/usr/local/lib –with-mhash=/usr/local/lib –with-config-file-path=/etc –enable-zip –with-config-file-path=/usr/local/php5/etc
make
make install
make clean
cp php.ini-dist /usr/local/php5/etc/php.ini
打开php.ini把dll后缀改为so
make
make install
make clean
cp php.ini-dist /usr/local/php5/etc/php.ini
打开php.ini把dll后缀改为so
13.编译f
添加下面的代码到相应的位置
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php .phtml
添加下面的代码到相应的位置
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
index.php
如果启用了SELinux的话还需要执行如下命令
setenforce 0
chcon -t texrel_shlib_t /usr/local/apache2/modules/libphp5.so
service httpd restart
setenforce 1
index.php
如果启用了SELinux的话还需要执行如下命令
setenforce 0
chcon -t texrel_shlib_t /usr/local/apache2/modules/libphp5.so
service httpd restart
setenforce 1
重新启动之后就可以了
14.关于Zend 直接运行解压包里的pl文件安装即可..
14.关于Zend 直接运行解压包里的pl文件安装即可..
转载自: /2010/06/29/centos5-apache2-2-15-mysql5-1-48-php5-2-13-source/
因原文贴图被视为违规图片………更多详细截图请看原文………
PS:请审核人员认真一些…不要随便就来个文不对题… 我不觉得这个内容和标题有什么不想对的地方…不要动不动就文不对题…质量低下原因来不通过审核……………………如果真的觉得文不对题的话可以能看懂的人看看………………………………去掉几张贴图………………原内容重新发………………我看还文不对题到什么时候……………………………………………………….
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论