type
status
date
slug
summary
tags
category
icon
password
这里写文章的前言:
一个简单的开头,简述这篇文章讨论的问题、目标、人物、背景是什么?并简述你给出的答案。
可以说说你的故事:阻碍、努力、结果成果,意外与转折。
- 安装php及其扩展
- 安装nginx
- 设置/etc/nginx/sites-available
- 链接到/etc/nginx/sites-enabled
- (可选)如果希望使用80端口,需要保证自己的站点设置了
server_name www.gbnc.com
最好同时也删除掉/etc/nginx/sites-enabled/default(这只是个超链接)nginx -t
测试配置文件systemctl reload nginx
重新加载配置
- 安装数据库 设置用户名密码
- 注意使用sql设置用户是 ‘【用户名】@local’ 实际使用的用户名是【用户名】
- 使用
gunzip
或其他方式导入xxx.sql.gz
- 设置生产环境
- 使用rsync上传项目到/var/www/[站点名](当然要先创建目录)
- 在site/default/settings.php中 注释掉使用settings.ddev.php的部分
- 在settings.php中设置数据库连接信息
- 设置nginx请求缓存大小
- 设置php内存限制大小 /etc/php/8.1/fpm/php.ini
memory_limit = 512M
- 设置盐值 RuntimeException: Missing $settings['hash_salt'] in settings.php.‣
- 上传文件大小
- php.ini:
post_max_size = 20M
upload_max_filesize = 20M
- nginx.conf:在http{}中 添加
client_max_body_size 20M
(不是等号 用空格) - 关闭twig调试
有关Notion安装或者使用上的问题,欢迎您在底部评论区留言,一起交流~
zcat 2025-4-14_10-54.sql.gz | mysql -u gbnc_user -p'attempt-cups-item' gbnc
root
dre-admin-apples-trusting
gbnc
gbnc_user
attempt-cups-item
- Author:Narohaz
- URL:https://narohaz.top/article/1d35fe46-04d5-8006-8ec9-cb736442b30a
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!