


How VMware installs and optimizes Rocky Linux server systems
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.
Step 4: Select version Red Hat Enterprise Linux 8 64-bit
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.
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
#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"
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
You need to press the ↑ key and select Install Rocky Linux 8
Wait for a while to enter This interface:
#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?
You need to do this step one by one, you can’t skip it directly. .
Language Support Select English and Chinese, I am afraid that Chinese will appear garbled
Time & Date Select Dongba District
Software Selection select Minimal Install, minimum installation
Installation Destination select Custom
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
#Select Accept Changes in the pop-up window
Network & Host Name Remember to turn on the network card! ! Otherwise, the server is not connected to the Internet, then click Configure
, click IPV4 Settings, enter DNS, here we recommend 114.114.114.114 or 223.5.5.5
Return to Time & Date, open Network Time
Click the gear on the right side of ON to set the NTP server
A Alibaba Cloud timing server is added here
Set the root password, pay attention! If the password security is very low, you need to press Done twice to save the password.
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
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
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?
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
Do not stop NetworkManager
Attention! ! network.service does not exist in Rocky Linux! ! If you stop NetworkManager, the system will be offline! !
Optional, turn off the firewall
systemctl stop firewalld systemctl disable firewalld
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
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
Change rc.local to executable mode
chmod 755 /etc/rc.d/rc.local
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
Since I am using EFI boot installation, I edit grub.cfg in the EFI folder
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
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 ${替换为你自己的主机名}
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
timedatectl set-timezone Asia/Shanghai
ssh password-free for yourself
ssh-keygen -t rsa cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
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
If installed by default, the name of the network card is ens160
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
: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
添加:
* soft nproc 65536 * hard nproc 65536 * soft nofile 65536 * hard nofile 65536
效果如图:
然后执行:
vim /etc/sysctl.conf
在文末添加:
vm.max_map_count=655360
然后执行:
sysctl -p
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

For many users, hacking an Android TV box sounds daunting. However, developer Murray R. Van Luyn faced the challenge of looking for suitable alternatives to the Raspberry Pi during the Broadcom chip shortage. His collaborative efforts with the Armbia

DeepSeek is a powerful intelligent search and analysis tool that provides two access methods: web version and official website. The web version is convenient and efficient, and can be used without installation; the official website provides comprehensive product information, download resources and support services. Whether individuals or corporate users, they can easily obtain and analyze massive data through DeepSeek to improve work efficiency, assist decision-making and promote innovation.

There are many ways to install DeepSeek, including: compile from source (for experienced developers) using precompiled packages (for Windows users) using Docker containers (for most convenient, no need to worry about compatibility) No matter which method you choose, Please read the official documents carefully and prepare them fully to avoid unnecessary trouble.

How to download BitPie Bitpie Wallet App? The steps are as follows: Search for "BitPie Bitpie Wallet" in the AppStore (Apple devices) or Google Play Store (Android devices). Click the "Get" or "Install" button to download the app. For the computer version, visit the official BitPie wallet website and download the corresponding software package.

BITGet is a cryptocurrency exchange that provides a variety of trading services including spot trading, contract trading and derivatives. Founded in 2018, the exchange is headquartered in Singapore and is committed to providing users with a safe and reliable trading platform. BITGet offers a variety of trading pairs, including BTC/USDT, ETH/USDT and XRP/USDT. Additionally, the exchange has a reputation for security and liquidity and offers a variety of features such as premium order types, leveraged trading and 24/7 customer support.

1. Installation environment (Hyper-V virtual machine): $hostnamectlStatichostname:localhost.localdomainIconname:computer-vmChassis:vmMachineID:renwoles1d8743989a40cb81db696400BootID:renwoles272f4aa59935dcdd0d456501Virtualization:microsoftOperatingSystem:CentOS Linux7(Core)CPEOSName:cpe:

Ouyi OKX, the world's leading digital asset exchange, has now launched an official installation package to provide a safe and convenient trading experience. The OKX installation package of Ouyi does not need to be accessed through a browser. It can directly install independent applications on the device, creating a stable and efficient trading platform for users. The installation process is simple and easy to understand. Users only need to download the latest version of the installation package and follow the prompts to complete the installation step by step.

Gate.io is a popular cryptocurrency exchange that users can use by downloading its installation package and installing it on their devices. The steps to obtain the installation package are as follows: Visit the official website of Gate.io, click "Download", select the corresponding operating system (Windows, Mac or Linux), and download the installation package to your computer. It is recommended to temporarily disable antivirus software or firewall during installation to ensure smooth installation. After completion, the user needs to create a Gate.io account to start using it.
