How to install laravel5.8 through composer in Centos7.3
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.