@Konboi memo

主に技術に関してつらつらと。

さくらVPS 環境構築

さくらVPSを契約していたものの、放置気味で勿体無いので
ちゃんといじる事にしよう。
ということで、OSのを再インストールして構築したので、それのメモ。

ユーザーの作成

$ useradd username
$ paswwd passward

テキストエディタのインストール

emacs をインストール。
yum でインストール すると version が22.x だった気がするので。

$ mkdir tmp
% cd tmp
$ wget ftp://ftp.ntu.edu.tw/gnu/emacs/emacs-23.3b.tar.bz2
$ tar xvf emacs-23.3b.tar.bz2
$ cd emacs-23.3b
$ ./configure
$ make
$ make install

公開認証鍵で ssh 接続

ローカルで

scp .ssh/id_rsa.pub username@example.com:~/

サーバーで

$ mkdir .ssh
$ mv id_rsa.pub .ssh/authorized_keys
$ chmod 600 authorized_keys
$ chmod 700 .ssh

ユーザーに管理者権限を

$ su -
$ visudo
root ALL=(ALL) ALL の下に
username  ALL=(ALL) ALL を追加

apache をインストール

$ yum install httpd

mysql をインストール

$ yum install mysql-server

perlbrew のインストール

$ curl -L http://xrl.us/perlbrew > perlbrew
$ perl perlbrew install
$ echo 'source /home/username/perl5/perlbrew/etc/bashrc' >> ~/.bashrc
$ source ~/.basrc

cpanm のインストール

$ perlbrew install-cpanm

とりあえず、これで必要な環境は整ったかな?