Because the work needs special to go from zero to learn laravel.
Really is like Laravel Chinese network said the appearance: First Contact Laravel Best is a key to install the integration package, save the Beginning is (composer) to be stumped to not start has been frustrated.
Be a whole day more, record down easy to meet friends less detours.
My environment is:
PHP-7.0.1
Centos-6.5
Mysql-5.6.28
Apache-2.2
In fact, it is related to the PHP environment.
First composer This step, this is to play laravel the beginning of the key steps, recommended (http://www.2cto.com/os/201512/452685.html) This article for installation guidance.
Once the composer is complete, it is ready to download the Laravel installation package.
Composer global require "Laravel/installer"
To make it easy to use here, edit the. bash_profile file to add an environment variable as follows:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7F/B7/wKioL1cqkWOy-u18AAAwrOLCG2c263.png "title=" Environment variable Laravel.png "alt=" Wkiol1cqkwoy-u18aaawrolcg2c263.png "/>
Borrow a Chinese language network for a passage
Once the installation is complete, you can use thelaravel new
command to create a new installation in the directory you specify.Laravel
application. For example:laravel new blog
command creates a name in the current directory namedblog
directory, which contains the newly installed Laravel, and all dependent packages are already installed. This method can be installed much faster than through Composer installation.
Laravel New Blog
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7F/B9/wKiom1cqk0mDbsNXAACDqlICzlc837.png "title=" QQ picture 20160505082337.png "alt=" Wkiom1cqk0mdbsnxaacdqliczlc837.png "/>
See this interface description composer and laravel have no problem, can be installed properly.
Laravel installation needs PHP mbstring,OpenSSL extension, these two extensions installation is troublesome, the index I recompile installed PHP (I left the source of PHP before the installation package), no source package can only suggest you go to Google.
Where there may be errors in the process:
[Email protected] html]# laravel New Blog
Crafting application ...
Running Composer as Root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted
Loading Composer repositories with the package information
Installing dependencies (including Require-dev) from lock file
Your requirements could not being resolved to an installable set of packages.
Problem 1
-Installation request for Laravel/framework v5.2.31, satisfiable by laravel/framework[v5.2.31].
-Laravel/framework v5.2.31 requires ext-mbstring *, the requested PHP extension mbstring is missing from yo ur system.
To enable extensions, verify that they is enabled in those. ini files:
-/etc/php.ini
You can also run ' PHP--ini ' inside terminal to see which files is used by PHP in CLI mode.
Application ready! Build something amazing.
[Email protected] html]# laravel New Blog
[RuntimeException]
Application already exists!
New [--dev] [--] [<name>]
You may encounter transmission exceptions and port problems when you install the download:
[Composer\downloader\transportexception]
The "http://packagist.org/p/provider-latest% 2455c2327270000a6a2c27c78e3109410de72e32fe9893b3c1269bd9507fdf3629.json "file could n
ot be downloaded (http/1.1 302 Found)
[Composer\downloader\transportexception]
Content-length mismatch
This is only because of the foreign website (transmission time is super, interrupt), only need to re-execute once, not once, and then execute again until successful.
Finally, there will be a permissions issue:
Test environment Phase I just gave it 777 permissions: chmod 777-r/var/www/html/blog/
When you're done, you'll see Laravel's initial main interface.
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7F/B9/wKiom1cqly3yXIUwAANpeQacAXU627.png "title=" Laravel after successful. png "alt=" Wkiom1cqly3yxiuwaanpeqacaxu627.png "/>
This article is from the "for the Future" blog, please be sure to keep this source http://tengteng412.blog.51cto.com/4751263/1770253
Talking about Laravel5. x Installing the centos6.5 system