[Yii series] Yii2.0 installation and debugging, yii series yii2.0

Source: Internet
Author: User

[Yii series] Yii2.0 installation and debugging, yii series yii2.0

Next, we finally chose the Yii framework as our main development framework. Today, I will talk to you about how to install and debug Yii2.0, we will talk to you later about how to quickly compile code on Yii2.0.

Install Yii2.0

Okay, the Composer tool is.

Switch to a Web-accessible directory and run the following command to install Yii:

$composer global require "fxp/composer-asset-plugin:~1.1.1"$composer create-project --prefer-dist yiisoft/yii2-app-basic basic

What do these two commands mean?

The first command installs Composer asset plugin, which is required to manage the bower and npm packages through Composer. This command takes effect globally, once and for all.

The second command installs Yii inbasicYou can also select other names.

During the installation process, you may need to authenticate the github account Token. How can this problem be generated.

Open your github homepage. Click the arrow in the upper-right corner of your avatar and click Setting in the drop-down box.

On the Personal settings page, click the last [Personal access tokens] In the left-side navigation bar ]. If you have created a token before, use it directly. If not, create one.

Specify the purpose of the token and the permissions to be configured. After the token is generated, a token will be generated to copy this large string. You can directly copy it when the command line requires you to input the token.

This prompt is displayed, indicating that the token has been stored and configured. You can continue to install it.

Installation is a long process. I have waited for about two hours. After installation, you can open it in the browser.

When opening a folder, you may encounter insufficient folder permissions and Access denied. Just execute the following statements.

#chmod 777 runtime#chmod -R 777 assets#chmod -R 777 web/assets

Enter http: // remote IP/app/yii/web/index. php In the browser to access the Yii framework initialization page.

As for how to build a code library locally, use a remote server as the production environment for release and deployment, and use the code cloud mentioned in [management tools] To publish Code together, as we will talk about in the next section, ^ _ ^.

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.