さくらのレンタルサーバーのシェル環境をカスタマイズする

レンタルサーバーだってリッチにしたい!という想いの記事です。

やりたいこと

  • zsh が使える
  • dircolors が使える(ls の色分けができる)
  • nano が使える

zsh の導入

.zshrc の編集については各々の設定があると思うので適宜読み替えてください

  1. chsh -s /usr/local/bin/zsh
  2. .zshrc 一式を突っ込む
    1. https://github.com/Lycolia/my-zsh-conf
  3. .zshrcfor sakura internet 以下のコメントを外して有効化する
  4. command not found: dircolors を解消するために次項の手順で coreutils を導入する

coreutils の導入

GNU ls と dircolors の導入により、ls に色付けが出来るようにします

mkdir local
wget https://ftp.gnu.org/gnu/coreutils/coreutils-9.2.tar.xz
xz -dc coreutils-9.2.tar.xz  | tar xf -
cd coreutils-9.2/
./configure --prefix=/home/<user-name>/local/
make
make install

nano の導入

wget https://www.nano-editor.org/dist/v7/nano-7.2.tar.xz
xz -dc nano-7.2.tar.xz  | tar xf -
cd nano-7.2/
./configure --prefix=/home/<user-name>/local/ --enable-color --enable-nanorc
make
make install
cp doc/sample.nanorc ~/.nanorc