Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
apt-get update
apt-get upgrade
apt-get install sudo git build-essential htop apt-transport-https ca-certificates curl gnupg2 software-properties-common # python-software-properties
# apt-get install openjdk-7-jre
# user
useradd -s /bin/bash -m -d /home/eserozvataf -c "eser ozvataf" -g staff eserozvataf
gpasswd -a eserozvataf sudo
echo "AllowGroups sudo" >> /etc/ssh/sshd_config
passwd eserozvataf
su - eserozvataf
# permissions
sudo chown -R root:staff /srv
sudo find /srv -type f -exec chmod 0660 {} \;
sudo find /srv -type d -exec chmod 2770 {} \;
# locale
sudo locale-gen "en_US.UTF-8"
sudo dpkg-reconfigure locales
# sudo apt-get install language-pack-en-base
sudo sh -c "echo 'LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8' >> /etc/environment"
# --- reboot ---
# docker
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
# nginx
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx
sudo gpasswd -a www-data staff
# nodejs
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install nodejs
# pm2
sudo npm -g install pm2
pm2 kill
echo "export NODE_ENV=production" >> ~/.profile
source ~/.profile
sudo pm2 startup ubuntu
# php 7
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0-fpm
# mariadb
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
echo "deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/5.5/ubuntu trusty main" | sudo tee /etc/apt/sources.list.d/mariadb-org-5.5.list
sudo apt-get update
sudo apt-get install mariadb-server
sudo service mysql stop
sudo mysql_install_db
sudo service mysql start
sudo mysql_secure_installation
# mongodb
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt-get update
sudo apt-get install mongodb-org
# elasticsearch
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee /etc/apt/sources.list.d/elasticsearch-2.x.list
sudo apt-get update
sudo apt-get install elasticsearch
sudo update-rc.d elasticsearch defaults 95 10
# redis - see https://blog.jbfavre.org/2015/03/30/discovering-redis-cluster/ for clustering
sudo add-apt-repository ppa:chris-lea/redis-server
sudo apt-get update
sudo apt-get install redis-server
wget http://download.redis.io/redis-stable/src/redis-trib.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.