Skip to content

Latest commit

 

History

History
175 lines (110 loc) · 2.9 KB

File metadata and controls

175 lines (110 loc) · 2.9 KB

← Index

How to setup a server on DO

1. Create Droplet

See the article How to install a server on DO

2. If your SSH key has custom name but not id_rsa

Optional step. Configurate your SSH

Do it only if the name of your SSH key is not id_rsa

[edit tool] ~/.ssh/config

Add the followig lines (do not forget to do required changes)

Host my_rails_server 257.123.45.67
  HostName 257.123.45.67
  IdentityFile ~/.ssh/my_rsa_key
  ForwardAgent yes

This is an optional step.

Authorize your public key on your new Server.

cat ~/.ssh/my_rsa_key.pub | ssh root@257.123.45.67 'cat >> ~/.ssh/authorized_keys'

3. Install TMUX

Visit your server ssh root@257.123.45.67

fig. 1

Install TMUX

apt update
apt-get install tmux -y

fig. 2

4. Download and run Installation script

Open a new TMUX session

tmux new -s rails_server_install

fig. 3

Download and run the install script

wget https://raw.githubusercontent.com/DeployRB/SetupServer/master/article-2/install_script.sh
time ( source ./install_script.sh )

fig. 4

fig. 5

5. Close your terminal window and wait

Even If you close your terminal window, Installation script and TMUX session will be alive. We will back later when Installation will be finished

6. Check installation process

In 5-20 minutes (depends on powerful of your droplet) Installation process will be finished.

Visit your server and check TMUX console.

tmux ls
tmux a -t rails_server_install

exit

fig. 6

Screen of the successful installation

fig. 7

7. Check Installed software

wget https://raw.githubusercontent.com/DeployRB/SetupServer/master/article-2/check_soft_script.sh
time ( source ./check_soft_script.sh )

fig. 8

You will see something like that:

fig. 9

Linux 3.16.0-4-amd64 1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux
PRETTY_NAME="Debian GNU/Linux 8 (jessie)" NAME="Debian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)"

Check LANG vars:

LANGUAGE has value: en_US:en
LANG has value: en_US.UTF-8
LC_ALL has value: en_US.UTF-8
LC_CTYPE has value: en_US.UTF-8

Programming Langs:

 rvm : Not found
 /usr/bin/ruby
 /usr/bin/node
 /usr/bin/python

Converters:

 /usr/bin/convert

CacheStores:

 /usr/local/bin/redis-server

DataBases:

 /usr/bin/psql
 /usr/bin/mysql

Search:

 /usr/bin/searchd

Helpers:

 /usr/bin/git
 /usr/bin/tmux
 /usr/local/bin/pygmentize

Image Optimizers:

 /usr/bin/gifsicle
 /usr/bin/jhead
 /usr/bin/jpegoptim
 /usr/bin/jpegtran
 /usr/bin/optipng
 /usr/bin/pngcrush
 /usr/bin/pngout
 /usr/bin/pngquant

WebServer:

 /usr/sbin/nginx

Check credential files

  • ~/credentials.txt
  • /home/rails/credentials.txt