|
发表于 2003-4-8 19:52:21
|
显示全部楼层
将软件全部拷贝到、/usr/local目录里。
# cd /usr/local
# tar -zxvf apache_1.3.27.tar.gz
# tar -zxvf openssl-0.9.6g.tar.gz
# tar -zxvf mod_ssl-2.8.11-1.3.27.tar.gz
# tar -zxvf php-4.2.3.tar.gz
# tar -zxvf mysql-3.23.53a-pc-linux-gnu-i686.tar.gz
-------------------------------------------------------------------------------
首先安装mysql。
# groupadd mysql
# useradd -g mysql mysql
# ln -s mysql-3.23.53a-pc-linux-gnu-i686 mysql
# cd mysql
# ./scripts/mysql_install_db
# chown -R root /usr/local/mysql
# chown -R mysql /usr/local/mysql/data
# chgrp -R mysql /usr/local/mysql
# chown -R root /usr/local/mysql/bin
# chmod +x support-files/mysql.server
# cp support-files/mysql.server /etc/rc.d/init.d/mysqld
# ln -s /etc/rc.d/init.d/mysqld /etc/rc.d/rc3.d/S99mysqld
# bin/safe_mysqld --user=mysql &
mysql安装成功、设置密码
OpenSSL
# cd openssl-0.9.6g
# ./config
# make
# make test
# cd ..
------------------------------------------------------------------------
配置mod_ssl
# cd mod_ssl-2.8.11-1.3.27
# ./configure --with-apache=../apache_1.3.27
# cd ..
-------------------------------------------------------------------------------
安装PHP、
首先、
# cd apache_1.3.27
# ./configure --prefix=/usr/local/apache
# cd ..
# cd php-4.2.3
# CFLAGS='-O2 -I../openssl-0.9.6g' ./configure --with-apache=../apache_1.3.27 \
--with-mysql=/usr/local/mysql
# gmake
# gmake install
# cd ..
--------------------------------------------------------------------------------
-----------
安装apache
# cd apache_1.3.27
# SSL_BASE=../openssl-0.9.6g ./configure --prefix=/usr/local/apache \
--enable-module=ssl \
--activate-module=src/modules/php4/libphp4.a \
--enable-module=php4
# make
# make certificate /*这一步做证书,会问你几个问题。还有设置密码*/
# make install
# cd ..
vi /usr/local/apache/conf/httpd.conf
对apache做如下配置
#将ServerAdmin q3boy@younet.com一行改为您的邮箱地址
#DocumentRoot "/home/httpd/html/" 此处为html文件主目录
# 同上
#Options FollowSymLinks MultiViews 为安全起见,去掉"Indexes"
#
# DirectoryIndex default.php default.phtml default.php3 default.html default.htm
#
#设置apache的默认文件名次序
#AddType application/x-httpd-php .php .phtml .php3 .inc
#AddType application/x-httpd-php-source .phps
#设置php文件后缀
最后
# /usr/local/apache/bin/apachectl startssl
键入你设定的密码。、apache启动成功 |
|