X

    Get a Quote

    Laravel Development

    How to install Laravel

    917 views
    Amit Shukla

    Laravel Installation Services

    Installation Laravel framework

    In five easy steps, you can install Laravel and get it set up on your system.

    Step 1 – What do I need?

    Before you install Laravel, you will need to check that you have all of the required elements,
    as follows:

    =>Laravel requires a web server environment and will run in Apache, IIS, and Nginx easily.
    Laravel should run in any server environment that supports PHP. The easiest way to
    set up a local webserver for development is to install XAMPP (Windows), MAMP (Mac
    OSX), or Apache with PHP5 on through a package manager on Linux.

    =>Laravel is written in the PHP scripting language. Currently, Laravel v3.2.5 requires a
    minimum of PHP v5.3 to run.

    =>Laravel requires that you have the FileInfo and Mcrypt libraries installed. Conveniently,
    they are almost always installed by default.

    =>For our QuickStart application, we require a database. Out of the box, Laravel supports
    MySQL, MSSQL, PostgreSQL, and SQLite.

    Step 2 – Downloading Laravel

    The easiest way to download Laravel is as a compressed package from http://laravel.com/download.

    Alternatively, you can download Laravel by cloning its git repository from GitHub.com
    with the following command.

    git clone git@github.com:laravel/laravel.git

    It would be better that you download the most current stable build.

    Extract the contents of the compressed package into the directory that you store your

    web applications. Typical locations include /Users/Shawn/Sites, c:\sites, and

    /var/www/vhosts/ depending on your operating system.

    We’ll assume that your first Laravel installation is in c:\sites\myfirst\.

    Mobile App Development Ad

    Step 3 – Configuring hosts

    Let’s go ahead and set up our webserver to host our site. We need to choose a hostname
    for our example application. This is our first application and we’re working on our local
    development environment, so let’s use http://myfirst.dev?.

    In Linux and OSX, simply add the following line to your /etc/hosts file:
    127.0.0.1 first.dev
    Windows users should add that line to their c:\windows\system32\drivers\etc\
    hosts file.
    Now you should be able to ping me first. dev and see that it resolves to 127.0.0.1.

    Step 4 – Setting up your VirtualHost

    Now that we have a hostname we need to tell our web server where to find the Laravel
    installation. Add the following VirtualHost configuration to your Apache webserver
    configuration and replace DocumentRoot with the path to your Laravel installation’s

    public directory.

    ServerName is my first.dev
    DocumentRoot c:/sites/myfirst/public

    It’s very important to note that DocumentRoot points to Laravel’s public directory.
    There are multiple security reasons for this. A momentary server misconfiguration can
    expose secure information, such as your database passwords.

    Step 5 – Restarting your web server and testing

    Now that you’ve installed the Laravel files, added your host declaration, and updated your
    web-server configuration you’re ready to go! Restart your web-server software and go to
    http://myfirst.dev in your browser. You should see the Laravel splash page!

    And that’s it!
    By this point, you should have a working installation of Laravel and are free to play around
    and discover more about it.

    You can hire our team for any assistance. We are one of the Best Software Development Companies working worldwide. Please connect with us for any Custom Web Application requirements. We are on the list of Top India Software Development Companies.

    Get a free quote: Contact Us

    App Development Company Add

    Thanks for reading our post “How to install Laravel”, please connect with us for any further inquiry. We are Next Big Technology, a leading web & Mobile Application Development Company. We build high-quality applications to full fill all your business needs.

    Avatar for Amit
    The Author
    Amit Shukla
    Director of NBT
    Amit Shukla is the Director of Next Big Technology, a leading IT consulting company. With a profound passion for staying updated on the latest trends and technologies across various domains, Amit is a dedicated entrepreneur in the IT sector. He takes it upon himself to enlighten his audience with the most current market trends and innovations. His commitment to keeping the industry informed is a testament to his role as a visionary leader in the world of technology.