• Linux + Apache + MySql + PHP + Laravel





    Update and Upgrade Ubuntu

    $ sudo apt-get update
    $ sudo apt-get upgrade


    Start out with the basics – Apache, MySQL and PHP + extensions

    $ sudo apt-get install mysql-server mysql-client apache2 php5 php5-cli
    libapache2-mod-php5 php5-mysql php5-curl php5-gd php-pear php5-
    imagick php5-mcrypt php5-memcache php5-mhash php5-sqlite php5-xmlrpc
    php5-xsl php5-json php5-dev libpcre3-dev


    Download Composer

    $ sudo curl -s$ https://getcomposer.org/installer | php

    Install Laravel

    $ sudo php composer.phar global require "laravel/laravel"
    change directory to directory for laravel project

    $ cd /var/www/html
    $ sudo php ~/composer.phar create-project --prefer-dist laravel/laravel ProjectName

    To give permision for server to access folder, then execute below command on terminal :

    $ sudo chown -R www-data:www-data /var/www/html
    $ sudo chown -R www-data:www-data /var/www/html/ProjectName/storage
    $ sudo chown -R www-data:www-data /var/www/html/ProjectName/vendor


    This error might happen :
    500 internal server error

    To fix this error change directory to project directory. Execute below command on terminal:


    $ cd /var/www/html/
    $
    sudo chmod 755 -R ProjectName
    $ sudo chmod -R o+w ProjectName/storage


    Afterward your project can be open at https://yourlocalhost/ProjectName/public

    Unfortunately to make Laravel really function for routing we need to make virtualhost for laravel. I will update later.

    Reference :
    1.
    https://snippets.khromov.se/debian-lamp-stack-in-one-command/2. https://stackoverflow.com/questions/31543175/getting-a-500-internal-server-error-on-laravel-
    5-ubuntu-14-04
    3. https://www.youtube.com/watch?v=7mWZLPdE2B4 
  • 0 comments:

    Post a Comment

    GET A FREE QUOTE NOW

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

    ADDRESS

    4759, NY 10011 Abia Martin Drive, Huston

    EMAIL

    contact-support@mail.com
    another@mail.com

    TELEPHONE

    +201 478 9800
    +501 478 9800

    MOBILE

    0177 7536213 44,
    017 775362 13