Table of contents
VMware's CentOS7 mirror installation
1. Open VMware and click New Virtual Machine
2. The default content is the next step
4. Select the CentOS7 version of Linux
5. Select the storage location
6. Select the number of allocated processors
3. Set the installation location
7. Wait for the installation to complete
Create Nginx installation script
Mirror address:
Just click to download.
https://mirrors.tuna.tsinghua.edu.cn/centos-vault/7.8.2003/isos/x86_64/CentOS-7-x86_64-DVD-2003.iso
VMware's CentOS7 mirror installation
1. Open VMware and click New Virtual Machine
Select Custom (Advanced) here and select Next
2. The default content is the next step
3. Select mirroring later
4. Select the CentOS7 version of Linux
5. Select the storage location
6. Select the number of allocated processors
7. Allocate memory
This place needs to be allocated according to the memory size of your own machine.
8. Use NAT network
9. Default LSI Loginc(L)
10. Default SCSI(S)
11. Create a new virtual disk
12. Allocate disk space
13. Default next step
14. Custom hardware
15. Select the mirror address
After setting, click Close
16. Finished
CentOS7 initial configuration
1. Start the image
This place can be skipped by ESC at startup
2. Choose language
we choose chinese
3. Set the time
3. Set the installation location
4. Set up the network
This step is very important, if you do not set it, you will definitely not be able to access the Internet.
Turn on the network button, you can see that the driver name of our network is called [ens33]
It takes a while after it is turned on, and we can directly connect to this Linux service using the IP address of this network.
After confirming, click [Finish] in the upper left corner.
5. Start the installation
6. Set login pwd
Here I like to set six zeros, because the setting is simple, it needs to be pressed twice
need to click here twice
7. Wait for the installation to complete
When finished, you can see the word Restart.
Install Nginx test
link using xshell
link successful
Create Nginx installation script
For convenience, create a [installNginx.sh] file directly under [/root], paste the content, save it with [:wq], and execute the script file through [source].
#!/bin/bash
# 安装库
yum install epel-release -y
# 安装 Nginx
yum install nginx -y
# 启动 Nginx 服务
systemctl start nginx
# 关闭防火墙
systemctl stop firewalld
# 禁用防火墙
systemctl disable firewalld
# 设置 Nginx 开机自启动
sudo systemctl enable nginx
display effect
Execute it.
Access test via IP
It can be seen that the access is CentOS, and what we need to access is nginx, but we can see Nginx with the wrong path
The wrong path, you can see nginx here, which means that our nginx must be installed successfully.