2005-03-14(yhj)
操作平台:FreeBSD 5.3-RELEASE
所需软件:apache_1.3.33.tar.gz
openssl-0.9.7c.tar.gz
mod_ssl-2.8.22-1.3.33.tar.gz
一、安装openssl-0.9.7c
#tar xvzf openssl-0.9.7c.tar.gz
#cd openssl-0.9.7c
#make install
二、安装apache_1.3.33
#tar xvzf apache_1.3.33.tar.gz
#cd apache_1.3.33
#./configure --prefix=/usr/local/apache1.3 --enable-module=so
注:先编译,这样可以让mod_ssl知道apache装在什么位置,等编译完mod_ssl再继续配置和安装apache_1.3.33
三、安装mod_ssl-2.8.22-1.3.33
#tar xvzf mod_ssl-2.8.22-1.3.33.tar.gz
#cd mod_ssl-2.8.22-1.3.33
#./configure --with-apache=/usr/home/oracle/ssl/apache_1.3.33 --with-ssl=/usr/home/oracle/ssl/openssl-0.9.7c --prefix=/usr/local/apache1.3/
注:--with-apache应指定apache解压目录,并不是apache安装目录。
四、继续安装apache_1.3.33
#cd apache_1.3.33
#make
#make certificate
出现的提示信息:
Signature Algorithm ((R)SA or (D)SA) [R]:
1. Country Name (2 letter code) [XY]:cn
2. State or Province Name (full name) [Snake Desert]:liaoning
3. Locality Name (eg, city) [Snake Town]:dalian
4. Organization Name (eg, company) [Snake Oil, Ltd]:wangjin
5. Organizational Unit Name (eg, section) [Webserver Team]:Server Team
6. Common Name (eg, FQDN) [www.snakeoil.dom]:192.168.0.233
7. Email Address (eg, name@FQDN) [www@snakeoil.dom]:yhj@noblemeet.com
8. Certificate Validity (days) [365]:
STEP 3: Generating X.509 certificate signed by Snake Oil CA [server.crt]
Certificate Version (1 or 3) [3]:
STEP 4: Enrypting RSA private key with a pass phrase for security [server.key]
The contents of the server.key file (the generated private key) has to be
kept secret. So we strongly recommend you to encrypt the server.key file
with a Triple-DES cipher and a Pass Phrase.
Encrypt the private key now? [Y/n]: y
writing RSA key
Enter PEM pass phrase:wodemima
Verifying - Enter PEM pass phrase:wodemima
Fine, you're using an encrypted RSA private key.
#make install
出现的最后提示信息:
<=== [config]
+--------------------------------------------------------+
| You now have successfully built and installed the |
| Apache 1.3 HTTP server. To verify that Apache actually |
| works correctly you now should first check the |
| (initially created or preserved) configuration files |
| |
| /usr/local/mod_ssl/conf/httpd.conf
| |
| and then you should be able to immediately fire up |
| Apache the first time by running: |
| |
| /usr/local/mod_ssl/bin/apachectl start
| |
| Or when you want to run it with SSL enabled use: |
| |
| /usr/local/mod_ssl/bin/apachectl startssl
| |
| Thanks for using Apache. The Apache Group |
| http://www.apache.org/ |
+--------------------------------------------------------+
注:运行/usr/local/mod_ssl/bin/apachectl start只启动apache
/usr/local/mod_ssl/bin/apachectl startsslg带SSL方式启动apache,所以只运行这个参数命令就行。
/usr/local/mod_ssl/bin/apachectl stop 停止以上两种启动方式。
评论