Last active
April 21, 2021 09:22
-
-
Save mihailgolban/28a6829fa425098934ce596105128f42 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 1 | |
else | |
#Update and Upgrade | |
echo "Updating and Upgrading" | |
apt-get update && sudo apt-get upgrade -y | |
sudo apt install debfoster -y | |
#install snapd | |
sudo rm -f /etc/apt/preferences.d/nosnap.pref | |
sudo apt update | |
sudo apt install snapd | |
sudo apt-get install dialog | |
cmd=(dialog --separate-output --checklist "Please Select Software you want to install:" 22 76 16) | |
options=(1 "Visual Studio Code" off # any option can be set to default to "on" | |
2 "LAMP" off | |
3 "Nginx" off | |
4 "MySQL Workbench" off | |
5 "phpMyAdmin" off | |
6 "Composer" off | |
7 "Build Essentials" off | |
8 "Node.js and npm" off | |
9 "Git" off | |
10 "Ruby" off | |
11 "PIP" off | |
12 "vim" off | |
13 "oh my zsh" off | |
14 "yakuake" off | |
15 "Docker" off | |
16 "Docker Compose" off | |
17 "ctop" off | |
18 "VirtualBox" off | |
19 "Vagrant" off | |
20 "Redis" off | |
21 "Generate SSH Keys" off | |
22 "BleachBit" off | |
23 "peek" off | |
24 "Google Chrome" off | |
25 "Slack" off | |
26 "qBittorent" off | |
27 "KeePassX" off | |
28 "SuperProductivity" off | |
29 "Gifex" off | |
30 "Postman" off | |
31 "Rocketchat-client" off | |
32 "Thunderbird" off | |
33 "Joplin-desktop" off | |
34 "Telegram-desktop" off | |
35 "Inkscape" off | |
36 "Skype" off) | |
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) | |
clear | |
for choice in $choices | |
do | |
case $choice in | |
1) | |
#Install Visual Studio Code* | |
echo -e "\n####### Installing Visual Studio Code #######\n" | |
snap install code --classic | |
;; | |
2) | |
#Install Apache, MySQL, PHP | |
echo -e "\n####### Installing Apache #######\n" | |
apt install apache2 -y | |
echo -e "\n####### Installing Mysql Server #######\n" | |
apt install mysql-server -y | |
mysql_secure_installation | |
systemctl stop mysql | |
echo -e "\n####### Installing PHP #######\n" | |
apt install php libapache2-mod-php php-opcache php-cli php-gd php-curl php-mysql -y | |
systemctl stop apache2 | |
;; | |
3) | |
#Install Nginx | |
echo -e "\n####### Installing Nginx #######\n" | |
#make sure you don’t have Apache or any other web server running on port 80 or 443. | |
systemctl stop apache2 | |
apt install nginx -y | |
#By default Nginx service will start on boot. If you want to disable the Nginx service to start at boot: | |
systemctl disable nginx | |
systemctl stop nginx | |
;; | |
4) | |
#Install MySQL Workbench | |
echo -e "\n####### Installing MySQL Workbench #######\n" | |
snap install mysql-workbench-community | |
;; | |
5) | |
#Install phpMyAdmin | |
echo -e "\n####### Installing phpMyAdmin #######\n" | |
apt install phpmyadmin -y | |
echo "Cofiguring apache to run phpMyAdmin" | |
echo "Include /etc/phpmyadmin/apache.conf" >> /etc/apache2/apache2.conf | |
echo "Enabling module rewrite" | |
a2enmod rewrite | |
echo "Restarting Apache Server" | |
service apache2 restart | |
;; | |
6) | |
#Install Composer | |
echo -e "\n####### Installing Composer #######\n" | |
apt install wget php-cli php-zip unzip -y | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
HASH="$(wget -q -O - https://composer.github.io/installer.sig)" | |
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
php composer-setup.php --quiet --install-dir=/usr/local/bin --filename=composer | |
rm composer-setup.php | |
;; | |
7) | |
#Install Build Essentials | |
echo -e "\n####### Installing Build Essentials #######\n" | |
apt install -y build-essential | |
;; | |
8) | |
#Install Nodejs and npm | |
echo -e "\n####### Installing Nodejs #######\n" | |
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash - | |
apt install nodejs -y | |
;; | |
9) | |
#Install git | |
echo -e "\n####### Installing Git, please configure git later... #######\n" | |
apt install git -y | |
;; | |
10) | |
#Install Ruby | |
echo -e "\n####### Installing Ruby #######\n" | |
apt install ruby-full -y | |
;; | |
11) | |
#Install Pip | |
echo -e "\n####### Installing PIP #######\n" | |
apt install python3-pip -y | |
;; | |
12) | |
#Install Vim | |
echo -e "\n####### Installing Vim #######\n" | |
apt install vim -y | |
;; | |
13) | |
#Install oh-my-zsh | |
echo -e "\n####### Installing oh-my-zsh #######\n" | |
apt install wget zsh -y | |
chsh -s $(which zsh) | |
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" | |
echo -e "\nType exit to continue..." | |
;; | |
14) | |
#Install yakuake | |
echo -e "\n####### Installing yakuake #######\n" | |
apt install yakuake -y | |
;; | |
15) | |
#Install Docker | |
echo -e "\n####### Installing Docker #######\n" | |
#Removing older versions | |
apt-get remove docker docker-engine docker.io containerd runc | |
apt-get update | |
#Install the dependencies necessary to enable a new repository over HTTPS | |
apt-get install apt-transport-https ca-certificates curl gnupg lsb-release | |
#Import the repository’s GPG key using the following curl command: | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
#Add the Docker APT repository to your system’s software repository list by typing: | |
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ | |
focal stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
#install the latest version of Docker CE (Community Edition) with: | |
apt-get update | |
apt-get install docker-ce docker-ce-cli containerd.io -y | |
#Manage Docker as a non-root user | |
#Create the docker group | |
groupadd docker | |
#Add your user to the docker group | |
gpasswd -a $USER docker | |
service docker restart | |
;; | |
16) | |
#Install Docker-Compose | |
echo -e "\n####### Installing Docker-Compose #######\n" | |
#Download the Docker Compose binary into the /usr/local/bin directory with the following curl command: | |
curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
#Once the download is complete, apply executable permissions to the Compose binary: | |
chmod +x /usr/local/bin/docker-compose | |
;; | |
17) | |
#Install ctop | |
echo -e "\n####### Installing ctop #######\n" | |
wget https://github.com/bcicen/ctop/releases/download/v0.7.2/ctop-0.7.2-linux-amd64 -O /usr/local/bin/ctop | |
chmod +x /usr/local/bin/ctop | |
;; | |
18) | |
#Install VirtualBox | |
echo -e "\n####### Installing VirtualBox #######\n" | |
apt-get install virtualbox -y | |
;; | |
19) | |
#Install Vagrant | |
echo -e "\n####### Installing Vagrant #######\n" | |
wget https://releases.hashicorp.com/vagrant/2.2.3/vagrant_2.2.3_linux_amd64.zip | |
unzip vagrant_2.2.3_linux_amd64.zip | |
mv vagrant /usr/local/bin/vagrant | |
chmod +x /usr/local/bin/vagrant | |
;; | |
20) | |
#Install Redis | |
echo -e "\n####### Installing Redis #######\n" | |
apt install redis-server -y | |
;; | |
21) | |
#Generating SSH keys | |
echo -e "\n####### Generating SSH keys #######\n" | |
ssh-keygen -t rsa -b 4096 | |
;; | |
22) | |
#Bleachbit | |
echo -e "\n####### Installing BleachBit #######\n" | |
apt install bleachbit -y | |
;; | |
23) | |
#Peek | |
echo -e "\n####### Installing Peek #######\n" | |
add-apt-repository ppa:peek-developers/stable -y | |
apt update | |
apt install peek -y | |
;; | |
24) | |
#Google Chrome | |
echo -e "\n####### Installing Google Chrome #######\n" | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
dpkg -i google-chrome-stable_current_amd64.deb | |
rm google-chrome-stable_current_amd64.deb | |
;; | |
25) | |
#Slack | |
echo -e "\n####### Installing Slack #######\n" | |
apt install gdebi-core wget | |
wget -O ~/slack.deb "https://downloads.slack-edge.com/linux_releases/slack-desktop-3.3.7-amd64.deb" | |
gdebi --non-interactive ~/slack.deb | |
rm ~/slack.deb | |
;; | |
26) | |
#qBittorent | |
echo -e "\n####### Installing qBittorent #######\n" | |
apt install qbittorrent -y | |
;; | |
27) | |
#KeePassX | |
echo -e "\n####### Installing KeePassX #######\n" | |
apt install keepassx -y | |
;; | |
28) | |
#SuperProductivity | |
echo -e "\n####### Installing SuperProductivity #######\n" | |
snap install superproductivity | |
;; | |
29) | |
#Gifex | |
echo -e "\n####### Installing Gifex #######\n" | |
snap install gifex | |
;; | |
30) | |
#Postman | |
echo -e "\n####### Installing Postman #######\n" | |
snap install postman | |
;; | |
31) | |
#Rocketchat-client | |
echo -e "\n####### Installing rocketchat-desktop #######\n" | |
snap install rocketchat-desktop | |
;; | |
32) | |
#Thunderbird | |
echo -e "\n####### Installing Thunderbird #######\n" | |
snap install thunderbird | |
;; | |
33) | |
#joplin-desktop | |
echo -e "\n####### Installing joplin-desktop #######\n" | |
snap install joplin-desktop | |
;; | |
34) | |
#telegram-desktop | |
echo -e "\n####### Installing telegram-desktop #######\n" | |
snap install telegram-desktop | |
;; | |
35) | |
#inkscape | |
echo -e "\n####### Installing inkscape #######\n" | |
snap install inkscape | |
;; | |
36) | |
#Skype | |
echo -e "\n####### Installing Skype #######\n" | |
snap install skype | |
;; | |
esac | |
done | |
echo -e "\n###### All Done!!! ######\n" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment