Skip to content

Instantly share code, notes, and snippets.

@psgganesh
Last active July 24, 2016 14:37
Show Gist options
  • Save psgganesh/94368f14cd21786e03735d64201aa992 to your computer and use it in GitHub Desktop.
Save psgganesh/94368f14cd21786e03735d64201aa992 to your computer and use it in GitHub Desktop.
Elementary OS [ luna essentials ]
# Name: 0_luna_dev.sh
# Description: Automated setup of dev tools for elementary OS
# Author: Shankar <[email protected]>
# Twitter handle: @psgganesh
# USAGE
# CURL or WGET the RAW URL of this file and run below two commands
# 1. chmod +x lumen.sh
# 2. sudo bash ./lumen.sh
# Check your browser with the IP address of the host machine and viola, you have lumen installed
# Init
apt-get update
apt-get -y install sudo
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Clean-up System
sudo apt-get purge midori-granite
sudo apt-get purge noise
sudo apt-get purge software-center
sudo apt-get purge scratch-text-editor
sudo apt-get purge bluez
sudo apt-get purge modemmanager
sudo apt-get autoremove
sudo apt-get autoclean
# Build essentials
sudo apt-get -y install python-software-properties
sudo apt-get -y install software-properties-common
sudo add-apt-repository ppa:schot/gawk
sudo apt-get update
sudo apt-get -y install gawk
# Linux brew
sudo apt-get -y install build-essential curl git m4 ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
# Add to ~/.profile
echo 'export PATH="/home/shankar/.linuxbrew/bin:$PATH"' >> ~/.profile
echo 'export MANPATH="/home/shankar/.linuxbrew/share/man:$MANPATH"' >> ~/.profile
echo 'export INFOPATH="/home/shankar/.linuxbrew/share/info:$INFOPATH"' >> ~/.profile
echo 'export PATH="/home/shankar/.linuxbrew/sbin:$PATH"' >> ~/.profile
sudo source ~/.profile
# Install Plank themes
sudo apt-get install -y xterm
cd ~ && mkdir -p ~/.temp-plank-themer && cd ~/.temp-plank-themer && wget https://github.com/rhoconlinux/plank-themer/archive/master.zip && unzip master.zip && cd plank-themer-master/ && rm -fR ~/.config/plank/dock1/theme_index; rm -fR ~/.config/plank/dock1/themes-repo; cp -a theme_index/ ~/.config/plank/dock1 && cp -a themes-repo/ ~/.config/plank/dock1 && cd ~ && rm -R ~/.temp-plank-themer && sh ~/.config/plank/dock1/theme_index/plank-on-dock-themer.sh
sudo reboot
# Name: 1_brew_me_luna.sh
# Description: Automated setup of dev tools for elementary OS
# Dependencies: 0_luna_dev.sh
# Author: Shankar <[email protected]>
# Twitter handle: @psgganesh
# Globals
php_config_file="/etc/php5/fpm/php.ini"
# Git
clear
brew install git
echo "Git is installed"
sleep 5s
# nodejs and npm
clear
brew install -vd node
echo "Node is installed !"
sleep 5s
# nginx
clear
echo 'export PATH="/home/shankar/.linuxbrew/sbin:$PATH"' >> ~/.profile
sudo source ~/.profile
sudo add-apt-repository ppa:nginx/stable
sudo apt-get -y install nginx
sudo service nginx restart
echo "nginx is installed !"
sleep 5s
# php5-fpm
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
#And the install correct PHP version:
#sudo apt-get install php7.0 # for PHP 7.0
sudo apt-get -y install php5.6 # for PHP 5.6
#sudo apt-get install php5.5 # for PHP 5.5
#sudo apt-get install php-xdebug php-apcu
sudo apt-get -y install php5.6-fpm php5.6-mysql php5.6-xml php5.6-mcrypt php5.6-cli php5.6-mysql curl php5.6-mbstring
clear
# sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available
# sudo apt-get -y install imagemagick
# sudo apt-get -y install php5-imagick
echo "Php and it's dependencies are installed !"
sleep 5s
# mysql and it's dependencies
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
sudo apt-get -y install mysql-server
# Create DB
echo "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION" | mysql -u root -proot
echo "GRANT PROXY ON ''@'' TO 'root'@'%' WITH GRANT OPTION" | mysql -u root -proot
mysql -u root -e "CREATE DATABASE IF NOT EXISTS localdb" -proot
mysql -u root -e "GRANT ALL PRIVILEGES ON localdb.* TO 'root'@'localhost' IDENTIFIED BY 'root'" -proot
mysql -u root -e "FLUSH PRIVILEGES" -proot
sleep 15s
clear
echo "mySQL and it's dependencies are installed !"
sleep 5s
# Get composer globally installed
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
# php.ini config change
sudo sed -i "s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g" ${php_config_file}
sudo service php5-fpm restart
# npm packages
npm install -g gulp
# Install Java
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
# Install mysql workbench
wget https://launchpad.net/ubuntu/+archive/primary/+files/libzip1_0.9.3-1_amd64.deb
sudo dpkg -i libzip1_0.9.3-1_amd64.deb
wget http://launchpadlibrarian.net/94808408/libmysqlclient16_5.1.58-1ubuntu5_amd64.deb
sudo dpkg -i libmysqlclient16_5.1.58-1ubuntu5_amd64.deb
sudo apt-get -f install python-paramiko libzip2 libmysqlclient18 mysql-client mysql-common python-pysqlite2 libdbi-perl libdbd-mysql-perl libplrpc-perl libnet-daemon-perl mysql-client
# Name: 2_dev_tools.sh
# Description: Automated IDE setup
# Dependencies: 0_luna_dev.sh and 1_brew_me_luna.sh
# Author: Shankar <[email protected]>
# Twitter handle: @psgganesh
# Install Atom IDE
sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update
sudo apt-get install atom
# Install necessary codecs
sudo apt-get -y install gsfonts-x11 libxine1-ffmpeg gxine mencoder mpeg2dec vorbis-tools id3v2 mpg321 mpg123 libflac++6 ffmpeg totem-mozilla icedax tagtool easytag
# Install Brackets IDE
sudo add-apt-repository ppa:webupd8team/brackets
sudo apt-get update
sudo apt-get install brackets
# Intelli J community edition
# Download IntelliJ IDEA CE from www.jetbrains.com/idea/download/
tar -zxvf Downloads/ideaIU-*
sudo mv idea-IU-*/ /opt/idea
sudo ln -s /opt/idea/bin/idea.sh /usr/local/bin/idea
# PhpStorm
# Download PhpStorm from https://download.jetbrains.com/webide/PhpStorm-2016.2.tar.gz
tar -zxvf Downloads/PhpStorm*
sudo mv PhpStorm-*/ /opt/phpstorm
sudo ln -s /opt/phpstorm/bin/phpstorm.sh /usr/local/bin/phpstorm
# Install MS fonts
sudo apt-get install ttf-mscorefonts-installer
@psgganesh
Copy link
Author

psgganesh commented Jul 14, 2016

2_dev_tools.sh

  • Atom IDE
  • Brackets IDE
  • IntelliJ IDE
  • Few MS fonts

@psgganesh
Copy link
Author

  • Removed php-ming and added php5.6

@psgganesh
Copy link
Author

  • Added php-mbstring

@psgganesh
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment