格安のキワモノ系海外VPS「prgmr.com」
格安の海外VPSのprgmr.comを契約しました。契約と解約の方法、デフォルトでのメモリやディスクの使用率、ちょっと使った印象などをまとめておきます(契約は2009年7月)。
プラン
prgmr.comはアメリカのVPS業者で、XENで仮想化されたサーバがレンタルされます。$6からプランがあり、単に固定IPが必要な場合も最安レベルだと思われます。
雰囲気は極めて怪しく、恐ろしく簡素なウェブに" We don't assume you are stupid."と売り文句が書かれています。事実、Webによる管理画面などなく、すべての操作をコンソールで行います。
ひときわ目を引く$6のプランはXENでメモリ128MBと価格にしては優秀な印象。ただ転送量は20GiBと一般的な他のVPSより1桁少ない点に注意が必要です。半年、1年で契約すると更に安くなります。
6$ | 128MB RAM | 3GiB Disk | 20GiB Network transefer | |
8$ | 256MB RAM | 6GiB Disk | 40GiB Network transefer | |
12$ | 512MB RAM | 12GiB Disk | 80GiB Network transefer | |
20$ | 1024MB RAM | 24GiB Disk | 160GiB Network transefer | |
36$ | 2048MB RAM | 48GiB Disk | 320GiB Network transefer | |
68$ | 4096MB RAM | 96GiB Disk | 640GiB Network transefer |
契約まで
もちろんWebから申し込めますが、一部人手による作業があり、英語のメールを書く必要があります。
サインアップ
コースを選んで連絡先をフォームに入力するだけ。支払い方法はpaypalが利用できます。
住所は都道府県が選択式ですが、ウムラウト記号や[]が入っている項目を選択するとエラーになり先に進めません。適当にAomoriなどを選ぶと良いようです。
サインアップ終了後に以下の内容が表示されます。
Signup successful Thanks for signing up! Signup information for YOURNAME: Username: USERNAME Package: 128MiB ram, 3GiB disk, 20GiB transfer Xen VPS, $6/month Remember to send your OpenSSH format public key in an attachment to support@prgmr.com also, let me know if you want CentOS 5.2 or Debian 5.0.
また以下のメールが送られてきます。
you ordered a xen vps, 128MiB ram, 3GiB disk, 20GiB transfer Xen VPS, $6/month username USERNAME Before I can set you up, I need to know what distro you would like and an OpenSSH format public key (on a *NIX, run ssh-keygen and send me either the id_dsa.pub or id_rsa.pub file in an attachment) on putty/windows, see http://www.unixwiz.net/techtips/putty-openssh.html#keypair and scroll down to the screen shot where it says 'openssh format public key for pasting into authorized_keys' - that is what I need. thanks.
コンソールに繋ぐための公開鍵と、どのディストリビューションを使うのかメールしてくれ、とのこと。ここから先は手作業になります。
鍵の作成と設定依頼
Linuxならssh-keygenで鍵を作成すれば良いです。
ssh-keygen
途中で鍵を作る場所を聞かれるのでid_rsaとかしておけば、カレントディレクトリにid_rsaとid_rsa.pubが作られます。パスフレーズはお好みで。面倒なら空欄でも良いでしょう。
希望のディストリビューションを書いて公開鍵id_rsa.pubを添付して support@prgmr.com へ送信します。参考サイトの通り適当な英語メールを書きました。すぐに自動返信メールが届きます。
Hello I want to use Debian. thanks.
以降の作業は手作業で行われているらしく、相手はGMT-0900くらいで動いているので、気長に待つ必要があります。
特に記載はありませんが休日は対応してくれていないようです。しばらくすると設定完了のメールが届きます。
Your server is setup now, you can login to council.prgmr.com with your username and ssh key and follow the instructions at http://book.xen.prgmr.com/mediawiki/index.php/Quickstart The default root password is password, and you should get a bill soon by email. If you have any questions please email support@prgmr.com. Thanks very much. Nick Schmalenberger
管理用のsshアクセス先を教えてくれます。この場合だと USERNAME@council.prgmr.com へ繋げば良いことになります。councilの部分は複数種類あるらしいのでメールを確認のこと。
コンソールへの接続
事前に秘密鍵を登録しておく必要があります。先ほど作成したid_rsaを食わせるなど、適当に。
ssh-add id_rsa
メールの指示に従ってsshで接続します。
ssh USERNAME@council.prgmr.com
以下の管理用コンソールが現れます。
Name ID Mem VCPUs State Time(s) USERNAME 117 128 1 -b---- 19.2 Options for USERNAME 1. console 2. create/start 3. shutdown 4. destroy/hard shutdown 5. reboot 6. exit press the number> Read from remote host council.prgmr.com: Connection reset by peer Connection to council.prgmr.com closed.
ざっと説明すると1. consoleで生のコンソールを叩ける。2. create/startはサーバを起動させる(デフォルトで起動している)。実際にはそのままコンソールが起動する。grubの画面も見られるのでCent OSやFreeBSDはリストアできるらしい(Debianは不明)。あとの項目は不明。概ね意味通りと思われます。
初期状態について
個々のホストにはUSERNAME.xen.prgmr.comというドメインが当たっています。正引きはもちろん、逆引きもこのドメインが設定されています。
デフォルトでsshdが入っていますが、デフォルトでrootログインが禁止されており、1度はコンソールに入る必要があります。
ps
PID TTY TIME CMD 1 ? 00:00:03 init 2 ? 00:00:00 kthreadd 3 ? 00:00:00 migration/0 4 ? 00:00:00 ksoftirqd/0 5 ? 00:00:02 watchdog/0 6 ? 00:00:08 events/0 7 ? 00:00:00 khelper 19 ? 00:00:00 xenwatch 20 ? 00:00:00 xenbus 51 ? 00:00:00 kblockd/0 60 ? 00:00:00 ksuspend_usbd 66 ? 00:00:00 khubd 69 ? 00:00:00 kseriod 102 ? 00:00:00 pdflush 103 ? 00:00:00 pdflush 104 ? 00:00:00 kswapd0 105 ? 00:00:00 aio/0 230 ? 00:00:00 net_accel/0 537 ? 00:00:00 kjournald 613 ? 00:00:00 udevd 1115 ? 00:00:00 rsyslogd 1200 ? 00:00:01 sshd 1227 ? 00:00:00 cron 1244 hvc0 00:00:00 login 1245 tty2 00:00:00 getty 1246 tty3 00:00:00 getty 1247 tty4 00:00:00 getty 1248 tty5 00:00:00 getty 1249 tty6 00:00:00 getty 5057 hvc0 00:00:00 bash 5084 hvc0 00:00:00 ps
/proc/cpuinfo
processor : 0 vendor_id : AuthenticAMD cpu family : 16 model : 2 model name : Quad-Core AMD Opteron(tm) Processor 2352 stepping : 3 cpu MHz : 2110.816 cache size : 512 KB physical id : 0 siblings : 1 core id : 0 cpu cores : 1 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 5 wp : yes flags : fpu de tsc msr pae cx8 apic cmov pat clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow constant_tsc up rep_good pni cx16 popcnt lahf_lm cmp_legacy extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch bogomips : 4233.19 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 48 bits physical, 48 bits virtual power management: ts ttp tm stc 100mhzsteps hwpstate
free
total used free shared buffers cached Mem: 131288 56432 74856 0 12060 25148 -/+ buffers/cache: 19224 112064 Swap: 131064 0 131064
df
Filesystem 1K-blocks Used Available Use% Mounted on /dev/xvda1 2952848 554608 2248240 20% / tmpfs 65644 0 65644 0% /lib/init/rw udev 10240 20 10220 1% /dev tmpfs 65644 4 65640 1% /dev/shm
sources.list
deb http://ftp.us.debian.org/debian lenny main
ping
PING USERNAME.xen.prgmr.com (xx.xx.xx.xx) 56(84) bytes of data. 64 bytes from USERNAME.xen.prgmr.com (xx.xx.xx.xx): icmp_seq=1 ttl=42 time=143 ms 64 bytes from USERNAME.xen.prgmr.com (xx.xx.xx.xx): icmp_seq=2 ttl=42 time=142 ms 64 bytes from USERNAME.xen.prgmr.com (xx.xx.xx.xx): icmp_seq=3 ttl=41 time=155 ms 64 bytes from USERNAME.xen.prgmr.com (xx.xx.xx.xx): icmp_seq=4 ttl=42 time=159 ms 64 bytes from USERNAME.xen.prgmr.com (xx.xx.xx.xx): icmp_seq=5 ttl=41 time=138 ms 64 bytes from USERNAME.xen.prgmr.com (xx.xx.xx.xx): icmp_seq=6 ttl=41 time=158 ms 64 bytes from USERNAME.xen.prgmr.com (xx.xx.xx.xx): icmp_seq=7 ttl=42 time=146 ms 64 bytes from USERNAME.xen.prgmr.com (xx.xx.xx.xx): icmp_seq=8 ttl=42 time=138 ms 64 bytes from USERNAME.xen.prgmr.com (xx.xx.xx.xx): icmp_seq=9 ttl=42 time=139 ms 64 bytes from USERNAME.xen.prgmr.com (xx.xx.xx.xx): icmp_seq=10 ttl=41 time=141 ms --- USERNAME.xen.prgmr.com ping statistics --- 10 packets transmitted, 10 received, 0% packet loss, time 8996ms rtt min/avg/max/mdev = 138.164/146.181/159.305/7.941 ms
初期設定
基本的には通常のサーバ設定と何ら変わりはありません。prgmr.comを使う上で注意が必要そうな部分を取り上げます。
ユーザ設定
デフォルトでrootパスワードがpasswordになっているので、これは早々に変更してしまいましょう。
passwd
apt
貧弱な/etc/apt/sources.listはとりあえず以下にでもしましょう。jpではなくusのミラーなのが新鮮です。
deb http://ftp.us.debian.org/debian lenny main contrib non-free deb-src http://ftp.us.debian.org/debian lenny main contrib non-free deb http://security.debian.org/ lenny/updates main contrib non-free deb-src http://security.debian.org/ lenny/updates main contrib non-free
ロケール
もしLANG=ja_JP.UTF-8だとperlがwarningを吐きます。
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "ja_JP.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory
ロケールのカタログが足りないのが原因のようです。
試行錯誤の結果以下のパッケージを入れれば黙らせることができました。
apt-get install localse locales-all
結構ディスク容量を食うので、必要がなければ入れない方が良いでしょう。
各種サーバのインストール
あとはお好みで。
例えばApache2をインストール。
apt-get install apache2
これでhttp://USERNAME.xen.prgmr.com/でIt Works!が確認できるます。
参考までにApacheインストール後の状況。
Filesystem 1K-blocks Used Available Use% Mounted on /dev/xvda1 2952848 680748 2122100 25% / tmpfs 65644 0 65644 0% /lib/init/rw udev 10240 20 10220 1% /dev tmpfs 65644 4 65640 1% /dev/shm
total used free shared buffers cached Mem: 131288 120984 10304 0 6768 80500 -/+ buffers/cache: 33716 97572 Swap: 131064 24 131040
まだ余裕があるように見えますが、これに色々追加していくとディスクがカツカツになるはずです。やはりお遊びを越えた用途には、最低でも$8以上のプランが選択肢になってきそうですね。
請求
契約後しばらくするとinvoiceというメールが届くので、この請求メールに書いてあるリンクをクリックして、PayPalにより支払いを行います。サーバの契約状況は以下から確認できます。
サポート
英語でsupport@prgmr.comにメールを送ればいろいろ対応してもらえるのだと思います。公式のTwitterアカウントprgmrcomもあります。
何気なくprgmr.comのトラブルについて(日本語で)つぶやいたら、公式のアカウントから的確なreplyが飛んできて驚きました。
prgmr.comのホストは無事に復旧した。でも何故かデフォルトで設定されていたns1.sjc.he.netのネームサーバが使えなくなっているっぽい。アナウンスは特にないけど自力でどうにかしろってことかな。
@kokutoto I can't read what you are saying but if I just re-ip'd you and dns is broken, use 216.218.223.67 and 38.99.2.224
解約について
解約用のウェブインターフェイスなどはありません。メールで解約の希望を伝えると、しばらくすると特に返信もなくアカウントが削除されました。