One: Install a virtual machine. Process omitted (self-Baidu)
Step 2: Configure the IP address of the virtual machine.
The IP address configuration is based on the Vm configuration of Dashen_Akun to install CentOS-7-Minimal. Review the specific configuration again. For detailed reference, you can go to _A Kun to learn.
Three: Install the lnmp environment
Open the installed and configured centos7.4
(1) Check the system version and install the installation package of each version according to the system version
# cat /etc/-release
(2) Update the yum package
# yum update #Update the yum package to facilitate the installation of the lnmp environment
yum -y install wget screen curl python #for CentOS/Redhat 或
# apt-get -y install wget screen curl python #for Debian/Ubuntu
wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz #Contains source code, can be downloaded at home and abroad
tar -zvxf oneinstack-full.tar.gz #Unzip the installation package
cd oneinstack #If you need to modify the directory (installation, data storage, Nginx log), please modify the options.conf file and enter the installation package directory
./install.sh # Execution file Note: Do not execute sh install.sh or bash install.sh like this
screen -S oneinstack #If the network is interrupted, you can execute the command `screen -R oneinstack` to reconnect the installation window
Note: The order of successful installation of pictures is not the order of normal installation,
Add add-ons
./addons.sh
lnmp environment installed successfully
Fourth, configure the local host file
The author uses xshell, the first picture, and sublime2.
Here, in order to access the virtual machine conveniently, or to avoid the change of the IP address of the virtual machine, the program needs to make a lot of modification to the configuration file.
We can do a mapping directly in the host. Generally in the C:\Windows\System32\drivers\etc
directory, it can be opened with Notepad, Sublime , etc. An additional line is the IP address of the virtual machine.
Before opening hosts, please set the hosts file access permissions. Right click and select file properties
1. Add the IP of our virtual machine
After the configuration is complete, use xshell to connect to the virtual machine
At this time, we need to remember our virtual machine IP. If you do not understand the IP configuration, please refer to step 2.
connection succeeded!
2.xftp use
We used xshell to connect to the virtual machine before, then we will use xftp for file transfer
open our xftp
Our web files are located at
We can see that the web update package is placed in this location for local testing!
Thanks! !