Still want to be elegant when developing under Windows?
Let's talk about the PHP environment we need to talk about next!
Multi-version PHP, Swoole, Xdebug, Mysql, Redis, Mongodb.
All of the above are installed in the Linux environment, while PhpStorm and the browser are installed in the Windows environment.
In order to facilitate the use of the above software management in the Linux environment, the pagoda management panel will be installed and used here (one-click creation of website, FTP, database, SSL; security management, scheduled tasks, file management, PHP multi-version coexistence and switching; built-in LNMP and LAMP), about the detailed introduction of the pagoda, please go to the official website of the pagoda to check
Now officially start to explain the process of setting up the PHP development environment:
1. Windows install VMware Workstation (virtual machine)
2.VM Ubuntu (Ubuntu Desktop 16.04LTS
3. Configure the file sharing directory in the Linux environment and the Windows environment in the virtual machine
4. Install PhpStorm under Windows
5. Install Pagoda in Ubuntu system
wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && sudo bash install.sh
6. Open the pagoda for the first time and select the LAMP or LNMP environment to install
7. Install PHP extensions reids, swoole, xdebug under the pagoda interface
8. Install Redis under the pagoda interface
9. Add a new website
10. Windows sets the hosts file to resolve the website domain name set in the previous step to your virtual machine IP
11. After completing the above operations, we can access the website normally on the browser, and then we start the php debugging environment (Xdebug+Phpstorm)
12. Modify the php configuration file in the pagoda to open xdebug, and restart php after the modification is complete
[Xdebug]
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_mode="req"
xdebug.remote_log="/tmp/xdebug.log"
xdebug.remote_port=9000
xdebug.remote_host=127.0.0.1 xdebug.remote_handler="dbgp" zend_extension=/www/server/php/71/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
13. Make sure that the Xdebug port in Phpstorm is the same as the Xdebug port in php just set