このページを共有


7月のカレンダー



1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

カテゴリ一覧

ただの日記(936)
原付生活(3)
子育て日記(11)
PC関連(11)
もろもろ日記(911)

競馬+POG(1668)
当たらない予想と反省会(708)
POGネタ(58)
競馬について考える(19)
競馬もろもろ(224)
ダービーウィーク!(14)
2011年競馬場訪問記(27)
2012年競馬場訪問記(53)
2013年競馬場訪問記(62)
2014年競馬場訪問記(40)
2015年競馬場訪問記(43)
2016年競馬場訪問記(25)
2017年競馬場訪問記(36)
2018年競馬場訪問記(37)
2019年競馬場訪問記(34)
2020年競馬場訪問記(24)
2021年競馬場訪問記(37)
2022年競馬場訪問記(52)
2023年競馬場訪問記(70)
2024年競馬場訪問記(71)
2025年競馬場訪問記(26)
地方競馬馬主(5)
ひとくち馬主(3)

ホームページ製作(362)
PHPの備忘録(14)
CSSの備忘録(5)
JavaScriptの備忘録(2)
ホームページもろもろ(289)
Flashの備忘録(12)
管理人の備忘録(21)
スマフォ用サイト作成(19)

自宅サーバ(367)
FreeBSD(17)
Apache(4)
PHP(5)
MySQL(18)
サーバもろもろ(149)
障害連絡(133)
リニューアルプロジェクト 2011-2012(41)

お仕事(48)
お仕事(48)

旅の記録・水曜どうでしょう関連(43)
水曜どうでしょう(11)
2009年四国お遍路(6)
2009年アンコールワット(5)
2010年ベトナム(3)
2010年いっそ九州(5)
2010年北海道179市町村(5)
2011年春の一人旅(2)
2011年四国お遍路(6)


先月までのネタ

2025年
2025年6月(7)
2025年5月(3)
2025年4月(3)
2025年3月(3)
2025年2月(11)
2025年1月(7)

2024年
2024年12月(11)
2024年11月(7)
2024年10月(10)
2024年9月(6)
2024年8月(6)
2024年7月(7)
2024年6月(7)
2024年5月(5)
2024年4月(5)
2024年3月(7)
2024年2月(8)
2024年1月(13)

2023年
2023年12月(11)
2023年11月(8)
2023年10月(10)
2023年9月(7)
2023年8月(9)
2023年7月(10)
2023年6月(6)
2023年5月(10)
2023年4月(5)
2023年3月(4)
2023年2月(6)
2023年1月(6)

2022年
2022年12月(9)
2022年11月(8)
2022年10月(5)
2022年9月(5)
2022年8月(2)
2022年7月(6)
2022年6月(9)
2022年5月(3)
2022年4月(3)
2022年3月(4)
2022年2月(7)
2022年1月(5)

2021年
2021年12月(8)
2021年11月(9)
2021年10月(4)
2021年9月(3)
2021年8月(2)
2021年7月(6)
2021年6月(12)
2021年5月(2)
2021年4月(8)
2021年3月(2)
2021年2月(7)
2021年1月(2)

2020年
2020年12月(8)
2020年11月(3)
2020年10月(4)
2020年9月(1)
2020年8月(2)
2020年7月(7)
2020年6月(6)
2020年5月(9)
2020年4月(11)
2020年3月(8)
2020年2月(5)
2020年1月(9)

2019年
2019年12月(4)
2019年11月(5)
2019年10月(7)
2019年9月(2)
2019年8月(2)
2019年7月(8)
2019年6月(2)
2019年5月(3)
2019年4月(2)
2019年3月(4)
2019年2月(3)
2019年1月(1)

2018年
2018年12月(8)
2018年11月(5)
2018年10月(10)
2018年9月(6)
2018年8月(1)
2018年7月(7)
2018年6月(5)
2018年5月(7)
2018年4月(19)
2018年3月(3)
2018年2月(3)
2018年1月(11)

2017年
2017年12月(14)
2017年11月(11)
2017年10月(18)
2017年9月(18)
2017年8月(21)
2017年7月(29)
2017年6月(26)
2017年5月(23)
2017年4月(18)
2017年3月(11)
2017年2月(11)
2017年1月(16)

2016年
2016年12月(25)
2016年11月(24)
2016年10月(30)
2016年9月(15)
2016年8月(16)
2016年7月(15)
2016年6月(18)
2016年5月(30)
2016年4月(28)
2016年3月(29)
2016年2月(26)
2016年1月(32)

2015年
2015年12月(30)
2015年11月(29)
2015年10月(30)
2015年9月(27)
2015年8月(28)
2015年7月(28)
2015年6月(28)
2015年5月(29)
2015年4月(30)
2015年3月(28)
2015年2月(26)
2015年1月(29)

2014年
2014年12月(31)
2014年11月(28)
2014年10月(31)
2014年9月(29)
2014年8月(29)
2014年7月(31)
2014年6月(31)
2014年5月(30)
2014年4月(30)
2014年3月(28)
2014年2月(27)
2014年1月(31)

2013年
2013年12月(29)
2013年11月(27)
2013年10月(29)
2013年9月(27)
2013年8月(28)
2013年7月(28)
2013年6月(29)
2013年5月(29)
2013年4月(30)
2013年3月(26)
2013年2月(24)
2013年1月(29)

2012年
2012年12月(28)
2012年11月(27)
2012年10月(28)
2012年9月(30)
2012年8月(31)
2012年7月(33)
2012年6月(32)
2012年5月(33)
2012年4月(35)
2012年3月(30)
2012年2月(27)
2012年1月(31)

2011年
2011年12月(25)
2011年11月(25)
2011年10月(28)
2011年9月(28)
2011年8月(28)
2011年7月(28)
2011年6月(27)
2011年5月(26)
2011年4月(16)
2011年3月(9)
2011年2月(11)
2011年1月(9)

2010年
2010年12月(12)
2010年11月(11)
2010年10月(8)
2010年9月(13)
2010年8月(10)
2010年7月(20)
2010年6月(6)
2010年5月(9)
2010年4月(2)
2010年3月(3)
2010年2月(5)
2010年1月(8)

2009年
2009年12月(9)
2009年11月(2)
2009年10月(4)
2009年9月(3)
2009年8月(1)
2009年7月(9)
2009年6月(3)
2009年5月(14)
2009年4月(10)
2009年3月(11)
2009年2月(9)
2009年1月(10)

2008年
2008年12月(1)
2008年11月(1)
2008年10月(1)
2008年9月(5)
2008年8月(1)
2008年7月(1)
2008年6月(2)
2008年5月(1)
2008年4月(1)
2008年3月(2)
2008年2月(7)
2008年1月(7)

2007年
2007年12月(11)
2007年11月(7)
2007年10月(8)
2007年9月(12)
2007年8月(11)
2007年7月(5)
2007年6月(16)
2007年5月(8)
2007年4月(2)
2007年3月(14)
2007年2月(2)
2007年1月(8)

2006年
2006年12月(4)
2006年11月(6)
2006年10月(7)
2006年9月(10)
2006年8月(9)
2006年7月(20)
2006年6月(13)
2006年5月(3)

2005年
2005年9月(13)
2005年8月(13)
2005年7月(18)
2005年6月(24)
2005年5月(26)
2005年4月(26)
2005年3月(27)
2005年2月(22)
2005年1月(26)

2004年
2004年12月(29)
2004年11月(29)
2004年10月(26)
2004年9月(23)
2004年8月(12)


最近よく読まれてるネタ



今日は(共有)所有馬キエティスム の応援に、夜勤明けで大井競馬場 へ行ってきました。
(2025年6月13日のネタ:78回)

Excel VBAで「SPAT4自動投票システム」を作ってみました。
(2020年7月19日のネタ:73回)

地方競馬馬主 は全国の競馬場で馬主席 を使える?使えない?のまとめ。
(2023年12月3日のネタ:56回)

NHKマイルカップ の観戦に、3週連続の東京競馬場 へ行ってきました。
(2024年5月5日のネタ:55回)

今年最初の2歳重賞・栄冠賞 の観戦に、門別競馬場 へ行ってきました。(14回目の栄冠賞観戦)
(2025年6月24日のネタ:54回)

競馬場の「音」にまつわる話。
(2015年12月17日のネタ:35回)

とっても残念なクイーン賞。
(2013年12月4日のネタ:35回)

今年最初の北海道遠征!今日はばんえい十勝 ・帯広競馬場 へ行ってきました。
(2025年6月23日のネタ:30回)

昨日は船橋競馬場 へ行ってきました。(ほぼ飲み会。)
(2025年6月7日のネタ:27回)

今日は安田記念 の観戦に、東京競馬場 へ行ってきました。
(2025年6月8日のネタ:25回)



最近のコメント



今日は改修工事真っ只中の #京都競馬場 (パークウインズ京都競馬場)へ行ってきました。(チョネ)

本日は笠松競馬場へ行ってきました。(あいべ)

管理人の今年の目標が一つ増えました…。(あああ)

まあそんなに書くことはありませんが…。(momo)

【管理人からご挨拶】 『The Sunday Breeze』は5月25日に開設19周年を迎えます。(アオヤギ)

4月からスタートする「Sunday Breeze POG!」の一部ルール追加について。(アオヤギ)

昨日「Sunday Breeze賞」の観戦に帯広競馬場へ行ってきました。(白イチゴ)

本日5月25日、「The Sunday Breeze」は18回目の誕生日を迎えました。(アオヤギ)

【「G1予想大会」プレリリース終了】皆様のご協力、本当にありがとうございました。(アオヤギ)

【再度お知らせとお願い】今週からの「G1予想大会」、新機能プレリリースを公開中です。(白イチゴ)



ネタの検索



管理人の競馬観戦記録


(2025年)

2011年以降の競馬観戦インデックス

JRA新潟競馬場
5月18日

JRA東京競馬場
2月16日 (共同通信杯)
2月23日 (フェブラリーS)
5月11日 (NHKマイルC)
6月8日 (安田記念)

JRA中山競馬場
1月5日 (中山金杯)
1月19日 (京成杯)

JRA京都競馬場
5月31日

JRA阪神競馬場
4月13日 (桜花賞)

JRA小倉競馬場
1月26日

帯広競馬場
6月23日

水沢競馬場
3月11日

船橋競馬場
1月22日 (ブルーバードC)
2月14日
6月6日

大井競馬場
4月30日
5月23日
6月13日

笠松競馬場
2月7日

園田競馬場
5月30日

姫路競馬場
2月6日

高知競馬場
2月5日

佐賀競馬場
1月25日
3月6日
3月30日

門別競馬場
6月24日 (栄冠賞)


管理人の競馬家計簿


(最近14日分)

2025年6月15日阪神
10勝  回収率:0.0%

2025年6月15日高知
10勝  回収率:0.0%

2025年6月17日川崎
11勝  回収率:140.0%

2025年6月18日川崎
10勝  回収率:0.0%

2025年6月23日帯広
62勝  回収率:60.1%

2025年6月24日門別
20勝  回収率:0.0%

2025年6月25日浦和
10勝  回収率:0.0%

2025年6月26日門別
10勝  回収率:0.0%

2025年6月27日園田
21勝  回収率:40.0%

2025年6月28日函館
31勝  回収率:61.8%

2025年6月28日福島
40勝  回収率:0.0%

2025年6月28日小倉
41勝  回収率:78.8%

2025年合計
713220
勝率:30.9%  回収率:62.0%
(万馬券:2本的中)

2024年合計
1394381
勝率:27.3% 回収率:70.5%
(万馬券:12本的中)

2023年合計
1772537
勝率:30.3% 回収率:71.2%
(万馬券:11本的中)

2022年合計
2097563
勝率:26.8% 回収率:66.4%
(万馬券:29本的中)

2021年合計
2147527
勝率:24.5% 回収率:67.8%
(万馬券:24本的中)


管理人のつぶやき


(皆様のフォローをお願いします。)

2006年7月のネタは全部で20件あります。

問題多発で新サーバへの移行延期。

まず。

日曜日夜に共有ディスクの移行。
移行中にディスクアクセスに異常があり、
そのままシステムダウン。というか停止状態。
本日13時過ぎまで。

実はメール絡みについては
日曜日日中に新サーバへ移行していたので
メールは正常に稼動していたものの、それ以外はすべて×。

ご迷惑をおかけしました。

そして、共有ディスクにあった一部ファイルが破損。
いろいろと手は尽くしましたが
Windowsとは違い、復旧はかなり難しいと思われます。

そして、致命的な問題。

旧サーバのDB。
トップページには「MySQL 4.0.14」と書いてあるものの、
実際は「MySQL 4.1.11」でした。
それなのに、7月4日分記事より
-----
まあ再構築前が4.0系でしたので、
多分4.0.27でいくと思います。
4.1.20では、5系とあまり変わらないような気もするし。
-----
てなことを書いて、結局4.0.27を入れてしまいました。

これが大誤算。
4.0系では、サブクエリが使えません。

各馬の詳細ページやら、POGのトップページやら
各所でサブクエリを多用しています。

select なんとか from (select …
とか
where なんとか=(select …
とか。

新サーバの確認中、ことごとくエラーになりました。
で、行き着いた原因が「MySQLのバージョン」。

ということで、今週は、MySQLのリインストールを
行った上で、できれば明日にも移行します。

遅くとも日曜日夜には。
ページの内容が内容だけに、土日の日中にできないのがツラい。

[コメント読む(0)]  人気ブログランキングへ 

qmailとezmlmのインストール&初期設定。

qmailのインストール。
パッチも当てます。

# fetch ftp://ftp.jp.qmail.org/qmail/qmail-1.03.tar.gz
# fetch http://mirror.averse.net/pub/FreeBSD/ports/local-distfiles/sada/qmail-date-localtime.patch.gz
# tar zxvf qmail-1.03.tar.gz
# gunzip qmail-date-localtime.patch.gz
# patch -p1 < ../qmail-date-localtime.patch

Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
&#124;This patch causes the various qmail programs to generate date stamps in
&#124;the local timezone. I find GMT too annoying to convert from/to. I make
&#124;no warranties that it will work in your timezone, however it works for me.
&#124;
&#124;--- qmail-1.01/date822fmt.c Tue Apr 15 15:05:23 1997
&#124;+++ date822fmt.c Fri Apr 18 00:39:41 1997
--------------------------
Patching file date822fmt.c using Plan A...
Hunk #1 succeeded at 1.
Hunk #2 succeeded at 13.
done

qmail用ユーザ、グループの作成。
# pw groupadd nofiles -g 3000
# pw groupadd qmail -g 3001
# pw useradd alias -g 3000 -u 3000 -d /var/qmail/alias
# pw useradd qmaild -g 3000 -u 3001 -d /nonexistent
# pw useradd qmaill -g 3000 -u 3002 -d /nonexistent
# pw useradd qmailp -g 3000 -u 3003 -d /nonexistent
# pw useradd qmailq -g 3001 -u 3004 -d /nonexistent
# pw useradd qmailr -g 3001 -u 3005 -d /nonexistent
# pw useradd qmails -g 3001 -u 3006 -d /nonexistent


ディレクトリの作成。
# mkdir /var/qmail

メイクします。
# make
( cat warn-auto.sh; echo CC='`head -1 conf-cc`'; echo LD='`head -1 conf-ld`' ) > auto-ccld.sh
cat auto-ccld.sh make-load.sh > make-load



(中略)



cat binm3+df.sh &#124; sed s}QMAIL}"`head -1 conf-qmail`"}g > binm3+df
chmod 755 binm3+df

# make setup
nroff -man qmail-local.8 > qmail-local.0
nroff -man qmail-lspawn.8 > qmail-lspawn.0



(中略)



./install

# make check
./instcheck

何も出なければOK。

# ./config-fast sundaybreeze.jp
Your fully qualified host name is sundaybreeze.jp.
Putting sundaybreeze.jp into control/me...
Putting sundaybreeze.jp into control/defaultdomain...
Putting sundaybreeze.jp into control/plusdomain...
Putting sundaybreeze.jp into control/locals...
Putting sundaybreeze.jp into control/rcpthosts...
Now qmail will refuse to accept SMTP messages except to sundaybreeze.jp.
Make sure to change rcpthosts if you add hosts to locals or virtualdomains!

結局旧サーバのファイルを使うので
あまり意味はなかったりする。

ということで、旧サーバから以下のファイルをそのまま使用。
・/var/qmail/rc → /usr/local/etc/rc.d/qmail.sh として使用
・/var/qmail/alias/.qmail*
・/var/qmail/control/*
・各ユーザのホームディレクトリにあるMaildir

一応配送テスト。
# echo "to: hotmailのアドレス" &#124; /var/qmail/bin/qmail-inject

とりあえず届いたのでOK。
これでqmailは終わりです。

続いて、メーリングリストexmlmのインストール。

# fetch http://cr.yp.to/software/ezmlm-0.53.tar.gz
# fetch http://www.ezmlm.org/archive/0.40/ezmlm-idx-0.40.tar.gz
# tar zxvf ezmlm-0.53.tar.gz
# tar zxvf ezmlm-idx-0.40.tar.gz
# cp -Rpf ezmlm-idx-0.40/* ezmlm-0.53/
# cd ezmlm-0.53
# patch < idx.patch

Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
&#124;--- ezmlm-warn.1 1998/02/17 00:32:45 1.1
&#124;+++ ezmlm-warn.1 1998/12/21 04:35:16 1.5
--------------------------



(中略)



Patching file ezmlm-weed.1 using Plan A...
Hunk #1 succeeded at 7.
Hunk #2 succeeded at 35.
Hunk #3 succeeded at 113.
done
# make
( cat warn-auto.sh; echo CC='`head -1 conf-cc`'; echo LD='`head -1 conf-ld`' ) > auto-ccld.sh
cat auto-ccld.sh make-load.sh > make-load



(中略)



cp -f ezmlmrc.en_US ezmlmrc

# make man
nroff -man ezmlm.5 > ezmlm.0
nroff -man ezmlm-gate.1 > ezmlm-gate.0
nroff -man ezmlm-idx.1 > ezmlm-idx.0
nroff -man ezmlm-get.1 > ezmlm-get.0



(中略)



nroff -man ezmlmrc.5 > ezmlmrc.0
nroff -man ezmlm-limit.1 > ezmlm-limit.0
# make setup
./compile install.c



(中略)



./install "`head -1 conf-bin`" < BIN
./install "`head -1 conf-man`" < MAN

本来は
/usr/local/bin/ezmlmのなかの
ezmlm-makeやらezmlm-subやらをつかって
一からメーリングリストを作るのですが、
これまた旧サーバで使用していたものがありますので
そのまま使います。
旧サーバの/var/ezmlmをそのまま持ってきました。


ここまでですべてのアプリケーションのインストールは完了。だと思う。

残りの作業は
・バックアップ&共有ディスクの増設+設定
・cronの編集、さざなみフォントインストール、DiCEの移動
7.18追記
さざなみフォント。
# tar jxvf sazanami-20040629.tar.bz2
# mkdir -p /usr/local/fonts/tryetype
# mv sazanami-*.ttf /usr/local/fonts/tryetype/

・コンテンツとデータの移動+Cバッチのリコンパイル
・LAN内で動作確認
・ルータの設定
で新サーバでの稼動開始となります。
ホントはカーネルの再構築とかいろいろやりたかったんだけど。
時間的余裕もなく。

連休中には新サーバでの稼動が開始します。たぶん。

[コメント読む(0)]  人気ブログランキングへ 

二日酔いのため、進捗なし。

飲みすぎです。

[コメント読む(0)]  人気ブログランキングへ 

mod_becomeとPHP5.1.4のインストール&初期設定。

まずはmod_becomeのインストール。

# fetch http://www.snert.com/Software/mod_become/mod_become103.tgz
# tar zxvf mod_become103.tgz
# cd mod_become-1.3/
# vi Makefile


APXS=apxs
APACHECTL=apachectl



APXS=/usr/local/apache/bin/apxs
APACHECTL=/usr/local/apache/bin/apachectl

と書き換え。

# make install-dynamic



(中略)



***************************************************************
As a Canadian living in France, there are somethings that are hard
for me to find. If you would like to say "Thank You" and/or get
support for my software, I would appreciate one (or more ;-) items
from my http://www.amazon.com/ wishlist under "achowe@snert.com".

Thank you,

Anthony Howe

で完了。

次にPHPのインストール。
# fetch http://www.php.net/get/php-5.1.4.tar.gz/from/jp.php.net/mirror
# mv mirror php-5.1.4.tar.gz
# tar zxvf php-5.1.4.tar.gz
# cd php-5.1.4/
# ./configure
? --enable-track-vars
? --enable-trans-sid
? --with-mysql=/usr/local
? --disable-debug
? --with-apxs=/usr/local/apache/bin/apxs
? --with-libxml-dir=/usr/local/lib
? --with-zlib-dir=/usr/lib
? --without-iconv
? --enable-mbstring
? --with-gd=/usr/local
? --with-freetype-dir=/usr/local
? --with-jpeg-dir=/usr/local
? --with-png-dir=/usr/local
? --with-zlib-dir=/usr/local
? --enable-gd-native-ttf
? --enable-gd-jis-conv

creating cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking host system type... i386-unknown-freebsd6.1
checking target system type... i386-unknown-freebsd6.1



(中略)



+--------------------------------------------------------------------+
&#124; License: &#124;
&#124; This software is subject to the PHP License, available in this &#124;
&#124; distribution in the file LICENSE. By continuing this installation &#124;
&#124; process, you are bound by the terms of this license agreement. &#124;
&#124; If you do not agree with the terms of this license, you must abort &#124;
&#124; the installation process at this point. &#124;
+--------------------------------------------------------------------+

Thank you for using PHP.

# make



(中略)




Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

# make install
Installing PHP SAPI module: apache
[activating module `php5' in /usr/local/apache/conf/httpd.conf]
cp libs/libphp5.so /usr/local/apache/libexec/libphp5.so



(中略)



You may want to add: /usr/local/lib/php to your php.ini include_path
Installing PDO headers: /usr/local/include/php/ext/pdo/

で完了。
php.iniは旧サーバで使用していたものを
そのまま使用。

これで一応Webがらみはすべて動く。はず。
明日はメール関連のインストールと設定。

[コメント読む(0)]  人気ブログランキングへ 

Apache1.3.36+mod_ssl2.8.27のインストール&初期設定。


# fetch http://www.modssl.org/source/mod_ssl-2.8.27-1.3.36.tar.gz
# fetch http://www.apache.jp/dist/httpd/apache_1.3.36.tar.gz
# tar zxvf mod_ssl-2.8.27-1.3.36.tar.gz
# tar zxvf apache_1.3.36.tar.gz
# cd mod_ssl-2.8.27-1.3.36
# env CFLAGS="-DBIG_SECURITY_HOLE"
? ./configure
? --with-apache=../apache_1.3.36
? --with-ssl=/usr/local
? --enable-rule=SHARED_CORE
? --with-layout=Apache
? --enable-module=so
? --enable-module=ssl
? --enable-module=rewrite
? --enable-shared=rewrite

Configuring mod_ssl/2.8.27 for Apache/1.3.36
+ Apache location: ../apache_1.3.36 (Version 1.3.36)
+ OpenSSL location: /usr/local
+ 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.

Configuring for Apache, Version 1.3.36
+ using installation path layout: Apache (config.layout)




(中略)




Now proceed with the following commands:
$ cd ../apache_1.3.36
$ make
$ make certificate
$ make install

上記のとおりに


# cd ../apache_1.3.36
# make

===> src
===> src/regex
sh ./mkh -i _REGEX_H_ regex2.h regcomp.c regerror.c regexec.c regfree.c > ../include/hsregex.h



(中略)



+---------------------------------------------------------------------+
&#124; Before you install the package you now should prepare the SSL &#124;
&#124; certificate system by running the 'make certificate' command. &#124;
&#124; For different situations the following variants are provided: &#124;
&#124; &#124;
&#124; % make certificate TYPE=dummy (dummy self-signed Snake Oil cert) &#124;
&#124; % make certificate TYPE=test (test cert signed by Snake Oil CA) &#124;
&#124; % make certificate TYPE=custom (custom cert signed by own CA) &#124;
&#124; % make certificate TYPE=existing (existing cert) &#124;
&#124; CRT=/path/to/your.crt [KEY=/path/to/your.key] &#124;
&#124; &#124;
&#124; Use TYPE=dummy when you're a vendor package maintainer, &#124;
&#124; the TYPE=test when you're an admin but want to do tests only, &#124;
&#124; the TYPE=custom when you're an admin willing to run a real server &#124;
&#124; and TYPE=existing when you're an admin who upgrades a server. &#124;
&#124; (The default is TYPE=test) &#124;
&#124; &#124;
&#124; Additionally add ALGO=RSA (default) or ALGO=DSA to select &#124;
&#124; the signature algorithm used for the generated certificate. &#124;
&#124; &#124;
&#124; Use 'make certificate VIEW=1' to display the generated data. &#124;
&#124; &#124;
&#124; Thanks for using Apache & mod_ssl. Ralf S. Engelschall &#124;
&#124; rse@engelschall.com &#124;
&#124; www.engelschall.com &#124;
+---------------------------------------------------------------------+
<=== src

サーバの秘密鍵と証明書申請データ(CSR)はあとで作るとして、
証明書は無償の認証局CACertで発行してもらったものがあります。
旧サーバのものを持ってきて、

# make certificate TYPE=existing CRT=証明書のパス

SSL Certificate Generation Utility (mkcert.sh)
Copyright (c) 1998-2000 Ralf S. Engelschall, All Rights Reserved.

Using existing custom certificate [EXISTING]
______________________________________________________________________

RESULT: Server Certification Files

o conf/ssl.key/server.key
The PEM-encoded DSA private key file which you configure
with the 'SSLCertificateKeyFile' directive (automatically done
when you install via APACI). KEEP THIS FILE PRIVATE!

o conf/ssl.crt/server.crt
The PEM-encoded X.509 certificate file which you configure
with the 'SSLCertificateFile' directive (automatically done
when you install via APACI).

Congratulations that you establish your server with real certificates.


# make install

===> [mktree: Creating Apache installation tree]
./src/helpers/mkdir.sh /usr/local/apache/bin
mkdir /usr/local/apache
mkdir /usr/local/apache/bin



(中略)



+--------------------------------------------------------+
&#124; You now have successfully built and installed the &#124;
&#124; Apache 1.3 HTTP server. To verify that Apache actually &#124;
&#124; works correctly you now should first check the &#124;
&#124; (initially created or preserved) configuration files &#124;
&#124; &#124;
&#124; /usr/local/apache/conf/httpd.conf
&#124; &#124;
&#124; and then you should be able to immediately fire up &#124;
&#124; Apache the first time by running: &#124;
&#124; &#124;
&#124; /usr/local/apache/bin/apachectl start
&#124; &#124;
&#124; Or when you want to run it with SSL enabled use: &#124;
&#124; &#124;
&#124; /usr/local/apache/bin/apachectl startssl
&#124; &#124;
&#124; Thanks for using Apache. The Apache Group &#124;
&#124; http://www.apache.org/ &#124;
+--------------------------------------------------------+

ってな感じでしょうか。

サーバの秘密鍵を作ります。

# openssl genrsa -rand 適当 -out server.key -des3 1024

0 semi-random bytes loaded
Generating RSA private key, 1024 bit long modulus
.....................................................++++++
........................................................................++++++
e is 65537 (0x10001)
Enter pass phrase for server.key:パスワード
Verifying - Enter pass phrase for server.key:パスワード

このままだと、Apache起動時にいつもパスワードを聞かれます。
なので、

# openssl rsa -in server.key -out server.key

Enter pass phrase for server.key:パスワード
writing RSA key

とすると、聞かれなくなります。

次にCSRを作ります。

# openssl req -new -days 365 -key server.key -out server.csr

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]:Kanagawa
Locality Name (eg, city) []:Chigasaki
Organization Name (eg, company) [Internet Widgits Pty Ltd]:The Sunday Breeze
Organizational Unit Name (eg, section) []:webmaster
Common Name (eg, YOUR name) []:www.sundaybreeze.jp
Email Address []:メールアドレス@sundaybreeze.jp

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

そうすると、
-rw-r--r-- 1 root wheel 745 Jul 12 12:41 server.csr
-rw-r--r-- 1 root wheel 887 Jul 12 12:36 server.key
こんな感じ。
どちらもパーミッションは400にしちゃいましょう。

で、
server.csrはApacheルート/conf/ssl.csr/へ
server.keyはApacheルート/conf/ssl.key/へ
移動します。
証明書自体はApacheルート/conf/ssl.crt/にあります。

証明書作ったときのCSRじゃなくていいのかな?
まあいいや。

httpd.confは旧サーバのものをそのまま使います。

configファイルの妥当性チェックは

# Apacheルート/bin/apachectl configtest

でできます。が、
まだmod_becomeやらPHPやらをインストールしていないのでエラーが出ます。
これはまた後日。

Apacheの起動シェルは
/usr/local/etc/rc.d
にある。はず。なのに。ない。なんで?

なので、邪道ですが

# cd /usr/port/www/apache13
# make

としてportsでmakeまでして、
出来上がった
/usr/ports/www/apache13/work/apache_1.3.36/apache.sh
を/usr/local/etc/rc.dにコピーしました。
もちろん起動コマンド等修正が必要です。

で、/etc/rc.confに
apache_enable="YES"
を追記してrebootすれば起動する、はず。

[コメント読む(0)]  人気ブログランキングへ