请注意,本文编写于 486 天前,最后修改于 476 天前,其中某些信息可能已经过时。
CentOS 7
步骤较为繁琐,但不复杂,请耐心食用
# Centos
$ yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
# Ubuntu/Deepin
$ wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh
PHP7.0+
和Nginx
PHP
版本,点击设置-安装扩展
,安装fileinfo
和opcache
禁用函数
,删除exec
、shell_exec
、proc_open
、proc_get_status
、putenv
,即不禁用这些函数Composer
为国内源,国外服务器请跳过此步- 如果提示更新,则根据提示执行命令更新,再执行下面的命令换源
- 如果提示不要使用`root`权限,只是警告,没有影响
$ composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
one.naraku.cn
$ cd /www/wwwroot/你的站点
$ git clone https://github.com/WangNingkai/OLAINDEX.git tmp
$ mv tmp/.git .
$ rm -rf tmp
$ git reset --hard
$ composer install -vvv # 这里确保已经安装composer成功,如果报权限问题,建议先执行权限命令
$ chmod -R 755 storage/
$ chown -R www:www *
$ php artisan od:install # 此时站点输入绑定的域名,然后输入yes
$ chmod 777 storage/app/config.json # 授权,否则安装报403
网站目录
,关闭防跨站攻击,并将运行目录设置为/public
,点击保存。伪静态
,选择laravel5
,点击保存配置文件
,注释以下内容,点击保存# location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
# {
# expires 30d;
# error_log off;
# access_log /dev/null;
# }
#
# location ~ .*\.(js|css)?$
# {
# expires 12h;
# error_log off;
# access_log /dev/null;
# }
SSL
,再点击Let's Encrypt
,申请,并开启强制HTTPS
admin/12345678
登录redirect_uri
栏输入https://绑定的域名/oauth
并点击申请,如https://one.naraku.cn/oauth
应用密钥
,复制下来后面会用到,然后点击返回快速启动
APPID
,这个也会用到初始化安装
页面,将https://绑定的域名/oauth
、应用密钥
、APPID
分别输入配置栏,点击保存500错误
,一般是因为权限问题。打开终端,在网站目录下,输入以下命令$ chown -R www:www *
$ chmod -R 755 storage/
$ git pull
$ composer install -vvv # 无版本更新只需执行到此(同时执行最后两条权限命令)
$ chmod -R 755 storage # 补充,保证缓存的写入权限,否则500
$ chown -R www:www *
$ cd /www/wwwroow/你的站点 # 进入站点目录
$ php artisan od:password
> 输入新用户名
> 输入新密码
> 是否重设密码,输入yes
版权属于:Naraku
本文链接:https://cloud.tencent.com/developer/article/1853390
本站所有原创文章均采用 知识共享署名-非商业-禁止演绎4.0国际许可证 。如需转载请务必注明出处并保留原文链接,谢谢~