Laravel 安装

1.Install Composer:
下载安装:
https://getcomposer.org/download/
or
https://developer.aliyun.com/composer

设置镜像地址:
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

sudo mv composer.phar /usr/local/bin/composer
chmod +x /usr/local/bin/composer
2.Install Laravel:
composer global require laravel/installer

sudo yum install unzip

composer create-project --prefer-dist laravel/laravel blog "6.*"

cd /usr/share/nginx/html/blog
chmod -R 755 ../blog/
chmod -R 777 storage/
chmod -R 777 bootstrap/cache/

php artisan key:generate
3.Web Server Setting:
vi /etc/nginx/conf.d/default.conf
root   /usr/share/nginx/html/blog/public;
location / {
    try_files $uri $uri/ /index.php?$query_string;
}

vi /etc/php.ini
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus     ,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinf     o,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,exec,passthru,chroot,shell_exec,system,chgrp,chown,dl,set_time_limit     ,show_source,highlight_file,gzinflate,str_rot13,pfsockopen,syslog,readlink,symlink,stream_socket_server,leak,popepassthru,escapeshellcmd     ,max_execution_time,ini_alter,ini_restore,popen,pclose,proc_open,proc_close,proc_get_status,phpinfo,escapeshellarg,chmod
;,rename,assert,mkdir,copy,delete,rmdir,chdir,dir,ini_set,putenv,getcwd
;,file,fopen,fwrite,unlink,file_get_contents,fputs,opendir,readdir,scandir
4.Test Laravel:
http://localhost/

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

5 × 5 =