Skip to content

Instantly share code, notes, and snippets.

@thach-pham
Forked from ldrahnik/post-install.sh
Last active July 21, 2018 02:46
Show Gist options
  • Save thach-pham/21f2e24e69eb8cc3817426a723384c1b to your computer and use it in GitHub Desktop.
Save thach-pham/21f2e24e69eb8cc3817426a723384c1b to your computer and use it in GitHub Desktop.
Elementary OS Loki installation - Ubuntu 16.04 (https://elementary.io/)
#!/bin/bash
# finished install proccess
# first update
sudo apt -y update && sudo apt -y upgrade
# settings:
# notification -> disable sounds
# sound -> sound effects -> mute
# mouse & touchpad -> mouse pointer speed
# user accounts -> ghost session disable
# security & privacy -> disable entire history
# elementary tweaks
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:philip.scott/elementary-tweaks && sudo apt -y update
sudo apt install -y elementary-tweaks
# tweaks:
# terminal -> follow last tab (gsettings set org.pantheon.terminal.settings follow-last-tab true)
# terminal -> disable unsafe paste alert
# animations -> disable animations
## google chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt -y update
sudo apt install -y google-chrome-stable
# run:
# do not send auto reports to google
# peek - an animated GIF recorder (https://github.com/phw/peek)
sudo add-apt-repository -y ppa:peek-developers/stable && sudo apt -y update
sudo apt install -y peek
# 1) settings -> keyboard -> shortcuts -> add custom:
# `peek` - assign left shift + print screen button (image is saved to screenshots folder)
# shutter
sudo add-apt-repository -y ppa:shutter/ppa && sudo apt -y update
sudo apt install -y shutter
# 1) after install: add to Apps/Startup/Shutter -> enable
# or in Shutter preferences enable Start Shutter at login -> enable
#
# 2) change screenshots folder to -> screenshots
# 3) Hide notification icon -> enable
# 4) Hide window on first lunch -> enable
# 5) Minimize to tray when closing main window -> disable
# 6) Show help text -> disable
# 7) settings -> keyboard -> shortcuts -> add custom:
# `shutter -s -e` - assign print screen button (-s .. selective, -e .. after print screen auto-exit shutter app (image is saved to screenshots folder))
# vlc
sudo apt install -y vlc
sudo apt install -y ubuntu-restricted-extras ffmpeg
# remove apps
sudo apt remove screenshot-tool -y
sudo apt remove pantheon-mail -y
sudo apt remove maya-calendar -y
sudo apt remove epiphany-browser -y
sudo apt remove audience -y
sudo apt remove noise -y
sudo apt remove scratch-text-editor -y
sudo apt remove simple-scan -y
sudo apt remove pantheon-calculator -y
sudo apt remove appcenter -y
sudo rm /etc/apt/sources.list.d/appcenter.list
sudo rm /etc/apt/sources.list.d/appcenter.list.save
rm -rf ~/.cache/epiphany
rm -rf ~/.config/epiphany
rm -rf ~/.cache/simple-scan
rm -rf ~/.cache/pantheon-photos
# mutt - an e-mail client (http://mutt.org)
# create config files (~/.mutt/muttrc + ~/.mutt/mailcap)
cd /opt/
sudo wget -c ftp://ftp.mutt.org/pub/mutt/mutt-1.9.0.tar.gz
sudo tar xf mutt-1.9.0.tar.gz
sudo rm mutt-1.9.0.tar.gz
cd mutt-1.9.0/
sudo apt install -y build-essential libncurses5-dev libncursesw5-dev
sudo apt install -y libssl-dev
sudo apt install -y libsasl2-dev
sudo apt install -y libtokyocabinet-dev
./configure --enable-pop --enable-imap --with-ssl --with-sasl --enable-smtp --enable-hcache --enable-sidebar --with-tokyocabinet
make
sudo make install
# neomutt (eventually)
# sudo apt install -y devscripts
# sudo apt install -y libgpgme11-dev
# gedit
sudo apt install -y gedit
# dropbox
cd /home/ldrahnik/projects
git clone [email protected]:zant95/elementary-dropbox.git
bash install.sh
# fix icon - for example icon at ~/.local/share/applications/dropbox to /home/ldrahnik/projects/elementary-dropbox/icons/64x64/apps
# git
sudo apt install -y git
git config --global core.excludesfile ~/.gitignore_global
# edit ~/.gitconfig (with specific content https://gist.github.com/ldrahnik/f2124d2ff1b130bd14f53834ec0b398b)
# create ~/.gitignore_global (with specific content https://gist.github.com/ldrahnik/f12422017b327e11e54afdeda6a6d166)
# github ssh key: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
# github gpg key: https://help.github.com/articles/generating-a-new-gpg-key/
# disable bluetooth
# add before last return /etc/rc.local rfkill block bluetooth
# atom
sudo add-apt-repository -y ppa:webupd8team/atom && sudo apt -y update
sudo apt install -y atom
# apache
sudo apt install -y apache2
# stop apache (port :80 will be configurated via nginx)
sudo service apache2 stop
# nginx
sudo apt install -y nginx
# php 5.6
sudo apt install -y php5.6 php5.6-bcmath php5.6-bz2 php5.6-cgi php5.6-cli php5.6-common php5.6-curl php5.6-dba php5.6-dev php5.6-enchant php5.6-fpm php5.6-gd php5.6-gmp php5.6-imap php5.6-interbase php5.6-intl php5.6-intl php5.6-json php5.6-json php5.6-ldap php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-odbc php5.6-opcache php5.6-pgsql php5.6-phpdbg php5.6-pspell php5.6-readline php5.6-recode php5.6-snmp php5.6-soap php5.6-sqlite3 php5.6-sybase php5.6-tidy php5.6-xml php5.6-xmlrpc php5.6-xsl php5.6-zip
# php 7.0
sudo apt install -y php7.0 php7.0-fpm php7.0-cli php7.0-common php7.0-mbstring php7.0-gd php7.0-intl php7.0-xml php7.0-mysql php7.0-mcrypt php7.0-zip
# php 7.1
sudo add-apt-repository -y ppa:ondrej/php && sudo apt update
sudo apt install -y php7.1 php7.1-fpm php7.1-cli php7.1-common php7.1-bcmath php7.1-bz2 php7.1-cgi php7.1-common php7.1-curl php7.1-dba php7.1-dev php7.1-enchant php7.1-gd php7.1-intl php7.1-json php7.1-ldap php7.1-mbstring php7.1-mysql php7.1-pgsql php7.1-recode php7.1-sqlite3 php7.1-xml php7.1-zip
# sendmail
sudo apt install -y sendmail
# when is installation freezed on Creating SSL certificates for sendmail:
# https://askubuntu.com/questions/937666/ubuntu-16-04-command-line-sendmail-installation-hanged
# composer
sudo apt install -y php-cli php-mbstring
cd /home/ldrahnik/projects
curl -sS https://getcomposer.org/installer -o composer-setup.php
# next, run a short PHP script to verify that the installer matches the SHA-384 hash for the latest installer found on the Composer Public Keys / Signatures (https://composer.github.io/pubkeys.html)
php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
# because for directory /usr/local/bin is sudo required but for .composer not
sudo chown -R $USER $HOME/.composer
# permissions apache & nginx folder
sudo chown -R $USER /usr/share/nginx
sudo chown -R $USER /var/www/
# alchemist - projects manager (https://github.com/alchemist-org/alchemist)
cd /home/ldrahnik/projects
git clone [email protected]:alchemist-org/alchemist.git
cd alchemist
composer install
# add alias to ~.bash_aliases: alias alchemist='php /home/ldrahnik/projects/alchemist/bin/alchemist.php'
# add config.local.neon from previous using alchemist or just create file config.local.neon
# (copy adminer.css to /adminernginx/adminer and /adminerapache/adminer folder adminer.css file from https://www.adminer.org/)
#
# alchemist install
# nvm
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
# re-open terminal
# node (include npm)
nvm install node
# grunt
npm install -g grunt-cli
# update npm
npm update npm -g
# slack
cd /opt
sudo wget -c https://downloads.slack-edge.com/linux_releases/slack-desktop-2.7.1-amd64.deb
sudo dpkg -i slack-desktop-2.7.1-amd64.deb
sudo rm slack-desktop-2.7.1-amd64.deb
# redshift
sudo apt install -y redshift redshift-gtk
# after:
# set up in settings auto start -> enable
# plank
plank --preferences
# after all: lock icons
# phpstorm
cd /opt
sudo wget https://download-cf.jetbrains.com/webide/PhpStorm-2017.2.2.tar.gz
sudo tar -xvf PhpStorm-2017.2.2.tar.gz
# sudo chown -R $USER:$USER /opt/PhpStorm-xxx # phpstorm is able selfupdate, but needs write access
sudo rm PhpStorm-2017.2.2.tar.gz
# add file type .phpt under php
# install plugins: latte, neon, ..
# sudo /opt/PhpStorm-172.3544.41/bin/phpstorm.sh # sudo because updates need to be root to automatically do that stuff
# go to Tools menu on PhpStorm and select Create Desktop Entry... from drop down -> sudo -> re-lock your icon again
#
# copy custom live templates to ~/.PhpStorm2017.2/config/templates
# mysql
sudo apt-get install mysql-server # interactive - ask to insert root password
# sudo mysql_secure_installation (interactive - remove testing databases, change root password etc. - WARNING: during this script is not possible set up empty password: Sorry, you can't use an empty password here.)
# xdebug
sudo apt-get install -y php-xdebug
# vim
sudo apt-get install -y vim
# create ~/.vimrc (with specific content)
# happy_hacking color theme
cd /home/ldrahnik/projects
git clone [email protected]:YorickPeterse/happy_hacking.vim.git
mkdir -p ~/.vim/colors
# ln -s /home/ldrahnik/projects/colors/happy_hacking.vim ~/.vim/colors/happy_hacking.vim WARNING: does not work
cp ~/projects/happy_hacking.vim/colors/happy_hacking.vim ~/.vim/colors
# vundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
# gparted (used for example for reformating usb disk)
sudo apt install -y gparted
# graphic sw
sudo apt install -y gimp inkscape
# filezilla
sudo apt install -y filezilla
# steam (eventually)
# sudo apt install -y steam
# pavucontrol
sudo apt install -y pavucontrol
# edit: sudo gedit /etc/modprobe.d/alsa-base.conf and add line in the end: "options snd-hda-intel model=,dell-headset-multi"
# discord (eventually)
#cd /opt/
#sudo apt install libc++1
#sudo wget -O discord-0.0.2.deb https://dl.discordapp.net/apps/linux/0.0.2/discord-0.0.2.deb
#sudo dpkg -i discord-0.0.2.deb
#sudo rm discord-0.0.2.deb
# wireshark
sudo apt -y install wireshark
# after logout, when it does not work automagically (wireshark asks during installation):
# gpasswd -a $USER wireshark -> logout and it should works (https://askubuntu.com/questions/458762/how-to-enable-wireshark-without-running-as-root-in-trusty-14-04)
# gitkpg
sudo apt install -y gitpkg
# texlive
sudo apt install -y texlive texstudio
sudo apt install -y texlive-lang-czechslovak
# example: change section & subsection format via package titlesec and much more packages
sudo apt install -y texlive-formats-extra
# office
sudo apt install -y libreoffice
# unetbootin (how to create windows bootable usb)
sudo apt-get install -y unetbootin
# rpm
sudo apt install -y rpm
# alien
sudo apt-get install alien dpkg-dev debhelper build-essential
# openvpn
sudo apt install -y openvpn
# traceroute (ping is only included by default)
sudo apt install -y inetutils-traceroute
# vagrant
sudo apt install -y vagrant
# virtualbox
sudo apt install -y virtualbox-qt
# octave (like matlab but free)
sudo apt install -y octave
# nethogs (traffic per process)
sudo apt install -y nethogs
# sqldeveloper
sudo apt install -y sqldeveloper-package
cd opt
sudo wget --user <e-mail> --password <password> http://download.oracle.com/otn/java/sqldeveloper/sqldeveloper-17.4.1.054.0712-no-jre.zip
cd sqldeveloper
sudo ln -s /opt/sqldeveloper/sqldeveloper.sh /usr/local/bin/sqldeveloper
sudo gedit sqldeveloper.sh
# wine3.6
# https://wiki.winehq.org/Ubuntu
# #!/bin/bash
# cd "`dirname $0`"/sqldeveloper/bin && bash sqldeveloper $*
# unset -v GNOME_DESKTOP_SESSION_ID
# cd /opt/sqldeveloper/sqldeveloper/bin && bash sqldeveloper $*
# python3.6 (installed 3.5.2)
sudo apt-get -y install zlib1g-dev
# prolog
sudo apt install swi-prolog-nox
cd /opt
sudo wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgz
sudo tar -xvf Python-3.6.3.tgz
cd Python-3.6.3
sudo ./configure
sudo make
sudo make install
# graphic
# NVIDIA Corporation GM108M [GeForce 840M] (rev a2)
# sudo add-apt-repository ppa:graphics-drivers/ppa # (https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa)
# sudo apt-get -y install nvidia-390
# $ nvidia-smi
# Play on Linux
sudo add-apt-repository ppa:/noobslab/apps
sudo apt-get update
sudo apt-get -y install playonlinux
# temperature senzor
sudo apt-get install psensor
# preferences -> Launch on session startup
# -> Hide window on startup
# senzor prefences -> CPU senzor -> Display senzor in the label
# hp deskjet printer (HP DeskJet ink Advantage 5075)
# sudo apt-get install -y libusb-1.0-0 libtool libsane-dev libsnmp-dev python-qt4 python-qt4-dbus python-dev xsane
# sudo apt-get install -y libcups2-dev libcupsimage2-dev libtool
# elementary has support for 5000 series nativaly
# at the end
# error during removing appcenter:
# wget -q "http://packages.elementary.io/key.asc" -O- | sudo apt-key add -
#
# if u set up like me bad locale settings during first steps installation:
# sudo dpkg-reconfigure locales
sudo apt autoremove -y
sudo apt autoclean -y
# install libreoffice
sudo add-apt-repository ppa:libreoffice/ppa
sudo apt update
sudo apt install libreoffice
# Install R 3.5
# Remove all r-cran-* packages first
sudo add-apt-repository ppa:marutter/rrutter3.5
sudo apt-get update
sudo apt install r-api-3.5
# Install RStudio Server 64bit
sudo apt-get install gdebi-core
wget https://download2.rstudio.org/rstudio-server-1.1.456-amd64.deb
sudo gdebi rstudio-server-1.1.456-amd64.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment