techwiki:centos

Differences

This shows you the differences between two versions of the page.


techwiki:centos [2021/08/28 08:57] (current) – created ying
Line 1: Line 1:
 +====== CentOS 7 Install ======
 +
 +  * download DVD version: https://www.centos.org/download/
 +
 +  * read this install guide first: http://www.2daygeek.com/centos-7-desktop-installation-steps-with-screenshots/
 +    * note: the default option is install server edition without GUI, make sure in "Installation Panel"
 +      * double check the installation summary > software selection, and choose the last one with GU
 +
 +  * during installer summary, if you want to format existing disk,
 +    * in "Installation Summary" page, under "System" icon, click "Installation Destination",
 +      - select the disk
 +      - 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
 +      - 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 \\ {{:techwiki:centos:centos_install_panel.png?200|}} {{:techwiki:centos:centos_install_choice.png?200|}} {{:techwiki:centos:centos_install_disk_select.png?200|}}
 +
 +===== Install Problem and Fix =====
 +
 +==== Get Everything working in VirtualBox ====
 +
 +  * [[:appwiki:virtualmachine#guest_addition_and_share_folder_working_guide_of_centos7_vm_on_win7]]
 +
 +** <del>fix internet connection for virtualbox install</del>(outdate) **
 +
 +  * check network connection status and find the Ethernet type status with the connection name<code bash>nmcli d</code>
 +  * edit the config for that connection <code bash>
 +sudo vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
 +
 +# add following
 +DNS1=8.8.8.8
 +DNS2=8.8.4.4
 +ONBOOT=yes  
 +</code>
 +  * additional note <code>
 +BOOTPROTO=dhcp # for auto ip get
 +</code>
 +  * reset the network by reboot or restart network <code bash>service network restart</code>
 +
 +** <del>fix mouse integration in VirtualBox install</del> (outdate)**
 +
 +  - make sure EPEL repo already installed
 +  - install folowing <code bash>sudo yum install dkms
 +sudo yum groupinstall "Development Tools"
 +sudo yum install kernel-devel
 +</code>
 +  - restart computer, then install guess tool as usual
 +
 +==== Fix Yum can't find anything after dropbox install ====
 +
 +  * Problem:
 +    * "Loaded plugins: fastestmirror, langpacks http://linux.dropbox.com/fedora/7/repodata/repomd.xml:" and then can't find anything when ask install something.
 +  * Solution: <code bash>
 +cd /etc/yum.repos.d/
 +sudo rm dropbox.repo
 +</code>
 +
 +==== USB Wifi not show wifi list ====
 +
 +  * 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 <code>yum install NetworkManager-wifi</code>
 +    * restart, try above again, even though it not show the list, it should still be able to connect.
 +
 +====== Customize OS ======
 +
 +===== Other Desktop environment =====
 +
 +
 +  * desktop environment option and install guide: http://unix.stackexchange.com/questions/181503/how-to-install-desktop-environments-on-centos-7
 +    * install cmd <code bash>
 +# 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
 +
 +</code>
 +
 +===== install MATE lightweight desktop environment =====
 +
 +  - get fedora repo with ask yes <code bash>sudo yum install epel-release</code>
 +  - get all user install MATE <code bash>sudo yum groupinstall "MATE Desktop"</code>
 +  - restart and login button gear icon will give the choice list now \\ {{:techwiki:centos:centos_login_desktop.png?200|}}
 +  - if you want uninstall <code bash>sudo yum groupremove "MATE Desktop"</code>
 +
 +
 +=====disable alt move window hotkey=====
 +
 +  * control panel > Window > Behavior, change alt key to super key \\ {{:techwiki:centos:linux_setting_window_move.png?600|}}
 +
 +=====create system shortcut=====
 +
 +  * Settings >> keyboard >> click "+" at the bottom
 +    * example: 
 +      * name as terminal, command as 
 +        * for gnome 3 desktop <code>gnome-terminal</code> 
 +        * for mate desktop <code>mate-terminal</code>
 +      * shortcut as Ctrl+F2
 +
 +====== Install Library ======
 +
 +<code bash>
 +sudo yum install libGLU
 +</code>
 +
 +====== Install App list ======
 +
 +**Firefox Update**
 +  * cmd <code bash>sudo yum update firefox</code>
 +
 +**Dukto - lan transfer tool**
 +  * go download: https://software.opensuse.org/download.html?project=home:colomboem&package=dukto
 +    * on the page, choose the your linux distribution type, then choose grab binary, for centos, grab the x86_64 rpm installer.
 +**filezilla**
 +  * make sure epel repo installed <code>sudo yum -y install epel-release</code>
 +  * install filezilla <code>sudo yum -y install filezilla</code>
 +**CMake**
 +  - download source code: https://cmake.org/download/
 +  - unpack and cd to the folder and command (ref: [[https://xinyustudio.wordpress.com/2014/06/18/how-to-install-cmake-3-0-on-centos-6-centos-7/|link]])<code bash>
 +./bootstrap
 +gmake
 +sudo gmake install
 +cmake --version
 +</code>
 +
 +**PySide and PySide2**
 +  - (For CentOS 7) if you not add this repo yet, than add it <code bash>rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm</code>
 +  - get pip installed <code>
 +sudo yum upgrade python-setuptools
 +sudo yum install python-pip python-wheel
 +sudo python -m pip install pyside2
 +</code>
 +**gvim - GUI vim**
 +  * install <code>sudo yum install vim-X11 -y</code>
 +**atom editor**
 +  * install git <code>sudo yum install wget git -y</code>
 +  * download rpm atom installer, https://atom.io/
 +  * if you got nss lib (Network Security Services) version error "NSS_VersionCheck", try install nss library <code>sudo yum install nss</code>
 +**unrar**
 +  - (For centos 7) use these cmd to install it <code bash>
 +## 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
 +</code>
 +
 +**7z**
 +  * method A: yum way <code bash>yum install p7zip</code>
 +  * method B: manual way:
 +    - make sure you have the dev tool already, skip if you have <code bash>
 +yum install gcc gcc-c++ bzip2
 +</code>
 +    - compile and install 7z <code bash>
 +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 ..
 +</code>
 +    - remove the download source file and package if you want
 +
 +**Apache web server**
 +  - install <code>sudo yum install httpd mod_ssl</code>
 +  - start server <code>sudo /usr/sbin/apachectl start</code>
 +  - add firewall to allow port 80 <code>sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT</code>
 +  - enable /var/www folder writting
 +====== ref ======
 +
 +  * https://www.tecmint.com/things-to-do-after-minimal-rhel-centos-7-installation/
 +
 +====== Problem and Fix ======
 +
 +  * Problem: yum lock when trying install
 +    * solution: turn off auto update on startup
 +