Infinite | Squares

Art of code and more

Ubuntu Server Setup

When I started new Ubuntu machine on Azure or DigitalOcean, I usually install some applications such as Node.js, MongoDB and Nginx and Git. To make things easier, I created a shell script that will do all that process.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# !/bin/sh
# update
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install build-essential libssl-dev

# nodejs
sudo add-apt-repository -y ppa:chris-lea/node.js

# nginx
sudo add-apt-repository -y ppa:nginx/stable

# mongodb
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list

# git
sudo add-apt-repository -y ppa:git-core/ppa

# redis
sudo add-apt-repository -y ppa:rwky/redis

# update repo
sudo apt-get update
sudo apt-get dist-upgrade

# install
sudo apt-get -y install nodejs nginx mongodb-org git ufw redis-server

# start mongod
sudo service mongod start

Using docker would be nice.

Comments