原文:http://www.discuz.net/thread-378685-1-1.html
弄了半天了,终于弄完了:
过程如下:
安装mysql-5.0.22
- >tar -xzvf mysql-5.0.22.tar.gz
- >cd mysql-5.0.22
- >./configure --prefix=/usr/local/mysql
- >make
- >make install
- >cd /usr/local/mysql
- >bin/mysql_install_db --user=mysql
- >chown -R root .
- >chown -R mysql var
- >chown -R mysql .
- >chown -R root /usr/local/mysql
- >chown -R mysql /usr/local/mysql/var
- >chown -R mysql /usr/local/mysql
- >chown -R root /usr/local/mysql/bin
- >cp /usr/local/mysql/share/mysql/mysql.server /etc/rc.d/init.d/mysqld
- >chkconfig --add mysqld
- >chgrp -R mysql /usr/local/mysql
- >/etc/rc.d/init.d/mysqld start
复制代码
安装jpegsrc.v6b
- >tar -xzvf jpegsrc.v6b.tar.gz
- >cd jpeg-6b
- >./configure
- >make
- >mkdir -p /usr/local/man/man1
- >make install
- >make install-lib
复制代码
安装freetype-2.2.1
- >tar -xzvf freetype-2.2.1.tar.gz
- >cd freetype-2.2.1
- >./configure
- >make
- >make install
复制代码
安装zlib-1.2.3
- >tar -xzvf zlib-1.2.3.tar.gz
- >cd zlib-1.2.3
- >./configure
- >make
- >make install
复制代码
安装libpng-1.2.12
- >tar -xzvf libpng-1.2.12.tar.gz
- >cd libpng-1.2.12
- >./configure
- >make
- >make install
复制代码
安装GD库gd-2.0.33
- >tar -xzvf gd-2.0.33.tar.gz
- >cd gd-2.0.33
- >./configure
- >make
- >make install
- >cp gd.h /usr/local/lib/
复制代码
安装libxml2-2.6.24
- >tar -xzvf libxml2-2.6.24.tar.gz
- >cd libxml2-2.6.24
- >./configure
- >make
- >make install
复制代码
安装apache: httpd-2.2.3
- >tar -xzvf httpd-2.2.3.tar.gz
- >cd httpd-2.2.3
- >./configure --prefix=/usr/local/apache --enable-module=so
- >make
- >make install
复制代码
安装php-5.1.4
- >tar -xzvf php-5.1.4.tar.gz
- >cd php-5.1.4
- >./configure --prefix=/usr/local/php \
- --with-apxs2=/usr/local/apache/bin/apxs \
- --with-gd \
- --with-jpeg-dir \
- --with-ttf \
- --with-zlib-dir \
- --with-png-dir \
- --enable-track-vars \
- --enable-mbstring=all \
- --with-mysql=/usr/local/mysql
- --------
- >make
- >make install
复制代码
- >libtool --finish /root/php-5.1.4/
- >chmod 755 /usr/local/apache/modules/libphp5.so
- >cp php.ini-dist /usr/local/php/lib/php.ini
- ------------------
- AddType application/x-httpd-php .php
- AddType application/x-httpd-php-source .phps
- LoadModule php5_module modules/libphp5.so
- DirectoryIndex index.html index.html.var index.php
- --------------------
- 再找
- #ServerName
- 把#去掉,后面的IP改成你的IP.
- 找到
- "/usr/local/apache/htdocs"
- 把两个"/usr/local/apache/htdocs"改为你存放网页文件的路径
- 保存httpd.conf文件.
- 启动它
- # /usr/local/apache2/bin/apachectl start
- 如果没有出错,写一个测试页放到你网页目录下, 我的就是上面所说的<? phpinfo(); ?>
- 保存.试试在测试器里打IP进去就可以看到PHPINFO页了
- 把Apache2加入系统服务
- #cd /etc/rc.d/init.d
- #cp /usr/local/apache/bin/apachectl ./httpd
- 用文本编辑/etc/rc.d/init.d/httpd
- 在头部加入
- #chkconfig: 345 79 15
- #description: Activates/Deactivates Apache Web Server
- # processname: httpd
- #chkconfig --add httpd
复制代码
安装Zend: ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz
- >tar -xzvf ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz
- >cd ZendOptimizer-3.0.1-linux-glibc21-i386
- >./install.sh
- --------------------------------
- /usr/local/php/lib/
- -------------------------------
- successed!!
复制代码
为了便于管理,大家也可以自行安装一个phpmyadmin及webmin的管理程序。
posted on 2009-12-10 10:56
Documents 阅读(394)
评论(0) 编辑 收藏 所属分类:
Linux 、
lamp 、
CentOS