cd /usr/local/src sh j2sdk-1_4_2_02-linux-i586-rpm.bin su rpm -Uvh j2sdk-1_4_2_02-linux-i586.rpm exit |
項目 |
値 |
---|---|
JAVA_HOME |
/usr/java/j2sdk1.4.2_02 |
PATH |
$JAVA_HOME/bin |
JAVA_HOME=/usr/java/j2sdk1.4.2_02 PATH=$PATH:$JAVA_HOME/bin (中略) export JAVA_HOME PATH |
cd /usr/local/src tar zxvf openssl-0.9.7c.tar.gz cd openssl-0.9.7c |
./config --prefix=/opt/openssl-0.9.7c |
make |
su make install # /opt/ssl でアクセスできるようシンボリックリンクを設定 cd /opt ln -s openssl-0.9.7c ssl exit |
cd /usr/local/src su useradd apache exit |
tar zxvf httpd-2.0.48.tar.gz cd httpd-2.0.48 |
./configure --prefix /opt/apache-2.0.48 --enable-modules="ssl" --with-ssl=/opt/ssl |
make |
su make install # /opt/apache2 でアクセスできるようシンボリックリンクを設定 cd /opt ln -s apache-2.0.48 apache2 exit |
su useradd tomcat |
cd /opt # ユーザ tomcat がオーナーとなるように Tomcat を展開。 mkdir jakarta-tomcat-4.1.29 chown tomcat:tomcat jakarta-tomcat-4.1.29 su tomcat tar zxvf /usr/local/src/jakarta-tomcat-4.1.29.tar.gz # /opt/tomcat4.1 でアクセスできるようシンボリックリンクを設定 ln -s jakarta-tomcat-4.1.29 tomcat4.1 # root に戻る exit # ログインユーザに戻る exit |
cd /usr/local/src tar zxvf jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz |
cd jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2 chmod +x buildconf.sh ./buildconf.sh ./configure --with-PACKAGE=yes --with-apxs2=/opt/apache2/bin/apxs --with-tomcat41=/opt/tomcat4.1 |
make |
su cp ../build/jk2/apache2/mod_jk2.so /opt/apache2/modules chown root:root /opt/apache2/modules/mod_jk2.so exit |
su cd /opt/apache2/conf mkdir certs cd certs |
/opt/ssl/bin/openssl genrsa -des3 1024 > webtribe.key.pem Generating RSA private key, 1024 bit long modulus ...............++++++ ............................++++++ e is 65537 (0x10001) Enter pass phrase: <== パスフレーズを入力します。 Verifying - Enter pass phrase: <== もう一度パスフレーズを入力します。 |
/opt/ssl/bin/openssl rsa -in webtribe.key.pem -out webtribe.key.pem Enter pass phrase for webtribe.key.pem: <== 先ほど入力したパスフレーズを入力します writing RSA key |
/opt/ssl/bin/openssl req -new -key webtribe.key.pem -out webtribe.csr.pem You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:JP State or Province Name (full name) [Some-State]:Osaka Locality Name (eg, city) []:Osaka Organization Name (eg, company) [Internet Widgits Pty Ltd]:Media Knowledge Industrial Co.,Ltd. Organizational Unit Name (eg, section) []:Product Common Name (eg, YOUR name) []:webtribe.mki.ne.jp Email Address []: Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []: |
/opt/ssl/bin/openssl x509 -in webtribe.csr.pem -out webtribe.cert.pem -req -signkey webtribe.key.pem -days 365 Signature ok subject=/C=JP/ST=Osaka/L=Osaka/O=Media Knowledge Industrial Co.,Ltd./OU=Product/CN=webtribe.mki.ne.jp Getting Private key |
chmod 400 * |
SSLCertificateFile /opt/apache2/conf/certs/webtribe.cert.pem SSLCertificateKeyFile /opt/apache2/conf/certs/webtribe.key.pem |
User apache Group apache ServerAdmin webmaster@mki.ne.jp ServerName webtribe.mki.ne.jp AddDefaultCharset Off |
LoadModule jk2_module modules/mod_jk2.so |
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/> |
[logger.file:0] level=ERROR file=${serverRoot}/logs/jk2.log [shm:] disabled=1 [channel.socket:localhost:8009] [status:] [uri:/jkstatus/*] group=status: [uri:/webtribe/*] |
su cd /opt/apache2/bin # コンフィグレーションチェック ./apachectl configtest # コンフィグレーションチェックでエラーがなければ、SSL 付きで Apache を起動 ./apachectl sslstart exit |
# root に切り替え su # ユーザ tomcat として起動 su - tomcat cd /opt/tomcat4.1/bin ./startup.sh exit exit |
C:\WINNT>cd \Program Files\Java\j2re1.4.2_02\lib\security C:\Program Files\Java\j2re1.4.2_02\lib\security>keytool -import -trustcacerts -keystore cacerts -alias webtribe -storetype jks -file c:\certs\webtribe.cert.pem キーストアのパスワードを入力してください: changeit <== cacerts の初期パスワードは changeit です 所有者: CN=webtribe.mki.ne.jp, OU=Product, O="Media Knowledge Industrial Co.,Ltd.", L=Osaka, ST=Osaka, C=JP 実行者: CN=webtribe.mki.ne.jp, OU=Product, O="Media Knowledge Industrial Co.,Ltd.", L=Osaka, ST=Osaka, C=JP シリアル番号: 0 有効日: Fri Dec 05 15:19:15 JST 2003 有効期限: Sat Dec 04 15:19:15 JST 2004 証明書のフィンガープリント: MD5: 35:F5:E2:D7:2F:75:0B:4A:00:B5:ED:1B:48:16:07:B2 SHA1: 7A:9C:41:93:BD:29:D6:E0:6C:49:80:57:D2:F5:A7:6D:67:60:11:10 この証明書を信頼しますか? [no]: yes 証明書がキーストアに追加されました。 |
パラメータ |
説明 |
---|---|
-import |
インポート |
-trustcacerts |
インポートするのは、信頼できる認証局の発行した証明書 (自己署名のサーバ証明書を信頼する、ということになります。) |
-keystore |
信頼されたルート証明書を格納するファイル |
-alias |
インポートする証明書の別名 |
-storetype |
証明書ストアのタイプ |
-file |
証明書ファイル |