Skip to content

Instantly share code, notes, and snippets.

@sugumura sugumura/command.log
Last active Jun 5, 2019

Embed
What would you like to do?
さくらレンタルサーバセットアップ
# login
$ ssh example@example.sakura.ne.jp
$ chsh -s /usr/local/bin/bash
$ exec $SHELL -l
$ cat > ~/.bash_profile <<EOF
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
EOF
$ cat > ~/.bashrc <<EOF
export LANG=ja_JP.UTF-8
alias rm='rm -i'
alias mv='mv -i'
alias ls='ls -G'
export PS1="\e[1;32m\][\u@\h \W]\\$\[\e[m\] "
EOF
$ exec $SHELL -l
$ exit
$ ssh-keygen -t rsa -b 4096 -f ~/.ssh/example.sakura.ne.jp
$ scp ~/.ssh/example.sakura.ne.jp.pub example@example.sakura.ne.jp:~/.ssh/authorized_keys
# login
$ ssh example@example.sakura.ne.jp
$ chmod 600 ~/.ssh/authorized_keys
$ exit
# write access info to ~/.ssh/config
$ ssh example
# composer install
$ mkdir bin
$ curl -sS https://getcomposer.org/installer | php -- --install-dir=./bin
$ mv bin/composer.phar bin/composer
$ composer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.