[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 inbasic
You 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, ^ _ ^.