From 0e195120c581ea1a9a42a4c8d75f6d7fddaf8eb3 Mon Sep 17 00:00:00 2001 From: hellcat <> Date: Sun, 6 Jul 2025 16:17:08 +0800 Subject: [PATCH] no message --- {env => just}/github-1 | 0 {env => just}/githubn.sql | 0 just/tom无脑流程.text | 82 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) rename {env => just}/github-1 (100%) rename {env => just}/githubn.sql (100%) create mode 100644 just/tom无脑流程.text diff --git a/env/github-1 b/just/github-1 similarity index 100% rename from env/github-1 rename to just/github-1 diff --git a/env/githubn.sql b/just/githubn.sql similarity index 100% rename from env/githubn.sql rename to just/githubn.sql diff --git a/just/tom无脑流程.text b/just/tom无脑流程.text new file mode 100644 index 0000000..a833f55 --- /dev/null +++ b/just/tom无脑流程.text @@ -0,0 +1,82 @@ + +#无脑按顺序执行 + +安装环境先 + +mkdir /var/www/.ssh + +sudo apt update +sudo apt install openssh-client +ssh-keygen -t rsa -b 4096 -C "your_email@example.com" +生成地址写 /var/www/.ssh/id_rsa_邮箱不要后缀 + +mkdir /www/wwwroot +cd /www/wwwroot + +apt install git + +git clone https://gitea.diaodu.us/tom/github + +mv github github-x.diaodu.us + +cd进去 + +chmod -R 777 # 第一遍需要777权限 +chmod -R 755 * # 然后改成这个 +chown -R www-data:www-data * + +mkdir github + +chmod -R 777 github + +just里取出env,配置一下 + +/etc/nginx/nginx.conf 用户改为www-data + +CREATE DATABASE github CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +CREATE USER 'github'@'localhost'; +GRANT ALL PRIVILEGES ON github.* TO 'github'@'localhost' IDENTIFIED BY 'hotshotgg'; +FLUSH PRIVILEGES; + +just里有sql,导入 + + + + + + + +CREATE DATABASE github CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +CREATE USER 'github'@'localhost'; +GRANT ALL PRIVILEGES ON github.* TO 'github'@'localhost' IDENTIFIED BY 'hotshotgg'; +FLUSH PRIVILEGES; + + +chmod -R 755 * +chown -R www-data:www-data * + + + +server { + listen 80; + listen [::]:80; + + root /www/wwwroot/github-x.diaodu.us/public; + index index.php; + server_name github-x.diaodu.us; + + location / { + try_files $uri /index.php$is_args$args; + } + + location ~ \.php$ { + try_files $fastcgi_script_name =404; + include fastcgi_params; + fastcgi_index index.php; + fastcgi_buffers 8 16k; + fastcgi_buffer_size 32k; + fastcgi_pass unix:/run/php/php-fpm.sock; + fastcgi_param DOCUMENT_ROOT $realpath_root; + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + } +}