The process of installing an LNMP environment based on OneInstack on CentOS 7 in VirtualBox
1. Continue to the previous article:https://www.shuijingwanwq.com/2016/04/16/1006/
2. Execute the command, as shown in Figure 1, and report an error, indicating that yum has failed to execute. The following methods can be solved:
yum -y install wget screen python #for centos/redhat
3. According to the analysis, it should be the error caused by the network connection failure, execute the command, and change the onboot=no to onboot=yes, as shown in Figure 2, 3:
vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
4. After saving, restart the network card and execute the command, as shown in Figure 4:
Service Network Restart
5. Execute the command again, success, as shown in Figure 5:
yum -y install wget screen python #for centos/redhat
6. Execute the command to check the IP address of the current virtual computer, as shown in Figure 6:
ifconfig -a
7. Set the port forwarding rules of the CentOS 7 network in VirtualBox, as shown in Figure 7:
8. Prepare to connect directly through putty on windwos 10, as shown in Figure 8:
9. The connection is successful, and it feels much more convenient than the virtual machine operation, as shown in Figure 9 and 10:
10,wgethttp://mirrors.linuxeye.com/oneinstack-full.tar.gz # Contains the source code, which can be downloaded at home and abroad, as shown in Figure 11:

wgethttp://mirrors.linuxeye.com/oneinstack-full.tar.gz#Include source code, which can be downloaded at home and abroad
11. Execute the command:tar xzf oneinstack-full.tar.gz, as shown in Figure 12:
cd oneinstack #If you need to modify the directory (installation, data storage, nginx log), please modify the options.conf file
12. Execute the command:
screen -s oneinstack # If the network is interrupted, you can execute the command `screen -r oneinstack` to reconnect the installation window
13,./install.sh #Note: Please do not sh install.sh or bash install.sh to execute like this, the execution selection can refer to:http://oneinstack.com/install/
14. Set the port forwarding rules of the CentOS 7 network in VirtualBox, and add the host port 9080 to forward to the subsystem port 80, as shown in Figure 13:
15. Open the URL:http://127.0.0.1:9080/, as shown in Figure 14:
16. Add a virtual host, execute the command, and execute the selection for reference:http://oneinstack.com/install/, as shown in Figure 15:
cd oneinstack
./vhost.sh
17. Enter /data/wwwroot/service.ygt.cm, create a new file index.php, as shown in Figure 16:
cd /data/wwwroot/service.ygt.cm
vim index.php
18. Open the URL:http://service.ygt.cm:9080/, as shown in Figure 17:















