menu

Laravel Installation Steps


Laravel Installation Steps – We can simply install laravel using these steps.


Laravel Installation Steps.

Let us understand how to install laravel.

Steps:-

There are some followings Steps to install laravel.

  • 1. Server requirement.
  • 2. Installing laravel.
  • 3. Configuration.
  • 4. Web server configuration.

1. Server requirement.

The laravel farmework has a some system requirements. all of these requirements are satisfied by laravel homestead virtual machine, so it is higly recommended that you use homestead as your local laravel developement requiement.

Still, if you are not using homestead, you will need to make sure your server meet the following requirements:
PHP 5.6.4
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension

2. Installing laravel.

Laravel utilizes Composer to manage its dependencies. So, before using laravel, make sure you have composer installed in your computer.

Via Laravel Installer.

First, download the laravel installer using composer.

Make sure to put the $HOME/.composer/vender/bin directory in your $PATH so the laravel executable can be located by your system.

Once installed, the laravel new command will be created a fresh laravel installation in your specific directory.

Via Composer Create-Project.

You may also install laravel by using the composer create project command in your terminal.

Local Development Server.

If you have PHP installed separated and you would like to use PHP is built in development server to serve your application, you may use the serve Artisan command. This command will start a development serevr at
http://localhost:8000:

3. Configuration.

Public directory.

After installing laravel, you should configure your web server’s document/web root to be the public directory. The index.php in this directory serves as the front controller or all HTTP requests entering
your application.

Configuration Files.

All of the configuration files foe the laravel framework are stored in config directory.

Directory Permissions.

After installing laravel, you have to need configure some permission. Directories within the storage and the bootstarp/cache directories should be writable by your web server or laravel will not run. If you are using the Homestead virtual machine, these permissions should already be set.

Application Key.

The next thing after installing Laravel is set your application key to a random string. If you installed Laravel via composer or the Laravel installer, this key has already been set for you by the php artisan key:generate command.

If the application key is not set, yours users sessions and other encrypted data will be not secure!

Additional Configuration.

laravel needs almost no other configuration out of the box. you are free to get started developing. However you may wish to review the config/app.php file and its documentation

You may also want to configure a few additional components of laravel, such as:
Cache
Database
Session

4. Web server configuration.

Pretty URLs

Apache

laravel includes a public/.htaccess file that is used to provide URL without the index.php front controller in the path. before serving laravel with apache be sure to enable the mod_rewrite module so the .htaccess file will be honored by the server.

Nginx

If you are using nginx, the following directive in your site configuration will direct all requests to the index.php front controller:

Advertisements