Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install laravel5.8 through composer in Centos7.3

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

In this issue, the editor will bring you about how to install laravel5.8 through composer in Centos7.3. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

First, install composer

Execute instruction curl-sS https://getcomposer.org/installer | php

Move php composer.phar to mv composer.phar / usr/local/bin/composer in the bin directory and rename it to composer

Enter the instruction to check the version to see if the installation is successful

Second, install laravel

Pay attention to the PHP requirements of the installation version you need

What Kaka uses here is that PHP7.2laravel is prepared to operate in the virtual machine without configuring conf separately, but directly operate in the html directory.

Execute to install composer create-project-- prefer-dist laravel/laravel blog "5.8.*" to check the version of laravle

III. Access testing

Find out the ip address of my virtual machine and then access the http://192.168.254.135/blog/public/index.php through the host

Fourth, fault tolerance

What is operated locally will not be affected, nor will it be affected by the online server.

In the same environment as Kaka, because it is a virtual machine, php-fpm may not restart after shutdown. The following error will occur. Do not panic when you encounter this error. Check whether your php-fpm is enabled.

Just execute the command systemctl start php-fpm

5. Set fpm self-startup

Kaka's PHP is installed directly using yum.

To set up fpm automatic startup, you only need to execute systemctl enable php-fpm.

6. Set ngixn self-startup

Adjust according to my nginx installation location, my installation location is / usr/local/nginx/

Execute cd / lib/systemd/system/

Create a vim nginx.service and write as follows

[Unit]

Description=nginx service

After=network.target

[Service]

Type=forking

ExecStart=/usr/local/nginx/sbin/nginx

ExecReload=/usr/local/nginx/sbin/nginx-s reload

ExecStop=/usr/local/nginx/sbin/nginx-s quit

PrivateTmp=true

[Install]

WantedBy=multi-user.target

Set self-boot systemctl enable nginx

The above is how to install laravel5.8 through composer in the Centos7.3 shared by Xiaobian. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report