Created
November 16, 2017 07:05
-
-
Save KingsleyOmon-Edo/711c0a79c29d532840bb5cae55b7c2d6 to your computer and use it in GitHub Desktop.
A post installation script for fedora 27
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 | |
curl_check () | |
{ | |
echo "Checking for curl..." | |
if command -v curl > /dev/null; then | |
echo "Detected curl..." | |
else | |
echo "Installing curl..." | |
dnf install -y curl | |
fi | |
} | |
wget_check () | |
{ | |
echo "Checking for wget..." | |
if command -v wget > /dev/null; then | |
echo "Detected wget..." | |
else | |
echo "Installing wget..." | |
dnf install -y wget | |
fi | |
} | |
node_check () | |
{ | |
echo "Checking for Nodejs..." | |
if command -v node > /dev/null; then | |
echo "Detected Nodejs..." | |
else | |
echo "Installing Nodejs" | |
curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash - | |
sudo dnf install nodejs -y | |
fi | |
} | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 1 | |
else | |
#Update and Upgrade | |
echo "Updating and Upgrading" | |
dnf update -y | |
#Check if curl is installed | |
curl_check | |
# Check if wget is installed | |
wget_check | |
sudo dnf install dialog -y | |
cmd=(dialog --separate-output --checklist "Please Select Software you want to install:" 22 76 16) | |
options=(1 "Gnome Tweak Tool" on # any option can be set to default to "on" | |
2 "Graphics and Multimedia" on | |
3 "Tools and utilities" on | |
4 "Themes and Icons" on | |
5 "Internet and Communication" on | |
6 "Development tools" off | |
7 "Editors" off | |
8 "Desktop EnvironmentS" off) | |
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) | |
clear | |
for choice in $choices | |
do | |
case $choice in | |
1) | |
# GNOME TWEAK TOOL | |
# Gnome Tweak Tool | |
echo "Installing the Gnome Tweak Tool" | |
dnf install -y gnome-tweak-tool | |
# Gnome shell extension | |
echo "Installing chrome gnome shell" | |
dnf install -y chrome-gnome-shell | |
;; | |
2) | |
# GRAPHICS AND MULTIMEDIA | |
sudo dnf install -y gstreamer1-plugins-base gstreamer1-plugins-good gstreamer1-plugins-ugly gstreamer1-plugins-bad-free gstreamer1-plugins-bad-free gstreamer1-plugins-bad-freeworld gstreamer1-plugins-bad-free-extras ffmpeg | |
# Gimp | |
echo "Installing Gimp" | |
sudo dnf install -y gimp | |
# Spotify | |
echo "Installing Spotify" | |
dnf config-manager --add-repo=http://negativo17.org/repos/fedora-spotify.repo | |
dnf install -y spotify-client | |
# VLC | |
echo "Installing VLC" | |
dnf install -y vlc | |
;; | |
3) | |
# TOOLS AND UTILITIES | |
# RPMFusion | |
echo "Installing RPM Fusion repositories" | |
rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-26.noarch.rpm | |
# Tlp batter power saver | |
echo "Installing tlp" | |
sudo dnf install -y tlp | |
# Fedy | |
echo "Installing Fedy" | |
su -c "curl http://folkswithhats.org/fedy-installer -o fedy-installer && chmod +x fedy-installer && ./fedy-installer" | |
# Zip Utilities | |
echo "Installing compression utilities" | |
sudo dnf install -y p7zip p7zip-plugins unrar | |
# Bleachbit | |
echo "Installing Bleachbit" | |
dnf install -y bleachbit | |
# GParted | |
echo "Installing GParted" | |
sudo dnf install -y gparted | |
;; | |
4) | |
# THEMES AND ICONS | |
# Paper, Zukitre, Arc, Adapta, Chrome-Os, Android | |
echo "Installling Paper, Zukitre, Arc, Adapta, Chrome-Os, Android" | |
dnf config-manager --add-repo https://copr.fedorainfracloud.org/coprs/heikoada/gtk-themes/repo/fedora-27/heikoada-gtk-themes-fedora-27.repo | |
dnf update | |
dnf install -y paper-gtk-theme paper-icon-theme zukitre-gtk-theme arc-gtk-theme arc-icon-theme adapta-gtk-theme chrome-os-theme android-theme arc-theme | |
# Xenlism Minimalism | |
echo "Installing Xenlism Minimalism theme" | |
bash <(wget -qO- https://raw.githubusercontent.com/xenlism/minimalism/master/INSTALL/online.install) | |
# Numix | |
echo "Installling Numix theme" | |
sudo dnf copr enable numix/numix | |
sudo dnf install -y numix-icon-theme-circle | |
# Vertex Theme | |
echo "Installing Vertex theme" | |
dnf config-manager --add-repo https://download.opensuse.org/repositories/home:Horst3180/Fedora_24/home:Horst3180.repo | |
dnf install -y vertex-theme | |
# Arc Theme | |
dnf config-manager --add-repo http://download.opensuse.org/repositories/home:Horst3180/Fedora_24/home:Horst3180.repo | |
dnf install -y arc-theme | |
;; | |
5) # INTERNET AND COMMUNICATIONS | |
# Google Chrome | |
echo "Installing google chrome" | |
cat << EOF > /etc/yum.repos.d/google-chrome.repo | |
[google-chrome] | |
name=google-chrome - \$basearch | |
baseurl=http://dl.google.com/linux/chrome/rpm/stable/\$basearch | |
enabled=1 | |
gpgcheck=1 | |
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub | |
EOF | |
dnf install -y google-chrome-stable | |
# Slack | |
echo "Installing Slack" | |
wget -o slack.rpm https://downloads.slack-edge.com/linux_releases/slack-2.8.2-0.1.fc21.x86_64.rpm | |
dnf install -y slack.rpm | |
rm -f slack.rpm | |
# Skype | |
echo "Installing Skype" | |
wget -O skypeforlinux.rpm https://go.skype.com/skypeforlinux-64.rpm | |
dnf install -y skypeforlinux.rpm | |
rm -f skypeforlinux.rpm | |
;; | |
6) # DEVELOPMENT TOOLS | |
#Install Development Essentials | |
echo "Installing development tools" | |
dnf install -y @development-tools | |
# JDK 9 | |
echo "Installing JDK 9" | |
sudo wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/9.0.1+11/jdk-9.0.1_linux-x64_bin.rpm" | |
sudo rpm -ivh jdk-9.0.1_linux-x64_bin.rpm | |
rm -f jdk-9.0.1_linux-x64_bin.rpm | |
echo 'export JAVA_HOME=/usr/java/jdk-9.0.1/bin/java' >> ~/.bashrc | |
echo 'export PATH=$PATH:$HOME/bin:JAVA_HOME' >> ~/.bashrc | |
source ~/.bashrc | |
# .Net Core SDK | |
echo "Installing .Net Core SDK" | |
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc | |
sudo sh -c 'echo -e "[packages-microsoft-com-prod]\nname=packages-microsoft-com-prod \nbaseurl=https://packages.microsoft.com/yumrepos/microsoft-rhel7.3-prod\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/dotnetdev.repo' | |
sudo dnf update | |
sudo dnf install -y libunwind libicu compat-openssl10 | |
sudo dnf install -y dotnet-sdk-2.0.2 | |
# LAMP stack | |
echo "Installing Apache" | |
dnf install -y httpd | |
systemctl enable httpd.service | |
systemctl start httpd.service | |
# Install the fire wall | |
dnf install -y firewalld | |
systemctl start firewalld | |
sudo systemctl enable firewalld | |
firewall-cmd --add-service=http --permanent | |
firewall-cmd --add-service=https --permanent | |
firewall-cmd --reload | |
echo "Installing MariaDB Server" | |
dnf install -y mariadb mariadb-server | |
systemctl enable mariadb | |
systemctl start mariadb | |
mysql_secure_installation | |
firewall-cmd --add-service=mysql --permanent | |
firewall-cmd --reload | |
echo "Installing PHP" | |
dnf install -y php php-common php-mysqlnd php-gd php-imap php-xml php-cli php-opcache php-mbstring php-pdo_mysql php-pdo | |
systemctl restart httpd | |
#echo "Installing Phpmyadmin" | |
echo "Installing phpmyadmin" | |
rpm -Uvh http://rpms.famillecollet.com/fedora/remi-release-26.rpm | |
dnf -y install phpMyAdmin php-mysqlnd php-mcrypt php-php-gettext | |
service httpd restart | |
#Install Nodejs | |
echo "Installing Nodejs" | |
# curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash - | |
sudo dnf install -y nodejs | |
# Yeoman and several generators | |
sudo npm install -g yo gulp-cli bower generator-webapp generator-wordpress generator-aspnet generator-javascript grunt-cli bower generator-karma generator-angular generator-backbone generator-jquery generator-bootstrap generator-mobile generator-generator | |
# Easy static website generator | |
sudp npm install -g easystatic | |
#Install git | |
echo "Installing Git, please congiure git later..." | |
dnf install -y git | |
;; | |
7) #EDITORS | |
# Atom | |
echo "Installing Atom" | |
wget -O atom.rpm https://atom.io/download/rpm | |
dnf install -y atom.rpm | |
rm -f atom.rpm | |
# Sublime Text 3 | |
echo "Installing Sublime Text" | |
sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg | |
sudo dnf config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo | |
dnf check-update | |
sudo dnf install -y sublime-text | |
# Visual Studio Code | |
echo "Installing Visual Studio Code" | |
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc | |
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo' | |
dnf check-update | |
sudo dnf install -y code | |
# Nija IDE | |
echo "Installing Ninja IDE" | |
wget -O ninja-ide.rpm https://www.dropbox.com/s/1xm26wjhk7n39qi/ninja-ide-2.3-1.noarch.rpm | |
dnf install -y ninja-ide.rpm | |
rm -f ninja-ide.rpm | |
;; | |
8) # DESKTOP ENVIRONMENTS | |
# MATE Desktop | |
echo "Installing MATE Desktop" | |
dnf install -y @mate-desktop | |
# Install XFCE Desktop | |
echo "Installing xfce desktop" | |
dnf install -y @xfce-desktop | |
# LXDE Desktop | |
echo "Installing LXDE Desktop" | |
dnf install -y @lxde-desktop | |
# Cinnamon Desktop | |
echo "Installing Cinnamon desktop" | |
dnf install -y @cinnamon-desktop | |
esac | |
done | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment