Setup CentOS 7 / Fedora

Technical Level: Beginner

Useful quick reference for getting a viable Fedora or CentOS 7 setup.

In all cases these steps should be run as root:

sudo -s

Starting with FC23 Yum has upgraded to Dandified Yum aka DNF. Since this guide is for either CentOS 7 or FC23... if you just run:

alias yum=dnf

It when running in Fedora, it should remove the constant warnings.

add yourself to the wheel (so you can sudo -s)

usermod -a -G wheel youruser

change sudo rules to no password required, if you want, on wheel

  • run visudo
  • search for %wheel
  • comment current rule
  • uncomment the one with NOPASSWD

EPEL (CentOS ONLY)

yum -y install epel-release
rpm -i http://mirrors.rit.edu/fedora/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

Disable GUI (optional)

systemctl set-default multi-user.target

Enable GUI (once you want it back)

systemctl set-default graphical.target

Setup Cinnamon Desktop (more conventional than GNOME3) -- Fedora23 ONLY

yum -y groupinstall "Cinnamon Desktop"

basic things

yum -y install gcc vim-enhanced rdesktop screen openvpn maven git strace ntp

Fedora 26:

dnf install redhat-rpm-config python3-devel
dnf group install "C Development Tools and Libraries"

optional but fun things

yum -y install thunderbird inkscape scribus blender darktable rhythmbox

setup time to handle VM time skew (ONLY IF IN VM)

sed -i '1itinker panic 0' /etc/ntp.conf

disable SELinux (optional)

setenforce 0 # live
sed -i -e 's/SELINUX=.*/SELINUX=disabled/' /etc/selinux/config

disabling packagekitd stops the auto-updating

sudo systemctl disable packagekitd
yum erase PackageKit

alternatively

gsettings set org.gnome.software download-updates false

give screen more scrollback

sed -ie 's/^defscrollback\ .*$/defscrollback 5000\nscrollback 5000/' /etc/screenrc

setup VIM

echo set tabstop=4 >> /etc/vimrc
echo syntax on >> /etc/vimrc
echo set comments= >> /etc/vimrc
echo colo elflord >> /etc/vimrc # optional

pull Google Chrome Repo

firefox http://www.google.com/chrome/
yum -y install ./Downloads/chrome-*.rpm

rpmfusion gives good stuff - Fedora ONLY

rpm -i http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-21.noarch.rpm
rpm -i http://download1.rpmfusion.org/free/fedora/rpmfusion-nonfree-release-21.noarch.rpm

If you have an NVidia GPU, install the nvidia akmod

yum install akmod-nvidia

Install Sun/Oracle Java. Select 64bit RPM

firefox http://java.sun.com/
rpm -i {file}.rpm

setup java alternatives

alternatives --install /usr/bin/java java /usr/java/latest/bin/java 200000
alternatives --install /usr/bin/javaws javaws /usr/java/latest/bin/javaws 200000

Java Browser (Mozilla) Plugin 64-bit

alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/latest/lib/amd64/libnpjp2.so 200000

verify it is selected properly for each one

(sometimes openjdk remains primary)

alternatives --config java
alternatives --config javaws
alternatives --config libjavaplugin.so.x86_64

Dealing with Hi DPI screens

yum -y install gnome-tweak-tool
gsettings set org.gnome.desktop.interface scaling-factor 2
gsettings set org.cinnamon.desktop.interface scaling-factor 2

Firefox: do about:config and set layout.css.devPixelsPerPx to something higher (1.7 or 2)

Thunderbird: Menu->Preferences->Advanced->Config Editor; then the same as Firefox.