A new computer, a Mac, a special egg pain of various environments installed. Two hours, finally the development environment has been well-equipped.
Xampp Needless to say, Phpstorm (Java EE 6.0), navicat for MySQL, a bunch of registration code, cracked version can find people headache. Finally, the deal is OK.
Here is the business.
Yii Download, composer installed, Yii can not initialize, has been reported permission denied. Frankly speaking, I am Linux is a small white, under the Mac Console (finder-> application---utilities---terminal. App), the command line is as follows
Cd/applications/xampp/htdocs find the download good Composer.phar
Set alias composer= "/applications/xampp/htdocs/composer.phar" (composer and yii are here)
And from there, it's a privilege issue.
Composer ....
The sudo command line does not work and finally solves this problem with chmod a+x "/applications/xampp/htdocs/composer.phar"
Below
Composer, start composer.
Composer Create-project--prefer-dis Advanced Advanced (online search for a line of code testing, do not know the role of no, although the following error)
PHP init initializes the project, which is the exact same as Windows.
Configuring a virtual Host
Sudo/etc/hosts//Because the MAC has permission restrictions, so need to temporarily get root permissions to add on the virtual host domain name Ctrol+x save exit, and Linux inconsistent OH
Modifying the XAMPP configuration file
sudo nano/applications/xmapp/xamppfiles/etc/httpd.conf, press Ctrl+w to search for "httpd-vhosts.conf", remove the previous # comment, and ensure that vhosts is introduced The virtual host configuration file.
<directory "/applications/xampp/htdocts/advanced" >
Options All
Allowoverrid All
Order Allow,deny
Allow from all
</Diretory>
Open file Httpd-vhosts.conf file, directory is/applications/xampp/xamppfiles/etc/extra/httpd-vhosts.conf, enter command in terminal as follows
<virtualhost *: the>ServerAdmin frontend.com DocumentRoot"/applications/xampp/htdocs/advanced/frontend/web"ServerName www.frontend.com errorlog"Logs/frontend.com.error.log"Customlog"Logs/frontend.com.error.access.log"Common</virtualhost><virtualhost *: the>ServerAdmin backend.com DocumentRoot"/applications/xampp/htdocs/advanced/backend/web"ServerName www.backend.com errorlog"Logs/backend.com.error.log"Customlog"Logs/backend.com.error.access.log"Common</VirtualHost>
Install Yii under Mac