专业网络服务提供商
关于进一步加强国内域名注册信
信产部、公安部全面开展依法打
“感恩回报,传递激情” —书生
关于2009年春节期间公司有关活
关于总部基地机房升级断网通知
关于网通服务器迁址的紧急通知
国研IDC机房进行设备升级割接通
关于上调中文域名注册和续费价
英文CN域名规则调整通知
关于部份服务器升级南北双通服
首页帮助中心虚拟主机正文

Linux 主机

首先下载以下文件:
httpd-2.0.54.tar.gz [http://www.apache.org]
MySQL-client-4.1.12-1.i386.rpm [http: //www.mysql.org]
MySQL-devel-4.1.12-1.i386.rpm
MySQL-server-4.1.12-1.i386.rpm
php-5.0.4.tar.gz [http://www.php.net]
ZendOptimizer-2.5.10a-linux-glibc21-i386.tar.gz [http://www.zend.com]
gd-2.0.33.tar.gz [http://www.boutell.com/gd]
libxml2-2.6.19.tar.gz [http://xmlsoft.org/sources/]
zlib-1.2.2.tar.gz [http://www.zlib.net]
jpegsrc.v6b.tar.gz [http://www.ijg.org/files/]
libpng-1.2.8.tar.gz [http://www.libpng.org/pub/png/libpng.html]
freetype-2.1.10.tar.gz [http://savannah.nongnu.org/download/freetype/freetype-2.1.10.tar.gz]

1.安装MYSQL
#rpm -ivh MySQL-server-4.1.12-1.i386.rpm
#rpm -ivh MySQL-client-4.1.12-1.i386.rpm
#rpm -ivh MySQL-devel-4.1.12-1.i386.rpm [Libraries and header files 这个要安装,否则下面会出错]

成功后测试一下Mysql ,rpm包默认安装路径 /var/lib/mysql

#mysql
如果Mysql已经设置过密码了,那么命令应该是
#mysql -u root -p
#Enter password:
#mysql> show databases; [显示数据表]
#mysql>quit #退出

2.安装GD库

(1).安装libxml
# tar zvxf libxml2-2.6.19.tar.gz
# cd libxml2-2.6.19
# ./configure
# make
# make install

(2).安装zlib
# tar zvxf zlib-1.2.2.tar.gz
# cd zlib-1.2.2
# ./configure
# make
# make install

(3).安装jpeg
# tar zvxf jpegsrc.v6b.tar.gz
# cd jpeg-6b
# ./configure
# make
# make install-lib
# make install

这个需要说明一下,安装的时候,有提示好几个错误,类似:
/usr/bin/install: 无法创建一般文件‘/usr/local/jpeg6/man/man1/cjpeg.1’: 没有那个文件或目录
这个处理很简单,既然提示没有这个目录,那就手工建立一个
# mkdir /usr/local/jpeg6/man
# mkdir /usr/local/jpeg6/man/man1
之后重新install一下就ok

(4).安装libpng:
# tar zvxf libpng-1.2.8.tar.gz
# cd libpng-1.2.8
# ./configure
# make
# make install

(5).安装freetype:
# tar zvxf freetype-2.1.10.tar.gz
# cd freetype-2.1.10
# ./configure
# make
# make install

(6).安装gd库:
# tar zvxf gd-2.0.33.tar.gz
# cd gd-2.0.33
# ./configure --prefix=/usr/local --with-zlib=/usr/local --with-png=/usr/local --with-jpeg=/usr/local --with-freetype=/usr/local
# make
# make install

3.安装apache (php5需要apache2.0.46以上版本)
# tar zxvf httpd-2.0.54.tar.gz
# cd httpd-2.0.54
# ./configure --prefix=/usr/local/apache2 --enable-module=so
# make
# make install

设置成开机自启动

在/etc/rc.d/rc.local 中加入一行 /usr/local/apache2/bin/apachectl start
这样每次重新启动系统以后,apache也会随系统一起启动.

4.安装PHP5
# tar zvxf php-5.0.4.tar.gz
# cd php-5.0.4
# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-zlib-dir=/usr/local --with-gd=/usr/local --enable-trace-vars --with-mysql
# make
# make install
# cp php.ini-dist /usr/local/php/lib/php.ini [在PHP目录中复制PHP.INI文件到指定位置]

如果在configure的时候出错configure: error: Cannot find MySQL header files under yes.需先安装MySQL-devel-4.1.12-1.i386.rpm,见上面mysql安装


编辑apache配置文件httpd.conf

#vi /usr/local/apache2/conf/httpd.conf

修改如下:

搜索
#AddType application/x-tar .tgz

本新闻共2页,当前在第1页  1  2  

Copyright © 2000 - 2008 北京贰度网络科技发展有限公司 Morecn.Inc
《中华人民共和国电信与信息服务业务经营许可证》编号:京ICP证05007082号