1. For the first connection, select Yes, as shown in Figure 1:

2. Because the instance type is I/O-optimized and the disk type is SSD cloud disk, refer to this URL: https://help.aliyun.com/knowledge_detail/6689611.html
3. Copy the download link for the tool auto_fdisk_ssd.sh, as shown in Figure 2:
http://aliyun_portal_storage.oss-cn-hangzhou.aliyuncs.com/help%2Fecs%2Fauto_fdisk_ssd.zip?spm=5176.776689611.0.0.DmH9za&file=help%2Fecs%2Fauto_fdisk_ssd.zip

4. Download the tool auto_fdisk_ssd.sh. After pasting the download link, you need to modify it, as shown in Figure 3:
wget http://aliyun_portal_storage.oss-cn-hangzhou.aliyuncs.com/help/ecs/auto_fdisk_ssd.zip

5. Extract auto_fdisk_ssd.zip, as shown in Figure 4:
unzip auto_fdisk_ssd.zip

6. Automatically detect whether there is an unpartitioned data disk, format the new data disk, and mount it automatically. Execute the command, as shown in Figures 5 and 6:
bash auto_fdisk_ssd.sh


7. Execute the command. Refer to the URL: http://oneinstack.com/install/ , as shown in Figure 7:
yum -y install wget screen python #for CentOS/Redhat

8. Execute the command, as shown in Figure 8:
wget http://aliyun-oss.linuxeye.com/oneinstack-full.tar.gz #Download for Alibaba Cloud users

9. Execute the command, as shown in Figure 9:
tar xzf oneinstack-full.tar.gz

10. Edit the options.conf file and replace all instances of /data/ with /alidata1/, as shown in Figure 10:
cd oneinstack #If you need to change the directory (installation, data storage, Nginx logs), please modify the options.conf file
vim options.conf

11. Execute the command and restart at the end, as shown in Figures 11 and 12:
./install.sh #Note: Do not execute it as sh install.sh or bash install.sh


12. Open the IP address, as shown in Figure 13:

13. Add a virtual host, as shown in Figure 14:

14. Edit the /usr/local/nginx/conf/vhost/service.ygt.cm.conf file, as shown in Figure 15:

15. Add an FTP account, as shown in Figure 16:
./pureftpd_vhost.sh

16. Use FlashFXP to connect to FTP and finish uploading the program, as shown in Figure 17:


17. Edit the /usr/local/nginx/conf/vhost/service.ygt.cm.conf file, as shown in Figure 18:
service nginx restart
service php-rpm restart

18. Open the URL: http://service.ygt.cm , as shown in Figure 19:

19. Edit service.ygt.cm/www/config/main-local.php to enable URL optimization, as shown in Figure 20:

20. Open the URL: http://service.ygt.cm/site/about , which returns a 404 Not Found, as shown in Figure 21:

21. Edit the /usr/local/nginx/conf/rewrite/other.conf file, as shown in Figure 22:
Reference URL: http://www.yiiframework.com/doc-2.0/guide-start-installation.html
vim other.conf
location / {
# If a real existing file cannot be found, dispatch the request to index.php
try_files $uri $uri/ /index.php?$args;
}

22. Open the URL: http://service.ygt.cm/site/about , as shown in Figure 23:

23. Check whether the current PHP environment meets the most basic requirements of Yii. Copy requirements.php to service.ygt.cm/www/web/requirements.php and edit it, as shown in Figure 24:
$frameworkPath = dirname(__FILE__) . ‘/../../vendor/yiisoft/yii2’;

24. Open the URL: http://service.ygt.cm/requirements.php and find that the Fileinfo extension is not installed, as shown in Figure 25:

25. Refer to the URL: http://oneinstack.com/question/oneinstack-how-to-support-the-fileinfo/ to compile and install fileinfo, as shown in Figure 26:

26. Open the URL: http://service.ygt.cm/requirements.php and find that the Fileinfo extension is now installed, as shown in Figure 27:

27. Install the redis extension, as shown in Figure 28:
cd /usr/local/php/bin/
./pecl install redis
# Load fileinfo
echo ‘extension=redis.so’ > /usr/local/php/etc/php.d/ext-redis.ini
service php-fpm restart

28. Check phpinfo() and find that the redis extension is installed, as shown in Figure 29:

29. Configure php.ini to make session storage support redis, as shown in Figure 30:
vim /usr/local/php/etc/php.ini
; session.save_handler = files
session.save_handler = redis
; session.hash_function = 0
session.hash_function = “sha512”
session.save_path = “”
Finally, restart the ECS;

30. For security settings, rename or delete all files under /alidata1/wwwroot/default, as shown in Figure 31:

