techwiki:centos

CentOS 7 Install

  • during installer summary, if you want to format existing disk,
    • in “Installation Summary” page, under “System” icon, click “Installation Destination”,
      1. select the disk
      2. under other storage option, select “Auto configure partitioning” and check “I would like to make additional space available”, then click “Done” on top left corner
      3. in pop-up partition table, select the partition or disk and click “Delete” button to mark as to delete, then click right bottom corner “Reclaim Space” button
    • then you got a clean disk to install, uncheck “I would like to make additional space available” and continue install
  • while installing, set the pass for ROOT user, and set the pass and name for yourself
  • screen shot

fix internet connection for virtualbox install(outdate)

  • check network connection status and find the Ethernet type status with the connection name
    nmcli d
  • edit the config for that connection
    sudo vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
     
    # add following
    DNS1=8.8.8.8
    DNS2=8.8.4.4
    ONBOOT=yes  
  • additional note
    BOOTPROTO=dhcp # for auto ip get
  • reset the network by reboot or restart network
    service network restart

fix mouse integration in VirtualBox install (outdate)

  1. make sure EPEL repo already installed
  2. install folowing
    sudo yum install dkms
    sudo yum groupinstall "Development Tools"
    sudo yum install kernel-devel
  3. restart computer, then install guess tool as usual
  • on the top right corner drop down menu, Wifi setting panel
    • try click on “Connect to Hidden Network”, type the Wifi name, security type (most likely wpa2 personal), and pass
    • if not connected after a while, try install wifi
      yum install NetworkManager-wifi
    • restart, try above again, even though it not show the list, it should still be able to connect.

Customize OS

    • install cmd
      # gnome: the desktop with (Start menu,Application, Place on top, and taskbar, space on bottom)
      yum -y groups install "GNOME Desktop"
      startx
       
      # -- use gnome shell mode instead centos default gnome classic mode
      echo "exec gnome-session" >> ~/.xinitrc
      startx
      # -- or in set login and choose from list
      systemctl set-default graphical.target
       
      # KDE: windows like bottom (start menu, taskbar, space)
      yum -y groups install "KDE Plasma Workspaces" 
      echo "exec startkde" >> ~/.xinitrc
      startx
       
      # cinnamon: more like windows 7
      # Add the EPEL Repository by fedora, set [priority=5] or optionally change to [enabled=0]
      yum -y install epel-release
      sed -i -e "s/\]$/\]\npriority=5/g" /etc/yum.repos.d/epel.repo
      sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/epel.repo
      yum --enablerepo=epel install [Package] # if [enabled=0], input a command to use the repository
      # install
      yum --enablerepo=epel -y install cinnamon*
      echo "exec /usr/bin/cinnamon-session" >> ~/.xinitrc
      startx
       
      # MATE: basically GNOME 2, looks like windows XP on skin with (Application, Place, System) on top, like old fedora
      yum --enablerepo=epel -y groups install "MATE Desktop"
      echo "exec /usr/bin/mate-session" >> ~/.xinitrc 
      startx
       
      # xfce: looks like above but low quality like
      yum --enablerepo=epel -y groups install "Xfce" 
      echo "exec /usr/bin/xfce4-session" >> ~/.xinitrc 
      startx
  1. get fedora repo with ask yes
    sudo yum install epel-release
  2. get all user install MATE
    sudo yum groupinstall "MATE Desktop"
  3. restart and login button gear icon will give the choice list now
  4. if you want uninstall
    sudo yum groupremove "MATE Desktop"
  • control panel > Window > Behavior, change alt key to super key
  • Settings » keyboard » click “+” at the bottom
    • example:
      • name as terminal, command as
        • for gnome 3 desktop
          gnome-terminal
        • for mate desktop
          mate-terminal
      • shortcut as Ctrl+F2

Install Library

sudo yum install libGLU

Install App list

Firefox Update

  • cmd
    sudo yum update firefox

Dukto - lan transfer tool

filezilla

  • make sure epel repo installed
    sudo yum -y install epel-release
  • install filezilla
    sudo yum -y install filezilla

CMake

  1. download source code: https://cmake.org/download/
  2. unpack and cd to the folder and command (ref: link)
    ./bootstrap
    gmake
    sudo gmake install
    cmake --version

PySide and PySide2

  1. (For CentOS 7) if you not add this repo yet, than add it
    rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  2. get pip installed
    sudo yum upgrade python-setuptools
    sudo yum install python-pip python-wheel
    sudo python -m pip install pyside2

gvim - GUI vim

  • install
    sudo yum install vim-X11 -y

atom editor

  • install git
    sudo yum install wget git -y
  • download rpm atom installer, https://atom.io/
  • if you got nss lib (Network Security Services) version error “NSS_VersionCheck”, try install nss library
    sudo yum install nss

unrar

  1. (For centos 7) use these cmd to install it
    ## 64 bit linux ##
    wget https://www.rarlab.com/rar/rarlinux-x64-5.5.0.tar.gz
    tar -zxvf rarlinux-x64-5.5.0.tar.gz
    cd rar
    sudo cp -v rar unrar /usr/local/bin/
    cd ..
    rm -r rar

7z

  • method A: yum way
    yum install p7zip
  • method B: manual way:
    1. make sure you have the dev tool already, skip if you have
      yum install gcc gcc-c++ bzip2
    2. compile and install 7z
      curl -L https://sourceforge.net/projects/p7zip/files/latest/download?source=files -o 7zip.tar.bz2
      tar xjvf 7zip.tar.bz2 ; rm -f 7zip.tar.bz2 ; cd $(ls -1t | grep p7zip_ | head -1)
      cp makefile.linux_amd64 makefile.linux
      make -j $(grep processor /proc/cpuinfo | wc -l) all_test
      sudo ./install.sh
      cd ..
    3. remove the download source file and package if you want

Apache web server

  1. install
    sudo yum install httpd mod_ssl
  2. start server
    sudo /usr/sbin/apachectl start
  3. add firewall to allow port 80
    sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT
  4. enable /var/www folder writting

ref

Problem and Fix

  • Problem: yum lock when trying install
    • solution: turn off auto update on startup
  • techwiki/centos.txt
  • Last modified: 2021/08/28 08:57
  • by ying