Laravel installation and configuration tutorial, laravel Configuration tutorial _ PHP Tutorial

Source: Internet
Author: User
Tags how to install laravel
Laravel installation and configuration tutorial, laravel Configuration tutorial. Laravel installation and configuration tutorial. laravel Configuration Tutorial: apache, nginx, or other web servers are required in the system environment. laravel uses some powerful PHP features, so you need to install and configure the tutorial in P laravel, laravel Configuration tutorial

System environment requirements

Apache, nginx, or other web servers;
Laravel uses some strong PHP features, so it can be executed only in PHP5.3 or later;
Laravel uses FileInfo library (http://php.net/manual/en/book.fileinfo.php) to detect the mime type of the file, which is included by default in PHP5.3, but in Windows users need to own in php. enable this module in ini. if you do not understand it, please refer to the following link: 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 hash, and before using this framework, you need to ensure that this extension is installed, you can use phpinfo (); check whether the web server is correctly installed. if not, check http://php.net/manual/en/book.mcrypt.php;

Install laravel

Download laravel: http://laravel.com/download;
Decompress the compressed package and upload it to the web server;
Set the key value in config/application. php. you can set a random content consisting of 32 strings;
Verify whether storage/views can be written;
Access your application in a browser;

Now you have installed Laravel. you need to know more about it.

Additional content

Install the following additional extensions so that you can make full use of Laravel.

SQLite, MySQL, PostgreSQL, or SQL Server PDO drivers.
Memcached or APC.

Question?

If you have any installation problems, try the following:

Make sure that the public directory is the root directory of your site (see the server configuration below)

If you use mod_rewrite, set the index item in application/config/application. php to null.

Verify that your storage folder is writable.

Server Configuration

Here we guarantee a basic apache configuration. the root directory of Laravel is:/Users/JonSnow/Sites/MySite.

The configuration information is as follows:

The code is as follows:



DocumentRoot/Users/JonSnow/Sites/MySite/public
ServerName mysite. dev

Note: We install/Users/JonSnow/Sites/MySite, and our DocumentRoot to/Users/JonSnow/Sites/MySite/public.

Laravel is started in a Windows environment, but does not require you to use Windows. you can do this in your favorite system.

The installation of the PHP runtime environment is not in the scope of this tutorial. here, only the basic requirements are described.

Web server:

PHP 5.3 and later versions
PDO module
Mcrypt module
MYSQL database
Environment used in this tutorial:

PHP 5.4.5
MYSQL 5.0.45
Install the Laravel framework:

Download the Laravel framework: Laravel official download | Github download
Decompress the framework to the server directory.
The Laravel framework is installed in two simple steps. 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 indicates that the installation is successful.


How to install laravel offline

Generally, the dependency management method is used to download and install the SDK. if you need to install the SDK offline, install it on a machine and copy the file as an offline package.

Upload laravel to the server

On the apache server, the. htaccess file is used to control file access and redirection. the. htaccess file is also written in laravel's public file to control routing.

The Ghost system environment requires apache, nginx, or other web servers. laravel uses some of the strong and powerful features of PHP, so it must be in the P...

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.