分类: LINUX
2008-10-21 14:31:35
shell>tar xvf httpd-2.2.3.tar.gz
shell>cd httpd-2.2.3
shell>./configure --prefix=/usr/local/apache \
>--enable-rewrite=shared \
>--enable-speling=shared
shell>make
shell>make install
shell>vi /usr/local/apache /conf/httpd.conf
//进入usr/local/apache/bin
shell>./apachectl -k start
//这时候可以通过 测试
shell>./apachectl -k stop
复制代码shell> groupadd mysql
shell> useradd -g mysql mysql
shell> tar zxvf mysql-5.0.22.tar.gz
shell> cd mysql-5.0.22
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql //创建MySQL授权表
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql & //启动MYSQL服务器
shell>bin/mysqladmin -u root passwor "123456"//修改 mysql 的 root 密码
复制代码建立目录:
# mkdir -p /usr/local/jpeg6
# mkdir -p /usr/local/jpeg6/bin
# mkdir -p /usr/local/jpeg6/lib
# mkdir -p /usr/local/jpeg6/include
# mkdir -p /usr/local/jpeg6/man
# mkdir -p /usr/local/jpeg6/man1
# mkdir -p /usr/local/jpeg6/man/man1
# tar -zvxf jpegsrc.v6b.tar.gz
# cd jpeg-6b
# ./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static
# make; make install
复制代码# tar -zvxf libpng-1.2.12.tar.gz
# cd libpng-1.2.12
# ./configure --prefix=/usr/local/libpng/
# make; make install
复制代码# tar -zvxf freetype-2.1.1.tar.gz
# cd freetype-2.1.1
# mkdir -p /usr/local/freetype
# ./configure --prefix=/usr/local/freetype
# make;make install
复制代码#tar -zxvf zlib-1.2.3.tar.gz
#cd zlib.1.2.3
# ./configure
# make;make install
复制代码# tar -zvxf gd-2.0.33.tar.gz
# mkdir -p /usr/local/gd2
# cd gd-2.0.33
# ./configure --prefix=/usr/local/gd2 --with-jpeg=/usr/local/jpeg6/
--with-png=/usr/local/lib/
--with-zlib=/usr/local/lib/
--with-freetype=/usr/local/freetype/
# make; make install
复制代码# tar -zxf libxml2-2.6.24.tar.gz
# cd libxml2-2.6.24
# mkdir -p /usr/local/libxml2
# ./configure --prefix=/usr/local/libxml2
# make; make install
复制代码# tar -zvxf php-5.1.4.tar.gz
# cd php-5.1.4
# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs
--with-mysql=/usr/local/mysql/
--with-libxml-dir=/usr/local/libxml2
--with-expat-dir=/usr/lib --enable-soap
--with-gd=/usr/local/gd2/
--with-jpeg-dir=/usr/local/jpeg6/
--with-zlib-dir=/usr/local/lib/
--with-png=/usr/local/lib/
--with-freetype-dir=/usr/local/freetype/
# make
# make install
# cp php.ini-dist /usr/local/php/lib/php.ini
复制代码