仕事でVisual Studio 2005を使う事になったので、勉強用に購入しました。

今更Visual Studio 2005!?って感じなんですけど、オークションで1万円代だったので安い勉強代だったのではないかと思っています。
iTunes 10.5がリリースされました。
もうそろそろiOS 5もリリースされますし、iTunesもアップデートしておきましょう。
iTunes 10.5 の新機能
iTunes in the Cloud。iTunes で購入した音楽およびテレビ番組は、iCloud に保存されるため、お使いのデバイスで、いつでも、どこでも、楽しむことができます。しかも無料です。
自動ダウンロード。デバイスやコンピュータから音楽を購入すると、その音楽のコピーがお使いの PC および iOS デバイスに自動的にダウンロードされます。
以前に購入した項目をダウンロード。過去に購入した音楽、テレビ番組、App、およびブックを無料で再度ダウンロードできます。以前に購入した項目が iTunes Store にない場合は、ダウンロードできない可能性があります。
iOS 5 搭載の iPhone、iPad、および iPod touch と同期。
Wi-Fi で同期。同じ Wi-Fi ネットワーク上にある場合は、お使いの iPhone、iPad、または iPod touch を iTunes と Wi-Fi 経由でいつでも同期できます。
このアップデートのセキュリティコンテンツについて詳しくは、http://support.apple.com/kb/HT1222?viewlocale=ja_JP を参照してください。
Firefox 7とThunderbird 7がリリースされました。
次世代ブラウザ Firefox - 高速・安全・カスタマイズ自在な無料ブラウザ
無料メールソフト Thunderbird - Windows 7 対応メールソフトの決定版
yasuもWindows XP、7、Snow Leopard、Lion、Ubuntu 10.04にインストールしているFirefoxとThunderbirdをアップデートしました。
が、が、Ubuntu 10.04のFirefoxとThunderbirdを終了するとクラッシュレポートが表示されるようになりました。
■Firefox

ん〜、これはちょっと調べてみたいと思います。
自宅のWebサーバーのチューニングをしようとApacheのmod_mem_cacheの設定をしようとしたのですが、Scientific Linux 6のyumでインストールしたApacheはmod_mem_cacheに対応しないようです。
きっとmod_mem_cacheに致命的な問題でもあるのでしょうね。
別のチューニングを考えたいと思います。
先日AAA優待が利用できるのとJust MyShopキャンペーンでATOKが10%OFFになっていたので、ATOK X3 for Linux [ダウンロード版]を購入しました。
とはいえ、さすがLinux版&Ubuntu 64bit版。
Windows版やMac版と違ってインストールは簡単ではありません。
JastSystemのホームページにUbuntuのインストール方法が記載されていたので参考にしてインストールをしてみましたが、途中でつまずいてしまいました。
同じようにUbuntu 10.04 LTS 64bit版にATOK X3 for Linuxをインストールしている記事を探したらJustSystemに記載されている以外の手順があったのでこちらを参考にインストールしてみました。
Ubuntu 10.04 LTS 64bit に、ATOK X3 のインストール - それなりに適当にやってます
Ubuntu 10.10 AMD64 (64bit)にATOK X3をインストールする: とある人柱の日記
以下のものを準備しておきます。
ATOK X3 for Linuxのパッケージ本体(購入時のメールにURLが記載されている)
[042459]ATOK X3 for Linux アップデートモジュール
[044668]ATOK X3 for Linux Ubuntu 9.04(GTK+ 2.16) 対応モジュール
ダウンロード後に~/Downloads/atokx3ディレクトリに各tar.gzファイルを配置しておきます。
Ubuntu 10.04 LTS 64bit版にデフォルトで導入されていない32bitライブラリをインストールします。
lib32z1 (1:1.2.3.3.dfsg-15ubuntu1) を設定しています ...
lib32asound2 (1.0.22-0ubuntu7) を設定しています ...
lib32ncurses5 (5.7+20090803-2ubuntu3) を設定しています ...
lib32v4l-0 (0.6.4-1ubuntu1) を設定しています ...
lib32stdc++6 (4.4.3-4ubuntu5) を設定しています ...
ia32-libs (2.7ubuntu26.1) を設定しています ...
libc-bin のトリガを処理しています ...
ldconfig deferred processing now taking place
GNOMEやKDEなど、デスクトップにログインしているユーザーがいれば、すべてログアウトします。
[Ctrl]+[Alt]+[F2]キーを押します。
仮想端末に切り替わります。
ubuntu login: ubuntu ←いつもログインしているユーザ
Password: ログインユーザのパスワード
Last login: Sun Aug 28 21:47:37 JST 2011 on tty2
Linux ubuntu 2.6.32-33-generic #72-Ubuntu SMP Fri Jul 29 21:07:13 UTC 2011 x86_64 GNU/Linux
Ubuntu 10.04.3 LTS
Welcom to Ubuntu!
* Documentation: https://help.ubuntu.com/
# 言語を変更します。
ubuntu@ubuntu:~$ export LANG=C
# 空ファイル「/etc/gtk-2.0/gtk.immodules」を作成します。
ubuntu@ubuntu:~$ sudo touch /etc/gtk-2.0/gtk.immodules
[sudo] password for ubuntu: ログインユーザのパスワード
# ダウンロードしたATOK X3 for Linuxのファイルを展開します。
ubuntu@ubuntu:~$ cd ~/Downloads/atokx3
ubuntu@ubuntu:~/Downloads/atokx3$ tar xzf atokx3.tar.gz
# ATOK X3 for Linuxをインストールします。
ubuntu@ubuntu:~/Downloads/atokx3$ cd ATOKX3
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3$ sudo bash ./setupatok_tar.sh
This software is furnishesd under an end user agreement and may be used
or copied only in accordance with the terms of such license.
If you accept the terms of the license agreement,Please select "Yes"
If you do not accept the trems of the license agreement,Please select "No"
? (yes/no) yes
Input path of gtk-query-immodules-2.0 for 64bit application: /usr/bin/gtk-query-immodules-2.0
Input path of gtk.immodules for 64bit application: /etc/gtk-2.0/gtk.immodules
~中略~
Installation has been completed.
100%[===============================>] 49,470 63.8K/s in 0.8s
2011-08-29 20:17:54 (63.8 KB/s) - 'libwrap0_7.6.q-19_i386.deb' saved [49470/49470]
ubuntu@ubuntu:~/Downloads/atokx3$ dpkg --fsys-tarfile libwrap0_7.6.q-19_i386.deb | tar xf -
ubuntu@ubuntu:~/Downloads/atokx3$ sudo cp -r ./lib/libwrap.so.0* /usr/lib32/
[sudo] password for ubuntu: ログインユーザのパスワード
ubuntu@ubuntu:~/Downloads/atokx3$ sudo ldconfig
ubuntu@ubuntu:~/Downloads/atokx3/atokx3up2/bin/IIIMF$ tar xzvf iiimf-server-trunk_r3104-js3.i386.tar.gz ./usr/lib
./usr/lib/
./usr/lib/libiiimutils.la
./usr/lib/libiiimutils.a
./usr/lib/iiim/
./usr/lib/iiim/iiimd-watchdog
./usr/lib/libiiimutils.so.0.0.0
./usr/lib/libiiimutils.so.0
./usr/lib/libiiimutils.so
ubuntu@ubuntu:~/Downloads/atokx3/atokx3up2/bin/IIIMF$ sudo cp -r ./usr/lib/* /usr/lib32/
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3/src/IIIMF/trunk/lib/EIMIL$ cd ../iiimp/
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3/src/IIIMF/trunk/lib/iiimp$ ./autogen.sh --prefix=/ --exec-prefix-/usr ; echo $?
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3/src/IIIMF/trunk/lib/iiimp$ make ; echo $?
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3/src/IIIMF/trunk/lib/iiimp$ sudo cp libiiimp.la /usr/lib
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3/src/IIIMF/trunk/lib/iiimp$ cd ../iiimcf/
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3/src/IIIMF/trunk/lib/iiimcf$ ./autogen.sh --prefix=/ --exec-prefix-/usr ; echo $?
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3/src/IIIMF/trunk/lib/iiimcf$ make ; echo $?
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3/src/IIIMF/trunk/lib/iiimcf$ sudo cp libiiimcf.la /usr/lib
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3/src/IIIMF/trunk/lib/iiimcf$ cd ../../program/iiim-properties/
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3/src/IIIMF/trunk/program/iiim-properties$ ./autogen.sh --prefix=/ --exec-prefix-/usr ; echo $?
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3/src/IIIMF/trunk/program/iiim-properties$ make ; echo $?
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3/src/IIIMF/trunk/program/iiim-properties$ sudo make install-exec ; echo $?
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3/src/IIIMF/trunk/program/iiim-properties$ sudo rm /usr/lib/libiiimp.la
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3/src/IIIMF/trunk/program/iiim-properties$ sudo rm /usr/lib/libiiimcf.la
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3/src/IIIMF/trunk/program/iiim-properties$ sudo mv /usr/bin/iiimx-settings-init /usr/lib/iiim/
ubuntu@ubuntu:~/Downloads/atokx3/ATOKX3/src/IIIMF/trunk/program/iiim-properties$ sudo cp client.xml /etc/iiim/
Ubuntu 10.04 LTS 64bit版でもATOKが利用できるようになりました。
iiim-propertiesにバグがあって、設定ファイルである~/.gconf/desktop/input_methods/%gconf.xmlが肥大化するようなので最初に設定をしたら設定ファイルを読み込み専用にします。
設定が終わったら設定ファイルを読み込み専用にします。
鍵認証方式のSSHを設定します。
以前CentOSの構築の際にも実施したrootユーザにスイッチできるユーザをwheelグループで制御します。
# 保存してviエディタを終了します
# 管理用ユーザ(sl6)をwheelグループに追加します
[root@sl6 ~]# usermod -G wheel sl6
秘密鍵・公開鍵を作成して鍵認証方式のログインができるようにします。
鍵の作成には一般ユーザで実施します。
# もしrootと表示された場合一般ユーザではないので一般ユーザでログインしなおすかsuコマンドで一般ユーザにスイッチしてください
# 鍵を作成します
[sl6@sl6 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/sl6/.ssh/id_rsa):
Created directory '/home/sl6/.ssh'.
Enter passphrase (empty for no passphrase): 鍵認証用パスフレーズを入力
Enter same passphrase again: 鍵認証用パスフレーズを再度入力
Your identification has been saved in /home/sl6/.ssh/id_rsa.
Your public key has been saved in /home/sl6/.ssh/id_rsa.pub.
The key fingerprint is:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx sl6@sl6.sa-sa-ki.jp
The key's randomart image is:
+--[ RSA 2048]----+
| . ? . o |
| d o . +p+|
| . - + |
| .% . .|
| S.+ . .|
| a o E= |
| d * % . |
| + |
| t |
+-----------------+
# 鍵ファイルを確認します
[sl6@sl6 ~]$ ls -la .ssh
合計 16
drwx------. 2 sl6 sl6 4096 6月 26 15:06 2011 .
drwx------. 4 sl6 sl6 4096 6月 26 15:06 2011 ..
-rw-------. 1 sl6 sl6 1743 6月 26 15:06 2011 id_rsa # 秘密鍵(クライアント)
-rw-r--r--. 1 sl6 sl6 404 6月 26 15:06 2011 id_rsa.pub # 公開鍵(サーバー)
# 公開鍵(サーバー)ファイルの名前を変更します
[sl6@sl6 ~]$ mv .ssh/id_rsa.pub ssh.authorized_keys
# 公開鍵(サーバー)ファイルのアクセス権を読み取り専用にします
[sl6@sl6 ~]$ chmod 400 .ssh/authorized_keys
[sl6@sl6 ~]$ ls -la .ssh
合計 16
drwx------. 2 sl6 sl6 4096 6月 26 15:08 2011 .
drwx------. 4 sl6 sl6 4096 6月 26 15:08 2011 ..
-r--------. 1 sl6 sl6 404 6月 26 15:06 2011 authorized_keys ← 読み取り専用になっていることを確認
-rw-------. 1 sl6 sl6 1743 6月 26 15:06 2011 id_rsa
# 秘密鍵(クライアント)は本サーバに接続したいクライアント端末にコピーしてください
# クライアントパソコンにコピーしたらサーバー上からは削除しておきます
[sl6@sl6 ~]$ rm .ssh/id_rsa
SSHサーバーの設定を変更して鍵認証ができるようにします。
他にもrootユーザでのログインやパスワード無しユーザのログインを禁止します。
※rootユーザで作業します
#LoginGraceTime 2m
PermitRootLogin no # コメント解除してyesからnoに変更するとrootでログインできなくなります
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
PermitEmptyPasswords no # コメントを解除するとパスワードなしのログインを禁止します
PasswordAuthentication no # yesからnoに変更すると公開鍵暗号認証に変更します
X11Forwarding no # コメントを解除します
#X11Forwarding yes # コメント化します
# 保存してviエディタを終了します
# SSHサーバー(サービス)を再起動して設定を反映します
[root@sl6 ~]# /etc/rc.d/init.d/sshd restart
sshd を停止中: [ OK ]
sshd を起動中: [ OK ]
これで鍵認証方式でログインができるようになりました。
鍵認証方式とはいえアクセス制御をしておいた方がよりセキュアになるので下記設定を追加します。
※SSH接続可能なクライアントをローカルホストと自宅ネットワーク内のパソコンからに制限する場合
# ローカルホスト(サーバー自身)のSSH接続を許可します
[root@sl6 ~]# echo "sshd: 127.0.0.1" >> /etc/hosts.allow
# 自宅ネットワーク内のパソコンからのSSH接続を許可します
※ yasuの自宅ネットワークは192.168.で始まるIPアドレスで構成しているので各自設定する場合は読み替えてください。
[root@sl6 ~]# echo "sshd: 192.168." >> /etc/hosts.allow
■関連記事
Scientific Linux 6で自宅サーバー構築 その1 サーバー機Express 5800 GT110bのオンボードRAIDでRAID1設定
Scientific Linux 6で自宅サーバー構築 その2 Scientific Linux 6をExpress5800/GT110bにインストール
Scientific Linux 6で自宅サーバー構築 その3 Scientific Linux 6インストール後の初期設定
Scientific Linux 6で自宅サーバー構築 番外編その1 Scientific Linux 6のcronについて
Scientific Linux 6で自宅サーバー構築 その4 Scientific Linux 6 にClamAVをインストールしてウィルス対策
Scientific Linux 6で自宅サーバー構築 その5 Scientific Linux 6 にTripwireをインストールしてファイル改ざんを検知する
Scientific Linux 6で自宅サーバー構築 その6 Scientific Linux 6 にchkrootkitをインストールしてrootkit感染を検知する
Scientific Linux 6で自宅サーバー構築 その7 NTPサーバーで自動時刻合わせ
Scientific Linux 6で自宅サーバー構築 その8 バッファオーバーフロー攻撃対策を行う
Scientific Linux 6で自宅サーバー構築 その9 logwatchでサーバー監視
Scientific Linux 6で自宅サーバー構築 その10 DNSサーバーを構築
Scientific Linux 6で自宅サーバー構築 番外編その2 Scientific Linuxを6.0から6.1にアップグレードする
Scientific Linux 6で自宅サーバー構築 その11 PostfixとDovecotとSMTP-AUTHでメールサーバーを構築する
Scientific Linux 6で自宅サーバー構築 その12 メールサーバーにSSLを導入する
Scientific Linux 6で自宅サーバー構築 その13 Apache PHP MySQLをインストール
Scientific Linux 6で自宅サーバー構築 その14 WebサーバーにSSLを導入する
Scientific Linux 6で自宅サーバー構築 その15 WordPressを導入する
Scientific Linux 6で自宅サーバー構築 その16 Piwikでアクセスログ集計
Scientific Linux 6で自宅サーバー構築 その17 Squidをインストール
Scientific Linux 6で自宅サーバー構築 その18 sshで鍵認証を導入
Scientific Linux 6で自宅サーバー構築 その19 WebDavの設定
Scientific Linux 6で自宅サーバー構築 その20 lm_sensorをインストール
squidをインストールしてプロキシサーバーを構築します。
Dependencies Resolved
============================================================
Package Arch Version Repository Size
============================================================
Installing:
squid x86_64 7:3.1.10-1.el6 sl-security 1.7 M
Transaction Summary
============================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 1.7 M
Installed size: 5.8 M
Downloading Packages:
squid-3.1.10-1.el6.x86_64.rpm | 1.7 MB 00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 7:squid-3.1.10-1.el6.x86_64 1/1
Installed:
squid.x86_64 7:3.1.10-1.el6
Complete!
# プロキシサーバーを使っている端末のIPアドレス非表示
forwarded_for off # 追記
# エラー時に表示するホスト名
visible_hostname sa-sa-ki.jp # 追記
# プロキシサーバーからのアクセスであることを隠します
request_header_access Referer deny all # 追記
request_header_access X-Forwarded-For deny all # 追記
request_header_access Via deny all # 追記
request_header_access Cache-Control deny all # 追記
# Apache形式のログ出力
access_log /var/log/squid/access.log auto # 追記
emulate_httpd_log on # 追記
# 保存してviエディタを終了します
# Squidの自動起動設定を行います
[root@sl6 ~]# chkconfig squid on
[root@sl6 ~]# chkconfig --list squid
squid 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Squidのポート番号のアクセス許可設定を行います。
# 保存してviエディタを終了します
# iptablesを再起動してファイアウォールルールを反映します
[root@sl6 ~]# /etc/rc.d/init.d/iptables restart
iptables: ファイアウォールルールを消去中: [ OK ]
iptables: チェインをポリシー ACCEPT へ設定中filter [ OK ]
iptables: モジュールを取り外し中: [ OK ]
iptables: ファイアウォールルールを適用中: [ OK ]
構築したプロキシサーバーを経由してブラウジングできるようブラウザの設定を変更します。
Internet Explorer 9.0で設定してみます。
右上のツールボタンから[インターネットオプション]を選択します。

[接続]タグを選択して[LANの設定]ボタンをクリックします。

LANにプロキシサーバーを使用するにチェックします。
アドレスとポートはプロキシサーバーのIPアドレスとポート番号を入力します。
ローカルアドレスにはプロキシサーバーを使用にしないにチェックします。

これでプロシキサーバーを経由したインターネットができます。
■関連記事
Scientific Linux 6で自宅サーバー構築 その1 サーバー機Express 5800 GT110bのオンボードRAIDでRAID1設定
Scientific Linux 6で自宅サーバー構築 その2 Scientific Linux 6をExpress5800/GT110bにインストール
Scientific Linux 6で自宅サーバー構築 その3 Scientific Linux 6インストール後の初期設定
Scientific Linux 6で自宅サーバー構築 番外編その1 Scientific Linux 6のcronについて
Scientific Linux 6で自宅サーバー構築 その4 Scientific Linux 6 にClamAVをインストールしてウィルス対策
Scientific Linux 6で自宅サーバー構築 その5 Scientific Linux 6 にTripwireをインストールしてファイル改ざんを検知する
Scientific Linux 6で自宅サーバー構築 その6 Scientific Linux 6 にchkrootkitをインストールしてrootkit感染を検知する
Scientific Linux 6で自宅サーバー構築 その7 NTPサーバーで自動時刻合わせ
Scientific Linux 6で自宅サーバー構築 その8 バッファオーバーフロー攻撃対策を行う
Scientific Linux 6で自宅サーバー構築 その9 logwatchでサーバー監視
Scientific Linux 6で自宅サーバー構築 その10 DNSサーバーを構築
Scientific Linux 6で自宅サーバー構築 番外編その2 Scientific Linuxを6.0から6.1にアップグレードする
Scientific Linux 6で自宅サーバー構築 その11 PostfixとDovecotとSMTP-AUTHでメールサーバーを構築する
Scientific Linux 6で自宅サーバー構築 その12 メールサーバーにSSLを導入する
Scientific Linux 6で自宅サーバー構築 その13 Apache PHP MySQLをインストール
Scientific Linux 6で自宅サーバー構築 その14 WebサーバーにSSLを導入する
Scientific Linux 6で自宅サーバー構築 その15 WordPressを導入する
Scientific Linux 6で自宅サーバー構築 その16 Piwikでアクセスログ集計
Scientific Linux 6で自宅サーバー構築 その17 Squidをインストール
Scientific Linux 6で自宅サーバー構築 その18 sshで鍵認証を導入
Scientific Linux 6で自宅サーバー構築 その19 WebDavの設定
Scientific Linux 6で自宅サーバー構築 その20 lm_sensorをインストール
Apacheのアクセスログ集計のツールを探していたのですがPiwikっていうのがよさそうなので導入してみました。
Piwik 高性能アクセス解析オープンソースソフト GoogleAnalyticsよりも柔軟に高性能 モバイル用アプリも用意 日本語標準対応|PCあれこれ探索
piwik.org をDNSに問いあわせています... 91.121.8.168
piwik.org|91.121.8.168|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 5350808 (5.1M) [application/zip]
`latest.zip' に保存中
100%[==============================>] 5,350,808 1.18M/s 時間 4.3s
2011-08-20 19:22:37 (1.18 MB/s) - `latest.zip' へ保存完了 [5350808/5350808]
# Piwikを解凍します
[root@sl6 ~]# unzip latest.zip
# ドキュメントルート直下に配置します
[root@sl6 ~]# mv piwik /var/www/html
# ディレクトリのアクセス権限を変更します
[root@sl6 ~]# chmod 777 /var/www/html/piwik/tmp
[root@sl6 ~]# chmod 777 /var/www/html/piwik/config
[root@sl6 ~]# chown -R apache.apache /var/www/html/piwik
Piwik用のデータベースをMySQLで作成します。
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
# データベースを作成します
mysql> create database piwik;
Query OK, 1 row affected (0.00 sec)
# ユーザの作成・パスワードの設定、権限の付与を行います
mysql> grant all privileges on piwik.* to piwik@localhost identified by 'パスワード';
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
ブラウザから https://www.sa-sa-ki.jp/piwik/ へアクセスします。
[次へ]リンクをクリックしようかと思ったら、何やら警告が表示されてる。

"dom" エクステンションを有効にする必要があります(例えば "php-dom" と "php-xml" パッケージのどちらか、あるいは両方をインストールする)。 となっているのでphp-dom" と "php-xml"をインストールします。

Dependencies Resolved
============================================================
Package Arch Version Repository Size
============================================================
Installing:
php-xml x86_64 5.3.3-3.el6 sl 98 k
Installing for dependencies:
libxslt x86_64 1.1.26-2.el6 sl 449 k
Transaction Summary
============================================================
Install 2 Package(s)
Total download size: 548 k
Installed size: 2.4 M
Downloading Packages:
(1/2): libxslt-1.1.26-2.el6.x86_64.rpm | 449 kB 00:03
(2/2): php-xml-5.3.3-3.el6.x86_64.rpm | 98 kB 00:00
------------------------------------------------------------
Total 127 kB/s | 548 kB 00:04
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libxslt-1.1.26-2.el6.x86_64 1/2
Installing : php-xml-5.3.3-3.el6.x86_64 2/2
Installed:
php-xml.x86_64 0:5.3.3-3.el6
Dependency Installed:
libxslt.x86_64 0:1.1.26-2.el6
Complete!
# Apacheのサービスを再起動します
[root@sl6 ~]# /etc/rc.d/init.d/httpd restart
httpd を停止中: [ OK ]
httpd を起動中: [ OK ]
もう一回設定を最初からやり直します。
ブラウザから https://www.sa-sa-ki.jp/piwik/ へアクセスします。
domエクステンションもOKになっていたので[次へ]リンクをクリックします。


データベースサーバの設定を入力して[次へ]ボタンをクリックします。

管理者のアカウント情報を入力して[次へ]ボタンをクリックします。

自分のウェブサイトの情報を入力して[次へ]ボタンをクリックします。

トラッキングタグが表示されるのでメモっておき[次へ]リンクをクリックします。
メモしたトラッキングタグはホームページやブログのheadタグ内に追記しておきます。

初期設定が完了しました
[Piwikを継続]リンクをクリックします。

Google Analyticsと違ってリアルタイムに集計した結果を表示してくれるのでアクセス結果を見てるだけでも楽しくなってきます。
あともう一つ。Google Analyticsと違ってFlash Playerが不要なのでFlash Player未導入のパソコンやFlash Playerを導入することができないiPhoneやiPadでも統計結果が確認できるのもすごくいいと思います(←これ結構重要)
■関連記事
Scientific Linux 6で自宅サーバー構築 その1 サーバー機Express 5800 GT110bのオンボードRAIDでRAID1設定
Scientific Linux 6で自宅サーバー構築 その2 Scientific Linux 6をExpress5800/GT110bにインストール
Scientific Linux 6で自宅サーバー構築 その3 Scientific Linux 6インストール後の初期設定
Scientific Linux 6で自宅サーバー構築 番外編その1 Scientific Linux 6のcronについて
Scientific Linux 6で自宅サーバー構築 その4 Scientific Linux 6 にClamAVをインストールしてウィルス対策
Scientific Linux 6で自宅サーバー構築 その5 Scientific Linux 6 にTripwireをインストールしてファイル改ざんを検知する
Scientific Linux 6で自宅サーバー構築 その6 Scientific Linux 6 にchkrootkitをインストールしてrootkit感染を検知する
Scientific Linux 6で自宅サーバー構築 その7 NTPサーバーで自動時刻合わせ
Scientific Linux 6で自宅サーバー構築 その8 バッファオーバーフロー攻撃対策を行う
Scientific Linux 6で自宅サーバー構築 その9 logwatchでサーバー監視
Scientific Linux 6で自宅サーバー構築 その10 DNSサーバーを構築
Scientific Linux 6で自宅サーバー構築 番外編その2 Scientific Linuxを6.0から6.1にアップグレードする
Scientific Linux 6で自宅サーバー構築 その11 PostfixとDovecotとSMTP-AUTHでメールサーバーを構築する
Scientific Linux 6で自宅サーバー構築 その12 メールサーバーにSSLを導入する
Scientific Linux 6で自宅サーバー構築 その13 Apache PHP MySQLをインストール
Scientific Linux 6で自宅サーバー構築 その14 WebサーバーにSSLを導入する
Scientific Linux 6で自宅サーバー構築 その15 WordPressを導入する
Scientific Linux 6で自宅サーバー構築 その16 Piwikでアクセスログ集計
Scientific Linux 6で自宅サーバー構築 その17 Squidをインストール
Scientific Linux 6で自宅サーバー構築 その18 sshで鍵認証を導入
Scientific Linux 6で自宅サーバー構築 その19 WebDavの設定
Scientific Linux 6で自宅サーバー構築 その20 lm_sensorをインストール
WordPressを導入してブログサーバーを構築します。
事前にWordPress用データベースを作成しておきます。
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
# WordPress用データベースを作成します
mysql> create database testdb;
Query OK, 1 row affected (0.01 sec)
# ユーザの作成・パスワードの設定、権限の付与を行います
mysql> grant all privileges on testdb.* to testdb@localhost identified by 'パスワード';
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
WordPressのダウンロードと設定を行います。
100%[===================================>] 4,408,804 1.00M/s 時間 5.0s
2011-08-22 15:03:12 (853 KB/s) - `wordpress-3.2.1-ja.zip' へ保存完了 [4408804/4408804]
# ダウンロードしたWordPressを解凍します
[root@sl6 html]# unzip wordpress-3.2.1-ja.zip
# wordpressディレクトリをApacheユーザでアクセスできるようアクセス権を変更します
[root@sl6 html]# chown -R apache.apache wordpress
ブラウザで https://www.sa-sa-ki.jp/wordpress にアクセスします。
[設定ファイルを作成する]ボタンをクリックします。

データベース情報を入力して[作成する]ボタンをクリックします。
データベース名:testdb
ユーザー名:testdb
パスワード:パスワード (grant allコマンドで付与したパスワード)
データベースのホスト名:localhost
テーブル接頭辞:testdb_ (任意の名前で可)

ブログの情報を入力して[WordPressをインストール]ボタンをクリックします。
サイトのタイトル:sa-sa-ki.jpのblog (任意の名前で可)
ユーザ名:admin (ブログ用ユーザです)
パスワード:パスワード (ブログ用ユーザのパスワード)
メールアドレス:root@sa-sa-ki.jp (実在する個人のメールアドレスで可)
このサイトがGoogleやTechnoratiなどの検索エンジンに表示されるのを許可するのチェックを付ける

ブログ用ユーザとパスワードを入力して[ログイン]ボタンをクリックします。

あとはブログにログインする際、強制SSLがかかるよう設定を変更します。
// 注意:
// Windows の "メモ帳" でこのファイルを編集しないでください !
// 問題なく使えるテキストエディタ
// (http://wpdocs.sourceforge.jp/Codex:%E8%AB%87%E8%A9%B1%E5%AE%A4 参照)
// を使用し、必ず UTF-8 の BOM なし (UTF-8N) で保存してください。
// ** MySQL 設定 - こちらの情報はホスティング先から入手してください。 ** //
/** WordPress のためのデータベース名 */
define('DB_NAME', 'testdb');
/** MySQL データベースのユーザー名 */
define('DB_USER', 'testdb');
/** MySQL データベースのパスワード */
define('DB_PASSWORD', 'パスワード');
/** MySQL のホスト名 */
define('DB_HOST', 'localhost');
/** データベースのテーブルを作成する際のデータベースのキャラクターセット */
define('DB_CHARSET', 'utf8');
/** データベースの照合順序 (ほとんどの場合変更する必要はありません) */
define('DB_COLLATE', '');
/** 管理者サイト強制SSL */
define('FORCE_SSL_ADMIN', true);
~ 省略 ~
# 保存してviエディタを終了します
■関連記事
Scientific Linux 6で自宅サーバー構築 その1 サーバー機Express 5800 GT110bのオンボードRAIDでRAID1設定
Scientific Linux 6で自宅サーバー構築 その2 Scientific Linux 6をExpress5800/GT110bにインストール
Scientific Linux 6で自宅サーバー構築 その3 Scientific Linux 6インストール後の初期設定
Scientific Linux 6で自宅サーバー構築 番外編その1 Scientific Linux 6のcronについて
Scientific Linux 6で自宅サーバー構築 その4 Scientific Linux 6 にClamAVをインストールしてウィルス対策
Scientific Linux 6で自宅サーバー構築 その5 Scientific Linux 6 にTripwireをインストールしてファイル改ざんを検知する
Scientific Linux 6で自宅サーバー構築 その6 Scientific Linux 6 にchkrootkitをインストールしてrootkit感染を検知する
Scientific Linux 6で自宅サーバー構築 その7 NTPサーバーで自動時刻合わせ
Scientific Linux 6で自宅サーバー構築 その8 バッファオーバーフロー攻撃対策を行う
Scientific Linux 6で自宅サーバー構築 その9 logwatchでサーバー監視
Scientific Linux 6で自宅サーバー構築 その10 DNSサーバーを構築
Scientific Linux 6で自宅サーバー構築 番外編その2 Scientific Linuxを6.0から6.1にアップグレードする
Scientific Linux 6で自宅サーバー構築 その11 PostfixとDovecotとSMTP-AUTHでメールサーバーを構築する
Scientific Linux 6で自宅サーバー構築 その12 メールサーバーにSSLを導入する
Scientific Linux 6で自宅サーバー構築 その13 Apache PHP MySQLをインストール
Scientific Linux 6で自宅サーバー構築 その14 WebサーバーにSSLを導入する
Scientific Linux 6で自宅サーバー構築 その15 WordPressを導入する
Scientific Linux 6で自宅サーバー構築 その16 Piwikでアクセスログ集計
Scientific Linux 6で自宅サーバー構築 その17 Squidをインストール
Scientific Linux 6で自宅サーバー構築 その18 sshで鍵認証を導入
Scientific Linux 6で自宅サーバー構築 その19 WebDavの設定
Scientific Linux 6で自宅サーバー構築 その20 lm_sensorをインストール
今回はさらにセキュリティを向上するためにSSLを導入したいと思います。
メールサーバーのSSL証明書を作成する時にも実施しましたが下準備を行います。
# 設定ファイルを作業用ディレクトリにコピーします
[root@sl6 tls]# cp openssl.cnf ./www
[root@sl6 tls]# cd www
# 作業用ディレクトリの内容を確認しておきます
[root@sl6 www]# ls -la
合計 20
drwxr-xr-x. 2 root root 4096 6月 22 12:16 2011 .
drwxr-xr-x. 7 root root 4096 6月 22 12:16 2011 ..
-rw-r--r--. 1 root root 10906 6月 22 12:16 2011 openssl.cnf
# コピーしてきたopenssl.cnfファイルがあることを確認します
# 設定ファイルを編集します
[root@sl6 www]# vi openssl.cnf
# 42行目~44行目、48行目、55行目~56行目を修正します
dir = . # Where everything is kept # /etc/pki/CA から . に変更
certs = $dir # Where the issued certs are kept # $dir/certs から $dir に変更
crl_dir = $dir # Where the issued crl are kept # $dir/crl から $dir に変更
new_certs_dir = $dir # default place for new certs. # $dir/newcerts から $dir に変更
private_key = $dir/cakey.pem # The private key # $dir/private/cakey.pem から $dir/cakey.pem に変更
RANDFILE = $dir/.rand # private random number file # $dir/private/.rand から $dir/.rand に変更
# 保存してviエディタを終了します
# index.txtという空ファイルと01と書き込んだserialファイルを作成します
[root@sl6 www]# touch index.txt
[root@sl6 www]# echo 01 > serial
# 作業用ディレクトリの内容を確認しておきます
[root@sl6 www]# ls -la
合計 24
drwxr-xr-x. 2 root root 4096 6月 22 12:18 2011 .
drwxr-xr-x. 7 root root 4096 6月 22 12:16 2011 ..
-rw-r--r--. 1 root root 0 6月 22 12:18 2011 index.txt
-rw-r--r--. 1 root root 10867 6月 22 12:18 2011 openssl.cnf
-rw-r--r--. 1 root root 3 6月 22 12:18 2011 serial
# index.txtファイルとserialファイルがあることを確認します
認証局の秘密鍵を作成します。
# 作業用ディレクトリの内容を確認しておきます
[root@sl6 www]# ls -la
合計 28
drwxr-xr-x. 2 root root 4096 6月 22 12:19 2011 .
drwxr-xr-x. 7 root root 4096 6月 22 12:16 2011 ..
-rw-r--r--. 1 root root 963 6月 22 12:19 2011 cakey.pem
-rw-r--r--. 1 root root 0 6月 22 12:18 2011 index.txt
-rw-r--r--. 1 root root 10867 6月 22 12:18 2011 openssl.cnf
-rw-r--r--. 1 root root 3 6月 22 12:18 2011 serial
# 認証局の秘密鍵ファイル[cakey.pem]が作成されたことを確認します
「2.認証局の秘密鍵作成」で作成した認証局の秘密鍵ファイルを使って認証局の証明書を作成します。
# 作業用ディレクトリの内容を確認しておきます
[root@sl6 www]# ls -la
合計 32
drwxr-xr-x. 2 root root 4096 6月 22 12:21 2011 .
drwxr-xr-x. 7 root root 4096 6月 22 12:16 2011 ..
-rw-r--r--. 1 root root 944 6月 22 12:21 2011 cacert.pem
-rw-r--r--. 1 root root 963 6月 22 12:19 2011 cakey.pem
-rw-r--r--. 1 root root 0 6月 22 12:18 2011 index.txt
-rw-r--r--. 1 root root 10867 6月 22 12:18 2011 openssl.cnf
-rw-r--r--. 1 root root 3 6月 22 12:18 2011 serial
# 認証局の証明書ファイル[cacert.pem]が作成されたことを確認します
サーバー秘密鍵を作成します。
# メールサーバーにSSLでアクセスした時に毎回パスフレーズを聞かれないようにパスフレーズ付きサーバー秘密鍵を作成します
[root@sl6 www]# openssl rsa -in ./server.key -out ./server.key
Enter pass phrase for ./server.key: server.keyファイル作成時のパスフレーズ入力
writing RSA key
# 作業用ディレクトリの内容を確認しておきます
[root@sl6 www]# ls -la
合計 36
drwxr-xr-x. 2 root root 4096 6月 22 12:21 2011 .
drwxr-xr-x. 7 root root 4096 6月 22 12:16 2011 ..
-rw-r--r--. 1 root root 944 6月 22 12:21 2011 cacert.pem
-rw-r--r--. 1 root root 963 6月 22 12:19 2011 cakey.pem
-rw-r--r--. 1 root root 0 6月 22 12:18 2011 index.txt
-rw-r--r--. 1 root root 10867 6月 22 12:18 2011 openssl.cnf
-rw-r--r--. 1 root root 3 6月 22 12:18 2011 serial
-rw-r--r--. 1 root root 887 6月 22 12:21 2011 server.key
# サーバー秘密鍵ファイル[server.key]が作成されたことを確認します
「4.サーバー秘密鍵作成」で作成したサーバー秘密鍵ファイルを使ってサーバー証明要求書を作成します。
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []: 入力せずEnter
An optional company name []: 入力せずEnter
# 作業用ディレクトリの内容を確認しておきます
[root@sl6 www]# ls -la
合計 40
drwxr-xr-x. 2 root root 4096 6月 22 12:22 2011 .
drwxr-xr-x. 7 root root 4096 6月 22 12:16 2011 ..
-rw-r--r--. 1 root root 944 6月 22 12:21 2011 cacert.pem
-rw-r--r--. 1 root root 963 6月 22 12:19 2011 cakey.pem
-rw-r--r--. 1 root root 0 6月 22 12:18 2011 index.txt
-rw-r--r--. 1 root root 10867 6月 22 12:18 2011 openssl.cnf
-rw-r--r--. 1 root root 3 6月 22 12:18 2011 serial
-rw-r--r--. 1 root root 639 6月 22 12:22 2011 server.csr
-rw-r--r--. 1 root root 887 6月 22 12:21 2011 server.key
# サーバー証明要求書ファイル[server.csr]が作成されたことを確認します
サーバー証明要求書ファイルに書名を行い、サーバー証明書を作成します。
Using configuration from ./openssl.cnf
Enter pass phrase for ./cakey.pem: cakey.pemのパスフレーズを入力します
Check that the request matches the signature
Signature ok
Certificate Details:
Serial Number: 1 (0x1)
Validity
Not Before: Jun 22 03:23:28 2011 GMT
Not After : Jun 19 03:23:28 2021 GMT
Subject:
countryName = JP
stateOrProvinceName = chiba
organizationName = sa-sa-ki.jp
commonName = www.sa-sa-ki.jp
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
X509v3 Authority Key Identifier:
keyid:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Certificate is to be certified until Jun 19 03:23:28 2021 GMT (3650 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
# 作業用ディレクトリの内容を確認しておきます
[root@sl6 www]# ls -la
合計 60
drwxr-xr-x. 2 root root 4096 6月 22 12:23 2011 .
drwxr-xr-x. 7 root root 4096 6月 22 12:16 2011 ..
-rw-r--r--. 1 root root 3039 6月 22 12:23 2011 01.pem
-rw-r--r--. 1 root root 944 6月 22 12:21 2011 cacert.pem
-rw-r--r--. 1 root root 963 6月 22 12:19 2011 cakey.pem
-rw-r--r--. 1 root root 76 6月 22 12:23 2011 index.txt
-rw-r--r--. 1 root root 21 6月 22 12:23 2011 index.txt.attr
-rw-r--r--. 1 root root 0 6月 22 12:18 2011 index.txt.old
-rw-r--r--. 1 root root 10867 6月 22 12:18 2011 openssl.cnf
-rw-r--r--. 1 root root 3 6月 22 12:23 2011 serial
-rw-r--r--. 1 root root 3 6月 22 12:18 2011 serial.old
-rw-r--r--. 1 root root 3039 6月 22 12:23 2011 server.cer
-rw-r--r--. 1 root root 639 6月 22 12:22 2011 server.csr
-rw-r--r--. 1 root root 887 6月 22 12:21 2011 server.key
# サーバー証明書ファイル[server.cer]が作成されたことを確認します
# 各ファイルをrootユーザ読み取り専用に権限を変更します
[root@sl6 www]# chmod 400 *
# 作業用ディレクトリの内容を確認しておきます
[root@sl6 www]# ls -la
合計 60
drwxr-xr-x. 2 root root 4096 6月 22 12:23 2011 .
drwxr-xr-x. 7 root root 4096 6月 22 12:16 2011 ..
-r--------. 1 root root 3039 6月 22 12:23 2011 01.pem
-r--------. 1 root root 944 6月 22 12:21 2011 cacert.pem
-r--------. 1 root root 963 6月 22 12:19 2011 cakey.pem
-r--------. 1 root root 76 6月 22 12:23 2011 index.txt
-r--------. 1 root root 21 6月 22 12:23 2011 index.txt.attr
-r--------. 1 root root 0 6月 22 12:18 2011 index.txt.old
-r--------. 1 root root 10867 6月 22 12:18 2011 openssl.cnf
-r--------. 1 root root 3 6月 22 12:23 2011 serial
-r--------. 1 root root 3 6月 22 12:18 2011 serial.old
-r--------. 1 root root 3039 6月 22 12:23 2011 server.cer
-r--------. 1 root root 639 6月 22 12:22 2011 server.csr
-r--------. 1 root root 887 6月 22 12:21 2011 server.key
# 全ファイルの権限が読み取りのみになっていることを確認しておきます
作成したサーバー証明書ファイル使ってSSL通信できるようにApacheの設定ファイルを変更します。
# General setup for the virtual host, inherited from global configuration
DocumentRoot "/var/www/html" # コメント解除
ServerName www.sa-sa-ki.jp:443 # コメント解除とドメイン名をwww.example.comからwww.sa-sa-ki.jpに変更
**************** 以下追加 ****************
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
#
# For a single logfile with access, agent, and referer information
# (Combined Logfile Format), use the following directive:
#
CustomLog logs/ssl_access_log combined
**************** 以下追加終わり ****************
# Server Certificate:
# Point SSLCertificateFile at a PEM encoded certificate. If
# the certificate is encrypted, then you will be prompted for a
# pass phrase. Note that a kill -HUP will prompt again. A new
# certificate can be generated using the genkey(1) command.
SSLCertificateFile /etc/pki/tls/www/server.cer #/etc/pki/tls/certs/localhost.crtから/etc/pki/tls/www/server.cerに変更
# Server Private Key:
# If the key is not combined with the certificate, use this
# directive to point at the key file. Keep in mind that if
# you've both a RSA and a DSA private key you can configure
# both in parallel (to also allow the use of DSA ciphers, etc.)
SSLCertificateKeyFile /etc/pki/tls/www/server.key # /etc/pki/tls/private/localhost.keyから/etc/pki/tls/www/server.keyに変更
# 保存してviエディタを終了します
Apacheを再起動して設定ファイルを反映します
[root@sl6 www]# /etc/rc.d/init.d/httpd restart
httpd を停止中: [ OK ]
httpd を起動中: [ OK ]
HTTPSのポート番号のアクセス許可設定を行います。
# 保存してviエディタを終了します
# iptablesを再起動して設定を反映します
[root@sl6 www]# /etc/rc.d/init.d/iptables restart
iptables: ファイアウォールルールを消去中: [ OK ]
iptables: チェインをポリシー ACCEPT へ設定中filter [ OK ]
iptables: モジュールを取り外し中: [ OK ]
iptables: ファイアウォールルールを適用中: [ OK ]
ルータがない場合は不要な手順になりますが、yasuの家にはCTUとサーバーの間にルータがありますので併せてNAT設定で443番ポートをサーバーに向けます。
設定方法はルータの設定手順に従ってください。
■関連記事
Scientific Linux 6で自宅サーバー構築 その1 サーバー機Express 5800 GT110bのオンボードRAIDでRAID1設定
Scientific Linux 6で自宅サーバー構築 その2 Scientific Linux 6をExpress5800/GT110bにインストール
Scientific Linux 6で自宅サーバー構築 その3 Scientific Linux 6インストール後の初期設定
Scientific Linux 6で自宅サーバー構築 番外編その1 Scientific Linux 6のcronについて
Scientific Linux 6で自宅サーバー構築 その4 Scientific Linux 6 にClamAVをインストールしてウィルス対策
Scientific Linux 6で自宅サーバー構築 その5 Scientific Linux 6 にTripwireをインストールしてファイル改ざんを検知する
Scientific Linux 6で自宅サーバー構築 その6 Scientific Linux 6 にchkrootkitをインストールしてrootkit感染を検知する
Scientific Linux 6で自宅サーバー構築 その7 NTPサーバーで自動時刻合わせ
Scientific Linux 6で自宅サーバー構築 その8 バッファオーバーフロー攻撃対策を行う
Scientific Linux 6で自宅サーバー構築 その9 logwatchでサーバー監視
Scientific Linux 6で自宅サーバー構築 その10 DNSサーバーを構築
Scientific Linux 6で自宅サーバー構築 番外編その2 Scientific Linuxを6.0から6.1にアップグレードする
Scientific Linux 6で自宅サーバー構築 その11 PostfixとDovecotとSMTP-AUTHでメールサーバーを構築する
Scientific Linux 6で自宅サーバー構築 その12 メールサーバーにSSLを導入する
Scientific Linux 6で自宅サーバー構築 その13 Apache PHP MySQLをインストール
Scientific Linux 6で自宅サーバー構築 その14 WebサーバーにSSLを導入する
Scientific Linux 6で自宅サーバー構築 その15 WordPressを導入する
Scientific Linux 6で自宅サーバー構築 その16 Piwikでアクセスログ集計
Scientific Linux 6で自宅サーバー構築 その17 Squidをインストール
Scientific Linux 6で自宅サーバー構築 その18 sshで鍵認証を導入
Scientific Linux 6で自宅サーバー構築 その19 WebDavの設定
Scientific Linux 6で自宅サーバー構築 その20 lm_sensorをインストール