Last active
October 14, 2019 06:20
-
-
Save abhishekkhaware/8edb21b5ccb2e17bf3baef5ccc7b17ba to your computer and use it in GitHub Desktop.
Install Node JS, Apache, MySQL, PostgreSQL Servers, PHP, Composer, yarn, sublime text and Angular CLI on Ubuntu Desktop
This file contains hidden or 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
#! /bin/bash | |
#export DEBIAN_FRONTEND=noninteractive | |
echo $'\n\e[32mInstalling essentails ...\e[0m\n' | |
sudo apt-get install -y curl wget vim build-essential software-properties-common apt-transport-https git | |
echo $'\n\e[32mInstalling Apache, MYSQL, Postgresql Servers and PHP 5.6 and PHP 7.2 ...\e[0m\n' | |
sudo add-apt-repository -y ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install -y apache2 apache2-utils mysql-server postgresql postgresql-contrib | |
sudo apt-get install -y php7.2 libapache2-mod-php7.2 php7.2-mysql php7.2-pgsql php7.2-curl php7.2-gd php7.2-bcmath php7.2-xml php7.2-curl php7.2-mbstring php7.2-json | |
sudo apt-get install -y php5.6 libapache2-mod-php5.6 php5.6-mysql php5.6-pgsql php5.6-curl php5.6-gd php5.6-mcrypt php5.6-json php5.6-xml php5.6-mbstring php5.6-gd | |
echo $'\n\e[32mEnabling apache rewrite ...\e[0m\n' | |
sudo a2enmod rewrite | |
sudo service apache2 restart | |
echo $'\n\e[32mInstalling composer, Dependency Management for PHP ...\e[0m\n' | |
curl -sS https://getcomposer.org/installer | php | |
sudo mv composer.phar /usr/local/bin/composer | |
sudo chown -R www-data:www-data /var/www | |
sudo chmod -R 777 /var/www | |
echo $'\n\e[32mInstalling angular sublime-text ubuntu-restricted-extras ...\e[0m\n' | |
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-get update | |
sudo apt-get install -y sublime-text | |
echo $'\n\e[32mInstalling NODE JS 12 ...\e[0m\n' | |
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
echo $'\n\e[32mInstalling latest Yarn Package manager for nodejs ...\e[0m\n' | |
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt-get update && sudo apt-get install -y yarn | |
echo $'\n\e[32mFix NPM PERMISSION ISSUE ....\e[0m\n' | |
mkdir ~/.npm-global | |
npm config set prefix '~/.npm-global' | |
echo 'export PATH=$HOME/bin:/usr/local/bin:$HOME/.composer/vendor/bin:$HOME/.npm-global/bin:$PATH' >> ~/.bashrc | |
source ~/.bashrc | |
echo $'\n\e[32mInstalling angular CLI globally(without CLI Analytics) ...\e[0m\n' | |
NG_CLI_ANALYTICS=No npm install -g @angular/cli | |
sudo apt-get install -y ubuntu-restricted-extras | |
echo $'\n\e[32mINFO:\e[0m If you need wine-stable, Please install by below command \nsudo apt install wine-stable\e[0m\n' | |
echo $'\n\e[32mInstallation Completed! Thank you. :) \e[0m\n' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation via curl
curl -sS https://gist.githubusercontent.com/abhishekkhaware/8edb21b5ccb2e17bf3baef5ccc7b17ba/raw/1809d2195319375b2a4e8a15f51fa87b30e8d48e/bootstrap.sh | bash
Or, Installation via wget,
wget -O - https://gist.githubusercontent.com/abhishekkhaware/8edb21b5ccb2e17bf3baef5ccc7b17ba/raw/1809d2195319375b2a4e8a15f51fa87b30e8d48e/bootstrap.sh | bash