1. Continuing from the previous post: https://www.shuijingwanwq.com/2016/04/16/1006/
2. I executed the command, as shown in Figure 1, and got an error indicating that yum failed. The following method resolves this:
yum -y install wget screen python #for CentOS/Redhat

3. Based on my analysis, this error should be caused by a failed network connection. I executed the command to change ONBOOT=no to ONBOOT=yes, as shown in Figures 2 and 3:
vi /etc/sysconfig/network-scripts/ifcfg-enp0s3


4. After saving, I restarted the network interface by executing the command, as shown in Figure 4:
service network restart

5. I executed the command again, and it succeeded, as shown in Figure 5:
yum -y install wget screen python #for CentOS/Redhat

6. I executed the command to check the IP address of the current virtual machine, as shown in Figure 6:
ifconfig -a

7. I set up the port forwarding rules for the CentOS 7 network in VirtualBox, as shown in Figure 7:

8. I prepared to connect directly using PuTTY on Windows 10, as shown in Figure 8:

9. The connection succeeded, and it feels much more convenient than operating directly in the virtual machine, as shown in Figures 9 and 10:


10. wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz #Includes source code, downloadable both domestically and internationally, as shown in Figure 11:

11. Execute the command: tar xzf oneinstack-full.tar.gz, as shown in Figure 12:
cd oneinstack #If you need to modify the directories (installation, data storage, Nginx logs), 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 to the installation window
13. ./install.sh #Note: Do not execute this as sh install.sh or bash install.sh. For execution options, refer to: http://oneinstack.com/install/
14. Set up the port forwarding rules for the CentOS 7 network in VirtualBox, adding a rule to forward host port 9080 to subsystem port 80, as shown in Figure 13:

15. Open the URL: http://127.0.0.1:9080/ , as shown in Figure 14:

16. To add a virtual host, execute the commands. For execution options, refer to: http://oneinstack.com/install/ , as shown in Figure 15:
cd oneinstack
./vhost.sh

17. Navigate to /data/wwwroot/service.ygt.cm and create a new file named 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:

