After fresh GNU/Linux install

I don't like to keep using an OS installation for a long time (usually more than 6 months) because I loose track of my unused files and most of the software and the OS its self have usually been updated in that time period. Besides, installing the OS again and installing all the necessary programs again is like a new home refurninshing which makes your productivity bloom and helps you get rid of all those extra programs you installed and are not using any more, even if no significant updates are made the OS or your softwares. It also helps you be more safe and mobile: Create timely backups of your files and be ready to move to a new computer (I mean the hardware!).

One obstacle has always been finding and installing all the programs that you are frequently using. This webpage is a short summary of how to install all the programs I use most often on my Scientific Linux. Each program has its very own documentation and complete installation method but going through all those pages after each new OS install is too frustraiting and time consuming. So I have created this list to put the most important aspects of installing each program. Since it took me several cycles of re-installs to make this list and I can't find something like it on the internet I am putting it here for others to use too and make life easier for them ;-). Using this list, the time it takes from begining to install a new linux to the moment I am ready to go back to my ordinary computer life is about 3 hours! The procedures explained bellow can be used on all RHEL based linux OSs, e.g., Fedora, Red Hat and Scientific Linux

Scientific Linux is a special compilation of the Red Hat Enterprise Linux, Linux Operating System produced by Fermi and CERN. I personally find it much more interesting than all other distributions of Linux. The thing that really attracts me is that it is much less contaminated with extra pre-installed applications and that it's use of the CPU for my particular applications is much more efficient than the other distributions I have tried for my purposes: Fedora and Ubuntu. So let's get on with the list....

Notice:
I have written these notes primarily for myself and this page surves me as a notebook for my personal software installs. I am only sharing this to help other people who are taking the same steps as me and, like me, are not a linux professional. I therefore cannot guarantee that these steps will work on your system or that they will not cause any data, software or hardware loss and damage. So please follow these steps with your own responsibility. I can just say that everything that is listed here was tested on my own Scientific Linux and has worked without any problem and that I regularly re-check and update this page every time I install a new Scientific Linux. In any case don't forget to take a backup of all your data and software before installing a new OS (in this case Scientific Linux)

Notice II:
Until Scientific Linux 7 comes out, I have recently moved to CentOS 7, which uses GNOME 3.

RHEL 7 documentation
In case you want to understand RedHat Enterprise linux based operating systems (like Scientific Linux or CentOS) most fully is its own documentation webpage is the place to go. I strongly advise you to have a look through these even if you don't understand anything. At least you will get familiar with the keywords. If you have time to go though and read them (the ones that are relevant to your work) accurately, that would be very helpful.

Writing the .iso file to a DVD:
The best way to write the .iso file you download is the command line. As root, you can use this command:
     $ su
     # growisofs -dvd-compat -Z /dev/dvd=YOURISOFILE.iso

Notes to consider during (before) installation:

  1. Set your /home directory in a separate partition during installation. Doing this will really help you in your future OS updates. Since nearly most (if not all) of your personal settings will remain unchanged after a new installation. If you had done this in your old OS, set the mounting point of that partition to /home but choose not to format it. After the installation is finished, set your user name to be the same as it was in your old system. Then it will ask to change the permissions of all the files in "/home" to be accessible to the new user.
  2. while you are installing your new Linux, choose not to install the applications bellow (except firefox!).

GNOME 3
In case you were use to GNOME 2 in your previous experiences with GNU/Linux, moving to GNOME 3 can be very hard. There are lots of things that have changed and will definitely make life much harder for you at first! Fortunately RedHat has made this nice Desktop migration guide to make life easier for such people (like me at first!). Here are some of the things I liked to change:

  1. By default the GNOME classic session is used when you install a new RHEL 7 based opertaing system. If you want the actual GNOME 3 session, on the log-in screen, click the settings sign and choose GNOME. Only once is enough, the next time you log-in, your choice will be remembered.
  2. One annoying thing with GNOME 3 (not the classic style) is that when you click on an application in the "dash" and another instance of that application is open in another workspace, it will go there instead of opening a new one in the workspace you are using. To fix this, Follow these steps: "Tweak Tool" --> "Shell Extensions" --> Turn "Launch new instance" on.
  3. To be able to customize a lot of the GNOME 3 settings, you will need the dconf-editor. You can get it with yum install dconf-editor. After a fresh OS install, it is nice to go through these options and configure the parameters as you like. But make your decisions wisely because you might forget what you changed. An easier configuration method is the "Tweak tool" application.

Nautilus not in browser mode:
If Nautilus (your file manager) is just a box (spatial view) go to "edit", then select "preferences" and in "behavior" choose "Always open in browser windows".

Internet connection:
If the internet connection doesn't get connected automatically:

  1. Right click on the computers showing the connection, click "Edit Connections..."
  2. Select "System eth0", then click on "Edit" and choose the box that says "Connect Automatically".

Changing your hostname
If you haven't set your hostname during the installation, the hostname of your computer will be localhost. I personally, like to have a name for the computer, so when I am on the terminal, the prompt displays my login ID and my computer name.

  1. You have to be root, so in the terminal, run su.
  2. run gedit /etc/hostname
  3. Write any name you want for your computer and save the file.

Update make:
GNU make is the main tool to build all the packages you want to install from source. To remain up to date with the most recent programs, it is advisable to have the most recent version of make. If you want to check the version you currently have, you can run: $ make --version in your terminal emulator. Installing it is really easy: download the most recent version. Assuming it was downloaded in: DIR=/home/YOURID/Downloads/:
     $ cd /home/YOURID/Downloads/
     $ tar -xzf make-version.tar.gz
     $ cd make-version
     $ ./configure
     $ make
     $ su
     # make install

Adding repositories:
The default software repositories that get installed with Scientific Linux are usually not enough for the range of necessary software, so these two repositories can be helpful, type in the following commands as root:

  1. ELRepo:
         # rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org
         # rpm -Uvh http://elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm
  2. EPEL:
    Download the rpm from here and run it. After you install EPEL, if recurring errors, giving a 404 error come in your usage of yum, for example yum update, then run: yum clean metadata.

Installing NVIDIA cards:
With GNOME 3, it is very important that you have hardware support for OpenGL. The explanations here are very useful. I needed some small modifications on my computer, so here is a summary of the necessary steps.
To make sure that your OpenGL is working based on your hardware you can run this command:
     # glxinfo | grep renderer
If you see the name of your graphic card then you don't need to take the steps below. In case you are not sure of the name of your graphic card, you can run:
     # lspci | grep VGA
Note that this process involves restarting the computer, so read through it first completely. Go to the Nvidia drivers page and download the driver for your card in GNU/Linux (they just write Linux!). Don't forget the directory you downloaded this file to. Until you restart the computer, you can write these commands in a terminal emulator.
     $ su
     # yum groupinstall "Development Tools"
     # yum install kernel-devel kernel-headers dkms
     # gedit /etc/modprobe.d/blacklist.conf
Put blacklist nouveau in this file and save and exit gedit.
     # mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
     # dracut -v /boot/initramfs-$(uname -r).img $(uname -r)
Now you have to restart the computer. When your login page comes up (probably with a very degraded graphics), type Ctrl+Alt+F2 and run init 3. You will have to re-enter your user name and password. Then change to root, go to the folder with the Nvidia driver and run it by placing a ./ before its name. Read all the prompts and answer the questions and you are done. It is easier to allow the driver its self to update your X configuration. After it is finished, a restart should fix your graphics with the Nvidia driver. The Nvidia X server settings can be accessed in "Applications" --> "Other".
To make sure that OpenGL now knows of your graphic card, you can confirm with the first command in this topic. By the way, you can restart the computer on the command line with the # reboot command.

Keyboard layouts:
For changing the layout of your keyboard:

  1. Go to "System"-->"Preferences"-->"Keyboard". Add any layout you like.
  2. Click on "Layout Options"-->"Key(s) to change layout" and choose the keys you like to change between the layouts.

NTFS:
NTFS is not a native file system to Linux, so you have to install it separately if you want to share removable hard disks between a windows system and your Linux, installing it is easy, just run #yum install ntfs-3g as root. You need to have the EPEL repository installed for this command to work.

LaTeX:
LaTeX is an alternative to the WYSWYG (what you see is what you get, like Microsoft Office or Libre Office) method of document preparation. You write the mark up in the middle of the text. This gives you an extremely high level of freedom. The output (as a PDF file) is also, in my view at least, much more professional.
A complete install of LaTeX will take above 2Giga Bytes of your space, so it is only convenient when you have a large disk space and high speed connection to the internet. If so, it is best to just leave it working while doing the rest. If not, in the installation settings, you can select schemes that require less space. Download TeX live, unpack it and run ./install-tl as root in the directory, follow the instructions for a full install and it will download and install. Do not close the terminal after it is finished, you are going to need some of the information in the last lines.
After LaTeX installation:After the installation you have to add three paths to your environmental variables: PATH, MANPATH and INFOPATH. After the installation finishes, it tells you what addresses have to be added for these three variables. Go to your home directory and open .bashrc where your environmental variables are set:
     # cd ~
     # gedit .bashrc
You have to add these three lines in it. Just be careful that the ADDRESS is the same as that said after the installation for each variable:
     PATH=ADDRESS:$PATH
     MANPATH=ADDRESS:$MANPATH
     INFOPATH=ADDRESS:$INFOPATH
Save and quit gedit. Then you have to log out and log back in again so Linux boots with your new environment variables added.
Updating LaTeX:
You can update the packages or install new ones using tlmgr. Updates for LaTeX packages come nearly on a daily basis! Run tlmgr --help to guide you in the process.

Emacs:
Emacs is a professional text editor very suitable for programming, text markup (like LaTeX and HTML) and only plain text. I strongly suggest that you become fluent in it if you are using any of these tools. I do have to warn that the learning curve is very steep. If you are new to programming or document mark-up, you can ignore emacs for now and stick to gedit (the default editor). But when you gain a good level of proficiency in them, learning emacs will really simplify your life ;-).
You can install it from the repositories. If you want to install the latest version you will need the following packages. After installing them simply run $ configure --with-x-toolkit=no, $ make and $ make install in the downloaded file. You don't necessarily need all these packages, but you will have them if necessary.

  1. $ su
  2. $ yum install libgif-devel libungif-devel libtiff-devel libXpm-devel glib libjpeg-devel libpng-devel libtiff-devel ncurses-devel ImageMagick gpm dbus-devel gtk2-devel

Dropbox:
Dropbox is a very convenient service for syncing your files over several computers. If you don't already have an account, you can register here. To install Dropbox simply go to the webpage and download it (for Fedora if you are using RHEL or SL). Run the .rpm file and it will be added in "Applications/Internet" menu. By clicking on it it will guide you through the installation. But the main problem is the Dropbox repository address which will interfere with your yum installs and updates later, that you have to edit manually in the command line:

  1. $ su
  2. # gedit /etc/yum.repos.d/dropbox.repo
  3. look for the line that says: baseurl=http://linux.dropbox.com/fedora/$releasever/, comment it out (add # before the line). Add a new line with the following: baseurl=http://linux.dropbox.com/fedora/19/. Save it and close gedit.
  4. Increase the 20, save the file and run # yum update, if it works keep the increased value, if not, use 20. Dropbox is not always in line with the new Fedora releases!
Note that as Dropbox gets updated, it might re-write this file. So later on, in any yum session, if you see it complain about the same problem, you can fix it in the same manner.

Printer:
To install the printer follow these steps:

  1. Type "localhost:631/" in the browser.
  2. Go to the "Administration" tab and click "Add printer".
  3. Write "root" as user name and your root password as its password.
  4. Choose the "ipp" type.
  5. The connection should be: socket://IP:9100 for most printers. Needless to say that IP should be the IP address of your printer.
  6. You will need your printer's PPD file in most cases. The rest is easy and doesn't need explanations.

Adobe Flash
There is a very nice explanation Here. You can consider this as a fast summary:

  1. Download and run the YUM version from here. This will add a repository file in your /etc/yum.repos.d/ directory so that yum can recognize it.
  2. As root in the command line type:
    # yum install flash-plugin for 64bit systems or
    # yum install nspluginwrapper alsa-plugins-pulseaudio flash-plugin for 32bit ones.

Adobe PDF viewer
With a fresh linux install you get the Evince PDF viewer. But it is a very simple viewer, in case you want higher quality prints, especially on vector graphic generated plots, and more options, you can install the Adobe PDF viewer. I personally use LaTeX's pgfplots to draw my plots so all the line and font settings are the same as my text. It also forces me to keep the data that generate the plots beside the text. But the problem was that when I printed it with Evince, the plots would become blurry! Evince would also not show the full resolution (very close vertical lines would be connected). But both these problems were fixed with the adobe PDF viewer. I should caution though that it is a closed source software. If you are producing high quality plots, I strongly recommend it for their printing.
To install it, first you have to become root and install the appropriate Adobe repositories and then install it:
     # su
     # rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
     # rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
     # yum install nspluginwrapper.i686 AdobeReader_enu libxml2.so.2

This is only for the English language, in case you want another language you can check the list with yum list AdobeReader* before running the last command. Choose your desired language and change the AdobeReader_enu section of the last line. To run it, simply run acroread. The explanations here on how to install Adobe PDF reader are a summary of the explanations here.
There is one thing I miss in Evince though: Automatic reloading! Unfortunately Adobe PDF viewer doesn't support that! In order to reload your document you have to either choose "Reload" in the file menu or press Ctrl+R.

LibreOffice
The installation is very easy: Download a tar ball from here and unpack it. Go to the directory you unpacked it in and:
     # su
     # cd RPMS
     # yum install *.rpm
You are ready to go, easy wasn't it?
Very soon you will get a notification that a more recent version of LibreOffice is available. If you like to have both versions, it is possible: simply repeat the processes above for the new download. But that will cause your application menus to be bloated. To remove the old version you can use # yum remove libreofficeVERSIONNUMBER* For example if you had LibreOffice 4.1 but have also installed 4.2, you can simply run: # yum remove libreoffice4.1*. If you are not sure about the name of the old version, you can simply run: yum list installed and find the libreoffice package you want to uninstall in that list, then run the yum remove command.

Python 3, NumPy, SciPy and Matplotlib
Python 2.x is usually installed with your system but I use Python 3, since it is the future of Python, not the past ;-). So here is how to install it along with all the other necessary modules:

  1. Download the correct source files package and unpack it.
  2. Run # ./configure, # make and # make install in the unpacked folder.
  3. In order to install pip you will need setuptools. To install it, simply run the command below as root:
    # wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python3
  4. Pip is a very convenient package to install from, you can download from here and install it with:
         # python3 setup.py build
         # python3 setup.py install
  5. You are going to need the following packages:
    # yum install blas blas-devel lapack lapack-devel atlas atlas-devel python-devel
  6. Download NumPy and SciPy. Unpack them and in their unpacked directories run the build and install commands above. Just add a --fcompiler=gnu95 after the build command.
  7. Download Matplotlib (the .tar.gz) and follow the same steps above but without the flagged term (beginning with --). If they don't work, run chmod +x *.py in the directory first.
  8. Incase you are an astronomer, AstroPy (for working with FITS images) is necessary. But first you will need the Distribute package:
          # curl http://python-distribute.org/distribute_setup.py | python3
    Then download the source of AstroPy from the "Installing" section and install it same way you installed the above.
  9. To make your personal modules accessible to Python from everywhere, follow these steps:
         # cd ~ then # gedit .bashrc Add these two lines to the .bashrc file.
          PYTHONPATH="${PYTHONPATH}:THE ADDRESSES YOU WANT"
         export PYTHONPATH
  10. Log out then log in and your modules can be accessed from anywhere.

SSH and Screen:
SSH and Screen are two very useful methods for remote controlling your operations. With SSH you can login to your computer from any where and with screen you can see how a command is running remotely. So you can begin a command (after both SSH and Screen are activated) that takes a lot of time on your computer in your office, then go home and after a good dinner, see how the command is going. It is truely great. Another appication is that with screen you can log in to you office computer with your smartphone, tablet or computer on the street (or any where), set a command to run and then simply disconnect. The command will run on your computer and you can later check up on it. These two applications have been very useful for me and enabled me to travel across the Pacific with out a laptop, while being able to do all my work from my tablet and smartphone!
Enough of advertisement! You can set up these two by following these steps. First you have to install them (you will probably have the first two packages already!):
     # su
     # yum install openssh openssh-server screen
Then you have to set the sshd daemon only once until the next time you install your operating system (again, these two were probably done automatically by your system right after installation):
     # /sbin/chkconfig sshd on
     # /sbin/service sshd start
Note: In case you have changed your SSH host operating system your "host key" has changed and so you will need to edit the ~/.ssh/known_hosts/ file in your other system (not the one you just changed the operating system of). Open it with any text editor and remove all the line (It is a very long line of un-understandable letters and numbers intertwined!) that starts with your host (the one you just changed the operating system of) IP.

Reading your CPU status:
If you are an intensive CPU user then this program will really help you track your CPU temperature, fan speeds and everything else related:
     # su
     # yum install lm_sensors
     # sensors-detect
The last step is to set the program up with your particular system. It will ask a lot of questions! Answer "YES" to all of them and wait until it finishes. Once it is finished, you can get your information by running:
     # sensors

Static libraries
If you are writing programs and want to do a static linking between the libraries you are using, you should have the glibc-static package. You can read about the Advantages and disadvantages here:
     # yum install glibc-static

Background slideshow:
As root copy all the images you want into a directory in /usr/share/backgrounds/. Put a copy of /usr/share/backgrounds/default.xml in that folder, you can call it background-1.xml. This file is a very simple XML file (doesn't require any knowledge of XML). You will get a hold of how the file works by reading it. Modify it to your desire and save it. Then right click on the desktop background and click "Change Desktop Background" and choose that folder.
With the introduction of GNOME 3, you have to specify the XML file in the Gnome Tweak Tool. You can find it by searching "Tweak Tool" in the activities screen (when you move the mouse to the "hot corner"). Once it opens, in the Desktop tab, you can see a "Picture URI" option, where you can specify a file to set as background. Choose your XML file and your desktop will change. You can also make some other customizations here too.

Change Login screen background:
You can change the login screen background to one of the backgrounds you have chosen using the following procedures:
For the first time:

  1. You first have to find which of the images in /usr/share/backgrounds/ is the login background: it is one of the *_default.png images based on your resolution. Rename each, then go the lock screen to see if the background is removed. In my case it is 1920x1200_default.png, you can rename it to 1920x1200_default_backup.png
  2. Using GIMP, save the image you want as 1920x1200_default.png
  3. As root, move it to /usr/share/backgrounds

 

Comments and suggestions
If you find any problems in these procedures or feel I have not mentioned something important, please don't hesitate to tell me ;-). As you can see below, this page serves as a reference for a large audience so your suggestions can be very useful for other linux users (mainly beginners).

 

Updated on: September 6th, 2014.
Created on: March 12th, 2012.

Tohoku University Astronomical Institute, 6-3 Aramaki, Aoba-ku, Sendai, Japan, 980-8578
    akhlaghi :a:t: astr.tohoku.ac.jp, Office: Physics A; 838, +81-80-3335-9474