- set up a hostname for your new server.
hostnamectl set-hostname hostname
- Set up a timezone for your new server.
dpkg-reconfigure tzdata
- add user [
adduser user_name groups
] - Set up a ssh access for your new server.
ssh-keygen -b 4096
with a passphrase.ssh-copy-id username@ip
-
Disable Password authentication
/etc/ssh/sshd_config
-
Listen on only IPV4 :
echo 'AddressFamily inet' | sudo tee -a /etc/ssh/sshd_config
-
sudo systemctl restart sshd
-
-
Set up your deploy user
source /etc/profile.d/rvm.sh
(To reload shell with rvm command loaded)
-
Install phusion passenger.
gem install passenger
-
Install nginx .
rvmsudo passenger-install-nginx-module
- General nginx server module
http { ... passenger_root /usr/local/rvm/gems/ruby-2.4.0/gems/passenger-5.1.2; passenger_ruby /usr/local/rvm/gems/ruby-2.4.0/wrappers/ruby; ... }
- Start your nginx :
/opt/nginx/sbin ./nginx
-
Set up your deployment script. [ Capistrano ] https://github.com/capistrano/rails
{13:12}[2.4.0]~/dev/alphacamp-sg/Ecommerce:cart ✗ ➭ bundle exec cap install mkdir -p config/deploy create config/deploy.rb create config/deploy/staging.rb create config/deploy/production.rb mkdir -p lib/capistrano/tasks create Capfile Capified
- Set up your hosting configurations.
**References:**
- [Linode Quick Start Guide](https://www.linode.com/docs/getting-started)
- [Rvm multiuser Installation](https://rvm.io/rvm/install)
- [Passenger Web App server](https://www.phusionpassenger.com/)
- [Nginx](https://www.nginx.com/resources/wiki/)
- [Capistrano](https://github.com/capistrano/rails)
- [Symlinks](https://www.cyberciti.biz/tips/understanding-unixlinux-symbolic-soft-and-hard-links.html)
**OPTIONAL FURTHER READS**
- [Ansible](https://www.ansible.com/)