Describes how to install Laravel using Composer in LAMP environment.

Source: Internet
Author: User
Tags how to install laravel
This article describes how to install Laravel using Composer in the LAMP environment. it briefly analyzes the installation of Composer in the Ubuntu Server environment and related commands and tips for installing Laravel using Composer, for more information about how to install Laravel in the LAMP environment, see the following article: Composer # php/php-tp-inst, this article briefly analyzes how to install Composer in Ubuntu Server environment and how to use Composer to install Laravel. For more information, see

This article describes how to install Laravel using Composer in the LAMP environment. We will share this with you for your reference. The details are as follows:

Install Composer

We use apt to install the Ubuntu Server:

$ sudo apt install composer

Install Laravel

First, create a project directory and enter the new directory to use Composer to install Laravel:

$ sudo mkdir -p /var/www/html/laravel/my_laravel$ cd /var/www/html/laravel/$ sudo composer create-project laravel/laravel --prefer-dist my_laravel

Because Apache in Ubuntu uses www-data users, it does not work properly to avoid permission issues. We will set the following three directories: public, storage, and vendor:

$ sudo chown -R www-data /var/www/html/laravel/my_laravel/public/$ sudo chown -R www-data /var/www/html/laravel/my_laravel/storage/$ sudo chown -R www-data /var/www/html/laravel/my_laravel/vendor/

At this point, we can use a browser to access Laravel.

192.168.56.101/laravel/my_laravel/public/

Note: 192.168.56.101 is the IP address of my VM.

The preceding section details how to install Laravel using Composer in the LAMP environment. For more information, see other related articles in the first PHP community!

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.