Last active
March 22, 2018 17:35
-
-
Save pandeykartikey/25fe06a8cef2698626afeb3ad2d1ebb6 to your computer and use it in GitHub Desktop.
This is my Setup script for a fresh ubuntu install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get upgrade | |
# Basic Utilities | |
sudo apt-get install -y terminator && | |
sudo apt-get install -y git && | |
sudo apt-get install -y vim && | |
sudo apt-get install -y curl | |
# zsh | |
sudo apt install -y git-core zsh && | |
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
# node | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | zsh | |
echo 'export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.zshrc | |
nvm install v8.9.0 | |
# zsh theme spaceship | |
npm install -g spaceship-zsh-theme | |
# Sublime | |
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - && | |
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list && | |
sudo apt update && sudo apt install sublime-text | |
# LAMP server | |
sudo apt-get install -y tasksel && | |
sudo tasksel install lamp-server | |
# SCM Breeze | |
git clone git://github.com/ndbroadbent/scm_breeze.git ~/.scm_breeze | |
~/.scm_breeze/install.sh && | |
source ~/.zshrc | |
# Composer | |
sudo apt-get install curl php-cli php-mbstring git unzip && | |
cd ~ && | |
curl -sS https://getcomposer.org/installer -o composer-setup.php && | |
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer | |
# pip | |
sudo apt-get install -y python-pip python3-pip | |
# rvm | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB && | |
\curl -sSL https://get.rvm.io | bash -s stable && | |
echo "[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"" >> ~/.zshrc # This loads RVM | |
# Ruby on rails | |
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs && | |
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev && | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 && | |
curl -sSL https://get.rvm.io | bash -s stable && | |
source ~/.rvm/scripts/rvm | |
# Netspeed Indicator | |
sudo add-apt-repository ppa:nilarimogard/webupd8 && | |
sudo apt-get update && | |
sudo apt-get install -y indicator-netspeed | |
# Spotify | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886 0DF731E45CE24F27EEEB1450EFDC8610341D9410 && | |
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list && | |
sudo apt-get update && | |
sudo apt-get install spotify-client | |
# Wine | |
sudo dpkg --add-architecture i386 && | |
sudo apt-add-repository 'https://dl.winehq.org/wine-builds/ubuntu/' && | |
wget https://dl.winehq.org/wine-builds/Release.key && sudo apt-key add Release.key && | |
sudo apt update && sudo apt install winehq-stable | |
# Jupyter | |
python3 -m pip install --upgrade pip && | |
sudo -H python3 -m pip install jupyter && | |
sudo apt-get install python3-numpy python3-scipy python3-matplotlib python3-pandas python3-sklearn | |
python -m pip install --upgrade pip && | |
sudo -H python -m pip install jupyter && | |
sudo apt-get install python-numpy python-scipy python-matplotlib python-pandas python-sklearn | |
# Redis | |
sudo apt-get install build-essential tcl && | |
cd /tmp && | |
curl -O http://download.redis.io/redis-stable.tar.gz && | |
tar xzvf redis-stable.tar.gz && | |
cd redis-stable && | |
make && | |
make test && | |
sudo make install && | |
sudo mkdir /etc/redis && | |
sudo cp /tmp/redis-stable/redis.conf /etc/redis && | |
sudo vim /etc/redis/redis.conf | |
Make two changes there: | |
supervised no to supervised systemd | |
dir to dir /var/lib/redis | |
sudo vim /etc/systemd/system/redis.service | |
[Unit] | |
Description=Redis In-Memory Data Store | |
After=network.target | |
[Service] | |
User=redis | |
Group=redis | |
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf | |
ExecStop=/usr/local/bin/redis-cli shutdown | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target | |
sudo adduser --system --group --no-create-home redis && | |
sudo mkdir /var/lib/redis && | |
sudo chown redis:redis /var/lib/redis && | |
sudo chmod 770 /var/lib/redis | |
To start Redis- | |
sudo systemctl start redis | |
# PostgreSQL | |
wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add - && | |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' && | |
sudo apt-get update && | |
sudo apt-get install postgresql postgresql-contrib | |
# OpenCV (source- https://medium.com/@debugvn/installing-opencv-3-3-0-on-ubuntu-16-04-lts-7db376f93961) | |
sudo apt-get install build-essential && | |
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev && | |
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev && | |
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev && | |
sudo apt-get install libxvidcore-dev libx264-dev && | |
sudo apt-get install libgtk-3-dev && | |
sudo apt-get install libatlas-base-dev gfortran | |
cd ~ && | |
wget -O opencv.zip https://github.com/opencv/opencv/archive/3.3.0.zip && | |
unzip opencv.zip | |
sudo pip install virtualenv virtualenvwrapper && | |
sudo rm -rf ~/.cache/pip | |
echo '# virtualenv and virtualenvwrapper | |
export WORKON_HOME=$HOME/.virtualenvs | |
source /usr/local/bin/virtualenvwrapper.sh' >> ~/.zshrc && | |
source ~/.zshrc && | |
mkvirtualenv cv -p python3 && | |
pip install numpy | |
mkdir ~/opencv-3.3.0/build && | |
cd ~/opencv-3.3.0/build && | |
cmake -D CMAKE_BUILD_TYPE=RELEASE \ | |
-D CMAKE_INSTALL_PREFIX=/usr/local \ | |
-D INSTALL_PYTHON_EXAMPLES=ON \ | |
-D INSTALL_C_EXAMPLES=OFF \ | |
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.3.0/modules \ | |
-D PYTHON_EXECUTABLE=~/.virtualenvs/cv/bin/python \ | |
-D BUILD_EXAMPLES=ON .. && | |
make -j4 && | |
sudo make install && | |
sudo ldconfig | |
# | |
sudo apt-get install htop tig | |
# | |
sudo apt install phpmyadmin | |
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf | |
sudo a2enconf phpmyadmin.conf | |
sudo systemctl reload apache2.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment