Skip to content

Instantly share code, notes, and snippets.

@yuvalif
Last active March 12, 2018 13:55
Show Gist options
  • Save yuvalif/5faf874c606bd1a6906991cb7cc0c03d to your computer and use it in GitHub Desktop.
Save yuvalif/5faf874c606bd1a6906991cb7cc0c03d to your computer and use it in GitHub Desktop.
Linux (fedora 27) post install script
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <hostname> <email>"
exit 1
fi
echo "Post install process for Fedora Core 27"
# TODO: verify corret version and verify run-once
cat /etc/fedora-release
gnome-shell --version
# disable selinux
sudo setenforce Permissive
# set timezone
sudo timedatectl set-timezone Asia/Jerusalem
# change hostname
sudo hostnamectl set-hostname $1
# remove some bloatware
sudo yum -y remove cheese
sudo yum -y remove gnome-calendar
sudo yum -y remove gnome-documents
sudo yum -y remove gnome-contacts
sudo yum -y remove rhythmbox
sudo yum -y remove gnome-boxes
sudo yum -y remove totem
# install some missing tools
sudo yum -y update
sudo yum -y install vim
sudo yum -y install git
sudo yum -y install gcc
sudo yum -y install gcc-c++
sudo yum -y install clang
sudo yum -y install golang
sudo yum -y install boost-devel
sudo yum -y install valgrind
sudo yum -y install libpcap-devel
sudo yum -y install openssl-devel
sudo yum -y install wireshark
sudo yum -y install tcpreplay
sudo yum -y install jemalloc
sudo yum -y install maven
sudo yum -y install cxxtest
sudo yum -y install task
sudo yum -y install erlang
sudo yum -y install octave
sudo yum -y install glibc-static
sudo yum -y install finger
# for gsl building
sudo dnf install autoconf
sudo dnf install automake
sudo dnf install libtool
# for boost building
sudo yum -y install bzip2
sudo yum -y install bzip2-devel
sudo yum -y install lzma
sudo yum -y install lzma-devel
sudo yum -y install python-devel
sudo yum install openmpi
sudo yum install openmpi-devel
echo "module load mpi/openmpi-x86_64" >> ~/.bash_profile
# kubernetes stuff
sudo yum -y install libvirt-daemon-kvm qemu-kvm
# zeromq stuff
sudo yum -y install zeromq
sudo pip install pyzmq
# sudo yum -y install eclipse
# add more software
sudo yum -y install htop
sudo yum -y install redis
sudo yum -y install docker
sudo yum -y install nmap
sudo yum -y install hexchat # irc client
# vlc
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install vlc
# text based stuff
sudo yum -y install irssi # irc client
sudo yum -y install mutt # email client
sudo yum -y install lynx # terminal browser
# flume
wget http://apache.mivzakim.net/flume/1.8.0/apache-flume-1.8.0-bin.tar.gz
# docker stuff
# add myself to docker group so no need to run as root
sudo usermod -a -G docker $(whoami)
newgrp docker
# run docker daemon
sudo systemctl start docker
# make sure that docker start at boot
sudo systemctl enable docker
# get skype
sudo dnf -y install https://repo.skype.com/latest/skypeforlinux-64-alpha.rpm
# rabbitmq server
sudo yum -y install rabbitmq-server.noarch
# add /usr/local/lib to library path
sudo su
echo "/usr/local/lib" > /etc/ld.so.conf.d/99local.conf
ldconfig
exit
# get my vimrc and plugins
git clone https://github.com/yuvalif/vimrc.git
cd vimrc/
./fetch_dependencies.sh
cd ..
ln -s vimrc/vimrc .vimrc
# set vim alias
echo "alias vi=vim" >> ~/.bashrc
# set golang env
echo "export GOROOT=$HOME/go" >> ~./bash_profile
echo "export PATH=$PATH:$GOROOT/bin" >> ~./bash_profile
# turn off terminal beep TODO: check that
echo "set bell-style none" >> ~/.inputrc
# bittorrent client
sudo yum install qbittorrent
# image coomand line tool
sudo yum install ImageMagick
# etcher - tool for burning images
wget https://bintray.com/resin-io/redhat/rpm -O /etc/yum.repos.d/bintray-resin-io-redhat.repo
sudo yum install -y etcher-electron
# TODO: acapi
# TODO: reboot with plugged rj45
# generte ssh key
ssh-keygen -t rsa -b 4096 -C "$2"
# start ssh server on boot
sudo systemctl enable sshd
sudo systemctl start sshd
# install xclip
sudo yum install xclip
# some git related configuration
git config --global user.email "$2"
git config --global user.name "Yuval Lifshitz"
git config --global diff.tool vimdiff
git config --global difftool.prompt false
git config --global core.editor vim
# simple commandline paste bin
curl ix.io/client > ix
chmod +x ix
sudo mv ix /usr/local/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment