Remotely install the CentOS 7 operating system using VNC

Source: Internet
Author: User
Tags nameserver tightvnc

Remotely install the CentOS 7 operating system using VNC

By No if

Data centers are generally not local, if you want to reinstall the system, you have to run to the data center ...
So there has to be a way to solve this problem remotely.

At present, the main use of CentOS 7 is GRUB2, which differs from the grub1 of the past is actually very big.

1. Determine your network card name, IP and other related information

# View IP address and network card information
[[Email protected]/]# IP A
1:lo: <LOOPBACK,UP,LOWER_UP> MTU 65536 qdisc noqueue State UNKNOWN
Link/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00
inet 127.0.0.1/8 Scope host Lo
Valid_lft Forever Preferred_lft Forever
INET6:: 1/128 Scope Host
Valid_lft Forever Preferred_lft Forever
2:ENP3S0: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU Qdisc pfifo_fast State up Qlen 1000
Link/ether 00:21:70:5c:a5:6f BRD FF:FF:FF:FF:FF:FF
inet 192.168.17.131/24 BRD 192.168.17.255 Scope Global ENP3S0
Valid_lft Forever Preferred_lft Forever
Inet6 FE80::221:70FF:FE5C:A56F/64 Scope link
Valid_lft Forever Preferred_lft Forever

# View Gateway

[[Email protected]/]# IP route Show
Default via 192.168.17.254 dev enp3s0 proto static metric 100
192.168.17.0/24 Dev enp3s0 proto kernel scope link src 192.168.17.131 metric 100

From here we can get the following information:

Device Name: Enp3s0

IP Address: 192.168.17.131

Gateway Address: 192.168.17.254

2. Download the CentOS bootstrap file

Yum Install wget
Cd/boot
wget Http://mirror.centos.org/centos/7/os/x86_64/isolinux/vmlinuz-O vmlinuz-7
wget Http://mirror.centos.org/centos/7/os/x86_64/isolinux/initrd.img-O initrd-7.img

3. Add Grub Boot entry

To view/boot/grub2/grub.cfg, find the following code section:

Menuentry'CentOS Linux (3.10.0-327.22.2.el7.x86_64) 7 (Core)'--class CentOS--class gnu-linux--class GNU--class os--unrestricted $menuentry _id_option'gnulinux-3.10.0-327.el7.x86_64-advanced-5abaf349-18ce-4481-8e31-f29b0120827f'{Load_video Set gfxpayload=KeepInsmodGzioInsmodPart_msdosInsmodXFS Set Root='HD0,MSDOS1'        if[x$feature_platform_search_hint = xy]; ThenSearch--no-floppy--fs-uuid--set=root--hint-bios=hd0,msdos1--hint-efi=hd0,msdos1--hint-baremetal=ahci0,msdos1--hint='HD0,MSDOS1'3ee40dd3-d836-4aa5-b145-9fbc2541b151ElseSearch--no-floppy--fs-uuid--set=root 3ee40dd3-d836-4aa5-b145-9fbc2541b151filinux16/vmlinuz-3.10.0-327.22.2. el7.x86_64 root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet Lang=en_us. utf-8Initrd16/initramfs-3.10.0-327.22.2. el7.x86_64.img}

Then copy this section to/etc/grub.d/40_custom to make the following changes:

#!/bin/SHexecTail-N +3$0# ThisfileProvides a easy to add custom menu entries.  Simply type the# menu entries you want to add after this comment. Be careful not to change# the'EXEC Tail'Line Above.menuentry'Netinstall'{Load_video Set gfxpayload=KeepInsmodGzioInsmodPart_msdosInsmodXFS Set Root='HD0,MSDOS1'        if[x$feature_platform_search_hint = xy]; ThenSearch--no-floppy--fs-uuid--set=root--hint-bios=hd0,msdos1--hint-efi=hd0,msdos1--hint-baremetal=ahci0,msdos1--hint='HD0,MSDOS1'3ee40dd3-d836-4aa5-b145-9fbc2541b151ElseSearch--no-floppy--fs-uuid--set=root 3ee40dd3-d836-4aa5-b145-9fbc2541b151filinux16/vmlinuz-7Inst.vnc inst.vncpassword=12345678Inst.headless ip=192.168.17.131::192.168.17.254:255.255.255.0:: Enp3s0:none nameserver=114.114.114.114Inst.repo=http://Mirror.centos.org/centos/7/os/x86_64/inst.lang=en_us inst.keymap=usinitrd16/initrd-7. IMG}

Here's how to explain the format:

Inst.vnc #启用vnc

inst.vncpassword=12345678 # VNC Login password (at least 8 characters or more)

Inst.headless

Ip=192.168.17.131::192.168.17.254:255.255.255.0::enp3s0:none

# Ip=ip:: Gateway: Subnet Mask:: Device name: None

NAMESERVER=114.114.114.114 # DNS Address

inst.repo=http://mirror.centos.org/centos/7/os/x86_64/

# Yum Source Address

Inst.lang=en_us

# default language

Inst.keymap=us

# keyboard Mode

# Configure/etc/default/grub

Open/etc/default/grub

Modify Grub_default=0 to Grub_default=saved

# Check again, all configurations

4. Rebuild the configuration for the configuration to take effect

# Rebuilding the Grub configuration

Grub2-mkconfig-o/boot/grub2/grub.cfg

# List all startup entries

Awk-f\ ' $1== "Menuentry" {print $} '/etc/grub2.cfg

# The next time you start using Netinstall, use only once

Grub2-reboot Netinstall

# Reboot System

Reboot

5. Installing the CentOS system using VNC

The rest of the material mentions waiting for about a minute, and the personal experiment is waiting for about 10 minutes, depending on the speed.

Download TightVNC (http://www.tightvnc.com/download.php)

The password is the 12345678 set above

Successfully entered the CentOS installation interface

Note: Here is the use of the external yum source, in many cases the network is closed, then you must build an intranet of the Yum source server, in particular, can refer to

Http://www.cnblogs.com/gleaners/p/5735472.html

Reference:

Http://www.danpros.com/2016/02/how-to-install-centos-7-remotely-using-vnc

Remotely install the CentOS 7 operating system using VNC

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.