Install Yii2.0 under Linux

Source: Internet
Author: User


1, if not installed Composer, then enter the following command in the terminal, first install Composer (wait a bit long, please be patient, the same as below):

12 #若复制到终端里运行不了,请手工输入(下同)curl -sS https://getcomposer.org/installer | php

2. Run the following command to install the Composer asset plugin:

1 php composer.phar global require "fxp/composer-asset-plugin:1.0.0-beta3"

An error may occur that throws the following exception:

Description Composer.phar file is wrong, download Composer.phar from Https://getcomposer.org/composer.phar, overwrite Composer.phar in current directory. Then re-execute step 2. The occurrence of this procedure indicates that this step has been successfully performed.

3, the above related composer environment installation is complete, select one of the application templates below, and start installing Yii2.0. An application template is a Web application package that contains the basic structure of yii.

To install the basic Application template, run the following command:

1 php composer.phar create-project yiisoft/yii2-app-basic /var/www/yii-test

To install the Advanced application template, run the following command:

1 php composer.phar create-project yiisoft/yii2-app-advanced /var/www/yii-test

The above command means to install the YII2.0 framework package into the "/var/www/yii-test" directory.

During the installation process, the following error may occur:

By editing the "Disable_functions" in the php.ini, the function in the prompt is removed and disabled to resolve.

The following account entry prompts appear during the installation process:

Enter your github account and password, and then wait for the installation to complete.

4. Then execute the "init" file under the current directory, such as:

0 and 1 Select one (0 for the development environment, 1 for the test environment), after the carriage return, the installation succeeds.

5, through the browser into the "http://localhost/frontend/web/index.php", appears as shown, the installation is successful.

Install Yii2.0 under Linux

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.