Posts

Showing posts from October, 2017

Fresh Server Setup with Nginx, Passenger and Rails

Whenever you get a fresh server to setup it takes too much time to setup everything and sometimes you miss the essential task to perform on the server so for that this blog can help you. Once you are done with the creating the EC2 instance you'll get a pem file using that file login to the server. Login to server: chmod 400 /path_to_pem/you_pem_file_name.pem ssh -i /path_to_pem/you_pem_file_name.pem username @ec2-some_ip_seperated_by_(-)_(-).compute-1.amazonaws.com Note: username is the name of root user for ubuntu machine it “ubuntu” and for AMI(Amazon Machine Instances) is “ec2”. If you are successfully logged in to the server please do the followings: Add user(deploy) Now you need to add a user deploy in the server for deployment sudo -i export EDITOR=vim echo "export EDITOR=vim" >/etc/profile.d/editor.sh apt-get update useradd -d /home/deploy -m deploy passwd deploy apt-get install vim visudo deploy ALL=(ALL:ALL) ALL su deploy