Table of Contents
Create a virtual machine
Optimize Rocky Linux
Install common tools
Host name
Set the time zone to Dongba District
添加tailf命令
Home Operation and Maintenance Linux Operation and Maintenance How VMware installs and optimizes Rocky Linux server systems

How VMware installs and optimizes Rocky Linux server systems

May 12, 2023 pm 10:10 PM
linux vmware

Create a virtual machine

Just save the process here, after all, it is not the point.

Step 1: Select "Custom (Advanced)"

Step 2: Choose the highest version for compatibility. If you want to export to VMware on other computers, it is recommended not to choose one that is too high. version, it is recommended to select ESXi 6.7 for hardware compatibility

Step 3: Select the image package downloaded from the official website

, which is the minimal version from the official website. If it is a DVD version, the full version is 10.4GB. Large, it is still not recommended to download. After all, I only need a minimal installation.

How VMware installs and optimizes Rocky Linux server systems

Step 4: Select version Red Hat Enterprise Linux 8 64-bit

How VMware installs and optimizes Rocky Linux server systems

Step 5: Virtual machine name and location, fill this in yourself

Step 6: Number of processors*The number of cores per processor should not exceed that of the physical machine That's it, allocate it on demand. If it's just for testing, it is recommended to use 1 CPU and 2 cores.

How VMware installs and optimizes Rocky Linux server systems

Step 7: 4G of memory is enough

Step 8: Choose NAT for the network, this is the most stable, at least you don’t have to worry about not having a network. If you confirm the

in the network Step 9: Default

Step 10 and hard disk operation: NVME, create a new hard disk, the largest disk can be larger, compared to a server, if it is too small, The data will fill up immediately. You can enter 512. If your disk is already large, you can enter 1024 and larger capacities.

It is recommended to store the virtual disk as a single file

How VMware installs and optimizes Rocky Linux server systems

#Then take the next step to complete the creation of the virtual machine.

Delete excess hardware and select EFI boot

Click "Edit Virtual Machine Settings" to remove the printer and sound card. Select the USB controller and uncheck "Share Bluetooth device with virtual machine"

How VMware installs and optimizes Rocky Linux server systems

How VMware installs and optimizes Rocky Linux server systems

Enter the second menu and select "Advanced" , select "UEFI" as the firmware type. Why choose EFI? Firstly, this boot is more advanced, and when installing the system, the screen display area is larger. If you don’t believe me, you can try booting using BIOS. Anyway, I have tried both.

Open the virtual machine and install RockyLinux

How VMware installs and optimizes Rocky Linux server systems

You need to press the ↑ key and select Install Rocky Linux 8

Wait for a while to enter This interface:

How VMware installs and optimizes Rocky Linux server systems

#Real men choose English! After all, no one wants to see that the folder names in the user folder of the home directory are all in Chinese, right?

How VMware installs and optimizes Rocky Linux server systems

You need to do this step one by one, you can’t skip it directly. .

How VMware installs and optimizes Rocky Linux server systems

Language Support Select English and Chinese, I am afraid that Chinese will appear garbled

Time & Date Select Dongba District

How VMware installs and optimizes Rocky Linux server systems

Software Selection select Minimal Install, minimum installation

How VMware installs and optimizes Rocky Linux server systems

Installation Destination select Custom

How VMware installs and optimizes Rocky Linux server systems

Follow my installation From experience, home does not need to be too big at present. After all, those who really know how to operate the server generally use the root user to install server applications in the root directory. They are not very good at running home to install them, so I will use all the remaining space of more than 450 G here. Give the root directory

How VMware installs and optimizes Rocky Linux server systems

#Select Accept Changes in the pop-up window

How VMware installs and optimizes Rocky Linux server systems

Network & Host Name Remember to turn on the network card! ! Otherwise, the server is not connected to the Internet, then click Configure

How VMware installs and optimizes Rocky Linux server systems

, click IPV4 Settings, enter DNS, here we recommend 114.114.114.114 or 223.5.5.5

Return to Time & Date, open Network Time

How VMware installs and optimizes Rocky Linux server systems

Click the gear on the right side of ON to set the NTP server

A Alibaba Cloud timing server is added here

How VMware installs and optimizes Rocky Linux server systems

Set the root password, pay attention! If the password security is very low, you need to press Done twice to save the password.

How VMware installs and optimizes Rocky Linux server systems

Create a normal user here. Similarly, if the password security is very low, you need to click twice. Done several times to be able to save

How VMware installs and optimizes Rocky Linux server systems

The completed effect is as shown in the figure, and then click Begin Installation. After the installation is complete, Reboot System can

Connect to Rocky Linux

How VMware installs and optimizes Rocky Linux server systems

Enter ip addr to view the server's ip address, and then start FinalShell to connect to the server. No, no, no, there is no one really operating the server in the server, right?

How VMware installs and optimizes Rocky Linux server systems

How VMware installs and optimizes Rocky Linux server systems

Please use root to log in to Rocky Linux

Optimize Rocky Linux

Close and delete vmtoolsd

Why do I need to do this step? Because I found that installing Rocky Linux/CentOS in VMware will automatically install a vmtoolsd for you, but here we It is the server kernel version, there is no need for this thing at all, and this thing may have a memory leak and occupy a lot of memory, so it is better to delete it directly. The shell script is as follows:

systemctl stop vmtoolsd
systemctl disable vmtoolsd
rm -rf /etc/pam.d/vmtoolsd
rm -rf /usr/bin/vmtoolsd
Copy after login

Do not stop NetworkManager

Attention! ! network.service does not exist in Rocky Linux! ! If you stop NetworkManager, the system will be offline! !

How VMware installs and optimizes Rocky Linux server systems

Optional, turn off the firewall

systemctl stop firewalld
systemctl disable firewalld
Copy after login

Change the resource mirror source to Alibaba Cloud

Since Rocky Linux is based on CentOS8, it is directly Just take the resource mirror source of Alibaba Cloud CentOS8

yum install -y wget
wget -O /etc/yum.repos.d/Rocky-BaseOS.repo http://mirrors.aliyun.com/repo/Centos-8.repo
yum clean all
yum makecache
Copy after login

Since the minimum installation of Rocky Linux does not include wget, you need to install this first. The principle is to directly download the CentOS8 image source on Alibaba Cloud, name it Rocky-BaseOS.repo and directly replace this file. Then refresh the image source cache through two yum commands.

Install common tools

yum install -y vim net-tools unzip zip
Copy after login

Change rc.local to executable mode

chmod 755 /etc/rc.d/rc.local
Copy after login

Modify the boot waiting time

The default boot waiting time is 5 seconds. It's such a waste of time

vim /boot/efi/EFI/rocky/grub.cfg
Copy after login

Since I am using EFI boot installation, I edit grub.cfg in the EFI folder

How VMware installs and optimizes Rocky Linux server systems

In the command mode of vim, enter /timeout and press Enter to find the place to control the boot waiting time. After changing it to 1 second, you can modify it by :wq

How VMware installs and optimizes Rocky Linux server systems

Host name

The default host name is localhost. If you feel like changing the name is the same, you can use the command:

hostnamectl set-hostname ${替换为你自己的主机名}
Copy after login

Set the time zone to Dongba District

You can use date - R Check the current time zone situation. If you did not select the wrong time zone during installation, there is no need to change it here

How VMware installs and optimizes Rocky Linux server systems

timedatectl set-timezone Asia/Shanghai
Copy after login

ssh password-free for yourself

ssh-keygen -t rsa
cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
Copy after login

The first step ssh-keygen -t rsa and press Enter all the way

Optimize network settings and modify DNS

vim /etc/sysconfig/network-scripts/ifcfg-ens160
Copy after login

If installed by default, the name of the network card is ens160

How VMware installs and optimizes Rocky Linux server systems

If there is no network connection after restarting the server, you can consider checking whether ONBOOT is no. You can add another DNS2. If you want to change to a static fixed IP, set it as follows:

BOOTPROTO=static
IPADDR=192.168.5.30
GATEWAY=192.168.5.1
NETMASK=255.255.255.0

How VMware installs and optimizes Rocky Linux server systems

:wq后保存,重启服务器,我发现重启NetworkManager无效????,记得ip改了后Finalshell需要重新设置连接

添加tailf命令

这个命令在查看日志中十分有用,虽然Rocky Linux有tail -f命令,但是对于用惯了tailf命令的我来说,缺了这个命令实在是太难受了。解决方法:使用CentOS7的tailf命令,丢到Rocky Linux的/usr/bin目录下即可

*可选,ElasticSearch方面修改

作为搞Java后端的程序猿,ES是常用工具,这里可以加一下ES的相关服务器配置

vim /etc/security/limits.conf
Copy after login

添加:

* soft nproc 65536
* hard nproc 65536
* soft nofile 65536
* hard nofile 65536
Copy after login

效果如图:

How VMware installs and optimizes Rocky Linux server systems

然后执行:

vim /etc/sysctl.conf
Copy after login

在文末添加:

vm.max_map_count=655360
Copy after login

然后执行:

sysctl -p
Copy after login

The above is the detailed content of How VMware installs and optimizes Rocky Linux server systems. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to use docker desktop How to use docker desktop Apr 15, 2025 am 11:45 AM

How to use Docker Desktop? Docker Desktop is a tool for running Docker containers on local machines. The steps to use include: 1. Install Docker Desktop; 2. Start Docker Desktop; 3. Create Docker image (using Dockerfile); 4. Build Docker image (using docker build); 5. Run Docker container (using docker run).

Difference between centos and ubuntu Difference between centos and ubuntu Apr 14, 2025 pm 09:09 PM

The key differences between CentOS and Ubuntu are: origin (CentOS originates from Red Hat, for enterprises; Ubuntu originates from Debian, for individuals), package management (CentOS uses yum, focusing on stability; Ubuntu uses apt, for high update frequency), support cycle (CentOS provides 10 years of support, Ubuntu provides 5 years of LTS support), community support (CentOS focuses on stability, Ubuntu provides a wide range of tutorials and documents), uses (CentOS is biased towards servers, Ubuntu is suitable for servers and desktops), other differences include installation simplicity (CentOS is thin)

What to do if the docker image fails What to do if the docker image fails Apr 15, 2025 am 11:21 AM

Troubleshooting steps for failed Docker image build: Check Dockerfile syntax and dependency version. Check if the build context contains the required source code and dependencies. View the build log for error details. Use the --target option to build a hierarchical phase to identify failure points. Make sure to use the latest version of Docker engine. Build the image with --t [image-name]:debug mode to debug the problem. Check disk space and make sure it is sufficient. Disable SELinux to prevent interference with the build process. Ask community platforms for help, provide Dockerfiles and build log descriptions for more specific suggestions.

How to view the docker process How to view the docker process Apr 15, 2025 am 11:48 AM

Docker process viewing method: 1. Docker CLI command: docker ps; 2. Systemd CLI command: systemctl status docker; 3. Docker Compose CLI command: docker-compose ps; 4. Process Explorer (Windows); 5. /proc directory (Linux).

Detailed explanation of docker principle Detailed explanation of docker principle Apr 14, 2025 pm 11:57 PM

Docker uses Linux kernel features to provide an efficient and isolated application running environment. Its working principle is as follows: 1. The mirror is used as a read-only template, which contains everything you need to run the application; 2. The Union File System (UnionFS) stacks multiple file systems, only storing the differences, saving space and speeding up; 3. The daemon manages the mirrors and containers, and the client uses them for interaction; 4. Namespaces and cgroups implement container isolation and resource limitations; 5. Multiple network modes support container interconnection. Only by understanding these core concepts can you better utilize Docker.

What computer configuration is required for vscode What computer configuration is required for vscode Apr 15, 2025 pm 09:48 PM

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

vscode cannot install extension vscode cannot install extension Apr 15, 2025 pm 07:18 PM

The reasons for the installation of VS Code extensions may be: network instability, insufficient permissions, system compatibility issues, VS Code version is too old, antivirus software or firewall interference. By checking network connections, permissions, log files, updating VS Code, disabling security software, and restarting VS Code or computers, you can gradually troubleshoot and resolve issues.

How to switch Chinese mode with vscode How to switch Chinese mode with vscode Apr 15, 2025 pm 11:39 PM

VS Code To switch Chinese mode: Open the settings interface (Windows/Linux: Ctrl, macOS: Cmd,) Search for "Editor: Language" settings Select "Chinese" in the drop-down menu Save settings and restart VS Code

See all articles