Closed supercaracal closed 6 years ago
$ sudo vim /etc/locale.gen # Remove commented out ja_JP.UTF-8 $ sudo locale-gen $ sudo update-locale LANG=ja_JP.UTF-8 $ sudo dpkg-reconfigure tzdata # Select Asia->Tokyo
$ sudo apt install build-essential libssl-dev libreadline-dev zlib1g-dev libpq-dev postgresql-9.5 nginx ntp
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv $ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build $ git clone https://github.com/rbenv/rbenv-vars.git ~/.rbenv/plugins/rbenv-vars $ rbenv install 2.4.1 $ rbenv global 2.4.1 $ gem install bundler $ rbenv rehash $ vi .rbenv-vars # Add secret key base later
$ git clone https://github.com/riywo/ndenv ~/.ndenv $ git clone https://github.com/riywo/node-build.git .ndenv/plugins/node-build $ ndenv install v7.9.0 $ ndenv global v7.9.0 $ npm -g update npm $ ndenv rehash
local all postgres trust local all all reject host all postgres 127.0.0.1/32 trust host all all 0.0.0.0/0 reject host all postgres ::1/128 trust host all all ::/0 reject local replication postgres trust
wget https://raw.githubusercontent.com/puma/puma/master/tools/jungle/init.d/puma wget https://raw.githubusercontent.com/puma/puma/master/tools/jungle/init.d/run-puma sudo cp puma /etc/init.d sudo chmod +x /etc/init.d/puma sudo update-rc.d -f puma defaults sudo cp run-puma /usr/local/bin sudo chmod +x /usr/local/bin/run-puma sudo touch /etc/puma.conf
/home/kasuga/vcs/aniwatch,kasuga,/home/kasuga/vcs/aniwatch/config/puma.rb,/home/kasuga/vcs/aniwatch/log/puma.log,RAILS_ENV='production';PORT=3000;RAILS_MAX_THREADS=1;PATH="/home/kasuga/.ndenv/shims:$PATH";
https://github.com/puma/puma/blob/master/docs/nginx.md
$ cat /etc/nginx/sites-available/default server { listen 80 default_server; listen [::]:80 default_server; root /home/kasuga/vcs/aniwatch/public; server_name aniwatch.japaneast.cloudapp.azure.com; keepalive_timeout 5; location / { proxy_pass http://localhost:3000; } }
ntpq -p
#pool 0.ubuntu.pool.ntp.org iburst #pool 1.ubuntu.pool.ntp.org iburst #pool 2.ubuntu.pool.ntp.org iburst #pool 3.ubuntu.pool.ntp.org iburst #pool ntp.ubuntu.com server ntp.nict.jp server ntp1.jst.mfeed.ad.jp server ntp2.jst.mfeed.ad.jp server ntp3.jst.mfeed.ad.jp
docker-compose up
japanize
apt install
rbenv
ndenv
postgresql settings
puma settings
nginx settings
https://github.com/puma/puma/blob/master/docs/nginx.md
ntp settings
ntpq -p