Here is little summary on how to install a Linux distribution on your desktop computer. Our target OS is CentOS/Fedora linux.

Install Linux distributions

Here we mainly shows the installation of Redhat distribution of Linux: Fedora/CentOS. Their relations are like this: Fedora (newest experimental test) -> Redhat (stable commercial product) -> CentOS (open source redistribution from Redhat). From this we can see that Fedora is a white mouse for developing and testing the new functions of future linux OS, Then the stable version of this Fedora OS is summarized as stable Redhat distribution for sell to commercial customs. Then the open source community will repackage the Redhat source files and remove its commercial parts. This repackaged OS from Redhat is named as CentOS. If you desire stability, centOS is a good choice. For new features, Fedora is better. Rich of money, go for Redhat!

Install CentOS Linux

Here we demonstrate the installation of CentOS 7.

Download CentOS 7 iso and burn it to u-disk

Download the CentOS 7 installation .iso file from the official website [3], then you can use the Fedora Media Writer tool [4] to burn this image to your u-disk.

Install CentOS 7 on computer

Change the boot sequence to boot from the u-disk and install CentOS 7 on your desktop hard drive. You can either choose the “minimal installation” or “Gnome desktop”. Then reboot the desktop and unplug the u-disk

Optional configuration

If you installed the minimal distribution, you can only enter the terminal interface of CentOS. However the default network is turn off, to update the system with yum you need to turn on the network. You can enable the network by editing the network configuration file [2]. The configuration file is located at: /etc/sysconfig/network-scripts/, the name of this file may by viaried as: ifcfg-etc… You need to change its content from: “onboot=no” to “onboot=yes”. After reboot, you should be able to connect the internet. If you wish to use Gnome desk, try to install it with the command [3].

1
2
# yum -y groups install "GNOME Desktop"
# startx

Install Fedora Linux

Fedora 25/29 installation will be shown here.

Create a u-disk linux installation drive

Download the fedora iso image from the official website. They also provide a tool called fedora media writer (FMW) in different platforms (windows, linux, mac). This tool will help you to burn the iso image to your u disk. Here, I make the installation preparation from a windows machine. After installed the FMW, place a u disk to your computer and then open the FMW and choose, iso from a local file, then choose the correct u disk and burn the iso image to it.

Recover previous linux data files

In my case, my linux system just faced a broken down that have to be reinstalled totally (Bad luck, unplugged the power cable by accident!). While my desktop computer has two hard disk driver that are configured as dual boot. Then I tried to recover my data from previous linux machine. There is a window tools called Linux Reader [5] that you can use to access linux data from windows.

Install Fedora with u-disk

After the linux data backup and installation u-disk preparation. We now boot from the u-disk with fedora img burnt on it. Then there will be a series of options during the installation.

  • Choose language: En-US (Try to stick to a single language inputs, or the keyboard inputs may be different)
  • step2. Prepare partition and choose the hard disk. Here auto-partition option is chosen by me. You may need to reclaim space during the installation. Then you need to “delete all” to the old disk.
  • step3. After these steps, the Fedora linux should be successfully installed on your system.

Configure system dependence

After the installation of CentOS/Fedora on the desktop, there are also some configurations have to be made.

Software source repository configuration

Software source will help the linux system to easily install softwares and make maintenance to the system. There are many linux repository mirror in China, eg:

By universities

  • USTC linux mirror
  • SJTU linux mirror
  • HUST linux mirror

By companies

  • NetEase 163 linux mirror
  • Alibaba linux mirror

Apply USTC centOS repo

Backup your repo file (/) and then replace with the content given by USTC mirror [6].

1
2
3
4
cd /etc/yum.repos.d/
sudo cp CentOS-Base.repo CentOS-Base.repo.backup
sudo vi CentOS-Base.repo
sudo yum makecache

Replace the content and save this file.

enable/disable repository

1
2
cd /etc/yum.repos.d/
sudo vi fedora.repo

Change the line “enabled=1” to “enabled=0” to disable a repository, change from 0 to 1 to enable a repository.

Restore the official repo file on fedora

Sometimes out of accident, you may delete the default fedora repo file. You may wish to restore it, because only the fedora.repo and fedora-update.repo from the official source could enable the default APP store on the fedora GNOME desktop to work. There is a very good instruction on how to do this [1]: Here we list the main command to solve this problem:

1
2
3
dnf -y reinstall fedora-repos-*.noarch.rpm

dnf -y reinstall --nogpgcheck 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

Install 3rd party repository sources

Besides the official software source, you can also install 3rd part repository source, because the official source maybe to slow in China mainland. There are many sources which you can choose. However, after my test, none of these repo mirror could replace the default linux from official fedora community, because these mirrors cause the Gnome APP store malfunction.

  • epel source
1
sudo yum install epel-release.noarch

exfat format support

You can install the fuse-exfat***.rpm package on fedora linux. This format will works both for windows and mac with support for single file bigger than 4G. After this installation, the exfat format of u-disk should be able to be recognized by fedora linux.

NTFS format support

Linux can not recognize the NTFS format disk from windows. You need to install the ntfs package to read it.

1
2
yum search ntfs
sudo yum install ntfs-3g.x86_64

Install NIVIDIA display card driver

This is a painful process, and have to be down in a hard way. I managed to installed it with the help from my friend. First you need to download the NVIDIA display driver from the official site [7].

Install dependence

1
2
3
4
sudo yum install gcc
sudo yum install kernel-devel
sudo yum install kernel-headers
sudo yum install dkms

Disable GNU nouveau display driver

1
2
3
4
5
6
7
8
9
cd /lib/modprobe.d/
vi dist-blacklist.conf
#blacklist nvidiafb
blacklist nouveau
options nouveau modeset=0

cd /etc/modprobe.d/
vi blacklist.conf
blacklist nouveau

Backup start booting image

1
2
3
sudo mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
sudo dracut -v /boot/initramfs-$(uname -r).img $(uname -r)
sudo dracut --omit-drivers "nouveau" /boot/initramfs-$(uname -r).img $(uname -r)

Set startup without/with xserver running

1
2
3
4
# default without xserver
systemctl set-default multi-user.target
# default with xerver
systemctl set-default graphical.target

Install NIVIDIA driver

After the above steps, reboot the system and cd to the directory where you have stored d your NIVIDIA drive.

1
sudo ./NIVIDIA_***.run

Then follow the instruction of the driver, you should be able to install the NIVIDIA driver on you desktop. Then set the default start up as xserver graphic interface. After reboot, your desktop shall run the NIVIDIA driver correctly.

Install common softwares on Linux

Gnome tweaks

This tool will configure the Gnome GUI appearance setting. You can search it in App store and install it.

Dash to Dock

This can be found on App store -> Shell extension.

VNote

VNote image app for linux could run Fedora, but it often crashes after open a larger markdown notes file. I tried to solve this problem by installing qtwebkit packages on the linux system. You can download the executable .image file from its official website [8].

Texlive & Texstudio

Install texlive on fedora 29

For fedora 29, the installation of texlive is far simple than previous fedora version. That is only because fedora 29 is born with ability to read NTFS/ISO format data type.

  • Step1. Download the latest texlive version from the official latex version. In my case, textlive2018 is downloaded.
  • Step2. Open the ISO image that you downloaded. And execute the installation file with root rights:
1
sudo ./install-lt
  • Step3. Configure the .bashrc file for the texlive as:
1
2
3
4
# added by nan for texlive2016 with latex editing software
export INFOPATH=${INFOPATH}:/usr/local/texlive/2018/texmf-dist/doc/info
export MANPATH=${MANPATH}:/usr/local/texlive/2018/texmf-dist/doc/man
export PATH=${PATH}:/usr/local/texlive/2018/bin/x86_64-linux

Then update the .bashrc file with the command

1
source .bashrc
  • Step4. Install the texstudio from fedora app store
    After these steps, you can check the installtion by typying the pdflatex command in terminal or check the texstudio via “Help-> Check Latex Installation”
    . If the version of latex is 2018, then the installation shall be correct.

Install texlive on CentOS 7

CentOS 7 can not recognize .iso image directly. You can use mount command to load it [10]. Some dependence should also be installed [11].

1
2
3
4
5
6
7
sudo yum install perl-Digest-MD5.x86_64
sudo mkdir /mnt/iso
sudo mount -o loop texlive2018.iso /mnt/iso/
cd /mnt/iso/
sudo ./install-tl
# wait for installation process, after it finished.
sudo umount /mnt/iso

Then configure the .bashrc file like what I does in the case for fedora.

Install texstudio

You can download the texstudio_x86_64.rpm package from the official website and then install it. Sometime times, texstudio may not recognized the texlive2018 that you have just installed. At that time you need to go to ‘texstudio -> options -> configure texstudio -> Build’. Check on the ‘show advanced options’, then fill the ‘command(path)’ with ‘/usr/local/texlive/2018/bin/x86_64-linux’. Then your texstudio should be able to work.

Nutstore installation

Nutstore drive is a mini cloud drive with sync of file changes. It is the only well maintained cloud drive in China mainland.
To install it, you first need to install it on linux, you first have to go to its official homepage and download the rpm installation package. Then you should follow the installation instruction and install the necessary dependence. Then you shall install it via the command:

Install nutstore on Fedora

1
sudo dnf install nautilus_nutstore_x86_65.rpm

Sometimes, there may be error report as: require python2-gobject***, you can search ‘python2-gobject rpm’ in google/bing and install it. Sometimes, a command with ‘–allowrasing’ maybe needed before the command.

1
sudo dnf install '--allowerasing' python2-gobject-base-3.26.0-1.fc27.x86_64.rpm

Install nutstore on CentOS

After constantly faced error reports when trying to install nutstore .rpm package. I tried to install nutstore from source files [9]. Where you just need to follow the official instruction.

GIMP

You can install GIMP directly from the Fedora App store.

Gfortran & Lapack

Gfotran and lapack can be install with yum easily.

1
sudo yum install lapack64-devel.x86_64

Python & Mdsplus

I preferred to use python3, however, nutstore depend on python2. So multi-version of pythons are required. Anaconda python 3 is a good choice for scientific computation. Installation of Mdsplus package is somehow a difficulty stuff. First you need to download the full package of mdsplus. Then you can install it on python via pip.

1
~/anaconda3/bin/pip install ~/MDSplus-alpha/mdsobjects/python

This approach will install the mdsplus package to the specific python version. You can also copy a valid MDSplus package for python directly to the site-packages of python.

Reference

[1] https://ask.fedoraproject.org/en/question/35074/restore-fedora-official-repository-files/

[2] https://wiki.centos.org/FAQ/CentOS7

[3] https://www.centos.org/

[4] https://getfedora.org/en/workstation/download/

[5] https://www.diskinternals.com/linux-reader/

[6] http://mirrors.ustc.edu.cn/help/centos.html

[7] https://www.nvidia.com/content/DriverDownload-March2009/confirmation.php?url=/XFree86/Linux-x86_64/410.78/NVIDIA-Linux-x86_64-410.78.run&lang=us&type=TITAN

[8] https://tamlok.github.io/vnote/en_us/

[9] https://www.jianguoyun.com/s/downloads/linux

[10] https://www.tecmint.com/extract-files-from-iso-files-linux/

[11] https://www.systutorials.com/241660/how-to-install-tex-live-on-centos-7-linux/