该配置并安装mod_ssl和Apache了。对此,你将需要有rsaref-2.0文件。在上搜索“rsaref20.tar.Z”。如果你不喜欢Lycos,你可以选择其他搜索引擎来搜索文件。当然只有你在美国才需要这个文件。(管它呢,你也可从别处下载,首先在查找“rsaref20.tar.Z”,好多啊!。)
创建rasref目录,你将在该目录提取文件。注意。这假定你下载了一个临时目录,而你就在此目录。
# mkdir rsaref-2.0 # cd rsaref-2.0 # gzip -d -c ../rsaref20.tar.Z | tar xvf -
现在配置并构造OpenSSL库。
# cd rsaref-2.0 # cp -rp install/unix local # cd local # make # mv rsaref.a librsaref.a # cd ../..
安装OpenSSL。记住,你将用它来创建临时证书和CSR文件。--prefix选项指定主安装目录。
# cd openssl-0.9.x # ./config -prefix=http://www.jb51.net/usr/local/ssl -L`pwd`/../rsaref-2.0/local/ rsaref -fPIC
现在make、测试并安装它。
# make # make test # make install # cd ..
我们将配置MOD_SSL模块,然后用Apache配置指定它为一个可装载的模块。
# cd mod_ssl-2.5.x-1.3.x # ./configure --with-apache=../apache_1.3.x # cd ..
现在我们可以把更多的Apache模块加到Apache源代码树中。可选的--enable-shared=ssl选项使得mod_ssl构造成为一个DSO“libssl.so”。关于在Apache支持DSO的更多信息,阅读Apache源代码树中的INSTALL和 htdocs/manual/dso.html文档。我强烈建议ISP和软件包装维护者为了最灵活地使用mod_ssl而使用DSO工具,但是注意,DSO不是在所有平台上的Apache都支持。
# cd apache_1.3.x # SSL_BASE=../openssl-0.9.x RSA_BASE=../rsaref-2.0/local ./configure --enable-module=ssl --activate-module=src/modules/php4/libphp4.a --enable-module=php4 --prefix=http://www.jb51.net/usr/local/apache --enable-shared=ssl [...你可加入更多的选项...]
生成Apache,然后生成证书,并安装...
# make
如果你已正确地完成,你将得到类似于以下的信息:
+-----------------------------------------------------------------------+ | Before you install the package you now should prepare the SSL | | certificate system by running the "make certificate" command. | | For different situations the following variants are provided: |
| % make certificate TYPE=dummy (dummy self-signed Snake Oil cert) | | % make certificate TYPE=test (test cert signed by Snake Oil CA) | | % make certificate TYPE=custom (custom cert signed by own CA) | | % make certificate TYPE=existing (existing cert) | | CRT=http://www.jb51.net/path/to/your.crt [KEY=http://www.jb51.net/path/to/your.key] |
| Use TYPE=dummy when you're a vendor package maintainer, | | the TYPE=test when you're an admin but want to do tests only, | | the TYPE=custom when you're an admin willing to run a real server | | and TYPE=existing when you're an admin who upgrades a server. | | (The default is TYPE=test) |
| Additionally add ALGO=RSA (default) or ALGO=DSA to select | | the signature algorithm used for the generated certificate. |
| Use "make certificate VIEW=1" to display the generated data. | | | | Thanks for using Apache & mod_ssl. Ralf S. Engelschall | | rse@engelschall.com | | | +-----------------------------------------------------------------------+
现在你可以创建一个定制的证书。该选项将提示输入你的地址、公司、和其他一些东西。关于证书,请参阅本文的结尾。
# make certificate TYPE=custom
现在安装Apache...
# make install
如果一切正常,你应该看到类似于以下的信息:
+----------------------------------------------------------------------------------+ | 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/apache/conf/httpd.conf | | and then you should be able to immediately fire up | | Apache the first time by running: |
| /usr/local/apache/bin/apachectl start | | Or when you want to run it with SSL enabled use: | | | | /usr/local/apache/bin/apachectl startssl | | Thanks for using Apache. The Apache Group | | / | +----------------------------------------------------------------------------------+
现在验证Apache和PHP是否正在工作。然而,我们需要编辑srm.conf和httpd.conf保证我们把PHP类型加到了配置中。查看httpd.conf并去掉下列行的注释。如果你精确地遵循了本文的指令,你的httpd.conf文件将位于/usr/local/apache/conf目录。文件有一行针对php4的addtype加了注释,现在就去掉注释。httpd.conf 文件--片断
> > # And for PHP 4.x, use: > # ---> AddType application/x-httpd-php .php ---> AddType application/x-httpd-php-source .phps > >
(编辑:焦作站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|