Centos6.9 virtual machine environment setup, centos6.9 Virtual Machine
I. Prepare tools
VMware Workstation
CentOS-6.9-x86_64-minimal.iso
SecureCRTPortabl
Ii. system installation 1. Diagram of Virtual Machine Installation Process
Install or upgrade an existing system
Install system with basic vedio driver
Rescue install system
The first option is normal installation.
The second option is the installation of the basic graphics card.
The third is the rescue mode.
Select the first item
Check the hardware fault disc found. Check whether the installation disc is faulty. Select Check and select OK
Configure the network: You need to click "automatically connect" to enable the NIC.
Restart
2. Network Configuration
Use root and password to log on to the system
Then set the NIC
Vi/etc/sysconfig/network-scripts/ifcfg-eno16777736
TYPE = Ethernet
BOOTPROTO = static // static address
DEFROUTE = yes
PEERDNS = yes
PEERROUTES = yes
20174_failure_fatal = no
IPV6INIT = yes
IPV6_AUTOCONF = yes
Required 6_defroute = yes
IPV6_PEERDNS = yes
20176_peerroutes = yes
20176_failure_fatal = no
NAME = eno16777736
DEVICE = eno16777736
ONBOOT = yes // enable the NIC
IPADDR = 192.168.225.104 // set the IP address
NETMASK = 255.255.255.0 // set the mask
GATEWAY = 192.168.225.2 // set the GATEWAY, that is, the remembered GATEWAY.
DNS1 = 114.114.114.114 // set DNS
DNS2 = 114.114.114.115 // sets the backup DNS.
Connect using SecureCRT
3. Configure the Yum Source
Http://mirrors.163.com/.help/centos.html
[Root @ wangmaster ~] # Cd/etc/yum. repos. d/
[Root @ wangmaster yum. repos. d] # ls
CentOS7-Base-163.repo CentOS-Debuginfo.repo CentOS-Sources.repo
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo
[Root @ wangmaster yum. repos. d] # mv CentOS-Base.repo CentOS-Base.repo.bak // invalidate the original yum
[Root @ wangmaster yum. repos. d] # yum clean all // clear yum Cache
Loaded plug-in: fastestmirror
Cleaning software source: base extras updates
Cleaning up everything
[Root @ wangmaster yum. repos. d] # yum repolist // update yum Library
Loaded plug-in: fastestmirror
Base | 3.6 kB
Extras | 3.4 kB: 00
Updates | 3.4 kB: 00
(1/4): base/7/x86_64/group_gz | 155 kB
(2/4): extras/7/x86_64/primary_db | 139 kB
(3/4): base/7/x86_64/primary_db | 5.6 MB
(4/4): updates/7/x86_64/primary_db | 3.9 MB
Determining fastest mirrors
Source ID source name status
Base/7/x86_64 CentOS-7-Base-163.com 9,363
Extras/7/x86_64 CentOS-7-Extras-163.com 311
Updates/7/x86_64 CentOS-7-Updates-163.com 1,126
Repolist: 10,800
[Root @ wangmaster yum. repos. d] #
[Root @ wangmaster yum. repos. d] # yum install-y vim // install the VIM Tool
4. Disable selinux.
[Root @ wangmaster yum. repos. d] # vim/etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX = can take one of these three values:
# Enforcing-SELinux security policy is enforced.
# Permissive-SELinux prints warnings instead of enforcing.
# Disabled-No SELinux policy is loaded.
SELINUX = disabled
# SELINUXTYPE = can take one of three two values:
# Targeted-Targeted processes are protected,
# Minimum-Modification of targeted policy. Only selected processes are protected.
# Mls-Multi Level Security protection.
SELINUXTYPE = targeted
5. Stop the Firewall
Query the Firewall Status:
[Root @ localhost ~] # Service iptables status
Stop Firewall:
[Root @ localhost ~] # Service iptables stop
Start Firewall:
[Root @ localhost ~] # Service iptables start
Restart Firewall:
[Root @ localhost ~] # Service iptables restart
Permanently disable the Firewall:
[Root @ localhost ~] # Chkconfig iptables off
Enable after permanent shutdown:
[Root @ localhost ~] # Chkconfig iptables on
6. Install the JDK Environment
Upload JDK
Tar-zxvf jdk1.8.tar.gz
Modify the/etc/profile file and configure the java environment
Vim/etc/profile
JAVA_HOME =/usr/local/java/jdk1.8
JAVA_BIN =/usr/local/java/jdk1.8/bin
PATH = $ PATH: $ JAVA_HOME/bin
CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar: $ JAVA_HOME/jre/lib/rt. jar
Export JAVA_HOME
Export JAVA_BIN
Export PATH
Export CLASSPATH
Source/etc/profile
Iii. Problems during installation (1) the virtualization performance counters are incompatible with binary conversions.
Solution: Disable the performance counter when setting the processor.
(2) failed to obtain the GPG key in linux
Solution:
The major problem is that your system does not have the yum GPG key.
- View your system version
- Cat/etc/issue
- Log onto mirrors.163.com and find the key of your system.
- RPM-GPG-KEY-CentOS-3
- RPM-GPG-KEY-CentOS-4
- RPM-GPG-KEY-CentOS-5
- RPM-GPG-KEY-CentOS-6
- Use command rpm -- import to import
- Rpm -- import http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6 (Change 6 to your current version)
- Use the yum-y install tree.