CentOS Minimal install and configure TIPS

Although various Linux distributions are very similar to the Unix system, there are still many differences. Linux is more interesting. Recently, I need to learn and test, just reinstall CentOS under VirtualBox under OSX platform. 7. Due to the performance of the machine itself, I also personally feel that Minimal installation not only saves resources, but also can better exercise your hands-on ability. Record this installation configuration again.

  1. The installation media is CentOS-7-x86_64-DVD-1511.iso (4.3GB.)
  2. Choose Minimal to minimize the installation. Does not include KDE/GOME.
  3. After the installation is complete, configure the network. First, try ifconfig.. (minimal does not include net-tools). You need to install it yourself. Choose CDROM (ISO) as the installation source.
    Mount the CD image:
# mkdir -p /mnt/cdrom
# mount /dev/cdrom  /mnt/cdrom
  1. Set source
    In order to use the CD-ROM image installation source, configure yum.repo:
    Temporarily back up the files in the /etc/yum.repos.d directory, create a new CentOS-Iso.repo, and add the following content:
    # vi CentOS-Iso.repo
[ base]
name=iso
baseurl=file:///mnt/cdrom
gpgcheck=0
  1. Install and set up the network
    # yum install net-tools
    The virtual machine sets up NAT and HOST-ONLY two network cards, configures static IP, configuration file:
    # vim /etc/sysconfig/network-scripts/ifcfgX
YPE=Ethernet
BOOTPROTO=static
IPADDR=192.168.56.100
NETMASK=255.255.255.0
NETWORK=192.168.56.0
IPV4_FAILURE_FATAL=no
NAME=enp0s3
UUID=ad60e4e1-c250-47f2-a0d2-fa1fbdbb0bd2
DEVICE=enp0s3
ONBOOT=yes

After configuration, restart the network and test whether the internal and external networks are normal.
# service network restart
4. Turn off the firewall, CentOS 7 does not directly set iptables
# systemctl stop firewalld.service && sudo systemctl disable firewalld.service
5. Install some necessary software such as wget, php, etc. depending on personal needs.
6. Install pip
# wget https://bootstrap.pypa.io/get-pip.py `` # python get-pip.py
7. Set time zone and time
View the current time zone date -R
Modify setting time zone tzselect`` # cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
Or add environment variables in profile (/etc/bashrc)
TZ='Asia/Shanghai'; export TZ
Set time update synchronization
# yum install -y ntpdate`` # ntpdate us.pool.ntp.org
8. Set up admin sudoers
# vim /etc/sudoersadd:

## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
gwang   ALL=(ALL)       ALL
  1. other
    Warning after terminal ssh connection:
- bash: warning: setlocale: LC_CTYPE: cannot change locale(UTF-8): No such file or directory
[ gwang@localhost ~]$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE=UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

repair:

sudo vi /etc/environment

LANG=en_US.utf-8
LC_ALL=en_US.utf-8
  1. carry on..

Recommended Posts

CentOS Minimal install and configure TIPS
Centos6.5 install and configure mongodb
CentOS 8 - install and configure NFS service
Install and configure FreeIPA in Centos7
Install centos7 and connect
VMware Fusion install CentOS7 and configure the network
How to install and configure Elasticsearch on CentOS 7
How to install and configure VNC on CentOS 8
How to install and configure Redis on CentOS 8
How to install and configure phpMyAdmin on CentOS 6
How to install and configure Owncloud on CentOS 8
How to install and configure Redmine on CentOS 8
centos7 install python3 and ipython
Know Linux and install CentOS
CentOs7.3 compile and install Nginx 1.9.9
CentOS 7 install Mono and MonoDevelop
CentOS6.5 install Java 8 and Tomcat8
Centos compile and install Git
CentOS7 install python3 and pip3
CentOS7 install OracleJDK and JRE
CentOS6.5 install Java 8 and Tomcat8
Centos7 compile and install ntp-4.2.8p11
CentOS 6.9 compile and install python
CentOS6 install and crack confluence
CentOS 6 compile and install python 3
CentOS6 install and crack Jira 7
How to install and configure NFS server on CentOS 8
Centos 7 install jdk and package service service
CentOS7 yum install and start mysql
CentOS Yum compile and install MySQL 5.6
Compile and install LAMP under Centos 5.2
CentOS 8 install Git and basic configuration
Minimal install JDK 1.8 tutorial in CentOS 7
Install and configure MySQL on Ubuntu
How to install and configure Postfix mail server on CentOS8
CentOS 6.x compile and install Nginx
Install and configure Docker in Ubuntu
CentOS7 compile and install L(A|N)MP environment
CentOS7.3 install iptables and detailed use
CentOS quickly install Python3 and pip3
CentOS7 yum install and start mysql
Centos7 and centos8 install mysql5.6 5.7 8.0 so simple
Install Python3 and ansible under CentOS8
Install and use docker under CentOS 6.8
1.5 Install Centos7
CentOS7 install and use SQL Server
Configure python3 environment on centos7 and
Install Python3 and Py under CentOS7
Linux CentOS6 compile and install Pyt
Nginx-ubuntu install Nginx and configure https
virtualBox install centos, and build tomcat
Install Mono 3.2 and Jexus 5.4 under CentOS 6.3
Detailed steps to install and configure k8s cluster in centos 7
Compile and install libmodbus library under CentOS7
CentOS7.5 source code compile and install mysql5.7.29
Centos7 compile and install MySQL8 problem record
Deploy Docker and configure Nginx in CentOS
Install Mono 2.10.8 and Jexus 5.0 under 32- and 64-bit CentOS 6.0
Compile and install nodejs and yum in Centos8
CentOS7.4 source code compile and install MySQL8.0
Install VMware Fusion and CentOS-7 on Mac