Skip to content

Instantly share code, notes, and snippets.

@YuriyGuts
Last active August 31, 2018 18:18
Show Gist options
  • Save YuriyGuts/18dea888722e88d57ed4 to your computer and use it in GitHub Desktop.
Save YuriyGuts/18dea888722e88d57ed4 to your computer and use it in GitHub Desktop.
A set of scripts to install most of the necessary software on a fresh CentOS 7 installation. Uses Dropbox to import settings.
#!/usr/bin/bash
# ----------------------
# 00-common-vars.sh
# ----------------------
# =========== CONFIG =============
# Assuming we'll set the Dropbox folder to ~/Dropbox
DROPBOX_FOLDER=$HOME/Dropbox
# ================================
# =========== ESSENTIAL ALIASES ==========
YUMINSTALL='sudo yum -y install'
RPMINSTALL='sudo rpm -Uvh'
IMPORTABLE_SETTINGS_FOLDER=$DROPBOX_FOLDER/Reference/Importable\ Software\ Settings
CURRENT_DIR=`pwd`
# ========================================
# ----------------------
# 01-install-repos.sh
# ----------------------
# Extended repos with more packages
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
$YUMINSTALL http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
$YUMINSTALL https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# For fonts and other desktop tweaks
sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
$YUMINSTALL http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
# For Double Commander
sudo wget http://download.opensuse.org/repositories/home:Alexx2000/CentOS_7/home:Alexx2000.repo -P /etc/yum.repos.d/
# For Google Chrome
cat << EOF | sudo tee /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
# For InSync
sudo rpm --import https://d2t3ff60b2tol4.cloudfront.net/repomd.xml.key
echo "[insync]
name=insync repo
baseurl=http://yum.insynchq.com/fedora/19/
gpgcheck=1
gpgkey=https://d2t3ff60b2tol4.cloudfront.net/repomd.xml.key
enabled=1
repo_gpgcheck=1
metadata_expire=120m
" | sudo tee /etc/yum.repos.d/insync.repo
# For Mono
sudo rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
sudo yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
# For VirtualBox
sudo rpm --import https://www.virtualbox.org/download/oracle_vbox.asc
sudo wget -O /etc/yum.repos.d/virtualbox.repo http://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
# For Node.js
wget -O /tmp/nodejs-setup.sh https://rpm.nodesource.com/setup_5.x && sudo bash /tmp/nodejs-setup.sh
# Enable/disable repositories
sudo sed -i '/enabled=1/c\enabled=0' /etc/yum/pluginconf.d/fastestmirror.conf
sudo yum-config-manager --disable Dropbox
# Done adding repos at this point
sudo yum -y update
# ----------------------
# 10-install-dropbox.sh
# ----------------------
$YUMINSTALL libgnome
$YUMINSTALL https://www.dropbox.com/download?dl=packages/fedora/nautilus-dropbox-2015.10.28-1.fedora.x86_64.rpm
# ----- Install Dropbox to pull all importable settings -----
$INSTALL dropbox
echo
echo "----- Now, please launch the Dropbox app and set it up. -----"
echo "Assuming the Dropbox folder will be set to: $DROPBOX_FOLDER"
echo
read -p "Press [Enter] once Dropbox has finished syncing your files..."
sudo yum-config-manager --disable Dropbox
# ----------------------
# 11-install-insync.sh
# ----------------------
sudo yum -y --nogpgcheck install insync
# ----------------------
# 12-install-doublecmd.sh
# ----------------------
$YUMINSTALL doublecmd-gtk
# ----------------------
# 13-install-fonts.sh
# ----------------------
# ----- Fonts -----
USER_FONTS_FOLDER=$HOME/.fonts
if [ ! -d "$USER_FONTS_FOLDER" ]; then
mkdir "$USER_FONTS_FOLDER"
fi
gsettings "set" "org.gnome.settings-daemon.plugins.xsettings" "hinting" "slight"
gsettings "set" "org.gnome.settings-daemon.plugins.xsettings" "antialiasing" "rgba"
echo "Xft.lcdfilter: lcddefault" > ~/.Xresources
$YUMINSTALL freetype-freeworld
$YUMINSTALL google-droid-sans-fonts google-droid-sans-mono-fonts google-droid-serif-fonts google-noto-sans-ui-fonts
$YUMINSTALL ubuntu-font-family
rsync -av "$IMPORTABLE_SETTINGS_FOLDER/Fonts/Windows" "$USER_FONTS_FOLDER"
rsync -av "$IMPORTABLE_SETTINGS_FOLDER/Fonts/Presentation" "$USER_FONTS_FOLDER"
rsync -av "$IMPORTABLE_SETTINGS_FOLDER/Fonts/ELEKS" "$USER_FONTS_FOLDER"
wget https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-2.00.1.tar.gz -P /tmp/
cd /tmp
tar -xvf liberation-fonts-ttf-2*.tar.gz
sudo mkdir -p /usr/share/fonts/truetype/liberation
cd liberation-fonts-ttf-2*
sudo cp *.ttf /usr/share/fonts/truetype/liberation/
fc-cache -fv "$USER_FONTS_FOLDER"
# Update fonts in Gnome shell
sudo perl -0777 -i.bak -pe 's/stage\s{[^}]+}/stage {\n font-family: "Noto Sans UI", sans-serif;\n font-weight: bold;\n font-size: 9pt;\n color: white;\n}/igs' /usr/share/gnome-shell/theme/gnome-shell.css
sudo perl -0777 -i.bak -pe 's/font-size: 10pt;/font-size: 9pt;\n font-weight: normal;/igs' /usr/share/gnome-shell/extensions/[email protected]/stylesheet.css
cd $CURRENT_DIR
# ----------------------
# 15-import-configs.sh
# ----------------------
# Import .config and other dotfiles
rsync -av "$IMPORTABLE_SETTINGS_FOLDER/Linux/CentOS/" "$HOME/"
source ~/.bashrc
sudo mkdir -p /root/.config/doublecmd
sudo rsync -av "$IMPORTABLE_SETTINGS_FOLDER/Double Commander/Linux/root/doublecmd/" /root/.config/doublecmd/
# Import Gnome configs
dconf load /org/gnome/terminal/ < ~/.config/initial/terminal.dconf
dconf load /org/gnome/gedit/ < ~/.config/initial/gedit.dconf
dconf load /org/gnome/meld/ < ~/.config/initial/meld.dconf
dconf load /org/gnome/settings-daemon/ < ~/.config/initial/org-gnome-settings-daemon.dconf
dconf load /org/gnome/shell/ < ~/.config/initial/org-gnome-shell.dconf
dconf load /org/gnome/desktop/ < ~/.config/initial/org-gnome-desktop.dconf
# Apply custom font config
sudo rsync -av ~/.config/initial/fonts/fonts.conf /etc/fonts/fonts.conf
# Import SSH configs
rsync -av "$IMPORTABLE_SETTINGS_FOLDER/SSH/" "$HOME/.ssh/"
# ----------------------
# 20-install-git.sh
# ----------------------
GIT_VERSION=2.6.4
# Remove old Git
sudo yum -y remove git
# Install build prerequisites
$YUMINSTALL curl-devel expat-devel gettext-devel openssl-devel zlib-devel
$YUMINSTALL gcc perl-ExtUtils-MakeMaker
# Download the sources
cd /usr/src
sudo wget https://www.kernel.org/pub/software/scm/git/git-$GIT_VERSION.tar.gz
sudo tar xzf git-$GIT_VERSION.tar.gz
# Compile
cd git-$GIT_VERSION
sudo make prefix=/usr/local/git all
sudo make prefix=/usr/local/git install
# Install to /usr/bin
sudo rsync -av /usr/local/git/bin/ /usr/bin/
cd $CURRENT_DIR
# ----------------------
# 21-install-sublime-text.sh
# ----------------------
SHORTCUT="[Desktop Entry]
Name=Sublime Text 3
Comment=Edit text files
Exec=/usr/local/sublime-text-3/sublime_text
Icon=/usr/local/sublime-text-3/Icon/128x128/sublime-text.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Utility;TextEditor;"
SCRIPT="#!/bin/sh
exec /usr/local/sublime-text-3/sublime_text \"\$@\" > /dev/null 2>&1 &
"
sudo curl -L "http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3083_x64.tar.bz2" -o "/usr/src/sublime-text-3.tar.bz2"
cd /usr/src
sudo tar -xvjf "sublime-text-3.tar.bz2"
cd "sublime_text_3"
sudo rm -rf "/usr/local/sublime-text-3/"
sudo mkdir -pv "/usr/local/sublime-text-3"
sudo mv -fv * "/usr/local/sublime-text-3/"
echo "${SCRIPT}" | sudo tee "/usr/local/bin/subl"
sudo chmod +x "/usr/local/bin/subl"
echo "${SHORTCUT}" > /tmp/sublime-text.desktop
sudo desktop-file-install /tmp/sublime-text.desktop
cd $CURRENT_DIR
# ----------------------
# 22-install-java.sh
# ----------------------
# Prepare the installation folder.
sudo rm -rf /usr/lib/jvm/java-8-oracle
sudo mkdir -p /usr/lib/jvm/java-8-oracle
cd /usr/lib/jvm/java-8-oracle
# Download Oracle JDK 8 and unpack.
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/8u65-b17/jdk-8u65-linux-x64.tar.gz"
sudo tar xzf jdk-8u65-linux-x64.tar.gz
sudo mv -f jdk1.8.0_65/* .
sudo rm -rf jdk*.tar.gz
# Set default paths.
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/java-8-oracle/jre/bin/java" 1
sudo update-alternatives --set java /usr/lib/jvm/java-8-oracle/jre/bin/java
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/java-8-oracle/bin/javac" 1
sudo update-alternatives --set javac /usr/lib/jvm/java-8-oracle/bin/javac
cd $CURRENT_DIR
# ----------------------
# 23-install-gradle.sh
# ----------------------
# Installs to /opt/gradle.
# Existing versions are not overwritten/deleted. Seamless upgrades/downgrades.
# $GRADLE_HOME points to latest *installed* (not released).
GRADLE_VERSION=2.9
sudo mkdir -p /opt/gradle
wget -N http://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-all.zip -P /tmp/
sudo unzip /tmp/gradle-${GRADLE_VERSION}-all.zip -d /opt/gradle
sudo ln -sfn gradle-${GRADLE_VERSION} /opt/gradle/latest
printf "export GRADLE_HOME=/opt/gradle/latest\nexport PATH=\$PATH:\$GRADLE_HOME/bin" | sudo tee /etc/profile.d/gradle.sh
. /etc/profile.d/gradle.sh
# check installation
gradle -v
rm -rf /tmp/gradle*.zip
# ----------------------
# 24-install-intellij-idea.sh
# ----------------------
# ----- IntelliJ IDEA -----
# Specify IDEA version here.
IDEA_PACKAGE=ideaIU-15.0.2.tar.gz
wget -O "/tmp/$IDEA_PACKAGE" http://download-cf.jetbrains.com/idea/$IDEA_PACKAGE
cd /tmp
if [ -f "/tmp/$IDEA_PACKAGE" ]; then
tar -xzvf "$IDEA_PACKAGE"
IDEA_EXTRACTED_FOLDER=`ls -dt idea-IU* | head -1`
sudo rsync -av "$IDEA_EXTRACTED_FOLDER/" /opt/idea/
sudo rsync -av /opt/idea/bin/idea.png /usr/share/pixmaps/
echo '[Desktop Entry]
Name=IntelliJ IDEA
Type=Application
Exec=/opt/idea/bin/idea.sh
Terminal=false
Icon=/opt/idea/bin/idea.png
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=IntelliJ IDEA
' > idea.desktop
sudo desktop-file-install idea.desktop
sudo rm -f idea.desktop
sudo rm -f /usr/local/bin/idea
sudo ln -s /opt/idea/bin/idea.sh /usr/local/bin/idea
fi
cd $CURRENT_DIR
# ----------------------
# 25-install-eclipse.sh
# ----------------------
# ----- Eclipse -----
wget -O "/tmp/eclipse.tar.gz" http://eclipse.mirror.garr.it/mirrors/eclipse//technology/epp/downloads/release/mars/1/eclipse-java-mars-1-linux-gtk-x86_64.tar.gz
cd /tmp
if [ -f "eclipse.tar.gz" ]; then
tar xf eclipse.tar.gz
sudo rsync -av eclipse/ /opt/eclipse/
sudo ln -sf /opt/eclipse/eclipse /usr/local/bin/eclipse
sudo -E eclipse -clean
fi
echo '[Desktop Entry]
Type=Application
Name=Eclipse
Comment=Eclipse Integrated Development Environment
Icon=/opt/eclipse/icon.xpm
Exec=/opt/eclipse/eclipse
Terminal=false
Categories=Development;IDE;Java;
StartupWMClass=Eclipse
' > /tmp/eclipse.desktop
sudo desktop-file-install /tmp/eclipse.desktop
cd $CURRENT_DIR
# ----------------------
# 50-install-apps.sh
# ----------------------
# ----- Editors, protocol clients, terminal programs -----
$YUMINSTALL google-chrome-stable
$YUMINSTALL curl wget axel httpie qbittorrent filezilla w3m mc
$YUMINSTALL vim emacs zsh
$YUMINSTALL remmina remmina-plugins-rdp
$YUMINSTALL tree lnav icu
$YUMINSTALL keepassx
sudo yum -y --nogpgcheck install insync
# Ack-grep
sudo wget -O /usr/bin/ack http://beyondgrep.com/ack-2.14-single-file && sudo chmod 0755 /usr/bin/ack
# ----- Development -----
$YUMINSTALL subversion
$YUMINSTALL meld
$YUMINSTALL mono-complete monodevelop
$YUMINSTALL nodejs php octave
$YUMINSTALL maven
$YUMINSTALL clang
$YUMINSTALL redis && sudo systemctl enable redis.service
$YUMINSTALL jq
# Ruby
$YUMINSTALL ruby ruby-devel
sudo gem install bropages
# Python
$YUMINSTALL python python3 python-tools python3-tools pypy python-pip python3-pip python-devel pypy-devel
$YUMINSTALL numpy python3-numpy scipy
sudo rsync -av --exclude='*.desktop' "$IMPORTABLE_SETTINGS_FOLDER/Python/" /usr/share/pixmaps
sudo desktop-file-install "$IMPORTABLE_SETTINGS_FOLDER/Python/idle2.desktop"
sudo desktop-file-install "$IMPORTABLE_SETTINGS_FOLDER/Python/idle3.desktop"
# Python packages
sudo pip install --upgrade pip
sudo pip install csvkit
# Docker
wget -qO- https://get.docker.com/ | sh
sudo usermod -aG docker `whoami`
sudo chkconfig docker on
# R / RStudio
$YUMINSTALL R
$YUMINSTALL https://download1.rstudio.org/rstudio-0.99.489-x86_64.rpm
rsync -av "$IMPORTABLE_SETTINGS_FOLDER/RStudio/" "$HOME/.rstudio-desktop/"
# Cloc
sudo wget -O /usr/local/bin/cloc https://github.com/AlDanial/cloc/releases/download/1.64/cloc-1.64.pl && sudo chmod 0755 /usr/local/bin/cloc
# ----- System Utils -----
$YUMINSTALL hardinfo htop iftop mtr glances sysstat dstat ncdu gparted
# ----- Networking -----
$YUMINSTALL openssh
# OpenVPN
$YUMINSTALL NetworkManager-openvpn NetworkManager-openvpn-gnome
mkdir -p ~/.cert
rsync -av "$IMPORTABLE_SETTINGS_FOLDER/OpenVPN/ca.ipvanish.com.crt" ~/.cert/
# Wireshark
$YUMINSTALL wireshark wireshark-gnome
sudo groupadd wireshark
sudo usermod -a -G wireshark `whoami`
sudo chgrp wireshark /usr/sbin/dumpcap
sudo chmod 750 /usr/sbin/dumpcap
sudo setcap cap_net_raw,cap_net_admin=eip /usr/sbin/dumpcap
sudo getcap /usr/sbin/dumpcap
# ----- Virtualization -----
$YUMINSTALL VirtualBox-5.0
# ----- Desktop customizations -----
$YUMINSTALL shutter
$YUMINSTALL gnome-color-chooser
$YUMINSTALL redshift gtk-redshift
# ----- Media -----
$YUMINSTALL rhythmbox vlc smplayer
$YUMINSTALL clementine gstreamer-plugins-ugly
$YUMINSTALL inkscape gthumb
$YUMINSTALL HandBrake-gui audacity mkvtoolnix mkvtoolnix-gui
# ----------------------
# 51-install-cairo-dock.sh
# ----------------------
CAIRO_DOCK_VERSION=3.4.1
# Core
wget -P /tmp/ https://github.com/Cairo-Dock/cairo-dock-core/releases/download/$CAIRO_DOCK_VERSION/cairo-dock-$CAIRO_DOCK_VERSION.tar.gz
cd /tmp
tar xf cairo-dock-$CAIRO_DOCK_VERSION.tar.gz
cd cairo-dock-$CAIRO_DOCK_VERSION
cmake CMakeLists.txt -DCMAKE_INSTALL_PREFIX=/usr -DFORCE_NOT_LIB64=yes
make
sudo make install
echo "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig" | sudo tee /etc/profile.d/cairo-dock.sh
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:" | sudo tee -a /etc/profile.d/cairo-dock.sh
sudo chmod +x /etc/profile.d/cairo-dock.sh
source /etc/profile.d/cairo-dock.sh
pkg-config gldi --variable=pluginsdir
# Plugins
wget -P /tmp/ https://github.com/Cairo-Dock/cairo-dock-plug-ins/releases/download/$CAIRO_DOCK_VERSION/cairo-dock-plug-ins-$CAIRO_DOCK_VERSION.tar.gz
cd /tmp
tar xf cairo-dock-plug-ins-$CAIRO_DOCK_VERSION.tar.gz
cd cairo-dock-plugins-$CAIRO_DOCK_VERSION
cmake CMakeLists.txt -DCMAKE_INSTALL_PREFIX=/usr -DFORCE_NOT_LIB64=yes
make
sudo make install
cd $CURRENT_DIR
# ----------------------
# 99-finalize.sh
# ----------------------
# =========== Finalization ============
# Update DB for 'locate'
sudo updatedb
echo
echo "----- Done. Now reboot for the remaining changes to take effect. -----"
echo
#!/usr/bin/env bash
# =========== CONFIG =============
# Assuming we'll set the Dropbox folder to ~/Dropbox
DROPBOX_FOLDER=$HOME/Dropbox
# ================================
# =========== ESSENTIAL ALIASES ==========
YUMINSTALL='sudo yum -y install'
RPMINSTALL='sudo rpm -Uvh'
IMPORTABLE_SETTINGS_FOLDER=$DROPBOX_FOLDER/Reference/Importable\ Software\ Settings
CURRENT_DIR=`pwd`
# ========================================
#!/usr/bin/env bash
source 00-common-vars.sh
# Extended repos with more packages
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
$YUMINSTALL http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
$YUMINSTALL https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# For fonts and other desktop tweaks
sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
$YUMINSTALL http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
# For Double Commander
sudo wget http://download.opensuse.org/repositories/home:Alexx2000/CentOS_7/home:Alexx2000.repo -P /etc/yum.repos.d/
# For Google Chrome
cat << EOF | sudo tee /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
# For InSync
sudo rpm --import https://d2t3ff60b2tol4.cloudfront.net/repomd.xml.key
echo "[insync]
name=insync repo
baseurl=http://yum.insynchq.com/fedora/19/
gpgcheck=1
gpgkey=https://d2t3ff60b2tol4.cloudfront.net/repomd.xml.key
enabled=1
repo_gpgcheck=1
metadata_expire=120m
" | sudo tee /etc/yum.repos.d/insync.repo
# For Mono
sudo rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
sudo yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
# For VirtualBox
sudo rpm --import https://www.virtualbox.org/download/oracle_vbox.asc
sudo wget -O /etc/yum.repos.d/virtualbox.repo http://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
# For Node.js
wget -O /tmp/nodejs-setup.sh https://rpm.nodesource.com/setup_5.x && sudo bash /tmp/nodejs-setup.sh
# Enable/disable repositories
sudo sed -i '/enabled=1/c\enabled=0' /etc/yum/pluginconf.d/fastestmirror.conf
sudo yum-config-manager --disable Dropbox
# Done adding repos at this point
sudo yum -y update
#!/usr/bin/env bash
source 00-common-vars.sh
$YUMINSTALL libgnome
$YUMINSTALL https://www.dropbox.com/download?dl=packages/fedora/nautilus-dropbox-2015.10.28-1.fedora.x86_64.rpm
# ----- Install Dropbox to pull all importable settings -----
$INSTALL dropbox
echo
echo "----- Now, please launch the Dropbox app and set it up. -----"
echo "Assuming the Dropbox folder will be set to: $DROPBOX_FOLDER"
echo
read -p "Press [Enter] once Dropbox has finished syncing your files..."
sudo yum-config-manager --disable Dropbox
#!/usr/bin/env bash
source 00-common-vars.sh
sudo yum -y --nogpgcheck install insync
#!/usr/bin/env bash
source 00-common-vars.sh
$YUMINSTALL doublecmd-gtk
#!/usr/bin/env bash
source 00-common-vars.sh
# ----- Fonts -----
USER_FONTS_FOLDER=$HOME/.fonts
if [ ! -d "$USER_FONTS_FOLDER" ]; then
mkdir "$USER_FONTS_FOLDER"
fi
gsettings "set" "org.gnome.settings-daemon.plugins.xsettings" "hinting" "slight"
gsettings "set" "org.gnome.settings-daemon.plugins.xsettings" "antialiasing" "rgba"
echo "Xft.lcdfilter: lcddefault" > ~/.Xresources
$YUMINSTALL freetype-freeworld
$YUMINSTALL google-droid-sans-fonts google-droid-sans-mono-fonts google-droid-serif-fonts google-noto-sans-ui-fonts
$YUMINSTALL ubuntu-font-family
rsync -av "$IMPORTABLE_SETTINGS_FOLDER/Fonts/Windows" "$USER_FONTS_FOLDER"
rsync -av "$IMPORTABLE_SETTINGS_FOLDER/Fonts/Presentation" "$USER_FONTS_FOLDER"
rsync -av "$IMPORTABLE_SETTINGS_FOLDER/Fonts/ELEKS" "$USER_FONTS_FOLDER"
wget https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-ttf-2.00.1.tar.gz -P /tmp/
cd /tmp
tar -xvf liberation-fonts-ttf-2*.tar.gz
sudo mkdir -p /usr/share/fonts/truetype/liberation
cd liberation-fonts-ttf-2*
sudo cp *.ttf /usr/share/fonts/truetype/liberation/
fc-cache -fv "$USER_FONTS_FOLDER"
# Update fonts in Gnome shell
sudo perl -0777 -i.bak -pe 's/stage\s{[^}]+}/stage {\n font-family: "Noto Sans UI", sans-serif;\n font-weight: bold;\n font-size: 9pt;\n color: white;\n}/igs' /usr/share/gnome-shell/theme/gnome-shell.css
sudo perl -0777 -i.bak -pe 's/font-size: 10pt;/font-size: 9pt;\n font-weight: normal;/igs' /usr/share/gnome-shell/extensions/[email protected]/stylesheet.css
cd $CURRENT_DIR
#!/usr/bin/env bash
source 00-common-vars.sh
# Import .config and other dotfiles
rsync -av "$IMPORTABLE_SETTINGS_FOLDER/Linux/CentOS/" "$HOME/"
source ~/.bashrc
sudo mkdir -p /root/.config/doublecmd
sudo rsync -av "$IMPORTABLE_SETTINGS_FOLDER/Double Commander/Linux/root/doublecmd/" /root/.config/doublecmd/
# Import Gnome configs
dconf load /org/gnome/terminal/ < ~/.config/initial/terminal.dconf
dconf load /org/gnome/gedit/ < ~/.config/initial/gedit.dconf
dconf load /org/gnome/meld/ < ~/.config/initial/meld.dconf
dconf load /org/gnome/settings-daemon/ < ~/.config/initial/org-gnome-settings-daemon.dconf
dconf load /org/gnome/shell/ < ~/.config/initial/org-gnome-shell.dconf
dconf load /org/gnome/desktop/ < ~/.config/initial/org-gnome-desktop.dconf
# Apply custom font config
sudo rsync -av ~/.config/initial/fonts/fonts.conf /etc/fonts/fonts.conf
# Import SSH configs
rsync -av "$IMPORTABLE_SETTINGS_FOLDER/SSH/" "$HOME/.ssh/"
#!/usr/bin/env bash
source 00-common-vars.sh
GIT_VERSION=2.6.4
# Remove old Git
sudo yum -y remove git
# Install build prerequisites
$YUMINSTALL curl-devel expat-devel gettext-devel openssl-devel zlib-devel
$YUMINSTALL gcc perl-ExtUtils-MakeMaker
# Download the sources
cd /usr/src
sudo wget https://www.kernel.org/pub/software/scm/git/git-$GIT_VERSION.tar.gz
sudo tar xzf git-$GIT_VERSION.tar.gz
# Compile
cd git-$GIT_VERSION
sudo make prefix=/usr/local/git all
sudo make prefix=/usr/local/git install
# Install to /usr/bin
sudo rsync -av /usr/local/git/bin/ /usr/bin/
cd $CURRENT_DIR
#!/usr/bin/env bash
source 00-common-vars.sh
SHORTCUT="[Desktop Entry]
Name=Sublime Text 3
Comment=Edit text files
Exec=/usr/local/sublime-text-3/sublime_text
Icon=/usr/local/sublime-text-3/Icon/128x128/sublime-text.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Utility;TextEditor;"
SCRIPT="#!/bin/sh
exec /usr/local/sublime-text-3/sublime_text \"\$@\" > /dev/null 2>&1 &
"
sudo curl -L "https://download.sublimetext.com/sublime_text_3_build_3103_x64.tar.bz2" -o "/usr/src/sublime-text-3.tar.bz2"
cd /usr/src
sudo tar -xvjf "sublime-text-3.tar.bz2"
cd "sublime_text_3"
sudo rm -rf "/usr/local/sublime-text-3/"
sudo mkdir -pv "/usr/local/sublime-text-3"
sudo mv -fv * "/usr/local/sublime-text-3/"
echo "${SCRIPT}" | sudo tee "/usr/local/bin/subl"
sudo chmod +x "/usr/local/bin/subl"
echo "${SHORTCUT}" > /tmp/sublime-text.desktop
sudo desktop-file-install /tmp/sublime-text.desktop
cd $CURRENT_DIR
#!/usr/bin/env bash
source 00-common-vars.sh
# Prepare the installation folder.
sudo rm -rf /usr/lib/jvm/java-8-oracle
sudo mkdir -p /usr/lib/jvm/java-8-oracle
cd /usr/lib/jvm/java-8-oracle
# Download Oracle JDK 8 and unpack.
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/8u65-b17/jdk-8u65-linux-x64.tar.gz"
sudo tar xzf jdk-8u65-linux-x64.tar.gz
sudo mv -f jdk1.8.0_65/* .
sudo rm -rf jdk*.tar.gz
# Set default paths.
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/java-8-oracle/jre/bin/java" 1
sudo update-alternatives --set java /usr/lib/jvm/java-8-oracle/jre/bin/java
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/java-8-oracle/bin/javac" 1
sudo update-alternatives --set javac /usr/lib/jvm/java-8-oracle/bin/javac
cd $CURRENT_DIR
#!/usr/bin/env bash
source 00-common-vars.sh
# Installs to /opt/gradle.
# Existing versions are not overwritten/deleted. Seamless upgrades/downgrades.
# $GRADLE_HOME points to latest *installed* (not released).
GRADLE_VERSION=2.9
sudo mkdir -p /opt/gradle
wget -N http://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-all.zip -P /tmp/
sudo unzip /tmp/gradle-${GRADLE_VERSION}-all.zip -d /opt/gradle
sudo ln -sfn gradle-${GRADLE_VERSION} /opt/gradle/latest
printf "export GRADLE_HOME=/opt/gradle/latest\nexport PATH=\$PATH:\$GRADLE_HOME/bin" | sudo tee /etc/profile.d/gradle.sh
. /etc/profile.d/gradle.sh
# check installation
gradle -v
rm -rf /tmp/gradle*.zip
#!/usr/bin/env bash
source 00-common-vars.sh
# ----- IntelliJ IDEA -----
# Specify IDEA version here.
IDEA_PACKAGE=ideaIU-15.0.2.tar.gz
wget -O "/tmp/$IDEA_PACKAGE" http://download-cf.jetbrains.com/idea/$IDEA_PACKAGE
cd /tmp
if [ -f "/tmp/$IDEA_PACKAGE" ]; then
tar -xzvf "$IDEA_PACKAGE"
IDEA_EXTRACTED_FOLDER=`ls -dt idea-IU* | head -1`
sudo rsync -av "$IDEA_EXTRACTED_FOLDER/" /opt/idea/
sudo rsync -av /opt/idea/bin/idea.png /usr/share/pixmaps/
echo '[Desktop Entry]
Name=IntelliJ IDEA
Type=Application
Exec=/opt/idea/bin/idea.sh
Terminal=false
Icon=/opt/idea/bin/idea.png
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=IntelliJ IDEA
' > idea.desktop
sudo desktop-file-install idea.desktop
sudo rm -f idea.desktop
sudo rm -f /usr/local/bin/idea
sudo ln -s /opt/idea/bin/idea.sh /usr/local/bin/idea
fi
cd $CURRENT_DIR
#!/usr/bin/env bash
source 00-common-vars.sh
# ----- Eclipse -----
wget -O "/tmp/eclipse.tar.gz" http://eclipse.mirror.garr.it/mirrors/eclipse//technology/epp/downloads/release/mars/1/eclipse-java-mars-1-linux-gtk-x86_64.tar.gz
cd /tmp
if [ -f "eclipse.tar.gz" ]; then
tar xf eclipse.tar.gz
sudo rsync -av eclipse/ /opt/eclipse/
sudo ln -sf /opt/eclipse/eclipse /usr/local/bin/eclipse
sudo -E eclipse -clean
fi
echo '[Desktop Entry]
Type=Application
Name=Eclipse
Comment=Eclipse Integrated Development Environment
Icon=/opt/eclipse/icon.xpm
Exec=/opt/eclipse/eclipse
Terminal=false
Categories=Development;IDE;Java;
StartupWMClass=Eclipse
' > /tmp/eclipse.desktop
sudo desktop-file-install /tmp/eclipse.desktop
cd $CURRENT_DIR
#!/usr/bin/env bash
source 00-common-vars.sh
# ----- Editors, protocol clients, terminal programs -----
$YUMINSTALL google-chrome-stable
$YUMINSTALL curl wget axel httpie qbittorrent filezilla w3m mc
$YUMINSTALL vim emacs zsh
$YUMINSTALL remmina remmina-plugins-rdp
$YUMINSTALL tree lnav icu
$YUMINSTALL keepassx
sudo yum -y --nogpgcheck install insync
# Ack-grep
sudo wget -O /usr/bin/ack http://beyondgrep.com/ack-2.14-single-file && sudo chmod 0755 /usr/bin/ack
# ----- Development -----
$YUMINSTALL subversion
$YUMINSTALL meld
$YUMINSTALL mono-complete monodevelop
$YUMINSTALL nodejs php octave
$YUMINSTALL maven
$YUMINSTALL clang
$YUMINSTALL redis && sudo systemctl enable redis.service
$YUMINSTALL jq
# Ruby
$YUMINSTALL ruby ruby-devel
sudo gem install bropages
# Python
$YUMINSTALL python python3 python-tools python3-tools pypy python-pip python3-pip python-devel pypy-devel
$YUMINSTALL numpy python3-numpy scipy
sudo rsync -av --exclude='*.desktop' "$IMPORTABLE_SETTINGS_FOLDER/Python/" /usr/share/pixmaps
sudo desktop-file-install "$IMPORTABLE_SETTINGS_FOLDER/Python/idle2.desktop"
sudo desktop-file-install "$IMPORTABLE_SETTINGS_FOLDER/Python/idle3.desktop"
# Python packages
sudo pip install --upgrade pip
sudo pip install csvkit
# Docker
wget -qO- https://get.docker.com/ | sh
sudo usermod -aG docker `whoami`
sudo chkconfig docker on
# R / RStudio
$YUMINSTALL R
$YUMINSTALL https://download1.rstudio.org/rstudio-0.99.489-x86_64.rpm
rsync -av "$IMPORTABLE_SETTINGS_FOLDER/RStudio/" "$HOME/.rstudio-desktop/"
# Cloc
sudo wget -O /usr/local/bin/cloc https://github.com/AlDanial/cloc/releases/download/1.64/cloc-1.64.pl && sudo chmod 0755 /usr/local/bin/cloc
# ----- System Utils -----
$YUMINSTALL hardinfo htop iftop mtr glances sysstat dstat ncdu gparted
# ----- Networking -----
$YUMINSTALL openssh
# OpenVPN
$YUMINSTALL NetworkManager-openvpn NetworkManager-openvpn-gnome
mkdir -p ~/.cert
rsync -av "$IMPORTABLE_SETTINGS_FOLDER/OpenVPN/ca.ipvanish.com.crt" ~/.cert/
# Wireshark
$YUMINSTALL wireshark wireshark-gnome
sudo groupadd wireshark
sudo usermod -a -G wireshark `whoami`
sudo chgrp wireshark /usr/sbin/dumpcap
sudo chmod 750 /usr/sbin/dumpcap
sudo setcap cap_net_raw,cap_net_admin=eip /usr/sbin/dumpcap
sudo getcap /usr/sbin/dumpcap
# ----- Virtualization -----
$YUMINSTALL VirtualBox-5.0
# ----- Desktop customizations -----
$YUMINSTALL shutter
$YUMINSTALL gnome-color-chooser
$YUMINSTALL redshift gtk-redshift
# ----- Media -----
$YUMINSTALL rhythmbox vlc smplayer
$YUMINSTALL clementine gstreamer-plugins-ugly
$YUMINSTALL inkscape gthumb
$YUMINSTALL HandBrake-gui audacity mkvtoolnix mkvtoolnix-gui
#!/usr/bin/env bash
source 00-common-vars.sh
CAIRO_DOCK_VERSION=3.4.1
# Core
wget -P /tmp/ https://github.com/Cairo-Dock/cairo-dock-core/releases/download/$CAIRO_DOCK_VERSION/cairo-dock-$CAIRO_DOCK_VERSION.tar.gz
cd /tmp
tar xf cairo-dock-$CAIRO_DOCK_VERSION.tar.gz
cd cairo-dock-$CAIRO_DOCK_VERSION
cmake CMakeLists.txt -DCMAKE_INSTALL_PREFIX=/usr -DFORCE_NOT_LIB64=yes
make
sudo make install
echo "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig" | sudo tee /etc/profile.d/cairo-dock.sh
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:" | sudo tee -a /etc/profile.d/cairo-dock.sh
sudo chmod +x /etc/profile.d/cairo-dock.sh
source /etc/profile.d/cairo-dock.sh
pkg-config gldi --variable=pluginsdir
# Plugins
wget -P /tmp/ https://github.com/Cairo-Dock/cairo-dock-plug-ins/releases/download/$CAIRO_DOCK_VERSION/cairo-dock-plug-ins-$CAIRO_DOCK_VERSION.tar.gz
cd /tmp
tar xf cairo-dock-plug-ins-$CAIRO_DOCK_VERSION.tar.gz
cd cairo-dock-plugins-$CAIRO_DOCK_VERSION
cmake CMakeLists.txt -DCMAKE_INSTALL_PREFIX=/usr -DFORCE_NOT_LIB64=yes
make
sudo make install
cd $CURRENT_DIR
#!/usr/bin/env bash
source 00-common-vars.sh
# =========== Finalization ============
# Update DB for 'locate'
sudo updatedb
echo
echo "----- Done. Now reboot for the remaining changes to take effect. -----"
echo
#!/usr/bin/env bash
rm -f master.sh
echo "#!/usr/bin/bash" >> master.sh
for script in $(ls | egrep '[0-9]+-' | sort)
do
echo "# ----------------------" >> master.sh
echo "# $script" >> master.sh
echo "# ----------------------" >> master.sh
cat $script >> master.sh
echo >> master.sh
done
# Remove obsolete lines
sed -i '/#!\/usr\/bin\/env bash/d' master.sh
sed -i '/source 00-common-vars.sh/d' master.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment