Windows XP SP3 does not update

Windows XP SP 2 を新規でインストールしたところ、何度やってもWindows Update が行われず、KB2497281 が表示される。これを解決するには、

1. Windows Update エージェントの最新バージョンを入手する方法に関する。現在、WindowsUpdateAgent3.0 が最新なのでそのパッケージをダウンロードする。

2. IEを終わらせて、ダウンロードしたパッケージを当てる。

3. リブートしてWindowsUpdateを実行。

これだけなんだが、辿り着くのに何故か時間がかかった。


When after I installed Windows XP SP2 as completely new install, I could not update the OS to XP3 even though I tried few times and got a same error KB2497281. Here is the way how to solve the error:

1. Get the newest version of Windows Update Agent, which is currently 3.0, from here.

2. Quit IE, and install the package which you get.

3. Reboot the computer and try Windows Update again.

That’s simple though I have taken some times somehow.

MacOS Snow Leopard on VMWare



VMWare でMacOS Snow Leopard の動作テスト

1. はじめに

基本的にやったことはチュートリアルと同じなので、これを良く読めば特に問題無い。: ここ

2. 必要なもの

2.a. Intel CPU, core 2 duo, quad, i5, i7 あたり
(Pen4 以下は駄目、あとAMD は全部駄目)
2.b. VMWare 7 workstation
2.c. Snow Leopard のインストールCD(実物が多分必要)
2.d. 10GB 以上のHDD の空き
2.e. Mac OSX 10.6.4 Server VMware Image (これはどっかから拾ってくる)

3. 準備

3.1. Mac OSX 10.6.4 Server VMware Image をどっかから手に入れると、フォルダのなかにVMWare のイメージなど一式が入っているので、とりあえず全部7zip かなんかで展開する(古いWinRAR とかだとうまくいかないので注意)。
3.2. VMWare 7 workstation をインストールして、Server VMWare Image のフォルダのなかを見ると、 Mac OS X Server 10.6 (experimental).vmwarevmみたいのがあるから、それ選択すれば大体準備完了。
(CPU は1つって書いてあるんだけど、2つでも動いたりするので、どっちでも良と
思うが、まぁあとで2つに変えられるのでとりあえず1つで始めても良いと思う)

4. インストール

4.1. VMWare のCD 設定を Darwin_Snow.iso を読み込むようにして、OSX を起動する。
4.2. Ctr+G で、VMWare のなか(つまりOSX インストーラ)のキー操作ができるようになったら、素早くF8 を押して、黒画面 でBoot Menu を出す。
4.3. Snow Leopard のCD を物理ドライブにセットして、下のCD を変えるボタンから、CD ドライブをiso からその物理ドライブに切り替える。
4.4. で黒画面に戻ったら、”c” を押してBoot DVD を選択する。
4.5. そんで次に普通にインストーラを起動するか聞かれるので、F8 をまた押して、Advance Option を呼べるようになったら、 “-v” ( ” は要らない)と入力して
Enter を押す verbose モードで、画面に字が沢山出てきたらひとまず待つ。
4.6. インストーラが立ち上がったら、言語を選択して、次に進まないで、上のメニューからディスクユーティリティを選択して、hard drive format type をOS X Extended (Journaled) にして一旦消去する。
4.7. そしたらディスクユーティリティは消して、次に進んでインストール。
4.8. インストールが終わったら、勝手に再起動するんだけど、OS が見つからない、と文句言われるので、再度 4.1. のように、iso イメージを選択して起動する。
4.9. そうすると各種、最初の設定画面になるので、適当に設定すれば良いんだけど、電話番号と場所の一致が面倒だと思うので、US WA 電話番号の市外局番は206 てのだけ揃えれば、多分大丈夫、というか全部適当でも多分大丈夫。

5. 既知の問題

5.1. シャットダウンはできたりできなかったりなので、巧くいかないようならさっさと電源落として良い。
5.2. 画面の解像度は、1024*768 で固定されているので、多分手動でやらないと駄目。やりかたは色々試してるんだけど、まだ巧くいかない、他の人は色々な方法でできてるんだが。
5.3. Darwin_Snow.iso は起動時に入れてないと起動しない。

それと、自分は日本語じゃなくて英語環境で英語キーボードなので、日本語環境については良く解らない。



A test that MacOS Snow Leopard on VMWare

1. introduction

Basically what I have done is to follow the instruction : here

2. Requirement

2.a. Intel CPU, core 2 duo, quad, i5, i7
(Under Pen4 is not working, and all AMD CPU is not working too)
2.b. VMWare 7 workstation
2.c. Snow Leopard Install CD
2.d. HDD space over 10GB
2.e. Mac OSX 10.6.4 Server VMware Image (which you need to get somewhere)

3. Preparation

3.1. After getting a Mac OSX 10.6.4 Server VMware Image from somewhere, you can see a VMWare image inside the folder. So just extract everything using 7zip or WinRAR or something like that.
3.2. Install VMWare 7 workstation. Then, you can see Mac OS X Server 10.6 (experimental).vmwarevm in the Server VMWare Image folder, so that choose it. Automatically whatever OS can kick the VMWare program itself, then it starts if there is no problem.

4. Install

4.1. Choose Darwin_Snow.iso on settings of VMWare CD, and run MacOS X.
4.2. Here, this is little tricky moment: press Ctr+G and handle key function in the VMWare, and then hit F8 immediately and show Boot Menu as black window.
4.3. Set A Snow Leopard CD on Physical drive, and change the CD from Darwin_Snow.iso to the CD by pressing the button which to change the CDs.
4.4. Then if you see black window again, then press “c” and choose Boot DVD
4.5. On the black window it asks you how to boot the installer, then hit F8 and see Advance Option, put “-v” and hit [Enter]. The installer is working as verbose mode, and wait if the computer casts a lot of incantations rapidly.
4.6. If the graphical install runs, don’t choose language, but choose Menu and Disc Utilities; and format the HDD space as OS X Extended (Journaled).
4.7. Then quit Disc Utilities, and install as normal sequence.
4.8. After finishing install, the computer will restart; but then the computer will complain that there is no CD image. So that you choose Darwin_Snow.iso and continue the booting process as I mentioned 4.3 above.
4.9. Then you just need to set as you want, but one thing the phone number and address would make you annoying. Choose US, WA, and phone number area code would be 206.

5. Known problem

5.1. Shutdown process sometimes fails. Just press stop button of the VMWare if it does not run the process.
5.2. Resolution is fixed as 1024*768. You’ll need to change the resolution manually. I have even tried several times, but it have not worked at all. Some could change the resolution in several ways, so you might do it as well.
5.3. It requires to Darwin_Snow.iso when booting process runs.

One thing, I do not use Japanese keyboard layout, so I actually do not know how to change the layout.

Snow Leopard on Dell Mini 10v



特にガイドに従って進めれば難しいことは無い。:gizmodo.com一つだけ問題があってHibernation ができないんだが、できてる人も居るみたいだが大多数はできてないので、仕方無い気がする。



There is no problem if you follow the guide: gizmodo.com. Only one thing which does not work is Hibernation. I have read very few did, but mostly have not done, so I guess I should use without it.

Backup WordPress Data using Bash via FTP

WordPress をFTP 経由でバックアップするために、単純にシェルスクリプトを使うことにした。ここで見つかったシェルスクリプトはかなり良い感じ。: guyrutenberg.com

作者は新しいスクリプトを書いているんだが、そっちは気にせずこの古いやつを幾つかコピーして使うことにした。それをコピーして保存し(シェルスクリプトは改行コードに注意)、少し設定を追加すれば良いだけだ。

$ ls /home/hogehogeUser/
wordpressBackup.sh

$ sudo chmod 755 /home/hogehogeUser/wordpressBackup.sh
$ vi /home/hogehogeUser/wordpressBackup.sh

USERINFO=~/.bashrc
source ${USERINFO}

DB_NAME= your mysql database name
DB_USER= your mysql database user name
DB_PASS= your mysql database password
DB_HOST= your mysql database host name (mostly localhost)

BLOG_DIR= your WordPress directory
BACKUP_DIR= /a directory/where/you/want to/copy first/

FTP_HOST= FTP server name
FTP_USER= FTP user name (would be anonymous)
FTP_PASS= the user name's password
FTP_BACKUP_DIR= a directory where you want to backup


次に、BACKUP_DIR の場所を作る。

$ sudo mkdir /a directory/where/you/want to/copy first/
$ sudo chmod 755 /a directory/where/you/want to/copy first/


そしてシェルから動くことが確認できたら、cron で動くようにすれば良い。


$ vi /home/hogehogeUser/runningForCron.sh

#!/bin/bash

echo "start hogehogeUser backup"
/bin/bash /home/hogehogeUser/wordpressBackup.sh
echo "end hogehogeUser backup"


$ crontab -e

45 * * * * /home/hogehogeUser/runningForCron.sh
#(which means to execute the script every hour)


もしシェルでは問題無く、cron の実行時にのみ問題があるならば、パーミッションや場所の確認をすると良い。crontab に、”45 * * * * /home/hogehogeUser/runningForCron.sh >>/tmp/analog.log 2>>/tmp/analog-err.log” とログを出力するようにして原因を調査すると早いだろう。



In order to backup wordpress via FTP without any plugins, I simply use a shell script which I have found on the internet: guyrutenberg

This script is really great. Although the author have revised, I ve just used the script and run several copies. Just copy the script and save it in somewhere, and need to run as a shell script. You also need to add database, FTP server location, etc.


$ ls /home/hogehogeUser/
wordpressBackup.sh

$ sudo chmod 755 /home/hogehogeUser/wordpressBackup.sh
$ vi /home/hogehogeUser/wordpressBackup.sh

USERINFO=~/.bashrc
source ${USERINFO}

DB_NAME= your mysql database name
DB_USER= your mysql database user name
DB_PASS= your mysql database password
DB_HOST= your mysql database host name (mostly localhost)

BLOG_DIR= your WordPress directory
BACKUP_DIR= /a directory/where/you/want to/copy first/

FTP_HOST= FTP server name
FTP_USER= FTP user name (would be anonymous)
FTP_PASS= the user name's password
FTP_BACKUP_DIR= a directory where you want to backup


OK, then you need to make a directory where the BACKUP_DIR locate.


$ sudo mkdir /a directory/where/you/want to/copy first/
$ sudo chmod 755 /a directory/where/you/want to/copy first/


Then test it, and check the result. If the script works correctly, add in cron.


$ vi /home/hogehogeUser/runningForCron.sh

#!/bin/bash

echo "start hogehogeUser backup"
/bin/bash /home/hogehogeUser/wordpressBackup.sh
echo "end hogehogeUser backup"


$ crontab -e
45 * * * * /home/hogehogeUser/wordpressBackup.sh
#(which means to execute the script every hour)


If you have a problem with cron even though the script works from your shell, you would need to change the permission, and location path. You would need to add in crontab -e like “45 * * * * /home/hogehogeUser/runningForCron.sh >>/tmp/analog.log 2>>/tmp/analog-err.log” to get logs, then much easier to search what the cause is.

FTP Service using IIS on Windows 7

Windows 7 はIIS が元々入っているので、FTP サービス だけ有効にすれば、すぐに使えるようになる。そこで家庭内LAN 向けのバックアップのために、FTP サービスを立ち上げる。rsync のほうのが速度は早いんだろうが、cygwin 入れたりするのがかったるいので、多少ネットワーク周りのパフォーマンスが悪くてもFTP にする。

"Control Panel" => "Programs" => "Programs and Features" => "Turn Windows features on or off" => "Internet Information Services" を開く。
以下の項目にチェックを入れる。
1. "FTP server" とその下にある、"FTP Extensibility"、"FTP service" の2つ。
2. "Web Management tools" の下にある、"IIS Management Console"だけ。
そしてOK を押す。

"Control Panel" => "System and Security" => "Administrative Tools" => "Internet Information Services Manager" を開く。

"sites" を右クリックし、"FTP Site" を追加、そして名前とディレクトリを決める。
そしてそのサーバのIP アドレス(192.168.0.1 など)を選択し、No SSL にチェックを入れる。Basic Authentication を選択し、現在使っているアカウント名のみ承認する。

"Control Panel" => "System and Security" => "Administrative Tools" => "Service" => "Microsoft FTP service" からFTP サービスをリスタートする。


ファイヤーウォールの設定を確認する。自分は面倒だったので、”Home or Work(private) Network” をオフにした。(Public Network はオンのまま)




Windows 7 contains IIS in default, so it is easy to use FTP service. In order to use as backup purpose for my computers at home, I built a FTP service. Comparing to rsync, rsync is rather faster than FTP, but I don’t wanna get bothered by installing cygwin etc, so I chose FTP even though the performance is not as good as rsync.

Open "Control Panel" => "Programs" => "Programs and Features" => "Turn Windows features on or off" => "Internet Information Services".
Then check;
1. "FTP server" and make sure checking both 2 options "FTP Extensibility", "FTP service" underneath.
2. "Web Management tools" and check only "IIS Management Console"
Then press OK.

Open "Control Panel" => "System and Security" => "Administrative Tools" => "Internet Information Services Manager".

Then, right click on "sites" and click Add "FTP Site", and write a name for your FTP site and select the path of folder.
Select the server's IP address(192.168.0.1 or whatever) and check No SSL.
Authentication Basic, and allow access your account name.

Restart FTP service from "Control Panel" => "System and Security" => "Administrative Tools" => "Service" => "Microsoft FTP service".


Also be careful to double-check the firewall settings. I simply off “Home or Work(private) Network” though I still use the firewall for Public Network. Well, I strongly recommend you to set the firework carefully though.