{"id":25622809,"url":"https://github.com/real-jiakai/linux-scripts","last_synced_at":"2025-04-14T06:06:35.269Z","repository":{"id":202859886,"uuid":"637788302","full_name":"real-jiakai/linux-scripts","owner":"real-jiakai","description":"整理一些自用的linux一键脚本。","archived":false,"fork":false,"pushed_at":"2025-02-24T01:04:25.000Z","size":184,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T06:06:30.887Z","etag":null,"topics":["linux","script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/real-jiakai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-08T12:10:47.000Z","updated_at":"2025-03-18T14:09:35.000Z","dependencies_parsed_at":"2024-01-04T05:24:16.939Z","dependency_job_id":"dadb5095-f50a-45e8-8355-b43cde7b12b2","html_url":"https://github.com/real-jiakai/linux-scripts","commit_stats":null,"previous_names":["real-jiakai/linux-scripts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/real-jiakai%2Flinux-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/real-jiakai%2Flinux-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/real-jiakai%2Flinux-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/real-jiakai%2Flinux-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/real-jiakai","download_url":"https://codeload.github.com/real-jiakai/linux-scripts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248830397,"owners_count":21168272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","script"],"created_at":"2025-02-22T10:57:51.148Z","updated_at":"2025-04-14T06:06:35.219Z","avatar_url":"https://github.com/real-jiakai.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\n整理一些自用的 Linux 一键脚本。\n\n# Usage\n\n以下是一些常用的 Linux 脚本及其说明：\n\n| 功能描述                                         | 命令                                                                                                                   |\n|--------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|\n| 创建 1GB 的 swap 交换分区                         | `curl -fsSL https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/create_swap.sh \\| bash`                    |\n| Debian 系的 Linux 发行版安装 Caddy               | `curl -fsSL https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/debian-install-caddy.sh \\| bash`           |\n| 一键安装 Git LFS                                 | `curl -fsSL https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/git-lfs-oneclick.sh \\| bash`               |\n| Rocky Linux 安装 Docker                          | `curl -fsSL https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/rocky-linux-install-docker-engine.sh \\| bash` |\n| 在 autodl 上安装 clash-meta                      | `curl -s https://gh.gujiakai.top/https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/autodl-install-clash-meta.sh \\| bash -s -- 你的订阅链接url` |\n| 国内 VPS 半自动脚本安装 clash-meta               | `curl https://gh.gujiakai.top/https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/domestic-vps-install-clash-meta.sh \\| bash -s -- 订阅链接url` |\n| Debian 系机器开机基本操作                         | `curl -fsSL https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/debian-startup.sh \\| bash`                |\n| 出售流量项目一键部署                              | `curl https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/sell-my-traffic.sh \\| bash`                     |\n| 国内机器更新 3x-ui 以及 xray 内核                 | `curl https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/update-3x-ui-manully.sh \\| bash`                |\n| Debian 系列的发行版使用 fail2ban                  | `curl https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/debian-fix-fail2ban.sh \\| bash`                 |\n| VPS 一键安装 watchtower                          | `curl https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/install-watchtower.sh \\| bash`                   |\n| 移除出售流量脚本中的 packetstream 支持            | `curl https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/remove-packetstream.sh \\| bash`                  |\n| xui 面板更新 geo 数据并将更新操作添加到定时任务   | `curl -O https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/xui-update-geodata.sh \u0026\u0026 chmod +x xui-update-geodata.sh \u0026\u0026 ./xui-update-geodata.sh` |\n| 一键安装 yt-dlp                                  | `curl https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/install_yt_dlp.sh \\| sh`                        |\n\n请根据自己的需求选择相应的脚本执行。\n\n## Additional Information \n\n1、半自动脚本，在autodl上安装clash-meta【注：国内服务器基本上可以用v2rayA项目来科学上网】补充说明：\n\n`curl -s https://gh.gujiakai.top/https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/autodl-install-clash-meta.sh | bash -s -- 你的订阅链接url`\n\n安装完毕后，在config.yaml的头部保证存在以下字段：\n\n```\nallow-lan: true\nexternal-controller: :9090\nexternal-ui: /root/clash/ui\nsecret: 你设置的ui界面的密码\n```\n\n在autodl平台的jupyterlab的终端中启动clash-meta服务\n\n```bash\n# service clash-meta start/stop/restart/status\nservice clash-meta start\n```\n\n在autodl平台的jupyterlab的终端中输入以下内容来设置代理环境。\n\n```bash\nexport http_proxy=\"http://localhost:7890\"\nexport https_proxy=\"http://localhost:7890\"\n```\n\n接着在本机电脑的终端中输入类似以下的命令，进行端口转发。\n\n```bash\n# 使用 SSH 创建端口转发\n# -L 9092:127.0.0.1:9090: 将本地端口 9092 转发到远程服务器的 9090 端口\n# root@region-9.autodl.pro: SSH 登录的远程服务器地址\n# -p 16030: 使用 16030 端口进行 SSH 连接\n# 注意将16030更改你的autodl机器的SSH端口\nssh -L 9092:127.0.0.1:9090 root@region-9.autodl.pro -p 16030\n```\n\n在浏览器地址中访问`http://127.0.0.1:9092/ui`，填写地址为`http://127.0.0.1:9092`，secret的值为一开始在config.yaml头部字段中的secret值。\n进入yacd面板中，选择一个能用的代理节点。\n\n回到autodl的jupyterlab终端处，在命令行中输入以下内容测试代理情况。\n\n```bash\ncurl ipinfo.io/json\n```\n\n如果出现ip归属地为代理节点所在的国家或地区，则表明代理在autodl平台生效。\n\n取消代理的话，可以使用如下命令。\n\n```bash\nunset http_proxy\nunset https_proxy\n```\n\n2、国内vps半自动脚本安装clash-meta【注：国内服务器基本上可以用v2rayA项目来科学上网】补充说明：\n\n`curl https://gh.gujiakai.top/https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/domestic-vps-install-clash-meta.sh | bash -s -- 订阅链接url`\n\n执行完毕后，在`/opt/clash`目录下的config.json文件头部保证以下字段：\n\n```yaml\nallow-lan: true\nexternal-controller: :9090\nexternal-ui: /root/clash/ui\nsecret: 你设置的ui界面的密码\n```\n\n接着重启clash-meta。\n\n```bash\n# 启动\nsystemctl start clash-meta \n# 重启clash-meta\nsystemctl restart clash-meta\n# 暂停clash-meta\nsystemctl stop clash-meta\n# 查看clash-meta状态\nsystemctl status clash-meta\n```\n\n放行服务器的9090端口后，在浏览器的地址栏输入`http://服务器ip地址:9090/ui`，填写地址为`http://服务器ip地址:9090`，secret的值为一开始在config.yaml头部字段中的secret值。 \n进入yacd面板中，选择一个能用的代理节点。\n\n在服务器终端中输入以下内容来设置代理环境。\n\n```\nexport http_proxy=\"http://localhost:7890\"\nexport https_proxy=\"http://localhost:7890\"\n```\n\n在命令行中输入以下内容测试代理情况。\n\n```\ncurl ipinfo.io/json\n```\n\n如果出现ip归属地为代理节点所在的国家或地区，则表明代理在linux终端生效。\n\n3、出售流量项目一键部署补充说明：`curl https://raw.githubusercontent.com/real-jiakai/linux-scripts/main/sell-my-traffic.sh | bash`\n\n包含的三个出售流量项目分别为：\n\n- traffmonetizer\n- repocket\n- earnfm\n\n如果需要使用，请将脚本中的对应参数更改为你的账户信息。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freal-jiakai%2Flinux-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freal-jiakai%2Flinux-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freal-jiakai%2Flinux-scripts/lists"}