System environment requirements
apache, nginx or other web server;
Laravel uses some powerful features of PHP, so it needs to be executed on PHP5.3 or higher;
Laravel uses the FileInfo library (http://php.net/manual/en/book.fileinfo.php) to detect the mime type of the file. This library is included by default in PHP5.3, but in Windows users need to Enable this module in php.ini. If you don’t understand, you can look here: http://php.net/manual/en/fileinfo.installation.php;
Laravel uses the Mcrypt library (http://php.net/manual/en/book.mcrypt.php) to encrypt and generate hashes. Before using this framework, you need to ensure that this extension is installed. You can pass phpinfo(); Check whether it is installed correctly in the web server. If not, you can check: http://php.net/manual/en/book.mcrypt.php;
Install laravel
Download laravel: http://laravel.com/download;
Unzip the compressed package file and upload it to the web server;
Set the value of key in config/application.php, you can set a random content composed of 32 strings;
Verify whether storage/views is writable;
Access your application in a browser;
At this point you have completed a Laravel installation, there are more things to know here.
Extra Content
Install some additional extensions below so you can get the most out of Laravel
SQLite, MySQL, PostgreSQL, or SQL Server PDO drivers.
Memcached or APC.
Question?
If you have installation issues, try the following:
Make sure the public directory is the root directory of your site (see server configuration below)
If you use mod_rewrite, set the index item in application/config/application.php to empty.
Verify that your storage folder is writable.
Server Configuration
Here we guarantee a basic apache configuration. Our Laravel root directory is: /Users/JonSnow/Sites/MySite
The configuration information is as follows:
Note: We installed to /Users/JonSnow/Sites/MySite and our DocumentRoot to /Users/JonSnow/Sites/MySite/public.
The Windows environment is used to get started with Laravel, but you are not required to use Windows. You can do it under your favorite system.
The installation of the PHP operating environment is beyond the scope of this tutorial. Here we only explain the basic requirements.
Web server:
PHP 5.3 and above
PDO module
Mcrypt module
MYSQL database
The environment used in this tutorial:
PHP 5.4.5
MYSQL 5.0.45
Install Laravel framework:
Download the Laravel framework: Laravel official download | Github download
Unzip the framework to the server directory
The Laravel framework is installed in a simple two-step process. To test whether the installation is successful, visit:
http://localhost/public/
The public directory is the folder that comes with the framework. If you see the initial interface of laravel, it means that it has been installed successfully.
Generally, it is downloaded and installed using dependency management. If you need to install it offline, install it on a machine first and then copy the file as an offline package.
For Apache server, .htaccess file is used to control file access and jump. Laravel’s public also has .htaccess file to control routing.