Home > PHP Framework > Laravel > body text

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

不言
Release: 2018-08-11 09:26:16
Original
2975 people have browsed it

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
Copy after login

(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
Copy after login

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
Copy after login

3: Install composer  

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

 Add global variables

   sudo mv composer.phar /usr/local/bin/composer
Copy after login

 View version number

    sudo composer -v
Copy after login

4: Create laravel project

1. Create a new folder

    sudo mkdir /data
    cd /data
Copy after login

2. Create a project

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

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;
        }
Copy after login

Generate soft connection

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

Restart nginx

  sudo service nginx restart
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!