First published: 2016-03-31. Last updated: 2016-10-12

Install

Configure users, groups and sudo

Remember to use visudo instead of directly editing the sudoers files.

# visudo

Verify

$ sudo -l

Use groupadd to add groups. Use useradd to add users. Use passwd to unlock users by setting their account passwords.

Update system

Clean dnf cache, upgrade system and reboot

$ sudo dnf -y clean all ; sudo dnf -y upgrade
$ sudo systemctl reboot

Configure shell history

You may not need this. Check your shell’s documentation

In your user shell configuration files, set the environment variables related to shell history: HISTFILE, HISTSIZE

As fallback, add to /etc/profile too

# File path may be different
export HISTFILE=~/.bash_history

Install RPM Fusion

Install RPM Fusion.

sudo dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

Firewall configuration

I configure services but keep them globally disabled, and then selectively enable them with rich rules. When editing the rich rules, using a MAC address as source doesn’t work when the source has its MAC address spoofed. I haven’t tested with the source with real hardware MAC address. Using a IP in source works OK.

Local email with postfix and mailx

Install postfix and mailx

$ sudo dnf -y install postfix mailx

Edit /etc/postfix/main.cf:

myhostname = localhost
mydomain = localdomain
myorigin = $myhostname
inet_interfaces = localhost
inet_protocols = all
mynetworks_style = host

Enable and start service

$ sudo systemctl enable postfix.service
$ sudo systemctl start postfix.service

Verify

$ sudo systemctl status --full postfix.service
<...>
$ netstat -lt | grep smtp
<...>

Configure postfix mta

$ sudo alternatives --config mta
<Choose sendmail.postfix in dialog/menu>

Test, opening with email client after sending it.

$ echo 'Test email body' | mail -s 'Test email subject' $(whoami)@localhost

Send root email to other user

Edit /etc/aliases

root:   <your username>

Run

$ sudo newaliases
$ sudo postfix reload
$ sudo systemctl restart postfix.service

Test, opening with email client after sending it (as root).

echo 'Test email body' | mail -s 'Test email subject' $(whoami)@localhost

Mail from cron jobs

After setting up local email in your system, restart the cron service so jobs start sending email notifications if they’re configured to do so

$ sudo systemctl restart crond.service

systemd targets

systemd’s targets serve similar purposes as traditional SysV runlevels.

List targets

$ systemctl list-units --type=target

This table roughly maps systemd targets to SysV runlevels. SysV runlevel 3 ~= multiuser.target and SysV runlevel 5 ~= graphical.target.

The default target is graphical.target, so the machine boots into a multi-user graphical system.

$ file /etc/systemd/system/default.target
/etc/systemd/system/default.target: symbolic link to /lib/systemd/system/graphical.target

For example, to make the machine boot into a non-graphical multi-user system, run below command and reboot

$ sudo systemctl set-default multi-user.target
Removed symlink /etc/systemd/system/default.target.
Created symlink from /etc/systemd/system/default.target to /usr/lib/systemd/system/multi-user.target.

Media

Image and photos

$ sudo dnf -y install digikam gimp geeqie ristretto perl-Image-ExifTool

Audio/video playback

$ sudo dnf -y install quodlibet gstreamer1-plugins-ugly mplayer vlc

Audio/video processing

$ sudo dnf -y install ffmpeg

Jekyll

$ sudo dnf -y install ruby-devel redhat-rpm-config
$ sudo dnf -y groupinstall "C Development Tools and Libraries"
$ gem install jekyll 'jekyll-gist'

Other software

$ sudo dnf -y install libreoffice-calc libreoffice-writer libreoffice-impress

References