-
-
Save luckylittle/565838d0f300c807cf7f9503516517d5 to your computer and use it in GitHub Desktop.
#!/bin/bash | |
# This is more of a notes, rather than script... | |
# CentOS 7 #1805 (@luckylittle) | |
# Majority of apps that i use on my personal CentOS laptop | |
# CentOS 7 #1805 based on RHEL 7.5 (ISO & VirtualBox) | |
# wget http://mirror.slu.cz/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1804.iso | |
# wget https://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-7-x86_64-Vagrant-1804_02.VirtualBox.box | |
# Red Hat Enterprise Linux release 8.0 (Ootpa) - few notes added where it's different | |
cd ~/Downloads/ | |
mkdir -p ~/Temp ~/Projects | |
# This script | |
wget https://gist.githubusercontent.com/luckylittle/565838d0f300c807cf7f9503516517d5/raw/d95cbcdbdd7ee9fce93fd4e386ca7acdf00c0eaf/centos7-initialize.sh | |
# EPEL Repo | |
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -y | |
# RPM Fusion Repo | |
sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm -y | |
# Inline with Upstream Stable (IUS) repo | |
sudo yum install https://centos7.iuscommunity.org/ius-release.rpm -y | |
# Remove default bloatware | |
sudo yum remove firefox empathy cheese gnome-boxes orca totem icedtea-web -y | |
# PIP2 | |
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | |
python get-pip.py --user | |
# PIP3 | |
sudo yum install python36 -y | |
python36 get-pip.py --user | |
# NTFS Support | |
sudo yum install ntfs-3g -y | |
# GCC 8.1.0 | |
wget https://ftp.gnu.org/gnu/gcc/gcc-8.1.0/gcc-8.1.0.tar.gz | |
sudo yum install gcc gcc-c++ libmpc-devel mpfr-devel gmp-devel zlib-devel libgcc libgcc.i686 glibc-devel glibc-devel.i686 -y | |
#tar xvzf gcc-8.1.0.tar.gz | |
#./configure --with-system-zlib --enable-multilib --enable-languages=c,c++ | |
#make -j 8 | |
#sudo make install | |
# Iron x64 browser | |
sudo yum install libXScrnSaver -y | |
wget http://www.srware.net/downloads/iron-linux-64.tar.gz | |
tar -xvzf iron-linux-64.tar.gz --directory=/opt | |
#sudo chown root:root /opt/iron-linux-64/chrome-sandbox | |
#sudo chown root:root /opt/iron-linux-64/chrome-wrapper | |
#sudo chmod 4755 /opt/iron-linux-64/chrome-sandbox | |
#sudo chmod 4755 /opt/iron-linux-64/chrome-wrapper | |
#/opt/iron-linux-64/chrome-wrapper | |
#chmod 400 /home/${USER}/.config/chromium/Default/History\ Provider\ Cache | |
#chmod 400 /home/${USER}/.config/chromium/Default/History | |
#chmod 400 /home/${USER}/.config/chromium/Default/History-journal | |
#note 06/2020: --test-type might have been deprecated and causes issues 'Couldn't sign you in. This browser or app may not be secure.' | |
git clone git@github.com:luckylittle/google-chromium-favourite-extensions.git | |
#Exec=/opt/iron-linux-64/chrome-wrapper %U --ignore-certificate-errors --test-type --password-store=basic --disk-cache-size=100 --ppapi-flash-path=/usr/lib/adobe-flashplugin/libpepflashplayer.so --ppapi-flash-version=30.0.0.113 --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36" | |
#Also edit /home/${USER}/.local/share/applications/chromium-devel.desktop | |
# Update | |
sudo yum update -y | |
#sudo yum install wget -y | |
# HashiCorp - all opensource products | |
sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo | |
sudo yum install boundary packer vault terraform waypoint nomad consul vagrant -y | |
# Double Commander | |
sudo wget https://download.opensuse.org/repositories/home:Alexx2000/CentOS_7/home:Alexx2000.repo -O /etc/yum.repos.d/home_Alexx2000.repo | |
sudo yum install doublecmd-gtk -y | |
# RHEL8 libunrar | |
sudo dnf install http://li.nux.ro/download/nux/dextop/el7/x86_64/libunrar-5.0.12-2.el7.nux.x86_64.rpm | |
# GoLang | |
wget https://dl.google.com/go/go1.10.2.linux-amd64.tar.gz | |
sudo tar -C /usr/local -xvzf go1.10.2.linux-amd64.tar.gz | |
echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee --append /etc/profile | |
# BleachBit | |
wget https://download.bleachbit.org/bleachbit-2.0-1.1.centos7.noarch.rpm | |
# Calibre | |
sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin | |
# CopyQ | |
#wget https://github.com/hluk/CopyQ/releases/download/v3.4.0/copyq_3.4.0_Fedora_27.x86_64.rpm | |
sudo dnf install https://github.com/luckylittle/CopyQ-for-RHEL8/releases/download/v6.2.0/CopyQ-6.2.0-1.el8.x86_64.rpm | |
# KeePassXC | |
sudo wget https://copr.fedorainfracloud.org/coprs/bugzy/keepassxc/repo/epel-7/bugzy-keepassxc-epel-7.repo -O /etc/yum.repos.d/bugzy-keepassxc-epel-7.repo | |
sudo yum install keepassxc libgpg-error -y | |
# MKVToolNix | |
sudo rpm -Uhv https://mkvtoolnix.download/centos/bunkus-org-repo-2-3.noarch.rpm | |
sudo yum install mkvtoolnix -y | |
# Slack | |
wget https://downloads.slack-edge.com/linux_releases/slack-3.2.0.beta25a7a50e-0.1.fc21.x86_64.rpm | |
# MS Skype | |
wget https://repo.skype.com/latest/skypeforlinux-64.rpm | |
# VLC | |
sudo yum install vlc -y | |
# VeraCrypt | |
wget https://launchpad.net/veracrypt/trunk/1.22/+download/veracrypt-1.22-setup.tar.bz2 | |
#./veracrypt-1.22-setup-gui-x64 | |
# MS VSCode | |
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' | |
yum check-update | |
sudo yum install code -y | |
# Oracle VirtualBox | |
sudo wget https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo -O /etc/yum.repos.d/virtualbox.repo | |
sudo yum install VirtualBox-5.2 kernel-devel gcc make perl -y | |
# RHEL8: sudo yum install kernel-devel elfutils-libelf-devel -y | |
wget https://download.virtualbox.org/virtualbox/5.2.12/Oracle_VM_VirtualBox_Extension_Pack-5.2.12.vbox-extpack | |
sudo /sbin/vboxconfig | |
sudo usermod -G vboxusers -a <username> | |
# When using Bridge mode with WiFi, promiscuous mode must be disabled and MAC address of the VM must match MAC of the WiFi adapter | |
# Vagrant setup | |
vagrant plugin install vagrant-vbguest | |
vagrant plugin install vagrant-sshfs | |
mkdir ~/Projects/vagrant-centos7;cd ~/Projects/vagrant-centos7 | |
vagrant init centos/7 | |
vagrant up | |
# Git 2 | |
wget https://github.com/git/git/archive/v2.17.1.tar.gz -O ~/Downloads/git-2.17.1.tar.gz | |
sudo yum install autoconf zlib-devel curl-devel -y | |
#make configure | |
#./configure --prefix=/usr | |
#make | |
#sudo make install | |
# ZSH | |
wget https://sourceforge.net/projects/zsh/files/zsh/5.5.1/zsh-5.5.1.tar.gz/download -O ~/Downloads/zsh-5.5.1.tar.gz | |
sudo yum install ncurses-devel -y | |
#./configure | |
#make | |
#make install | |
# Oh-My-ZSH | |
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" | |
# My list of plugins: aws cp docker docker-compose docker-machine firewalld git gnu-utils go helm kubectl man oc pip python sudo terraform vagrant virtualenv yum | |
# Fix the font issue with agnoster theme: | |
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf | |
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf | |
mv PowerlineSymbols.otf ~/.local/share/fonts/ | |
fc-cache -vf ~/.local/share/fonts/ | |
mkdir -p ~/.config/fontconfig/conf.d/ | |
mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/ | |
echo 'RPROMPT="[%D{%F}|%D{%R}]"' >> ~/.oh-my-zsh/themes/agnoster.zsh-theme | |
sed -i 's|%{%F{red}%}✘|%{%F{red}%}Err:$RETVAL|' ~/.oh-my-zsh/themes/agnoster.zsh-theme | |
# Sigil-Ebook | |
#https://github.com/Sigil-Ebook/Sigil/blob/master/docs/Building_on_older_Linux.md | |
wget https://github.com/Sigil-Ebook/Sigil/archive/0.9.9.tar.gz -O ~/Downloads/sigil-0.9.9.tar.gz | |
wget https://download.qt.io/archive/qt/5.5/5.5.1/qt-opensource-linux-x64-5.5.1.run | |
chmod +x qt-opensource-linux-x64-5.5.1.run | |
./qt-opensource-linux-x64-5.5.1.run | |
sudo yum install python36-tkinter mesa-libGL-devel python-devel python36-devel -y | |
pip3 install lxml six pyqt5 html5lib regex Pillow cssselect cssutils chardet --user | |
#cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH=/opt/Qt5.5.1/5.5/gcc_64/lib/cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python36 -DPYTHON_LIBRARY=/usr/lib64 -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m ../sigil-src | |
#make -j4 | |
#sudo make install | |
# XnViewMP | |
wget https://download.xnview.com/XnViewMP-linux-x64.tgz | |
tar xvzf XnViewMP-linux-64.tgz | |
sudo cp -r XnView /opt | |
cd /usr/lib64 | |
sudo ln -s libbz2.so.1.0.6 libbz2.so.1.0 | |
sudo rm /opt/XnView/lib/libcrypto.so | |
sudo rm /opt/XnView/lib/libcrypto.so.1.1 | |
cp -v /opt/XnView/XnView.desktop ~/Desktop | |
# PDF Sam | |
wget https://github.com/torakiki/pdfsam/releases/download/v3.3.5/pdfsam-3.3.5-bin.zip | |
# Remove OpenJDK | |
sudo yum remove java\* -y | |
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.rpm -O jdk-8u171-linux-x64.rpm | |
#sudo rpm -Uvh jdk-8u171-linux-x64.rpm | |
#java -version | |
# TigerVNC Viewer | |
wget https://github.com/TigerVNC/tigervnc/archive/v1.8.0.tar.gz -O ~/Downloads/tigervnc-1.8.0.tar.gz | |
# Apache OpenOffice | |
wget https://sourceforge.net/projects/openofficeorg.mirror/files/4.1.5/binaries/en-GB/Apache_OpenOffice_4.1.5_Linux_x86-64_install-rpm_en-GB.tar.gz/download -O Apache_OpenOffice_4.1.5_Linux_x86-64_install-rpm_en-GB.tar.gz | |
# GNOME Shell integration with Chrome | |
wget https://gitlab.gnome.org/GNOME/chrome-gnome-shell/-/archive/master/chrome-gnome-shell-master.tar.gz | |
# GNOME Shell Extensions 3.29.2-real | |
#https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/archive/3.29.2-real/gnome-shell-extensions-3.29.2-real.tar.gz | |
wget https://cmake.org/files/v3.11/cmake-3.11.3-Linux-x86_64.sh | |
chmod +x cmake-3.11.3-Linux-x86_64.sh | |
sudo ./cmake-3.11.3-Linux-x86_64.sh --prefix=/usr | |
#mkdir build;cd build | |
#cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_EXTENSION=OFF ../ | |
#sudo make install | |
git clone git@github.com:luckylittle/gnome-shell-favourite-extensions.git | |
# RHEL8: | |
wget https://kojipkgs.fedoraproject.org//vol/fedora_koji_archive02/packages/chrome-gnome-shell/10.1/1.fc28/x86_64/chrome-gnome-shell-10.1-1.fc28.x86_64.rpm | |
wget https://kojipkgs.fedoraproject.org//vol/fedora_koji_archive02/packages/gnome-icon-theme/3.12.0/9.fc28/noarch/gnome-icon-theme-3.12.0-9.fc28.noarch.rpm | |
dnf install gnome-shell-extension-desktop-icons | |
# FileZilla | |
wget https://dl1.cdn.filezilla-project.org/client/FileZilla_3.63.1_x86_64-linux-gnu.tar.bz2 | |
# to disable update checker: | |
# echo "127.0.0.1 update.filezilla-project.org" | sudo tee -a /etc/hosts | |
# YouTube-DL | |
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl | |
sudo chmod a+rx /usr/local/bin/youtube-dl | |
# GMVault | |
#https://github.com/gaubert/gmvault/issues/245 <-- READ! | |
wget https://github.com/gaubert/gmvault/archive/gmv-1.9.2.zip -O ~/Downloads/gmvault-1.9.2.zip | |
#python setup.py install --user | |
# Unzip, untar, RPM... | |
# for i in ls *.zip do; unzip $i; done | |
# for y in ls *.tar.gz do; tar xvzf $y; done | |
# for x in ls *.rpm do; sudo yum localinstall $x -y; done | |
# for z in ls *.bz2 do; tar jxvf $z; done | |
# Import GPG | |
gpg --import Lucian_Maly.gpg | |
git config --global user.email "<<REMOVED>>" | |
git config --global user.name "Lucian Maly" | |
git config --global gpg.program gpg | |
git config --global commit.gpgsign true | |
echo 'export GPG_TTY=$(tty)' >> ~/.zshrc | |
# VirtualBox Windows 8.1 Trial for Developers | |
wget https://az792536.vo.msecnd.net/vms/VMBuild_20180102/VirtualBox/IE11/IE11.Win81.VirtualBox.zip | |
# Docker v18.03.1.ce-1.el7.centos | |
sudo yum install yum-utils device-mapper-persistent-data lvm2 -y | |
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo | |
sudo yum install docker-ce -y | |
sudo usermod -aG docker lmaly | |
sudo systemctl start docker | |
# easyTag | |
sudo yum install easytag -y | |
# on RHEL8: https://kojipkgs.fedoraproject.org//packages/easytag/2.4.3/1.el7/x86_64/easytag-2.4.3-1.el7.x86_64.rpm | |
# libmp3splt & mp3splt on RHEL8 (based on Fedora 28, upstream Linux kernel 4.18, systemd 239, and GNOME 3.28) | |
wget http://download1.rpmfusion.org/free/fedora/releases/29/Everything/x86_64/os/Packages/l/libmp3splt-0.9.2-5.fc29.x86_64.rpm | |
wget http://download1.rpmfusion.org/free/fedora/releases/29/Everything/x86_64/os/Packages/m/mp3splt-2.6.2-5.fc29.x86_64.rpm | |
sudo yum localinstall libmp3splt-0.9.2-5.fc29.x86_64.rpm mp3splt-2.6.2-5.fc29.x86_64.rpm | |
# Stop and disable SSHD, RSysLogD & SysStat, they are usually not required on the laptop | |
sudo systemctl disable sshd | |
sudo systemctl stop sshd | |
sudo systemctl disable rsyslog | |
sudo systemctl stop rsyslog | |
sudo systemctl disable sysstat | |
sudo systemctl stop sysstat | |
sudo systemctl disable sysstat-collect.timer | |
sudo systemctl stop sysstat-collect.timer | |
sudo systemctl disable sysstat-summary.timer | |
sudo systemctl stop sysstat-summary.timer | |
sudo sed -i 's|#SystemMaxUse=|SystemMaxUse=100M|g' /etc/systemd/journald.conf | |
sudo bash -c 'echo "logfilelevel=0" >> /etc/dnf/dnf.conf' | |
sudo rm -rvf /var/log/sa/* | |
sudo find . -name '*.log' -type f -exec sudo bash -c 'cat /dev/null > {}' \; | |
# Relabel SELinux & start FSCK on next reboot | |
#sudo touch /forcefsck /.autorelabel | |
# Beep has been removed from RHEL, but it is very useful to indicate finished command. I use 5s speaker-test instead: | |
# https://bigsoundbank.com/detail-0089-electronic-alarm-buzzer-2.html | |
wget -O /tmp/Beep.b64 https://gist.githubusercontent.com/luckylittle/5b1bea100d020e660e6898f348b256d4/raw/255352cc6321b477503e54b5a1b7ecaafa810de8/Beep.b64 | |
cat /tmp/Beep.b64 | base64 -d | sudo tee /usr/share/sounds/alsa/Beep.wav | |
rm -rf /tmp/Beep.b64 | |
alias beep='speaker-test -l 1 -t wav -w Beep.wav' |
I found a pretty good .tmux.conf
today:
https://raw.githubusercontent.com/gpakosz/.tmux/master/.tmux.conf
https://raw.githubusercontent.com/gpakosz/.tmux/master/.tmux.conf.local
Sat Nov 20 08:25:13 UTC 2021
Created link that redirects here: https://red.ht/centos7
Sun Nov 21 01:57:25 UTC 2021
Installed apps on Red Hat Enterprise Linux release 8.4 (Ootpa), 5.9.14-1.el8.elrepo.x86_64 #1 SMP Thu Dec 10 18:33:25 EST 2020 x86_64 x86_64 x86_64 GNU/Linux
Desktop:
- DoubleCmd
- Terminal
- Iron
- Chrome
- FileZilla
- VS Code
- Slack
- KeePassXC
- CopyQ
- VLC
- Remmina
- PDF Sam
- XnView
- Spotify
- Oracle VirtualBox
- Calibre
- MKVToolNix GUI
- VeraCrypt
- Transmission
- Windows10Ent shortcut for VirtualBox
- 4x SSH Terminal (PF,m,L,R)
- sleep.sh
- Trash
Applications:
- Accessories
- Calculator
- Clocks
- CopyQ
- Double Commander
- Files
- KeePassXC
- Text Editor
- Tweaks
- VeraCrypt
- Visual Studio Code
- Internet
- FileZilla
- Firefox
- Google Chrome
- Iron
- Remmina
- Slack
- Transmission
- Office
- Calibre
- Programming
- Visual Studio Code
- Sound & Video
- EasyTAG
- MKVToolNix GUI
- Spotify
- VLC media player
- System Tools
- Oracle VM VirtualBox
- Settings
- Software
- Terminal
- Utilities
- Archive Manager
- Characters
- Disks
- Disk Usage Analyzer
- Document Viewer
- Fonts
- Help
- Image Viewer
- Logs
- Screenshot
- System Monitor
Double Commander changes due to gnome-terminal
:
- Change
xterm
in Configuration -> Terminal to/usr/bin/gnome-terminal --command {command}
- Change
*.srr
File Association in Configuration to Command:!{SHELL}
and parameters to"/usr/bin/python /home/lmaly/.local/bin/srr.py %D/%f -i %D -o %D"
If screen sharing does not work in Wayland, going to chrome://flags/#enable-webrtc-pipewire-capturer and enabling WebRTC PipeWire support should fix it.
To remove annoying GNOME Keyring popup when starting Chrome/Chromium in user autologin scenario, delete these two files before starting Chrome/Chromium for the first time:
rm -f /home/lmaly/.local/share/keyrings/login.keyring
rm -f /home/lmaly/.local/share/keyrings/user.keystore
Permanently show hidden files in Nautilus:
gsettings set org.gnome.nautilus.preferences show-hidden-files true
To disable auto-commenting in
vi
/vim
:echo 'autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o' >> ~/.vimrc