Pages

11 Nov 2016

CentOS 7 Desktop Build

Tutorial: Setup CentOS 7 as an everyday desktop

You can use CentOS 7 as an everyday desktop not just a server. This guide is aimed at building a minimalistic bare essentials build for home office / business users.

Install OS:
  • Download the latest CentOS 7 minimal ISO and burn to CD / USB Stick
  • Boot up your machine and choose to Install CentOS 7
  • Go through the wizard
  • The only options to look at would be the partition, machine name and username password. (click on vid for some guidance)

Additional Repo breakdown

Fast track bug, ver and security updates by enabling
vi /etc/yum.repos.d/CentOS-fasttrack.repo
enabled=1


Add Google chrome
vi /etc/yum.repos.d/google-chrome.repo
[google-chrome]
name=google-chrome
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


Add additional Driver support
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm

Add enterprise Linux and nux repos
yum -y install centos-release-scl epel-release && rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

(Optional) Server side packages:
Virtualisation SIG
yum install centos-release-qemu-ev.noarch

Application Install and desktop configuration
yum groupinstall "Base" -y
yum groupinstall "X Window System" -y
yum install gnome-classic-session gnome-terminal nautilus-open-terminal control-center liberation-mono-fonts cups gnome-calculator evince eog gedit firefox google-chrome-stable NetworkManager networkmanager-wifi ntfs-3g gnome-tweak-tool bash-completion bash-completion-extras -y


(Optional apps - Everyday useful apps)
yum groupinstall "Office Suite and Productivity" -y
yum install audacity gimp handbrake -y

Multimedia Support
yum install totem gstreamer1-plugins-base gstreamer1-plugins-base-devel gstreamer1-devel gstreamer1-plugins-good gstreamer-plugin-crystalhd  gstreamer1-plugins-bad-free gstreamer1-plugins-bad-free-devel gstreamer1-libav gstreamer1-vaapi gstreamer1-vaapi-devel gstreamer-plugins-base-tools gstreamer-tools.x86_64 PackageKit-gstreamer-plugin dirac flac libtheora libvorbis libvpx wavpack libv4l gavl libbluray libdv libmpcdec compat-libstdc++-33 gstreamer gstreamer-plugins-bad-free gstreamer-plugins-bad-free-devel gstreamer-plugins-base gstreamer-plugins-base-devel gstreamer-plugins-good gstreamer-python gstreamer-python-devel compat-libstdc++-33 gstreamer1-plugins-bad-free-extras gstreamer1-plugins-bad-freeworld gstreamer1-plugins-base-tools gstreamer1-plugins-good-extras gstreamer1-plugins-ugly gstreamer1 gstreamer-plugins-ugly gstreamer-ffmpeg -y

Turn off GNOME animations
yum install dconf-editor -y

(Optional) VPN Cisco Anyconnect
yum install openconnect pangox-compat -y

(Optional) Virtualisation
yum groupinstall 'Virtualization Hypervisor' -y
yum install virt-manager, qemu libguestfs-bash-completion -y

(Optional - wanting to add to your Win Domain environment)
yum install sssd realmd ntp -y


Configure and add machine to your DC, below is an example
++++++++++++++++++++++++++++++++++++++++++++++++++++
realm join group.company.eu -U adminaccount

vi /etc/sudoers
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
adminaccount@group.company.eu    ALL=(ALL)       ALL
group.dxi.eu\Domain_Admins     ALL=(ALL)       ALL

vi /etc/ntp.conf
server ntp1.int.company-ntpserver.eu
server ntp2.int.company-ntpserver.eu
server ntp3.int.compant-ntpserver.eu

++++++++++++++++++++++++++++++++++++++++++++++++++++

If you want to boot straight into Desktop GUI
unlink /etc/systemd/system/default.target
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target


Notes: When trying to enable"Global Dark Theme" causing the following error:
"Error writing setting", to fix:
1. cd ~/.config
2. mkdir gtk-3.0
3. cd gtk-3.0/
4. touch settings.ini
5. Log out
6. Log back in


13 Feb 2016

Setup a Bridged Network on Linux using Network Manager (Fedora, CentOS7, RHEL7)

Tutorial-Linux-Networking

NetworkManager has many benefits especially with WiFi compatibility, virtualisation and it's found by default on many Linux distros.

You may find when attempting to setup Bridging libvirt setups fail; suggested solution is to disable NetworkManager and use the classic network initscripts. However there is a work around for the bug.

Quick Ref Guide:
  1. Remove existing wired Network
  2. Add a new bridge connection
  3. Ensure bridge is set to connect automatically
  4. Add bridged-slave connections
  5. Set bridged-slave connection to auto
  6. Check bridged-slave interface MAC Address is your physical network (the one you removed)
  7. Activate the connection
CLI Guide

1. Make sure bridge module is loaded
modprobe --first-time bridge
modprobe: ERROR: could not insert 'bridge': Module already in kernel
2. Grab the name of your interface(s) and delete existing network(s)
nmcli con show 
nmcli con del 'Your interface'
(can use filter options, i.e view all active connections only, use nmcli --fields ACTIVE, NAME, UUID, TYPE, DEVICE, STATE c show)

3. Create Bridged network
nmcli con add type bridge ifname br0
(leaving the name blank after 'ifname' will default to default to bridge, bridge-1, bridge-2, and so on)

4. (Optional steps) Disable SFTP, Delay directive
nmcli con modify bridge-br0 bridge.stp no
vi /etc/sysconfig/network-scripts/ifcfg-bridge-br0 add line Delay=0
5. Create bridged-slave connection under current master bridge.
nmcli con add type bridge-slave ifname 'your interface name' master bridge-br0 
(you can grab the interface name ip a, this will be your physical interface)

6. Activate the bridge connection
ifup bridge-br0 bridge-slave-en0 or restart all your existing network interface(s) systemctl restart network
Notes
The above can be accomplished using NetworkManager Text User Interface by issuing nmtui. 

You can always go back and modify your network by issuing nmcli connection edit bridge-br0 which brings you to the interactive mode.

Useful definitions

  • ifname = The name of the interface to the bridge.
  • Aging time = The time, in seconds, a MAC address is kept in the MAC address forwarding database.
  • STP (Spanning Tree Protocol)
  • Priority = The bridge priority; the bridge with the lowest priority will be elected as the root bridge.
  • Forward delay = The time, in seconds, spent in both the Listening and Learning states before entering the
  • Forwarding state = The default is 15 seconds.
  • Hello time = The time interval, in seconds, between sending configuration information in bridge protocol
  • data units (BPDU).
  • Max age = The maximum time, in seconds, to store the configuration information from BPDUs. This
  • value should be twice the Hello Time plus 1 but less than twice the Forwarding delay minus

For more about Linux bridge network setups click here