squeezeにアップデート。dist-upgradeとか適当にやったら、udevdでカーネルが古いと言われて、 動かなくなっちゃったので、再インストールした。元々/homeと/etcは別パーティションにしていたし、その部分をバックアップとるようにしていたのなんの問題もない。このメモもあるしね。 んで、そのまま復旧できなかった部分をメモ。
まず、ディスクの扱いがすべてSATA扱いになっていて、IDEもsda*という形になる。現在のハードディスクは以下。
IDEのSeagate製120GB /dev/sdc SATAの日立製500GB /dev/sdb SATAのウェスタンデジタル1TB /dev/sda1 /dev/sda2
squeezeをインストールして、いろいろ設定する前に、起動時にこれらをマウントするようにfstabを編集しようとしたところ、UUIDで指定するべきと書いてある。さて・・。
root@me6:/dev/disk/by-uuid# ls -al lrwxrwxrwx 1 root root 9 2011-02-20 01:05 27c6bd6b-dad5-4d09-a428-6bfca8196131 -> ../../sdc lrwxrwxrwx 1 root root 10 2011-02-20 01:05 4a0cacb2-be22-46ad-812b-443e1b7c4015 -> ../../sda1 lrwxrwxrwx 1 root root 10 2011-02-20 01:05 5360c158-0f37-493c-8934-363e0984d9da -> ../../sda5 lrwxrwxrwx 1 root root 10 2011-02-20 01:05 b039a9a0-1da2-41e7-af83-bb3f6e8db18f -> ../../sdb1 lrwxrwxrwx 1 root root 10 2011-02-20 01:05 b90c56e8-a71a-4c9a-b8da-1b45559193eb -> ../../sdb2
とのこと。これをもとにIDでfstabを書く。 へー、/dev/xxxって結構変化するのね。
UUID=27c6bd6b-dad5-4d09-a428-6bfca8196131 /home ext3 defaults 0 2 UUID=b039a9a0-1da2-41e7-af83-bb3f6e8db18f /mnt/backup ext3 defaults 0 2 UUID=b90c56e8-a71a-4c9a-b8da-1b45559193eb /mnt/TimeMachine ext3 defaults 0 2root
次 まずはapacheからか。とりあえず、/etc/apache2/site-available/defautを編集し/home/htmlに行くようにする。
次、webdav。webdavに必要なのは以下のモジュール。
mods-available/dav.load mods-avaliable/dav_fs.load mods-avaiialbe/dav_fs.conf mods-avaliable/encoding.load
これをmods-enable/以下にシンボリックリンクして、apache2 restart。
次は、sambaか。http://localhost:901にアクセスして、 shareタグでme6とhpをshareに登録する。pathは/home/me6と/home/hp。んでもって、リードオンリーをNo,availableをYes、browsing enumをyesに設定する。今回は最初からuserになってるし、macos-xで動く状態になっている。
次わーsvn。
$apt-get install libapache2-svn
で、以下ををmods-enable/にシンボリックリンクして、dav_svn.confを編集。中身は前のメモを見て。
mods-available/dav_svn.load mods-available/dav_svn.conf
アクセス確認。げげげ、リポジトリがすでに全部httpsになってやがる。じゃ、次SSL、apache2にSSLを入れるの面倒なのでpoundで。svnのhttps設定は以前から変更なし。
Poundはロードバランサーだが、ロードバランサーとしては使っておらず、SSLWrapperとて使ってる。まずはインストール。
$apt-get install pound
んで、apache2のport.confを編集。
NameVirtualHost *:8080 Listen 8080 NameVirtualHost *:4443 Listen 4443
virtualhost側の設定も変更。
<VirtualHost *:8080> いろいろ <VirtualHost *:8080> <VirtualHost *:4443> いろいろ <VirtualHost *:4443>
pound側は、/etc/default/poundのstartup=1と/etc/pound.conf。つまり、apacheは8000で受けて、poundは80で受ける。poundは80で受けた物を8000に流し込む。
ListenHTTP Address 192.168.11.9 Port 80 xHTTP 3 Service HeadRequire "Host: *" Backend Address 192.168.11.9 Port 8080 End End End
まず、/usr/loca/etcに証明書を作成
#>openssl genrsa -des3 -out server-key.pem 1024 Generating RSA private key, 1024 bit long modulus ......................++++++ ........++++++ e is 65537 (0x10001) Enter pass phrase for server-key.pem: Verifying - Enter pass phrase for server-key.pem: #>openssl rsa -in server-key.pem -out server-key.pem Enter pass phrase for server-key.pem: writing RSA key #>openssl req -new -key server-key.pem -x509 -out pound.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]:KANAGAWA Locality Name (eg, city) []:YOKOHAMA Organization Name (eg, company) [Internet Widgits Pty Ltd]: xxxx Organizational Unit Name (eg, section) []: Common Name (eg, YOUR name) []: xxxx Email Address []: #> cat server-key.pem >> pound.pem
で、pound.confに以下を追加。追加ね。
ListenHTTPS Address 192.168.11.9 Port 443 Cert "/usr/local/etc/pound.pem" xHTTP 4 Service HeadRequire "Host: *" BackEnd Address 192.168.11.9 Port 4443 End End End
$>apt-get install fetchmail
すでに~/.fetchmailrcがあるので、特にやることなく。
fetchmailを起動するだけ。
で、webmailは、SquirrelMailを入れる。入れ方は前と一緒。apacheの設定がpoundとapacheに変わったので、ディレクティブを入れる位置が違う。VirtualHostの4443のほうにだけ入れる。つまり、httpsだけでしか動かないようにする。
<VirtualHost *:4443> いろいろ #web mail alias /mail /usr/share/squirrelmail <Directory /usr/share/squirrelmail> Options Indexes FollowSymLinks <IfModule mod_php4.c> php_flag register_globals off </IfModule> <IfModule mod_php5.c> php_flag register_globals off </IfModule> <IfModule mod_dir.c> DirectoryIndex index.php </IfModule> #deny from all #allow from 192.168.11.0/24 # access to configtest is limited by default to prevent infor$ <Files configtest.php> order deny,allow deny from all allow from 127.0.0.1 </Files> </Directory> <VirtualHost *:4443>
次〜〜〜〜〜
ってここまで10時間以上。
Natatalkは、書いてある通りだな。
せっかくなので、webdavもavahiにならんのか?
mod_dnssdってのがあるがうまく動かない。
Copyright (C) 2011 俺 All right reserved.