Install Yii under Mac

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.