(1): 安装zlib tar zxvf zlib-1.2.3.tar.gz cd zlib-1.2.3 ./configure --prefix=/data/zlib make make install 然后在/etc/ld.so.conf中添加 /data/zlib/lib 保存,执行ldconfig -v
(2)mysql installing. #groupadd mysql #useradd -g mysql mysql # vi /home/mysql/.bash_profile 添加 export PATH=$PATH:/data/mysql/bin
保存后,进入安装包所在目录,先安装Mysql
解压缩: tar -zxvf
mysql-5.0.45.tar.gz cd
mysql-5.0.45
接着要进行configure配置,在以前我只是制定了prefix没有设置字体编码,结果PHP后来不支持汉字编码,只好重新安装
才发现这个问题要注意,而且我们已经安装了zlib,就可以给mysql来指明zlib的位置
[root@cme_box mysql-5.0.45]# ./configure --prefix=/data/mysql
--with-zlib-dir=/data/zlib/ --with-charset=utf8 --with-extra-charsets=gbk,gb2312,utf8
make
make install
同样,在/etc/ld.so.conf中添加一行
/data/mysql/lib/mysql
保存,执行ldconfig -v
#./scripts/mysql_install_db #chown
-R root /data/mysql #chown
-R mysql /data/mysql/var #chgrp
-R mysql /data/mysql #
cp support-files/my-medium.cnf /etc/my.cnf
#/data/mysql/bin/mysqld_safe &
下来再init.d中设置mysql的自启动。
# cp support-files/mysql.server /etc/init.d/mysql cd /etc/rc3.d ln
-s ../init.d/mysql S85mysql ln
-s ../init.d/mysql K85mysql cd
../rc5.d/ ln
-s ../init.d/mysql S85mysql ln
-s ../init.d/mysql K85mysql cd
../init.d chmod
755 mysql
然后reboot查看mysql是否启动。
(3)安装apache tar -zxvf httpd-2.2.6.tar.gz
cd httpd-2.2.6
./configure --prefix=/data/httpd/ --enable-so --enable-cgi
--with-z=/data/zlib
make
make install cp /data/httpd/bin/apachectl /etc/init.d/httpd
cp: overwrite `/etc/init.d/httpd'? y
cd /etc/rc3.d
rm -fr K15httpd
cd /etc/rc5.d
rm -fr K15httpd
cd /etc/rc3.d
ln -s ../init.d/httpd K85httpd
ln -s ../init.d/httpd S85httpd
cd /etc/rc5.d
ln -s ../init.d/httpd K85httpd
ln -s ../init.d/httpd S85httpd
chmod 755 /etc/init.d/httpd
(4)安装GD库 首先,我们要安装各个图形库的支持,包括libpng, libjpeg,ttf等。 1)libpng tar -zxvf
libpng-1.2.23.tar.gz ./configure
--prefix=/data/libpng make make
install 然后将libpng的路径(/data/libpng/lib)加到/etc/ld.so.conf下,执行ldconfig
-v 能看到 /data/libpng/lib: libpng.so.3
-> libpng.so.3.23.0 libpng12.so.0
-> libpng12.so.0.23.0 这一项。说明安装成功。 2)freetype tar -zxvf
freetype-2.1.10.tar.gz cd
freetype-2.1.10 ./configure
--prefix=/data/freetype make make
install then
add the path of freetype(/data/freetype/lib) to /etc/ld.so.conf and
run command "ldconfig -v",we can get the
output /data/freetype/lib: libfreetype.so.6
-> libfreetype.so.6.3.8 3)jpeg tar
-zxvf jpegsrc.v6b.tar.gz ./configure
--prefix=/data/jpeg --enable-shared make make install 提示:/usr/bin/install: cannot
create regular file `/data/jpeg/include/jconfig.h': No such file or
directory nnd,在CU上查到了,原来是安装程序没有权限在/data下自己创建目录,需要手动创建