Home  >  Article  >  PHP Framework  >  Laravel environment construction: Details of the steps to build the Laravel5.5 framework

Laravel environment construction: Details of the steps to build the Laravel5.5 framework

不言
不言Original
2018-08-11 09:26:162903browse

The content of this article is about building the Laravel environment: The details of the steps to build Laravel5.5 (lunix-ubuntu) have certain reference value. Friends in need can refer to it. I hope it will be helpful to you. help.

Basic configuration

 PHP >= 7.0.0

 PHP OpenSSL extension

 PHP PDO extension

 PHP Tokenizer extension

PHP XML extension

1: nginx

  sudo apt-get update
  sudo apt-get install nginx

(Install nginx1.10* on ubuntu14)

2: php7.*

sudo add-apt-repository ppa:ondrej/php
  sudo apt-get install php7.1 php7.1-cli php7.1-fpm php7.1-gd php7.1-json

Install several extensions:

sudo apt-get install phpunit
  sudo apt-get install php7.1-zip
  sudo apt-get install php7.1-mbstring
  sudo apt-get install php7.1-xml

3: Install composer  

curl -sS https://getcomposer.org/installer | php
    /usr/bin/php composer.phar --version

 Add global variables

   sudo mv composer.phar /usr/local/bin/composer

 View version number

    sudo composer -v

4: Create laravel project

1. Create a new folder

    sudo mkdir /data
    cd /data

2. Create a project

  sudo composer create-project --prefer-dist laravel/laravel webLaravel "5.5.*"
      cd webLaravel
      sudo chmod -R 777 storage

5. Configure nginx

cd /etc/nginx/sites-available /

   sudo cp default webLaravel.conf

   sudo vim webLaravel.conf

Add the following configuration

 root /data/webLaravel/public;
 index index.php;
 server_name exc.tts.com;  (你的域名)

 location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/run/php/php7.1-fpm.sock;
        }

Generate soft connection

cd /etc/nginx/sites-enabled
sudo ln -s /etc/nginx/sites-available/webLaravel.conf webLaravel.conf

Restart nginx

  sudo service nginx restart

browser and visit exc.tts.com. success!

Related recommendations:

The design process of the configuration management system under the Laravel framework (with code)

Real-time chat room: based on Laravel Pusher Vue implements event broadcasting

Laravel local environment construction: Homestead development environment deployment

The above is the detailed content of Laravel environment construction: Details of the steps to build the Laravel5.5 framework. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn