Last active
June 5, 2019 08:25
-
-
Save sugumura/6d1da4d296be62b39c504a3f2ea67f2b to your computer and use it in GitHub Desktop.
さくらレンタルサーバセットアップ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# login | |
$ ssh [email protected] | |
$ 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 [email protected]:~/.ssh/authorized_keys | |
# login | |
$ ssh [email protected] | |
$ 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