Solve the problem that the VMWare virtual machine centos time is inconsistent with the local time

Solve the problem that the VMWare virtual machine centos time is inconsistent with the local time

The time of VM Ware virtual machine centos is inconsistent with the local time, as shown in the figure below. It is probably a problem with the time zone setting. Just set it to China Standard Time, CST.

insert image description here

Solution

1. Install the time synchronization plug-in ntpdate yum install ntpdate

insert image description here

2. Start the service service ntpdate restart or systemctl restart ntpdate

insert image description here

3. Set the time zone

1). Delete local time (US time): rm -rf /etc/localtime

2). Set the time zone to Shanghai: ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

4. Verification

Enter the date to see if it is correct

insert image description here

5. But after reboot, it failed.

insert image description here

6. Put it in crond

NTP Network Time Protocol, put it in crond, that is, it is the same as the network time at all times. After restart, it still takes effect. OK!

crond -e

Add this line of information:

* * * * * /usr/sbin/ntpdate us.pool.ntp.org | logger -t NTP

insert image description here
insert image description here

This is the end of this article about the inconsistency between VMWare virtual machine centos time and local time. For more relevant VMWare virtual machine centos time content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • VMware installation of CentOS virtual machine and configuration network graphic tutorial
  • CentOS7 network configuration under VMware virtual machine (host wireless Internet access)
  • Detailed explanation of VMware12 installation centOS8 configuration graphic tutorial (vm virtual machine installation centos8 tutorial)
  • How to install centOS8 in VMware12 (tutorial on installing centos8 in vm virtual machine)
  • Tutorial diagram of installing centos7.3 on vmware virtual machine

<<:  Use Typescript configuration steps in Vue

>>:  Fixed table width table-layout: fixed

Recommend

Detailed steps to implement the Excel import function in Vue

1. Front-end-led implementation steps The first s...

In-depth explanation of MySQL user account management and permission management

Preface The MySQL permission table is loaded into...

How to configure tomcat server for eclipse and IDEA

tomcat server configuration When everyone is lear...

How to use Docker Compose to implement nginx load balancing

Implement Nginx load balancing based on Docker ne...

How to solve the mysql error 1033 Incorrect information in file: 'xxx.frm'

Problem Description 1. Database of the collection...

How to install ZSH terminal in CentOS 7.x

1. Install basic components First, execute the yu...

Vue template compilation details

Table of contents 1. parse 1.1 Rules for intercep...

How to use cursor triggers in MySQL

cursor The set of rows returned by the select que...

Docker deployment and installation steps for Jenkins

First, we need a server with Docker installed. (I...

Steps to encapsulate the carousel component in vue3.0

Table of contents 1: Encapsulation idea 2. Packag...

Tutorial on using $attrs and $listeners in Vue

Table of contents introduce Example Summarize int...

About the processing of adaptive layout (using float and margin negative margin)

Adaptive layout is becoming more and more common i...

MySQL 8.0.12 Quick Installation Tutorial

The installation of MySQL 8.0.12 took two days an...

Detailed explanation of MySQL master-slave inconsistency and solutions

1. MySQL master-slave asynchrony 1.1 Network Dela...

How to use VirtualBox to simulate a Linux cluster

1. Set up HOST on the host Macbook The previous d...