既に動いている apache とは別のディレクトリに、新しいバージョンの apache + mod_ssl をインストールする。
apache_1.3.26.tar.gz と、 mod_ssl-2.8.9-1.3.26.tar.gz を手に入れて、展開。
展開先に cd して、configure を実行する。この時に、明示的にインストール先を /usr/local/apache_safe と指定。
office# pwd
/usr/local/src/apache_1.3.26
office# ./configure --prefix=/usr/local/apache_safe
Configuring for Apache, Version 1.3.26
+ using installation path layout: Apache (config.layout)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
+ configured for FreeBSD 4.3 platform
+ setting C compiler to gcc
+ setting C pre-processor to gcc -E
+ checking for system header files
+ adding selected modules
+ using builtin Expat
+ checking sizeof various data types
+ doing sanity check on compiler and options
Creating Makefile in src/support
Creating Makefile in src/os/unix
Creating Makefile in src/ap
Creating Makefile in src/main
Creating Makefile in src/lib/expat-lite
Creating Makefile in src/modules/standard
次に、mod_ssl をセットアップ。
office# cd ../mod_ssl-2.8.9-1.3.26
office# ./configure --with-apache=../apache_1.3.26
Configuring mod_ssl/2.8.9 for Apache/1.3.26
+ Apache location: ../apache_1.3.26 (Version 1.3.26)
+ Auxiliary patch tool: ./etc/patch/patch (local)
+ Applying packages to Apache source tree:
o Extended API (EAPI)
o Distribution Documents
o SSL Module Source
o SSL Support
o SSL Configuration Additions
o SSL Module Documentation
o Addons
Done: source extension and patches successfully applied.
Now proceed with the following commands (Bourne-Shell syntax):
$ cd ../apache_1.3.26
$ SSL_BASE=/path/to/openssl ./configure ... --enable-module=ssl
$ make
$ make certificate
$ make install
mod_ssl のセットアップが終わったら、apache を make する。
office# cd ../apache_1.3.26
office# which openssl
/usr/bin/openssl
office# env SSL_BASE=/usr ./configure --enable-module=ssl --enable-module=so --prefix=/usr/local/apache_safe
Configuring for Apache, Version 1.3.26
+ using installation path layout: Apache (config.layout)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
+ configured for FreeBSD 4.3 platform
+ setting C compiler to gcc
+ setting C pre-processor to gcc -E
+ checking for system header files
+ adding selected modules
o ssl_module uses ConfigStart/End
+ SSL interface: mod_ssl/2.8.9
+ SSL interface build type: OBJ
+ SSL interface compatibility: enabled
+ SSL interface experimental code: disabled
+ SSL interface conservative code: disabled
+ SSL interface vendor extensions: disabled
+ SSL interface plugin: Vendor DBM (libc)
+ SSL library path: /usr
+ SSL library version: OpenSSL 0.9.6 24 Sep 2000
+ SSL library type: installed package (stand-alone)
+ enabling Extended API (EAPI)
+ using builtin Expat
+ checking sizeof various data types
+ doing sanity check on compiler and options
Creating Makefile in src/support
Creating Makefile in src/os/unix
Creating Makefile in src/ap
Creating Makefile in src/main
Creating Makefile in src/lib/expat-lite
Creating Makefile in src/modules/standard
Creating Makefile in src/modules/ssl
office# make
===> src
===> src/os/unix
gcc -c -I../../os/unix -I../../include -funsigned-char -DMOD_SSL=208109 -DEAPI -DUSE_EXPAT -I../../lib/expat-lite `../../apaci` os.c
gcc -c -I../../os/unix -I../../include -funsigned-char -DMOD_SSL=208109 -DEAPI -DUSE_EXPAT -I../../lib/expat-lite `../../apaci` os-inline.c
rm -f libos.a
ar cr libos.a os.o os-inline.o
<略>
+---------------------------------------------------------------------+
| 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=/path/to/your.crt [KEY=/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 |
| www.engelschall.com |
+---------------------------------------------------------------------+
<=== src
office# make install
===> [mktree: Creating Apache installation tree]
./src/helpers/mkdir.sh /usr/local/apache_safe/bin
mkdir /usr/local/apache_safe
mkdir /usr/local/apache_safe/bin
./src/helpers/mkdir.sh /usr/local/apache_safe/bin
./src/helpers/mkdir.sh /usr/local/apache_safe/libexec
mkdir /usr/local/apache_safe/libexec
<略>
<=== [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/apache_safe/conf/httpd.conf
| |
| and then you should be able to immediately fire up |
| Apache the first time by running: |
| |
| /usr/local/apache_safe/bin/apachectl start
| |
| Or when you want to run it with SSL enabled use: |
| |
| /usr/local/apache_safe/bin/apachectl startssl
| |
| Thanks for using Apache. The Apache Group |
| http://www.apache.org/ |
+--------------------------------------------------------+
configure の時に prefix に指定した /usr/local/apache_safe に正しくインストールされているか確認。
office# ls -la /usr/local/apache_safe/
total 15
drwxr-xr-x 12 root wheel 512 6/21 10:52 .
drwxr-xr-x 18 root wheel 512 6/21 10:52 ..
drwxr-xr-x 2 root wheel 512 6/21 10:52 bin
drwxr-xr-x 2 root wheel 512 6/21 10:53 cgi-bin
drwxr-xr-x 12 root wheel 512 6/21 11:02 conf
drwxr-xr-x 3 root wheel 1024 6/21 10:52 htdocs
drwxr-xr-x 3 root wheel 3584 6/21 10:53 icons
drwxr-xr-x 3 root wheel 1024 6/21 10:52 include
drwxr-xr-x 2 root wheel 512 6/21 10:52 libexec
drwxr-xr-x 2 root wheel 512 6/21 11:04 logs
drwxr-xr-x 4 root wheel 512 6/21 10:52 man
drwxr-xr-x 2 nobody nobody 512 6/21 10:52 proxy
httpd.conf 直して試しに実行。
office# /usr/local/apache_safe/bin/apachectl startssl
office# ps -aux
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
<略>
root 239 0.0 0.3 3008 1732 ?? Ss 24 402 1:47.90 /usr/local/apache/bin/httpd -DSSL
<略>
nobody 81589 0.0 0.8 5196 4236 ?? I 5 602 3:17.63 /usr/local/apache/bin/httpd -DSSL
nobody 86782 0.0 0.8 5156 4212 ?? I 6 602 3:10.17 /usr/local/apache/bin/httpd -DSSL
nobody 15360 0.0 0.8 4884 3972 ?? I 8 602 2:42.65 /usr/local/apache/bin/httpd -DSSL
nobody 80978 0.0 0.6 4180 3232 ?? I 13 602 1:33.00 /usr/local/apache/bin/httpd -DSSL
nobody 3679 0.0 0.6 3988 3044 ?? I 土 11AM 1:11.92 /usr/local/apache/bin/httpd -DSSL
nobody 32759 0.0 0.5 3712 2760 ?? I 月 08PM 0:45.17 /usr/local/apache/bin/httpd -DSSL
nobody 34969 0.0 0.5 3692 2740 ?? I 火 08AM 0:43.17 /usr/local/apache/bin/httpd -DSSL
nobody 41708 0.0 0.5 3608 2664 ?? I 火 02PM 0:37.58 /usr/local/apache/bin/httpd -DSSL
nobody 51903 0.0 0.5 3512 2552 ?? I 水 11AM 0:26.82 /usr/local/apache/bin/httpd -DSSL
nobody 61086 0.0 0.5 3424 2468 ?? I 木 09AM 0:18.84 /usr/local/apache/bin/httpd -DSSL
<略>
root 91158 0.0 0.5 3044 2388 ?? Ss 11:04AM 0:00.06 /usr/local/apache_safe/bin/httpd -DS
nobody 91159 0.0 0.5 3212 2516 ?? I 11:04AM 0:00.02 /usr/local/apache_safe/bin/httpd -DS
nobody 91160 0.0 0.5 3192 2488 ?? I 11:04AM 0:00.01 /usr/local/apache_safe/bin/httpd -DS
nobody 91161 0.0 0.5 3192 2488 ?? I 11:04AM 0:00.01 /usr/local/apache_safe/bin/httpd -DS
nobody 91162 0.0 0.5 3500 2592 ?? I 11:04AM 0:00.03 /usr/local/apache_safe/bin/httpd -DS
nobody 91163 0.0 0.5 3204 2488 ?? I 11:04AM 0:00.01 /usr/local/apache_safe/bin/httpd -DS
nobody 91164 0.0 0.5 3212 2492 ?? I 11:04AM 0:00.01 /usr/local/apache_safe/bin/httpd -DS
nobody 91254 0.0 0.5 3052 2392 ?? I 11:12AM 0:00.00 /usr/local/apache_safe/bin/httpd -DS
nobody 91256 0.0 0.5 3052 2392 ?? I 11:12AM 0:00.00 /usr/local/apache_safe/bin/httpd -DS
nobody 91257 0.0 0.5 3052 2392 ?? I 11:12AM 0:00.00 /usr/local/apache_safe/bin/httpd -DS
OK!
ところで、make certificate してないけどよかったんかいのお。
|
|