vi. installation of Laravel
under Ubuntu to build LNMP environment. Compile and install mysql,nginx,php. Finally, install the composer under the Lnmp premise and install the Laravel frame. Install laravel5.1 now.
Laravel is a simple, elegant PHP Web development Framework (PHP Web framework). It frees you from the messy code of noodles, and it helps you build a perfect web app, and every line of code can be concise and expressive.
CD to website root (customizable), here I am/usr/local/server/www
2. Execute command:sudo composercreate-project laravel/laravel test–prefer-dist
This means creating a laravel framework called Test , which automatically downloads the component and generates a Test folder in the root directory .
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/77/F1/wKiom1Zxhy2QevjEAAFivCUP_Ug622.png "style=" float: none; "title=" 1.png "alt=" Wkiom1zxhy2qevjeaafivcup_ug622.png "/>
If the following error occurs;
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/77/F0/wKioL1ZxhzfC4O6xAADXANJwpDE704.png "style=" float: none; "title=" 2.png "alt=" Wkiol1zxhzfc4o6xaadxanjwpde704.png "/>
To/home/edom/.composer the entire directory to 777 permissions, and then rerun.
Execute command: sudo chmod 777–r/home/edom/.composer/
then re -sudo composer create-project laravel/laraveltest--prefer-dist you might want to change the project name of the test because it already exists.
If created successfully, as shown in:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/77/F1/wKiom1Zxhy_zkXG6AACfe6dACRQ365.png "style=" float: none; "title=" 3.png "alt=" Wkiom1zxhy_zkxg6aacfe6dacrq365.png "/>
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/77/F0/wKioL1ZxhzqCnTovAADJSfTnnBk884.png "style=" float: none; "title=" 4.png "alt=" Wkiol1zxhzqcntovaadjsftnnbk884.png "/>
3. give storage permission to write.
Execute command: sudo chmod 775–r storage
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/77/F1/wKiom1ZxhzGzFyO5AAA84ezmKl0210.png "style=" float: none; "title=" 5.png "alt=" Wkiom1zxhzgzfyo5aaa84ezmkl0210.png "/>
4. Configuring Nginx and Web directories
Open nginx default configuration file:
sudo vim/usr/local/server/nginx/conf/nginx.conf
Previously configured as follows:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/77/F0/wKioL1Zxhzug-heRAADf3rEjxyM160.png "style=" float: none; "title=" 6.png "alt=" Wkiol1zxhzug-heraadf3rejxym160.png "/>
The changes are as follows:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/77/F1/wKiom1ZxhzOQ_0SsAADXf1q4nno068.png "style=" float: none; "title=" 7.png "alt=" Wkiom1zxhzoq_0ssaadxf1q4nno068.png "/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/77/F0/wKioL1Zxhz3AHj4sAAClazsH0ro482.png "style=" float: none; "title=" 8.png "alt=" Wkiol1zxhz3ahj4saaclazsh0ro482.png "/>
5. open localhost with a browser , or if a blank page appears, try 777 permissions for the entire Laravel project . (try to give 775 permission, or not, can only give 777 permissions.) Don't quite understand why. )
sudo chmod 777–r/var/local/server/www/test4
then re-access localhost.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/77/F1/wKiom1ZxhzTinyajAACXf_PG2ic988.png "style=" float: none; "title=" 9.png "alt=" Wkiom1zxhztinyajaacxf_pg2ic988.png "/>
from this, install laravel and create the project successfully!
This article from the "Good Learning Day Up" blog, please be sure to keep this source http://sunrising.blog.51cto.com/10729461/1725446
Vi. installation of laravel5.1