Init
This commit is contained in:
48
03-UnrealEngine/流程管理与部署/VPS服务部署/ACME.sh 使用资料.md
Normal file
48
03-UnrealEngine/流程管理与部署/VPS服务部署/ACME.sh 使用资料.md
Normal file
@@ -0,0 +1,48 @@
|
||||
## 地址
|
||||
https://github.com/acmesh-official/acme.sh
|
||||
|
||||
## 通过acme.sh脚本来设置证书
|
||||
安装acme.sh
|
||||
```
|
||||
apt-get update && apt-get -y install socat //安装socat
|
||||
yum install socat
|
||||
wget -qO- get.acme.sh | bash //安装脚本
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
## 申请证书
|
||||
在你的域名解析服务提供商那里添加好解析记录,假定你的域名是yourdomain.com,记得不要开启CDN,然后执行下面命令申请证书。
|
||||
```
|
||||
acme.sh --issue --standalone -d yourdomain.com -k ec-256
|
||||
```
|
||||
因为本人要有blog,需要与nginx容器共存,所以使用网站目录方式:
|
||||
```
|
||||
acme.sh --issue -d blueroses.top -d www.blueroses.top -d tj.blueroses.top -k ec-256 --webroot /root/docker/nginx/html
|
||||
```
|
||||
|
||||
### 通配符证书申请
|
||||
通配符证书只支持dns方式,这里使用CloudFlare。首先在https://dash.cloudflare.com/profile/api-tokens 申请一个Global API Token。点击Global API Key栏的View即可,之后输入:
|
||||
```bash
|
||||
export CF_Key="19db67256c0eca16b5f4f4e8a7150c00eec16"
|
||||
export CF_Email="378100977@qq.com"
|
||||
```
|
||||
|
||||
```bash
|
||||
acme.sh --issue -d blueroses.top -d *.blueroses.top --dns dns_cf \
|
||||
--key-file /root/docker/trojan/trojan.key \
|
||||
--fullchain-file /root/docker/trojan/trojan.crt \
|
||||
--reloadcmd "docker restart nginx-web trojan"
|
||||
```
|
||||
|
||||
## 安装证书和私钥到指定位置
|
||||
```
|
||||
acme.sh --installcert -d blueroses.top \
|
||||
--fullchain-file /root/docker/trojan/trojan.crt \
|
||||
--key-file /root/docker/trojan/trojan.key \
|
||||
--ecc --reloadcmd "docker restart nginx-web trojan"
|
||||
```
|
||||
|
||||
## 自动续期
|
||||
```
|
||||
acme.sh --upgrade --auto-upgrade
|
||||
```
|
21
03-UnrealEngine/流程管理与部署/VPS服务部署/CloudFlare DDNS.md
Normal file
21
03-UnrealEngine/流程管理与部署/VPS服务部署/CloudFlare DDNS.md
Normal file
@@ -0,0 +1,21 @@
|
||||
## CloudFlare Key
|
||||
https://dash.cloudflare.com/profile
|
||||
|
||||
点击 API令牌->API秘钥:
|
||||
- Global API Key:23402010e956bb4d996ab994e178c62b3742c
|
||||
- Origin CA Key:v1.0-e2bbd4334c2f22123bde5da9-6540095b825ebbcfcf3e4abb47a07c51ea3a7ae66042059fb54ec5711cdbc11c4d380d09e3ed2837d55a90e918f10c86a6bdcf782601501fccc67191064186d9246842b23cd3092f
|
||||
|
||||
在域名的概述里有个区域ID,就是zoneId。
|
||||
- 区域ID:f84f14315f6b630be28364a1c217eea2
|
||||
|
||||
## 华硕路由器CloundFlare DDNS
|
||||
说明网址:http://tech.mornlong.com/post/29.html
|
||||
|
||||
## NodeJS DDNS服务
|
||||
最后更新于2018年,最好再自己看看
|
||||
- https://xcoder.in/2014/09/20/lets-build-ourselves-ddns/
|
||||
- https://github.com/XadillaX/dloucflare
|
||||
|
||||
其他:
|
||||
- https://www.npmjs.com/package/@oawu/ddns
|
||||
- https://www.npmjs.com/package/cloudflare-ddns-sync
|
70
03-UnrealEngine/流程管理与部署/VPS服务部署/CloudReve安装命令.md
Normal file
70
03-UnrealEngine/流程管理与部署/VPS服务部署/CloudReve安装命令.md
Normal file
@@ -0,0 +1,70 @@
|
||||
## 安装教程地址
|
||||
https://hub.docker.com/r/xavierniu/cloudreve
|
||||
|
||||
## 安装caddy用于反向代理
|
||||
```
|
||||
www.blueroses.top {
|
||||
tls admin@blueroses.top
|
||||
proxy / cloudreve:5212 {
|
||||
transparent
|
||||
}
|
||||
}
|
||||
```
|
||||
```
|
||||
docker run -d \
|
||||
--name caddy \
|
||||
-e "ACME_AGREE=true" \
|
||||
-e "CADDYPATH=/etc/caddycerts" \
|
||||
-v /dockercnf/caddy/certs:/etc/caddycerts \
|
||||
-v /dockercnf/caddy/Caddyfile:/etc/Caddyfile \
|
||||
--network my-network \
|
||||
-p 80:80 -p 443:443 \
|
||||
--restart unless-stopped \
|
||||
abiosoft/caddy
|
||||
```
|
||||
## aria2
|
||||
uid=0(root) gid=0(root) groups=0(root)
|
||||
```
|
||||
docker run -d \
|
||||
--name aria2 \
|
||||
--restart unless-stopped \
|
||||
--log-opt max-size=1m \
|
||||
-e PUID=0 \
|
||||
-e PGID=0 \
|
||||
-p 6800:6800 \
|
||||
-p 6888:6888 -p 6888:6888/udp \
|
||||
--network my-network \
|
||||
-v /dockercnf/aria2/config:/config \
|
||||
-v /dockercnf/aria2/downloads:/downloads \
|
||||
p3terx/aria2-pro
|
||||
```
|
||||
## cloudreve本体
|
||||
```
|
||||
docker run -d \
|
||||
--name cloudreve \
|
||||
-e PUID=0 \
|
||||
-e PGID=0 \
|
||||
-e TZ="Asia" \
|
||||
--network my-network \
|
||||
--restart=unless-stopped \
|
||||
-p 5212:5212 \
|
||||
-v /dockercnf/cloudreve/uploads:/cloudreve/uploads \
|
||||
-v /dockercnf/aria2/downloads:/downloads \
|
||||
-v /dockercnf/cloudreve/conf.ini:/cloudreve/conf.ini \
|
||||
-v /dockercnf/cloudreve/cloudreve.db:/cloudreve/cloudreve.db \
|
||||
xavierniu/cloudreve
|
||||
```
|
||||
## 账号密码
|
||||
首次启动后请执行docker logs -f cloudreve
|
||||
```
|
||||
[Info] 2020-04-08 07:15:19 初始化数据库连接
|
||||
[Info] 2020-04-08 07:15:19 开始进行数据库初始化...
|
||||
[Info] 2020-04-08 07:15:19 初始管理员账号:admin@cloudreve.org
|
||||
[Info] 2020-04-08 07:15:19 初始管理员密码:IAFhUH3m
|
||||
[Info] 2020-04-08 07:15:20 数据库初始化结束
|
||||
[Info] 2020-04-08 07:15:20 初始化任务队列,WorkerNum = 10
|
||||
[Info] 2020-04-08 07:15:20 初始化定时任务...
|
||||
[Info] 2020-04-08 07:15:20 当前运行模式:Master
|
||||
[Info] 2020-04-08 07:15:20 开始监听 :5212
|
||||
```
|
||||
账号为本人QQ邮箱,密码为常用密码
|
@@ -0,0 +1,27 @@
|
||||
#TODO
|
||||
# Jenkins通过命令行启动Ue4的自动测试框架
|
||||
https://www.emidee.net/ue4/2018/11/13/UE4-Unit-Tests-in-Jenkins.html
|
||||
好像可以通过 命令行来启动Ue4的自动测试框架
|
||||
|
||||
基础过程
|
||||
https://patricevignola.com/post/automation-jenkins-unreal
|
||||
|
||||
|
||||
# GitHook
|
||||
Git hooks是基于事件的。当你执行特定的git指令时,该软件会从git仓库下的hooks目录下检查是否有相对应的脚本,如果有就执行。
|
||||
|
||||
有些脚本是在动作执行之前被执行的,这种“先行脚本”可用于实现代码规范的统一、完整性检查、环境搭建等功能。有些脚本则在事件之后被执行,这种“后行脚本”可用于实现代码的部署、权限错误纠正(git在这方面的功能有点欠缺)等功能。
|
||||
|
||||
# 安装一个钩子
|
||||
钩子都被存储在Git目录下的hooks子目录中。也即绝大部分项目中的.git/hooks。当你用git init初始化一个新版本库时,Git 默认会在这个目录中放置一些示例脚本。这些脚本除了本身可以被调用外,它们还暴露了被触发时所传入的参数。这些示例的名字都是以 .sample 结尾,如果想启用它们,移除这个后缀即可。
|
||||
|
||||
把一个正确命名且可执行的文件放入 Git 目录下的 hooks 子目录中,即可激活该钩子脚本。这样一来,它就能 被 Git 调用。
|
||||
|
||||
|
||||
第三方选择使用
|
||||
# Gitlab Webhooks
|
||||
Webhooks 允许第三方应用监听 GitLab 上的特定事件,在这些事件发生时通过 HTTP POST 方式通知( 超时5秒) 到第三方应用指定的 Web URL。 例如项目有新的内容 Push,或是 Merge Request 有更新等。 WebHooks 可方便用户实现自动部署,自动测试,自动打包,监控项目变化等。
|
||||
|
||||
webhooks, 可以在 pull request / merge master 等几个场景下, 设置异步回调通知(http 请求)。这个背后就是 git hooks 在起作用。
|
||||
|
||||
因此,利用 WebHooks 的特性,可配合 Jenkins 实现一系列的自动化任务。
|
890
03-UnrealEngine/流程管理与部署/VPS服务部署/NAS与服务部署.md
Normal file
890
03-UnrealEngine/流程管理与部署/VPS服务部署/NAS与服务部署.md
Normal file
@@ -0,0 +1,890 @@
|
||||
---
|
||||
title: NAS与服务部署
|
||||
date: 2022-09-15 10:02:03
|
||||
excerpt:
|
||||
tags:
|
||||
rating: ⭐
|
||||
---
|
||||
# 绿联NAS
|
||||
https://support.ugnas.com/knowledgecenter/#/detail/eyJpZCI6MTI4MywidHlwZSI6InRhZzAwMiIsImxhbmd1YWdlIjoiemgtQ04iLCJjbGllbnRUeXBlIjoiUEMiLCJhcnRpY2xlSW5mb0lkIjo0MjQsImFydGljbGVWZXJzaW9uIjoiIiwicGF0aENvZGUiOiIifQ==
|
||||
|
||||
# BE88U支持的SFP+
|
||||
- SFP+ Optical transceiver(10G) : 10Gtek AXS85-192-M3
|
||||
- SFP+ transceiver Electrical 10G : TP-LINK TL-SM510U
|
||||
- SFP (1G) transceiver : SCOPTO ZK-GE-SM-3A/SC 1.25G1310nm/1550nm 3KM SC DDM
|
||||
- 2.5G GPON: HUAWEI SmartAX MA5671A (2.5G)/ NOKIA GPON ONT SFP Class I Laser G-010S-A
|
||||
- DAC: SHENGWEI SFP+ 10G DAC Cable 1m 30AWG
|
||||
|
||||
# NAS噪音太大,大家都吧NAS放置到哪了
|
||||
NAS噪音太大,大家都吧NAS放置到哪了? - cloud的回答 - 知乎
|
||||
https://www.zhihu.com/question/636419559/answer/3453548199
|
||||
|
||||
购买防共鸣垫
|
||||
# Token
|
||||
## blueroses.top AccessToken
|
||||
e01895f42649090f95bbea3cd94df897ca5c7e22
|
||||
## github双向验证恢复码
|
||||
bd0dc-c80ce
|
||||
09120-97ed1
|
||||
46bae-53203
|
||||
0a1b4-dde0d
|
||||
cae50-36821
|
||||
8c24c-31c93
|
||||
6931b-b582f
|
||||
90e3e-33c1e
|
||||
58bce-5b314
|
||||
94535-5da38
|
||||
6963d-6c7b7
|
||||
e5a82-23d6f
|
||||
837af-f7b5c
|
||||
3f421-2383d
|
||||
465e8-03051
|
||||
1d2fe-f3fdf
|
||||
## github 图床 picgo 设置
|
||||
blueroseslol/ImageBag
|
||||
master
|
||||
|
||||
- 图床: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
|
||||
- Picgo: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
|
||||
|
||||
ImageBag/Images/
|
||||
https://cdn.jsdelivr.net/gh/blueroseslol/ImageBag@latest
|
||||
|
||||
## Dockerhub Token
|
||||
dckr_pat_mWBh2SVqaaIU1QuAzSngrt8H6Do
|
||||
|
||||
# IOS
|
||||
- 38100977@qq.com
|
||||
- bluerose_us@qq.com (美国)
|
||||
- loujiajie2@sina.com (台湾)
|
||||
|
||||
# 路由器DDNS与科学上网插件
|
||||
https://blueroseslol.asuscomm.com:12345/Main_Login.asp
|
||||
https://blueroses.asuscomm.com:8443/Main_Login.asp
|
||||
- https://github.com/hq450/fancyss
|
||||
- **[https://t.me/merlinclashfile](https://t.me/merlinclashfile)**
|
||||
# 杂项
|
||||
- 星际蜗牛
|
||||
- [阿文菌爱捡垃圾 篇二十九:手把手教您组装一台ITX的高性能NAS:598元的6盘位准系统+I5 8代+B365+万兆网卡](https://post.smzdm.com/p/a834noe6/)
|
||||
- 黑群晖
|
||||
- [文菌装NAS 篇五:手把手教您安装黑群晖918+ 6.2保姆级教程,这应该是装黑群晖NAS最详细的教程了,含群晖设置](https://post.smzdm.com/p/aqx07xmk/)
|
||||
- UPS
|
||||
- 山特(SANTAK)TG-BOX600/850 UPS
|
||||
- 保护好你的小鸡!保姆级服务器安全教程! https://blog.laoda.de/archives/how-to-secure-a-linux-server
|
||||
|
||||
## NAS系统选择
|
||||
- OMV:与FreeNAS相比,拥有原生Docker,可以直接让容器使用硬件。
|
||||
- [官方下载地址](https://www.openmediavault.org/download.html)
|
||||
- [一次满足两个愿望?HTPC_NAS二合一服务器搭建教学(OMV新手入门)](https://www.bilibili.com/video/BV1Ge41147B9?spm_id_from=333.999.0.0&vd_source=d47c0bb42f9c72fd7d74562185cee290)
|
||||
- [OMV搭建系列教程[0] – 最小化安装Debian11](https://www.bilibili.com/read/cv13834759/)
|
||||
- 可使用protainer管理Docker
|
||||
- FreeNAS:比较适合企业使用,优势在于:拷贝速度以及硬盘寿命。
|
||||
- ZFS
|
||||
- Docker:需要在虚拟机上安装系统再部署。
|
||||
- UnRaid:要钱……
|
||||
|
||||
测速网速测试:
|
||||
```
|
||||
apt-get install speedtest-cli
|
||||
speedtest-cli --secure
|
||||
```
|
||||
|
||||
测速脚本:
|
||||
`wget -qO- bench.sh | bash`
|
||||
|
||||
vps ping测试、去程/回程路由跟踪、vps一键测试脚本:
|
||||
https://v2xtls.org/vps-ping%E6%B5%8B%E8%AF%95%E3%80%81%E5%8E%BB%E7%A8%8B-%E5%9B%9E%E7%A8%8B%E8%B7%AF%E7%94%B1%E8%B7%9F%E8%B8%AA%E3%80%81vps%E4%B8%80%E9%94%AE%E6%B5%8B%E8%AF%95%E8%84%9A%E6%9C%AC/
|
||||
|
||||
```bash
|
||||
wget https://raw.githubusercontent.com/hijkpw/testrace/master/testrace.sh
|
||||
bash testrace.sh
|
||||
```
|
||||
|
||||
## OMV6 网站路径
|
||||
/var/www/openmediavault/
|
||||
## Reality协议
|
||||
https://www.youtube.com/watch?v=3oQi_YBRTiQ&t=1s
|
||||
|
||||
客户端推荐:
|
||||
https://jichangtuijian.com/Reality%E4%B8%80%E9%94%AE%E5%AE%89%E8%A3%85%E8%84%9A%E6%9C%AC%E5%92%8C%E5%90%84%E4%B8%AA%E7%B3%BB%E7%BB%9F%E5%AE%A2%E6%88%B7%E7%AB%AF%E6%94%B6%E9%9B%86%E6%8E%A8%E8%8D%90.html
|
||||
## 检测端口是否被屏蔽
|
||||
- 国外站长工具:https://www.yougetsignal.com/tools/open-ports/
|
||||
- 国内站长工具:https://tool.chinaz.com/port
|
||||
- https:https://zhuanlan.zhihu.com/p/21286171
|
||||
# 待部署列表
|
||||
- [ ] Heidmall 导航页方便找对应应用
|
||||
- [x] 百度网盘
|
||||
- [x] gitea
|
||||
- 漫画
|
||||
- [x] LANraragi
|
||||
- [x] OnlyOffice
|
||||
- 影片
|
||||
- Emby Server(收费)
|
||||
- Plex(收费)
|
||||
- Overseerr(附带BT下载、传输功能)
|
||||
- [x] nas-tools
|
||||
- [x] Jellyfin(Emby Server代替品)
|
||||
- [x] qbittorrent
|
||||
- 下载
|
||||
- [x] Aria2
|
||||
- [x] Aria-NG
|
||||
- [ ] Transmisiion
|
||||
- 智能设备管理
|
||||
- HomeBridge
|
||||
- 照片
|
||||
- Moment
|
||||
- ResilioSync(手机照片备份)
|
||||
- Drive
|
||||
- hentaiathome
|
||||
- 笔记:[[#memos]]
|
||||
|
||||
# Docker源
|
||||
Portainer可以更换Docker的源,来加快下载速度。
|
||||
- azure源docker源:dockerhub.azk8s.cn
|
||||
- Docker中国区官方:registry.docker-cn.com
|
||||
- 网易:[http://hub-mirror.c.163.com](https://link.zhihu.com/?target=http%3A//hub-mirror.c.163.com/)
|
||||
- 中国科技大学镜像加速:[https://docker.mirrors.ustc.edu.cn](https://link.zhihu.com/?target=https%3A//docker.mirrors.ustc.edu.cn/)
|
||||
|
||||
# 域名与地址
|
||||
https://blueroses.asuscomm.com:8443
|
||||
ipv4.blueroses.top
|
||||
bluerose.top
|
||||
|
||||
## DNSPod
|
||||
ID:350298
|
||||
Token:ed4a9b995c02c1185964f0fdb01b76df
|
||||
|
||||
350311
|
||||
|
||||
# 服务部署
|
||||
- Portainer:9000 admin ljj@88483649
|
||||
- 路由器:https://blueroses.asuscomm.com:8443/
|
||||
- ~~Heidmall:8080~~
|
||||
- CloudReve:5212
|
||||
- Gitea:8888
|
||||
- SVN: http://ipv4.blueroses.top:7777/svnadmin
|
||||
- baidunetdisk:5800
|
||||
- lanraragi:9999
|
||||
- NASTools:10000
|
||||
- qbittorrenthttp:8080
|
||||
- Jellyfin:8096
|
||||
- [[#Perlite]]
|
||||
|
||||
## Heidmall
|
||||
参考:https://zhuanlan.zhihu.com/p/405906100
|
||||
|
||||
```bash
|
||||
cd /home
|
||||
mkdir -vp heimdall
|
||||
```
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name=heimdall \
|
||||
-e PUID=1000 \
|
||||
-e PGID=1000 \
|
||||
-e TZ=Asia/Shanghai \
|
||||
-p 8080:80 \
|
||||
-p 666:443 \
|
||||
-v /home/heimdall:/config \
|
||||
--restart unless-stopped \
|
||||
linuxserver/heimdall:latest
|
||||
```
|
||||
|
||||
### 增加密码保护
|
||||
This image now supports password protection through htpasswd. Run the following command on your host to generate the htpasswd file `docker exec -it heimdall htpasswd -c /config/nginx/.htpasswd <username>`. Replace
|
||||
|
||||
## CloudReve
|
||||
### 创建目录结构
|
||||
```c++
|
||||
cd /home
|
||||
mkdir -vp cloudreve/{uploads,avatar} \
|
||||
&& touch cloudreve/conf.ini \
|
||||
&& touch cloudreve/cloudreve.db \
|
||||
&& mkdir -p aria2/config \
|
||||
&& mkdir -p data/aria2 \
|
||||
&& chmod -R 777 data/aria2
|
||||
```
|
||||
|
||||
### 运行
|
||||
然后将以下文件保存为 `docker-compose.yml`,放置于当前目录,与 cloudreve 同一层级,同时,修改文件中的 `RPC_SECRET`。
|
||||
```c++
|
||||
version: "3.8"
|
||||
services:
|
||||
cloudreve:
|
||||
container_name: cloudreve
|
||||
image: cloudreve/cloudreve:latest
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5212:5212"
|
||||
volumes:
|
||||
- temp_data:/data
|
||||
- ./cloudreve/uploads:/cloudreve/uploads
|
||||
- ../srv/dev-disk-by-uuid-186bd712-77aa-422d-972f-8666404ff8ea/jellyfin/:/cloudreve/uploads/1/H
|
||||
- ./cloudreve/conf.ini:/cloudreve/conf.ini
|
||||
- ./cloudreve/cloudreve.db:/cloudreve/cloudreve.db
|
||||
- ./cloudreve/avatar:/cloudreve/avatar
|
||||
depends_on:
|
||||
- aria2
|
||||
aria2:
|
||||
container_name: aria2
|
||||
image: p3terx/aria2-pro
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "6800:6800"
|
||||
environment:
|
||||
- RPC_SECRET=bluerose
|
||||
- RPC_PORT=6800
|
||||
volumes:
|
||||
- ./aria2/config:/config
|
||||
- temp_data:/data
|
||||
volumes:
|
||||
temp_data:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
device: $PWD/data
|
||||
o: bind
|
||||
```
|
||||
|
||||
### 运行镜像
|
||||
后台运行模式,可以从 docker/docker-compose 的日志中获取默认管理员账户用户名和密码
|
||||
```c++
|
||||
docker-compose up -d
|
||||
```
|
||||
或者,直接运行,log 将会直接输出在当前控制台中,请注意退出之后保持当前容器运行
|
||||
```c++
|
||||
docker-compose up
|
||||
```
|
||||
在之后的控制面板中,按照如下配置
|
||||
1. **[不可修改]** RPC 服务器地址 => `http://aria2:6800`
|
||||
2. **[可修改, 需保持和 docker-compose.yml 文件一致]** RPC 授权令牌 => `your_aria_rpc_token`
|
||||
3. **[不可修改]** Aria2 用作临时下载目录的 节点上的绝对路径 => `/data`
|
||||
|
||||
### 更新
|
||||
关闭当前运行的容器,此步骤不会删除挂载的配置文件以及相关目录
|
||||
>docker-compose down
|
||||
|
||||
如果此前已经拉取 docker 镜像,使用以下命令获取最新镜像
|
||||
>docker pull cloudreve/cloudreve
|
||||
|
||||
## Aria2-NG
|
||||
- http://192.168.50.6:6800/jsonrpc
|
||||
- get
|
||||
- bluerose
|
||||
|
||||
```c++
|
||||
docker run -d \
|
||||
--name ariang \
|
||||
--log-opt max-size=1m \
|
||||
--restart unless-stopped \
|
||||
-p 6880:6880 \
|
||||
p3terx/ariang
|
||||
```
|
||||
|
||||
## Gitea
|
||||
```c++
|
||||
cd /home
|
||||
mkdir -vp gitea
|
||||
```
|
||||
|
||||
```c++
|
||||
docker run -d --restart=always --privileged=true --name=gitea \
|
||||
-p 822:22 \
|
||||
-p 8888:3000 \
|
||||
-v /home/gitea:/data \
|
||||
gitea/gitea:latest
|
||||
|
||||
docker run -d --restart=always --privileged=true --name=gitea \
|
||||
-p 822:22 \
|
||||
-p 8888:3000 \
|
||||
-v /root/docker/gitea:/data \
|
||||
gitea/gitea:latest
|
||||
```
|
||||
|
||||
https://blog.csdn.net/weixin_44415928/article/details/131700249
|
||||
|
||||
邮箱授权码
|
||||
uidsmqmeqjuubjhj
|
||||
## SVN
|
||||
参考文章:
|
||||
- https://www.cnblogs.com/zepc007/p/14521394.html
|
||||
- https://blog.csdn.net/zhuocailing3390/article/details/123777266
|
||||
|
||||
创建目录并且修改权限:
|
||||
```c++
|
||||
cd /home
|
||||
mkdir -vp svn
|
||||
chmod -R 777 /home/svn
|
||||
```
|
||||
|
||||
```c++
|
||||
docker run -d --name svn-server --restart=always \
|
||||
-v /home/svn:/home/svn \
|
||||
-p 7777:80 \
|
||||
-p 3690:3690 \
|
||||
elleflorio/svn-server
|
||||
```
|
||||
|
||||
创建管理员用户
|
||||
```c++
|
||||
docker exec -t svn-server htpasswd -b /etc/subversion/passwd <username> <password>
|
||||
docker exec -t svn-server htpasswd -b /etc/subversion/passwd bluerose ljj199221
|
||||
```
|
||||
|
||||
进入容器内部
|
||||
```bash
|
||||
docker exec -it svn-server /bin/sh
|
||||
```
|
||||
修改配置:
|
||||
```shell
|
||||
# 进入apache2目录
|
||||
cd /etc/apache2/
|
||||
|
||||
# 修改
|
||||
vi httpd.conf
|
||||
```
|
||||
修改内容:
|
||||
```shell
|
||||
ServerName ipv4.blueroses.top:7777
|
||||
```
|
||||
|
||||
### 配置
|
||||
访问地址:http://ipv4.blueroses.top:7777/svnadmin,进行后台的配置管理,配置内容如下:
|
||||
|
||||
- Subversion authorization file :/etc/subversion/subversion-access-control
|
||||
- User authentication file (SVNUserFile): /etc/subversion/passwd
|
||||
- Parent directory of the repositories (SVNParentPath): /home/svn
|
||||
- Subversion client executable:/usr/bin/svn
|
||||
- Subversion admin executable:/usr/bin/svnadmin
|
||||
>注意:配置填写好后进行test测试,Test passed后再进行保存配置信息
|
||||
|
||||

|
||||
|
||||
### 测试
|
||||
访问仓库,地址规则为:`ip:prot/svn/仓库名称`,比如:[http://ipv4.blueroses.top:7777/svn/demo/](http://ipv4.blueroses.top:7777/svn/demo/),svn客户端也用这个地址。
|
||||
|
||||
## 百度网盘
|
||||
|
||||
```bash
|
||||
cd /home
|
||||
mkdir -vp baidunetdisk/{config,downloads}
|
||||
```
|
||||
|
||||
```c++
|
||||
docker create \
|
||||
--name=baidunetdisk \
|
||||
-p 5800:5800 \
|
||||
-p 5900:5900 \
|
||||
-v /home/baidunetdisk/config:/config \
|
||||
-v /home/baidunetdisk/downloads:/config/baidunetdiskdownload \
|
||||
--restart unless-stopped \
|
||||
johngong/baidunetdisk:latest
|
||||
```
|
||||
|
||||
## calibre-web
|
||||
```bash
|
||||
cd /home
|
||||
mkdir -vp calibre/{config,books}
|
||||
```
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name=calibre-web \
|
||||
-e PUID=1000 \
|
||||
-e PGID=1000 \
|
||||
-e TZ=Asia/Shanghai \
|
||||
-e DOCKER_MODS=linuxserver/mods:universal-calibre `#optional` \
|
||||
-e OAUTHLIB_RELAX_TOKEN_SCOPE=1 `#optional` \
|
||||
-p 8083:8083 \
|
||||
-v /home/calibre/config:/config \
|
||||
-v /home/calibre/books/library:/books \
|
||||
--restart unless-stopped \
|
||||
linuxserver/calibre-web:latest
|
||||
```
|
||||
|
||||
安装完进入网页界面会提示没有Meta.db,可以通过安装另一个镜像来获得:
|
||||
```c++
|
||||
docker run -d \
|
||||
--name=calibre \
|
||||
--security-opt seccomp=unconfined `#optional` \
|
||||
-e PUID=1000 \
|
||||
-e PGID=1000 \
|
||||
-e TZ=Europe/London \
|
||||
-e PASSWORD= `#optional` \
|
||||
-e CLI_ARGS= `#optional` \
|
||||
-p 8080:8080 \
|
||||
-p 8081:8081 \
|
||||
-v /home/calibreTest/:/config \
|
||||
--restart unless-stopped \
|
||||
linuxserver/calibre:latest
|
||||
```
|
||||
|
||||
安装完进入8080,完成安装即可,之后在Calibre Library中就有Meta.db了。
|
||||
|
||||
## lanraragi
|
||||
https://post.smzdm.com/p/aenz8k7q/
|
||||
|
||||
```bash
|
||||
cd /home
|
||||
mkdir -vp lanraragi/{content,database}
|
||||
```
|
||||
|
||||
```c++
|
||||
docker run --name=lanraragi -d \
|
||||
-p 9999:3000 \
|
||||
-v /home/lanraragi/content:/home/koyomi/lanraragi/content \
|
||||
-v /home/lanraragi/database:/home/koyomi/lanraragi/database \
|
||||
--restart unless-stopped \
|
||||
dezhao/lanraragi_cn
|
||||
```
|
||||
|
||||
```bash
|
||||
cd /srv/dev-disk-by-uuid-186bd712-77aa-422d-972f-8666404ff8ea
|
||||
mkdir -vp lanraragi/{content,database}
|
||||
```
|
||||
|
||||
```c++
|
||||
docker run --name=lanraragi -d \
|
||||
-p 9999:3000 \
|
||||
-v /srv/dev-disk-by-uuid-186bd712-77aa-422d-972f-8666404ff8ea/lanraragi/content:/home/koyomi/lanraragi/content \
|
||||
-v /srv/dev-disk-by-uuid-186bd712-77aa-422d-972f-8666404ff8ea/lanraragi/database:/home/koyomi/lanraragi/database \
|
||||
--restart unless-stopped \
|
||||
dezhao/lanraragi_cn
|
||||
```
|
||||
/srv/dev-disk-by-uuid-186bd712-77aa-422d-972f-8666404ff8ea/
|
||||
https://e-hentai.org/
|
||||
|
||||
IOS APP:https://github.com/Doraemoe/DuReader
|
||||
|
||||
## 影音系列
|
||||
media使用一个公共外部文件夹
|
||||
```c++
|
||||
cd /home
|
||||
mkdir -vp media
|
||||
```
|
||||
|
||||
- TMDB:blueroses
|
||||
- API 36dfc472117c89d9d747184c31c4777d
|
||||
- TMDB超时问题解决: https://todsay.com/views/59.html
|
||||
- TMDB超时问题解决:https://www.hao4k.cn/thread-56601-1-1.html
|
||||
- 检测工具
|
||||
- https://tools.ipip.net/dns.php
|
||||
- 爱站ping检测工具
|
||||
|
||||
修改NAS Host即可,修改/etc/hosts文件。
|
||||
|
||||
NAS翻墙:https://www.youtube.com/watch?v=ha6mYJW8tIo
|
||||
### V2ray
|
||||
```c++
|
||||
cd /home
|
||||
mkdir -vp v2ray/modules
|
||||
touch v2ray/resolv.conf
|
||||
```
|
||||
|
||||
```c++
|
||||
docker run -d \
|
||||
--restart=always \
|
||||
--privileged \
|
||||
--network=host \
|
||||
--name v2raya \
|
||||
-e V2RAYA_ADDRESS=0.0.0.0:2017 \
|
||||
-v /home/v2ray/modules:/lib/modules:ro \
|
||||
-v /home/v2ray/resolv.conf:/etc/resolv.conf \
|
||||
-v /home/v2ray:/etc/v2raya \
|
||||
mzz2017/v2raya-nightly:latest
|
||||
```
|
||||
|
||||
预览端口2017
|
||||
进入之后选择导入V2ray设置,之后选择这一行的“选择”按钮,并且点击左上角的开启。并且勾选放置DNS污染。
|
||||
|
||||
docker attach
|
||||
docker exec -it v2raya bash
|
||||
|
||||
docker exec -it mzz2017_v2raya-nightly sh
|
||||
v2raya --lite --log-level debug
|
||||
|
||||
### homeassistant
|
||||
```c++
|
||||
docker run -d \
|
||||
--name homeassistant \
|
||||
--privileged \
|
||||
--restart=unless-stopped \
|
||||
-e TZ=Asia/Shanghai \
|
||||
-v /data/homeassistant:/config \
|
||||
--network=host \
|
||||
homeassistant/home-assistant
|
||||
```
|
||||
|
||||
默认端口8123
|
||||
|
||||
### NAS-TOOl
|
||||
```bash
|
||||
cd /home
|
||||
mkdir -vp nastools/{config,media}
|
||||
```
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name nas-tools \
|
||||
--hostname nas-tools \
|
||||
-p 10000:3000 `# 默认的webui控制端口` \
|
||||
-v /home/nastools/config:/config `# 冒号左边请修改为你想在主机上保存配置文件的路径` \
|
||||
-v /home/media:/media `# 媒体目录,多个目录需要分别映射进来` \
|
||||
-e PUID=0 `# 想切换为哪个用户来运行程序,该用户的uid,详见下方说明` \
|
||||
-e PGID=0 `# 想切换为哪个用户来运行程序,该用户的gid,详见下方说明` \
|
||||
-e UMASK=000 `# 掩码权限,默认000,可以考虑设置为022` \
|
||||
-e NASTOOL_AUTO_UPDATE=false `# 如需在启动容器时自动升级程程序请设置为true` \
|
||||
-e REPO_URL="https://ghproxy.com/https://github.com/jxxghp/nas-tools.git" `# 如果你访问github的网络不太好,可以考虑在创建容器时增加设置一个环境变量` \
|
||||
--restart unless-stopped \
|
||||
nastools/nas-tools:2.9.1
|
||||
```
|
||||
|
||||
***因为作者跑路了,所以需要使用其他人的镜像***
|
||||
|
||||
- https://hub.docker.com/r/sungamma/nas-tools/tags
|
||||
- https://hub.docker.com/r/ljnpng/nastools
|
||||
- https://hub.docker.com/r/nastools/nas-tools/tags
|
||||
|
||||
NASTools:admin password
|
||||
|
||||
- 从零开始的软路由之爱快docker安装nastools:https://zhuanlan.zhihu.com/p/547732022
|
||||
- 耗资过万,新手如何搭建家庭影院?绿联nas-tools详细教程:https://zhuanlan.zhihu.com/p/553313603
|
||||
|
||||
其他需要安装的:
|
||||
- Kodi Sync Queue(电视盒子)
|
||||
- kodi-19.4-Matrix-armeabi-v7a.apk(电视机上安装)
|
||||
|
||||
### jellyfin
|
||||
- 中国特供版:https://hub.docker.com/r/nyanmisaka/jellyfin
|
||||
```bash
|
||||
cd /home
|
||||
mkdir -vp jellyfin/{config,tvshows,movies}
|
||||
cd /srv/dev-disk-by-uuid-186bd712-77aa-422d-972f-8666404ff8ea
|
||||
mkdir -vp jellyfin/H
|
||||
```
|
||||
|
||||
```c++
|
||||
docker run -d \
|
||||
--name=jellyfin \
|
||||
-e PUID=1000 \
|
||||
-e PGID=1000 \
|
||||
-e TZ=Asia/Shanghai \
|
||||
-p 8096:8096 \
|
||||
-p 8920:8920 `#optional` \
|
||||
-p 7359:7359/udp `#optional` \
|
||||
-p 1900:1900/udp `#optional` \
|
||||
-v /home/jellyfin/config:/config \
|
||||
-v /home/media/tvshows:/data/tvshows \
|
||||
-v /home/media:/data/movies \
|
||||
-v /srv/dev-disk-by-uuid-186bd712-77aa-422d-972f-8666404ff8ea/jellyfin:/data/movies/H \
|
||||
--restart unless-stopped \
|
||||
nyanmisaka/jellyfin:latest
|
||||
```
|
||||
|
||||
### prowlarr
|
||||
```bash
|
||||
cd /home
|
||||
mkdir -vp prowlarr/{config}
|
||||
```
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name=prowlarr \
|
||||
-e PUID=1000 \
|
||||
-e PGID=1000 \
|
||||
--network=host \
|
||||
-e TZ=Asia/Shanghai \
|
||||
-p 9696:9696 \
|
||||
-v /home/prowlarr/config:/config \
|
||||
--restart unless-stopped \
|
||||
linuxserver/prowlarr:develop
|
||||
```
|
||||
/home/prowlarr/config/config.xml 中api key
|
||||
|
||||
ACG资源:
|
||||
- https://www.acgbox.link/#term-7
|
||||
|
||||
### ChineseSubFinder
|
||||
```c++
|
||||
cd /home
|
||||
mkdir -vp ChineseSubFinder /{config,media,browser}
|
||||
```
|
||||
|
||||
```c++
|
||||
docker run -d \
|
||||
-v /home/ChineseSubFinder/config:/config `# 冒号左边请修改为你想在主机上保存配置、日志等文件的路径` \
|
||||
-v /home/media:/media `# 请修改为需要下载字幕的媒体目录,冒号右边可以改成你方便记忆的目录,多个媒体目录需要添加多个-v映射` \
|
||||
-e PUID=1000 \
|
||||
-e PGID=1000 \
|
||||
-e PERMS=true `# 是否重设/media权限` \
|
||||
-e TZ=Asia/Shanghai `# 时区` \
|
||||
-e UMASK=022 `# 权限掩码` \
|
||||
-p 19035:19035 \
|
||||
-p 19037:19037 `# webui 的视频列表读取图片用,务必设置不要暴露到外网` \
|
||||
--name chinesesubfinder \
|
||||
--hostname chinesesubfinder \
|
||||
--log-driver "json-file" \
|
||||
--log-opt "max-size=100m" `# 限制docker控制台日志大小,可自行调整` \
|
||||
allanpk716/chinesesubfinder:latest-lite
|
||||
```
|
||||
|
||||
### opensubtitles
|
||||
- blueroses
|
||||
- Ljj@88483649
|
||||
|
||||
### qBittorent
|
||||
```bash
|
||||
cd /home
|
||||
mkdir -vp qBittorent/{config,media}
|
||||
```
|
||||
|
||||
```c++
|
||||
docker run -d \
|
||||
--name=qbittorrent \
|
||||
-e PUID=1000 \
|
||||
-e PGID=1000 \
|
||||
-e TZ=Asia/Shanghai \
|
||||
-e WEBUI_PORT=8080 \
|
||||
-p 8080:8080 \
|
||||
-p 6881:6881 \
|
||||
-p 6881:6881/udp \
|
||||
-v /home/qBittorent/config:/config \
|
||||
-v /home/media/home:/downloads/home \
|
||||
-v /srv/dev-disk-by-uuid-186bd712-77aa-422d-972f-8666404ff8ea/jellyfin/:/downloads/home/H \
|
||||
-v /srv/dev-disk-by-uuid-186bd712-77aa-422d-972f-8666404ff8ea/jellyfin/AV:/downloads/home/AV \
|
||||
-v /srv/dev-disk-by-uuid-186bd712-77aa-422d-972f-8666404ff8ea/jellyfin/3D:/downloads/home/3D \
|
||||
-v /srv/dev-disk-by-uuid-186bd712-77aa-422d-972f-8666404ff8ea/jellyfin/2D:/downloads/home/2D \
|
||||
--restart unless-stopped \
|
||||
linuxserver/qbittorrent
|
||||
```
|
||||
|
||||
username/password is `admin/adminadmin`.
|
||||
|
||||
▼默认监听端口是6881,即使想要映射监听端口,也不要监听默认端口,大多数PT站都是禁了的,用6881端口进行PT下载就会遇到以下问题:“Port 6881 is blacklisted!”,端口被黑名单了。
|
||||
|
||||

|
||||
|
||||
▼翻看PT站点的公告或者是常见问题,就可以看到被屏蔽的端口号,6881-6889都是禁封的,像这个站点推荐了49153-65535端口,随便自行设置就好。
|
||||
|
||||

|
||||
|
||||
### 让qBit可以外网访问
|
||||
去掉 启用Host Header属性验证。
|
||||
|
||||
▼刚安装好的qBit是不能通过外网访问的,即使在路由器上做了端口转发,访问时你会发现出现下面的情况。
|
||||

|
||||
|
||||
▼这时候我们需要将配置文件”qbittorent.conf“下载到本地进行修改,在文档末尾加入下面的代码。
|
||||
> WebUI\HostHeaderValidation=false
|
||||
|
||||

|
||||
|
||||
▼将修改好的conf文件上传到qBit的config文件夹下进行覆盖。
|
||||
|
||||

|
||||
|
||||
**注意:似乎只有admin用户有删除Container文件夹下文件的权限,请用admin用户进行操作。**
|
||||
|
||||

|
||||
### 初见qBittorrent
|
||||
▼现在在外网环境下也能够登录qBittorent了,用户名为admin,密码为adminadmin。
|
||||

|
||||
|
||||
▼此时的qBit还是英文,找到图中的小齿轮➡Web UI➡简体中文。
|
||||

|
||||
修改默认密码
|
||||
▼在刚刚修改语言的位置,往下拉一点点,就可以看到修改账号密码的地方了,为了省事(偷懒)也可以对局域网内网中的IP地址设置白名单,省去身份验证的步骤。
|
||||
|
||||

|
||||
|
||||
修改监听端口
|
||||
▼就香前面说的,监听端口在部署Docker时咱们没有做映射,默认的时6881,为了下载有速度,咱们这里随便roll一个用于传入连接的端口,同时开启UPnP功能转发端口,下载就能跑的起来了。
|
||||
|
||||

|
||||
|
||||
### 修改下载位置与自动添加种子
|
||||
▼我们之前将downloads文件夹映射到了Multimedia文件夹,这里展示出来的download是容器内部的文件夹,实际上是我们Nas上的Multimedia,相当于是根目录,是不能修改的,能做的只是在后面跟上新的路径,比如说”/Music“或者是”/Movie“之类的,如此下载就会下载到Multimedia下的Music/Movie等自建文件夹。自动添加种子奶爸一般不用,小伙伴们自行使用。
|
||||
|
||||

|
||||
|
||||
### PT站
|
||||
https://blog.csdn.net/u012558210/article/details/106538528
|
||||
|
||||
- http://share.dmhy.org/
|
||||
- https://www.36dm.com/
|
||||
- https://www.skyey2.com/login_notice.php
|
||||
- https://www.nicept.net/donate.php
|
||||
|
||||
## OnlyOffice
|
||||
```bash
|
||||
cd /home
|
||||
mkdir -vp onlyoffice/{logs,data}
|
||||
```
|
||||
|
||||
```bash
|
||||
docker run -i -t -d -p 9999:80 \
|
||||
-v /home/onlyoffice/logs:/var/log/onlyoffice \
|
||||
-v /home/onlyoffice/data:/var/www/onlyoffice/Data \
|
||||
onlyoffice/documentserver
|
||||
```
|
||||
之后让Example自动启动:
|
||||
```bash
|
||||
docker exec 6b51e5dd3e43 sudo sed 's,autostart=false,autostart=true,' -i /etc/supervisor/conf.d/ds-example.conf
|
||||
```
|
||||
|
||||
## hentaiathome
|
||||
客户编号:44771
|
||||
客户端密钥:m4NKWURvR83BsnJTuej1
|
||||
44771-m4NKWURvR83BsnJTuej1
|
||||
|
||||
```bash
|
||||
cd /home
|
||||
mkdir -vp hentaiathome/{data,download}
|
||||
|
||||
#Pull image
|
||||
docker pull ghcr.io/disappear9/hentaiathome:latest
|
||||
|
||||
#Create volume for caches and logs
|
||||
docker volume create h_at_h_data
|
||||
|
||||
#Run it
|
||||
docker run -d --name h_at_h \
|
||||
-p 9876:9876 \
|
||||
-v /home/hentaiathome/data:/hath/data \
|
||||
-v /home/hentaiathome/download:/hath/download \
|
||||
-e HatH_KEY=44771-xgp46ibo7fUJfsg3MU7U \
|
||||
ghcr.io/disappear9/hentaiathome
|
||||
```
|
||||
|
||||
Update:
|
||||
```bash
|
||||
#Stop
|
||||
sudo docker stop h_at_h
|
||||
|
||||
#Delete
|
||||
sudo docker rm h_at_h
|
||||
|
||||
#Delete old image
|
||||
sudo docker rmi ghcr.io/disappear9/hentaiathome
|
||||
|
||||
#Pull new image
|
||||
sudo docker pull ghcr.io/disappear9/hentaiathome
|
||||
|
||||
#Run it
|
||||
sudo docker run -d --name h_at_h -p YOUR_PORT:YOUR_PORT -v h_at_h_data:/hath/data -v /DOWNLOAD_DIR:/hath/download ghcr.io/disappear9/hentaiathome
|
||||
Or
|
||||
sudo docker run -d --name h_at_h --net host -v h_at_h_data:/hath/data -v /DOWNLOAD_DIR:/hath/download ghcr.io/disappear9/hentaiathome
|
||||
If you want to change port in the future.
|
||||
```
|
||||
|
||||
## Perlite
|
||||
```bash
|
||||
cd /home
|
||||
mkdir -vp perlite/{notes,config,web}
|
||||
|
||||
docker container rm perlite
|
||||
docker image rm sec77/perlite:latest
|
||||
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
```bash
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
perlite:
|
||||
image: sec77/perlite:latest
|
||||
container_name: perlite
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- NOTES_PATH=note
|
||||
- HIDE_FOLDERS=docs,private,trash
|
||||
- LINE_BREAKS=true
|
||||
volumes:
|
||||
- ./note:/var/www/perlite/note:ro
|
||||
- ./config:/web/config \
|
||||
|
||||
web:
|
||||
build:
|
||||
context: ./web
|
||||
image: sec77/perlite_web:stable
|
||||
container_name: perlite_web
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 9090:80
|
||||
volumes_from:
|
||||
- perlite
|
||||
depends_on:
|
||||
- perlite
|
||||
```
|
||||
|
||||
Gitea Token e2eb7193b043e0d914ba76651197ad0a36daa974
|
||||
|
||||
## Perforce
|
||||
```bash
|
||||
docker run -d --restart unless-stopped \
|
||||
-v /home/perforce/p4:/p4 \
|
||||
-p 1666:1666 \
|
||||
blueroses/perforce-helix-p4d:2024.5
|
||||
```
|
||||
|
||||
p4admin
|
||||
pass12349ers
|
||||
|
||||
## Jenkins
|
||||
参考:https://zhuanlan.zhihu.com/p/89312003
|
||||
|
||||
```bash
|
||||
docker run --name jenkinsci-blueocean -d -u root --restart unless-stopped \
|
||||
-p 8080:8080 \
|
||||
-p 50000:50000 \
|
||||
-v /mnt/nfs-1/jenkins/Data:/var/jenkins_home \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
jenkinsci/blueocean
|
||||
```
|
||||
|
||||
## jeessy/ddns-go
|
||||
|
||||
- 不挂载主机目录, 删除容器同时会删除配置
|
||||
```bash
|
||||
# host模式, 同时支持IPv4/IPv6, Liunx系统推荐
|
||||
docker run -d --name ddns-go --restart=always --net=host /opt/ddns-go:/root jeessy/ddns-go
|
||||
# 桥接模式, 只支持IPv4, Mac/Windows系统推荐
|
||||
docker run -d --name ddns-go --restart=always -p 9876:9876 jeessy/ddns-go
|
||||
```
|
||||
- 在浏览器中打开`http://主机IP:9876`,修改你的配置,成功
|
||||
|
||||
- [可选] 挂载主机目录, 删除容器后配置不会丢失。可替换 `/opt/ddns-go` 为主机目录, 配置文件为隐藏文件
|
||||
```bash
|
||||
docker run -d --name ddns-go --restart=always --net=host -v /opt/ddns-go:/root jeessy/ddns-go
|
||||
```
|
||||
|
||||
- [可选] 支持启动带参数 `-l`监听地址 `-f`间隔时间(秒)
|
||||
```bash
|
||||
docker run -d --name ddns-go --restart=always --net=host jeessy/ddns-go -l :9877 -f 600
|
||||
```
|
||||
|
||||
# memos
|
||||
```bash
|
||||
docker run -d --name memos --restart=always\
|
||||
-p 5230:5230 \
|
||||
-v /root/docker/memos:/var/opt/memos \
|
||||
neosmemo/memos:stable
|
||||
```
|
||||
|
||||
# Navidrome
|
||||
智能歌单
|
||||
```c++
|
||||
{
|
||||
"all": [
|
||||
{"contains": {"filepath":"/music/Tobu"}}
|
||||
],
|
||||
"sort": "dateadded",
|
||||
"order": "desc"
|
||||
}
|
||||
```
|
||||
|
||||
音乐削刮:
|
||||
- https://sspai.com/post/90896
|
||||
- https://www.cnblogs.com/vinlxc/p/11347744.html
|
83
03-UnrealEngine/流程管理与部署/VPS服务部署/Nginx安装命令.md
Normal file
83
03-UnrealEngine/流程管理与部署/VPS服务部署/Nginx安装命令.md
Normal file
@@ -0,0 +1,83 @@
|
||||
## 运行 有问题不能使用
|
||||
mkdir -p /root/docker/nginx/conf
|
||||
mkdir -p /root/docker/nginx/html
|
||||
mkdir -p /root/docker/nginx/log
|
||||
mkdir -p /root/docker/nginx/ssl
|
||||
```
|
||||
docker run -d --restart=always --name nginx-web \
|
||||
-v /root/docker/nginx/nginx.conf:/etc/nginx/nginx.conf \
|
||||
-v /root/docker/nginx/html:/usr/share/nginx/html \
|
||||
-v /root/docker/nginx/log:/var/log/nginx \
|
||||
-v /root/docker/trojan/:/root/docker/trojan \
|
||||
-v /etc/localtime:/etc/localtime:ro \
|
||||
-p 80:80 \
|
||||
nginx
|
||||
```
|
||||
|
||||
## 默认配置地址
|
||||
https://github.com/nginx/nginx/blob/master/conf/nginx.conf
|
||||
|
||||
记得修改
|
||||
```
|
||||
location / {
|
||||
root html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
```
|
||||
```
|
||||
location / {
|
||||
root /usr/share/nginx/html/;
|
||||
index index.html index.htm;
|
||||
}
|
||||
```
|
||||
修改完配置后需要重启docker容器。
|
||||
## 默认路径
|
||||
/usr/share/nginx/html/
|
||||
|
||||
## 有关DNS
|
||||
~~默认的域名blueroses.top是指向cloudflare的,所以通过域名来访问SFTP需要访问在cloudflare设置的子域名~~。然而是cloudflare域名解析的问题。
|
||||
- tj.blueroses.top
|
||||
- www.blueroses.top
|
||||
|
||||
因为还添加了阿里云DNS解析,所以更换VPS时需要记得**修改阿里云的DNS设置**。
|
||||
|
||||
## VPS Blog部署
|
||||
其他方法都或多或少的比较麻烦,所以最后用SFtp。
|
||||
### SFtp
|
||||
```
|
||||
docker run --privileged --name sftp \
|
||||
-v /root/docker/nginx/html:/home/web/ \
|
||||
-p 2222:22 -d atmoz/sftp \
|
||||
web:web:1000:1000:web
|
||||
```
|
||||
账号密码结为web,遇到权限问题,需要设置一下目录权限。
|
||||
chmod -R 666 /docker/nginx/html/
|
||||
|
||||
```
|
||||
docker run --name mysftp -p 2294:22 -d atmoz/sftp foo:pass:::upload
|
||||
|
||||
--name mysftp 容器名称
|
||||
foo:pass:::upload 其中foo为用户名,pass为密码,upload为上传的文件会保存到容器里面的/home/foo/upload目录里面
|
||||
-p 22:22 将宿主机的22端口映射到容器的22端口,这样方位宿主机的22端口则会转发到容器的22端口上
|
||||
-d atmoz/sftp 使用dockup hub中的atmoz/sftp镜像创建容器
|
||||
```
|
||||
|
||||
### githook
|
||||
因为使用docker所以没法直接执行bash。
|
||||
```
|
||||
rm -rf /docker/nginx/test/
|
||||
mkdir /docker/nginx/test/
|
||||
git clone /docker/gitea/git/repositories/bluerose/blog.git /docker/nginx/test/
|
||||
rm -rf
|
||||
cp -rf /docker/nginx/test/ /docker/nginx/html/
|
||||
|
||||
```
|
||||
```
|
||||
GIT_REPO=/docker/gitea/git/repositories/bluerose/blog.git \
|
||||
TMP_GIT_CLONE=/docker/test/ \
|
||||
PUBLIC_WWW=/docker/nginx/html/ \
|
||||
rm -rf ${TMP_GIT_CLONE} \
|
||||
mkdir ${TMP_GIT_CLONE} \
|
||||
git clone $GIT_REPO $TMP_GIT_CLONE \
|
||||
cp -rf ${TMP_GIT_CLONE} ${PUBLIC_WWW}
|
||||
```
|
881
03-UnrealEngine/流程管理与部署/VPS服务部署/Perforce Helix Core搭建.md
Normal file
881
03-UnrealEngine/流程管理与部署/VPS服务部署/Perforce Helix Core搭建.md
Normal file
@@ -0,0 +1,881 @@
|
||||
---
|
||||
title: Perforce Helix Core搭建
|
||||
date: 2022-12-21 14:51:55
|
||||
excerpt:
|
||||
tags: Perforce
|
||||
rating: ⭐
|
||||
---
|
||||
# 前言
|
||||
- 知乎
|
||||
- P4服务器部署、配置、备份流程详解 https://zhuanlan.zhihu.com/p/676332084
|
||||
# Perforce Docker
|
||||
可以使用这个容器:
|
||||
https://hub.docker.com/r/sourcegraph/helix-p4d
|
||||
|
||||
但这个容器是2020年构建的,我这里重新调整了一下,并且手动构建成功,具体可以参考下文。
|
||||
|
||||
## DockerFile构建
|
||||
大致步骤如下:
|
||||
1. 下载**blueroseslol/helix-docker**仓库的所有文件。
|
||||
2. 构建DockerFile。
|
||||
|
||||
```bash
|
||||
cd /home/perforce/helix-docker/helix-p4d/ && \
|
||||
docker build -f /home/perforce/helix-docker/helix-p4d/Dockerfile -t helix-p4d:2024.5 .
|
||||
```
|
||||
|
||||
docker build --file ./helix-p4d/Dockerfile --tag helix-p4d:2023.7 .
|
||||
|
||||
## 使用
|
||||
```shell
|
||||
docker run -d --name helix-p4d\
|
||||
-p 1666:1666 \
|
||||
-v /home/perforce/p4:/p4 \
|
||||
helix-p4d:2024.5
|
||||
```
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
-p 1666:1666 \
|
||||
-v /home/perforce/p4:/p4 \
|
||||
sourcegraph/helix-p4d:2020.2
|
||||
```
|
||||
|
||||
admin
|
||||
pass12349ers
|
||||
### Github文档
|
||||
```shell
|
||||
docker run --rm \
|
||||
--publish 1666:1666 \
|
||||
sourcegraph/helix-p4d:2020.2
|
||||
```
|
||||
|
||||
默认端口`:1666`, 默认用户名为 `admin`, 默认密码: `pass12349ers`。以下是所有配置的默认值。
|
||||
```shell
|
||||
NAME=perforce-server
|
||||
P4HOME=/p4
|
||||
P4NAME=master
|
||||
P4TCP=1666
|
||||
P4PORT=1666
|
||||
P4USER=admin
|
||||
P4PASSWD=pass12349ers
|
||||
P4CASE=-C0
|
||||
P4CHARSET=utf8
|
||||
JNL_PREFIX=perforce-server
|
||||
```
|
||||
|
||||
可以使用`--env` 覆盖上述环境变量:
|
||||
```shell
|
||||
docker run --rm \
|
||||
--publish 1666:1666 \
|
||||
--env P4USER=amy \
|
||||
--env P4PASSWD=securepassword \
|
||||
sourcegraph/helix-p4d:2020.2
|
||||
```
|
||||
|
||||
请注意,尽管服务器在重启后仍能存活(即数据被保留),但如果你在初始启动后(即镜像的第一次运行,在选项被硬编码为Perforce Helix核心服务器自身配置时)改变选项,它可能会中断。要启动一个长期运行的生产容器,记得要把数据目录(`P4HOME`)容器,把`--rm`标志换成`d`(分离):
|
||||
```shell
|
||||
docker run -d \
|
||||
--publish 1666:1666 \
|
||||
--env P4PASSWD=securepassword \
|
||||
--volume ~/.helix-p4d-home:/p4 \
|
||||
sourcegraph/helix-p4d:2020.2
|
||||
```
|
||||
|
||||
### 启用SSL
|
||||
首先生成自签名证书:
|
||||
```shell
|
||||
mkdir ssl
|
||||
pushd ssl
|
||||
openssl genrsa -out privatekey.txt 2048
|
||||
openssl req -new -key privatekey.txt -out certrequest.csr
|
||||
openssl x509 -req -days 365 -in certrequest.csr -signkey privatekey.txt -out certificate.txt
|
||||
rm certrequest.csr
|
||||
popd
|
||||
```
|
||||
接下来设置SSL文件映射目录也就是`P4SSLDIR`的值,并且设置`P4PORT`使用SSL。
|
||||
```shell
|
||||
docker run --rm \
|
||||
--publish 1666:1666 \
|
||||
--env P4PORT=ssl:1666 \
|
||||
--env P4SSLDIR=/ssl \
|
||||
--volume ./ssl:/ssl \
|
||||
sourcegraph/helix-p4d:2023.1
|
||||
```
|
||||
|
||||
### 时间显示问题
|
||||
1. 修改容器内系统时区。
|
||||
2. 修改P4V时间显示,Edit - Preferences - Display - Show date andtime as,Server time => Local time。
|
||||
|
||||
##### Docker容器修改时间
|
||||
方法一:配置Dockerfile镜像时修改,这样打包出来的镜像文件是需要的时区的。
|
||||
操作方式:Dockerfile中添加代码
|
||||
```bash
|
||||
# 在安装tzdata之前最好先update和upgrade,以防apt-get获取不到tzdata
|
||||
RUN apt-get update -y && apt-get upgrade -y
|
||||
# 安装,中国用户填写[Asia/Shanghai] ,表示亚洲/上海 ,东八区
|
||||
RUN apt-get install -y tzdata && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
```
|
||||
缺点:由于构建时需要更新ubuntu,所以需要需要网络支持,网络不好的时候拖累构建镜像的速度。亲测,在中国白天速度快,晚上慢。
|
||||
|
||||
**建议通过env进行指定**:
|
||||
```bash
|
||||
ENV TZ=Asia/Shanghai
|
||||
RUN In -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
```
|
||||
|
||||
方法二(强烈不推荐):在运行的容器中,进行修改
|
||||
操作方式:docker attach 登录到运行的容器中执行如下代码
|
||||
```bash
|
||||
# 在安装tzdata之前最好先update和upgrade,以防apt-get获取不到tzdata
|
||||
apt-get update -y && apt-get upgrade -y
|
||||
# 安装
|
||||
apt-get install -y tzdata
|
||||
# 配置
|
||||
echo "Asia/Shanghai" > /etc/timezone
|
||||
# dpkg-reconfigure -f noninteractive tzdata 或者这个。
|
||||
dpkg-reconfigure tzdata
|
||||
```
|
||||
|
||||
方法三:启动容器的时候进行设置
|
||||
操作方式:启动命令中添加 挂载目录,例如:
|
||||
```bash
|
||||
# 启动容器时挂载宿主机目录
|
||||
docker run -v /etc/localtime:/etc/localtime:ro <IMAGE:TAG>
|
||||
# 其中 -v 参数中ro代表只读模式(read only)
|
||||
# 如果您的项目中已经使用了-v 没有关系,启动时挂载多个目录只要写多个-v就可以
|
||||
```
|
||||
缺点:依赖于宿主机,一般生产环境宿主机都是linux,如果你也是Linux内核,推荐使用
|
||||
|
||||
### 推送镜像到Dockerhub
|
||||
登录
|
||||
```bash
|
||||
docker login
|
||||
|
||||
# Github
|
||||
docker login ghcr.io -u 378100977@qq.com -p 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
|
||||
```
|
||||
|
||||
推送
|
||||
```bash
|
||||
docker tag 5572f8b12de1 blueroses/perforce-helix-p4d:2024.5
|
||||
docker push blueroses/perforce-helix-p4d:2024.5
|
||||
|
||||
# 登录github
|
||||
docker push ghcr.io/blueroses/perforce-helix-p4d:2024.5
|
||||
```
|
||||
|
||||
## helix-proxy Docker
|
||||
Package: helix-proxy
|
||||
Priority: optional
|
||||
Section: non-free/vcs
|
||||
Installed-Size: 30
|
||||
Maintainer: Perforce Software, Inc. <support+packaging@perforce.com>
|
||||
Architecture: amd64
|
||||
Source: perforce
|
||||
Version: 2024.1-2596294~focal
|
||||
|
||||
|
||||
# IDE设置
|
||||
- VSCode - Settings - Extensions - Perforce
|
||||
- Client:工作区名称
|
||||
- Dir:工作目录
|
||||
- Password:密码
|
||||
- Port:服务器ip与端口
|
||||
- User:用户名
|
||||
- Rider - Settings - Version Control - Perforce
|
||||
- 输入Server、User、Workspace、utf8
|
||||
# Perforce
|
||||
## 参考
|
||||
- 官方文档
|
||||
- https://www.perforce.com/manuals/p4guide/Content/P4Guide/Home-p4guide.html
|
||||
- https://help.perforce.com/helix-core/quickstart-unreal/Content/quickstart/game-home-quickstart.html
|
||||
- 知乎&UE官方文档
|
||||
- https://docs.unrealengine.com/5.1/en-US/using-perforce-as-source-control-for-unreal-engine/
|
||||
- [UE5 源码引擎构建&UGS部署与搭建](https://zhuanlan.zhihu.com/p/414193101?utm_id=0)
|
||||
- [UE4管理多重项目-WiseeEngineering](https://zhuanlan.zhihu.com/p/364346565)
|
||||
- [UnrealEnigne源码构建&Perforce&(UnrealGameSync)开发版本控制基础部署](https://zhuanlan.zhihu.com/p/362276094)
|
||||
- [打通UE4美术资源版本控制关节](https://zhuanlan.zhihu.com/p/261692804)
|
||||
- [UE5+Perforce+阿里云ECS版本控制搭建流程与工作流程](https://zhuanlan.zhihu.com/p/640743305)
|
||||
- 解决大小写问题 :[P4服务器部署、配置、备份流程详解](https://zhuanlan.zhihu.com/p/676332084)
|
||||
- 视频
|
||||
- [ [英文直播]版本控制基础 | Version Control Fundamental(真实字幕组)](https://www.bilibili.com/video/BV1tp4y1C7f8/?spm_id_from=333.337.search-card.all.click&vd_source=d47c0bb42f9c72fd7d74562185cee290)
|
||||
- [配置管理软件Perforce代码版本管理中分支和标签应用示例—4.Local库的分支](https://www.bilibili.com/video/BV14z411b7VB/?spm_id_from=333.999.0.0&vd_source=d47c0bb42f9c72fd7d74562185cee290)
|
||||
- [配置管理软件Perforce代码版本管理中分支和标签应用示例—5.stream库的分支](https://www.bilibili.com/video/BV1xK41177W1/?spm_id_from=333.999.0.0&vd_source=d47c0bb42f9c72fd7d74562185cee290)
|
||||
- [P4V进阶教学自用——stream分支基本操作+文件resolve+分支制作](https://www.bilibili.com/video/BV1LC411z76w/?spm_id_from=333.999.0.0&vd_source=d47c0bb42f9c72fd7d74562185cee290)
|
||||
|
||||
### cmd
|
||||
- 设置默认服务器IP:`p4 set P4PORT=servername:port`
|
||||
- 设置默认用户名:`p4 set P4USER=your.username`
|
||||
- 设置typemap:`p4 -P YourPassword typemap`
|
||||
- 设置p4ignore
|
||||
- `p4 set P4IGNORE=.p4ignore`
|
||||
- `p4 ignores`
|
||||
- `p4 add -f ...`:add(add所有文件并且包含文件名含通配符的文件)
|
||||
- `p4 reconcile -aed`:检查所有增加/修改/删除的文件并且放到Pending Changelist
|
||||
- [p4 clean](https://www.perforce.com/manuals/cmdref/Content/CmdRef/p4_clean.html)
|
||||
- `p4 clean -a`:从工作区中删除没有add的文件。
|
||||
- `p4 clean -n`:不执行任何操作即可预览操作结果。
|
||||
- `p4 clean -i`:可清除ignore的文件。
|
||||
|
||||
## 规划
|
||||
### 开发目录设计
|
||||
- [UE4管理多重项目-WiseeEngineering(翻译)](https://zhuanlan.zhihu.com/p/364346565)
|
||||
|
||||
- ArtSource(美术资源:引擎中相应的美术资产应该统一从ArtSource仓库导入,这样美术人员可以集中在标准资产管线下的资产迭代,可以更加集中注意力于美术资产质量,所以前提是项目初期必须构建标准稳定的渲染和审核验收流程(这一点也是国内很多项目及经常返工,开发成本极高的原因))
|
||||
- Engine(引擎路径,这里我用于个人使用则不需要太多的分流)
|
||||
- Project(项目工程)
|
||||
|
||||
Example:
|
||||
- e:\\Perforce
|
||||
- ArtSource
|
||||
- ShowRoom
|
||||
- UnrealEngine
|
||||
|
||||
### ASoul P4的设计
|
||||
仓库:
|
||||
1. Engine(Stream Depot)
|
||||
1. 引擎源码
|
||||
2. Project(Stream Depot)
|
||||
1. 构建引擎。
|
||||
2. 项目工程。
|
||||
3. ArtSource(Local Depot)
|
||||
1. 美术资产。
|
||||
|
||||
#### 分支
|
||||
1. Release
|
||||
2. Mainline
|
||||
3. Development
|
||||
1. UE4
|
||||
2. UE5
|
||||
3. Trunk分支(主干)
|
||||
4. shiwan(线上分支)
|
||||
1. shiwanxxx
|
||||
2. shiwanpico
|
||||
3. ...
|
||||
|
||||
使用最暴力的Mainland(主干)分支开发模式,如有试玩需求,会创建shiwan分支。
|
||||
|
||||
#### 用户
|
||||
1. admin
|
||||
2. art
|
||||
3. director
|
||||
4. ~~remote~~ (这个用户名无法登陆)
|
||||
5. qa
|
||||
|
||||
#### 权限管理
|
||||
`//仓库名/分支/目录/...`
|
||||
1. *
|
||||
1. read://...
|
||||
2. art:
|
||||
1. write://Project/Development/LiveDirector/Content/...
|
||||
3. director
|
||||
1. write://Project/Development/LiveDirector/Content/...
|
||||
4. qa
|
||||
1. write://Project
|
||||
|
||||
#### WorkSpace设置
|
||||
1. 编码使用:UTF8-no bom
|
||||
2. Connection–>Edit Current Workspace–>Advanced,设置为
|
||||
1. Line ending characters for text file -> `UNIX style linefeed`
|
||||
2. OnSubmit -> `Don't submit unchanged files`
|
||||
3. 勾选
|
||||
1. Allwrite
|
||||
2. Clobbr
|
||||
3. Altsync(直播棚不要勾这个)
|
||||
|
||||
#### .p4ignore
|
||||
```bash
|
||||
# Ignore IDE related files
|
||||
.vscode\
|
||||
.vsconfig\
|
||||
|
||||
# Ignore project-specific files
|
||||
LiveDirector\Binaries\**\*.pdb
|
||||
LiveDirector\Binaries\**\*-Debug.*
|
||||
LiveDirector\Binaries\**\*-Shipping.*
|
||||
LiveDirector\Build\Receipts\*
|
||||
LiveDirector\DerivedDataCache\*
|
||||
LiveDirector\Intermediate\*
|
||||
LiveDirector\Plugins\**\Intermediate\*
|
||||
LiveDirector\Saved\*
|
||||
LiveDirector\*.sln
|
||||
LiveDirector\*.vcxproj
|
||||
LiveDirector\*.vs\
|
||||
LiveDirector\*.idea\
|
||||
LiveDirector\obj\
|
||||
LiveDirector\**\FileOpenOrder\
|
||||
|
||||
|
||||
Tools\VCluster\Binaries\**\*.pdb
|
||||
Tools\VCluster\Binaries\**\*-Debug.*
|
||||
Tools\VCluster\Binaries\**\*-Shipping.*
|
||||
Tools\VCluster\Build\Receipts\*
|
||||
Tools\VCluster\DerivedDataCache\*
|
||||
Tools\VCluster\Intermediate\*
|
||||
Tools\VCluster\Plugins\**\Intermediate\*
|
||||
Tools\VCluster\Saved\*
|
||||
Tools\VCluster\*.sln
|
||||
Tools\VCluster\*.vcxproj
|
||||
Tools\VCluster\*.vs\
|
||||
Tools\VCluster\*.idea\
|
||||
Tools\VCluster\obj\
|
||||
Tools\VCluster\**\FileOpenOrder\
|
||||
|
||||
# Ignore Engine temporary files
|
||||
Engine\**\__pycache__\*.pyc
|
||||
|
||||
# Ignore temporary files for Editor runs
|
||||
Engine\Engine\Intermediate\EditorRuns\
|
||||
|
||||
# Add back binary-distributed plugins
|
||||
!LiveDirector\Plugins\DirectorAssistanter\Intermediate\
|
||||
|
||||
# Ignore RiderLink
|
||||
LiveDirector\Plugins\Developer\RiderLink\
|
||||
|
||||
# Ingore LiveCoding(?) temporary files
|
||||
Engine\**\Intermediate\Build\**\*.h.old
|
||||
|
||||
# Ignore UnrealInsights temporary files
|
||||
Engine\Engine\Programs\UnrealInsights\Saved\
|
||||
Engine\Engine\Programs\UnrealInsights\Intermediate\
|
||||
|
||||
# Ignore Node.js moddules for RemoteControlWebInterface
|
||||
Engine\Engine\Plugins\VirtualProduction\RemoteControlWebInterface\**\node_modules\
|
||||
Engine\Engine\Plugins\VirtualProduction\RemoteControlWebInterface\**\package.json
|
||||
Engine\Engine\Plugins\VirtualProduction\RemoteControlWebInterface\**\package-lock.json
|
||||
Engine\Engine\Plugins\VirtualProduction\RemoteControlWebInterface\WebApp\**\build\
|
||||
Engine\Engine\Plugins\VirtualProduction\RemoteControlWebInterface\WebApp\Server\public\
|
||||
|
||||
# Ignore all Engine files.
|
||||
Engine\
|
||||
|
||||
# Ignore Ts History
|
||||
LiveDirector\ts_file_versions_info.json
|
||||
```
|
||||
|
||||
## 搭建p4顺序
|
||||
1. 搭建Perforce服务
|
||||
2. 创建一个Stream Depot或者所有Depot。
|
||||
3. 设置 p4 typemap
|
||||
4. 创建MainLine分支
|
||||
5. 添加.p4ignore文件
|
||||
6. 创建一个工作区,设置工作区设置后上传文件。
|
||||
|
||||
## Typemap
|
||||
typemap 的设置能够在 Perforce 中控制文件的只读和可写的形式。 然后要做这件事情,需要管理员先在命令行cmd下设置 P4 的环境变量。
|
||||
在指定仓库上右键,点击`Open Command Windows Here`,输入`p4 typemap`即可在弹出的txt文件中修改保存关闭即可。(输入UE官方推荐的内容即可)
|
||||
```text
|
||||
# The form data below was edited by Jeff
|
||||
# Perforce File Type Mapping Specifications.
|
||||
#
|
||||
# TypeMap: a list of filetype mappings; one per line.
|
||||
# Each line has two elements:
|
||||
#
|
||||
# Filetype: The filetype to use on 'p4 add'.
|
||||
#
|
||||
# Path: File pattern which will use this filetype.
|
||||
#
|
||||
# See 'p4 help typemap' for more information.
|
||||
|
||||
TypeMap:
|
||||
text //....asp
|
||||
text //....cnf
|
||||
text //....css
|
||||
text //....htm
|
||||
text //....html
|
||||
text //....inc
|
||||
text //....js
|
||||
text //....ts
|
||||
text+w //....log
|
||||
text+w //....ini
|
||||
text+w //....pdm
|
||||
binary+Fl //....zip
|
||||
binary+Fl //....bz2
|
||||
binary+Fl //....rar
|
||||
binary+Fl //....gz
|
||||
binary+Fl //....avi
|
||||
binary+Fl //....jpg
|
||||
binary+Fl //....jpeg
|
||||
binary+Fl //....mpg
|
||||
binary+Fl //....gif
|
||||
binary+Fl //....tif
|
||||
binary+Fl //....mov
|
||||
binary+Fl //....jar
|
||||
binary+l //....ico
|
||||
binary+l //....exp
|
||||
binary+l //....btr
|
||||
binary+l //....bmp
|
||||
binary+l //....doc
|
||||
binary+l //....dot
|
||||
binary+l //....xls
|
||||
binary+l //....ppt
|
||||
binary+l //....pdf
|
||||
binary+l //....tar
|
||||
binary+l //....exe
|
||||
binary+l //....dll
|
||||
binary+l //....lib
|
||||
binary+l //....bin
|
||||
binary+l //....class
|
||||
binary+l //....war
|
||||
binary+l //....ear
|
||||
binary+l //....so
|
||||
binary+l //....rpt
|
||||
binary+l //....cfm
|
||||
binary+l //....ma
|
||||
binary+l //....mb
|
||||
binary+l //....pac
|
||||
binary+l //....m4a
|
||||
binary+l //....mp4
|
||||
binary+l //....aac
|
||||
binary+l //....wma
|
||||
binary+l //....docx
|
||||
binary+l //....pptx
|
||||
binary+l //....xlsx
|
||||
binary+l //....png
|
||||
binary+l //....raw
|
||||
binary+l //....odt
|
||||
binary+l //....ods
|
||||
binary+l //....odg
|
||||
binary+l //....odp
|
||||
binary+l //....otg
|
||||
binary+l //....ots
|
||||
binary+l //....ott
|
||||
binary+l //....psd
|
||||
binary+l //....sxw
|
||||
binary+S2w //....exe
|
||||
binary+S2w //....dll
|
||||
binary+S2w //....lib
|
||||
binary+S2w //....app
|
||||
binary+S2w //....dylib
|
||||
binary+S2w //....stub
|
||||
binary+S2w //....ipa
|
||||
binary //....bmp
|
||||
text //....ini
|
||||
text //....config
|
||||
text //....cpp
|
||||
text //....h
|
||||
text //....c
|
||||
text //....cs
|
||||
text //....m
|
||||
text //....mm
|
||||
text //....py
|
||||
binary+l //....uasset
|
||||
binary+l //....umap
|
||||
binary+l //....upk
|
||||
binary+l //....udk
|
||||
binary+w //....exe
|
||||
binary+w //....dll
|
||||
binary+w //....lib
|
||||
binary+w //....app
|
||||
binary+w //....dylib
|
||||
binary+w //....stub
|
||||
binary+w //....ipa
|
||||
binary //....bmp
|
||||
text //....ini
|
||||
text+w //....config
|
||||
text //....cpp
|
||||
text //....h
|
||||
text //....c
|
||||
text //....cs
|
||||
text //....m
|
||||
text //....mm
|
||||
text //....py
|
||||
binary+l //....uasset
|
||||
binary+l //....umap
|
||||
binary+l //....upk
|
||||
binary+l //....udk
|
||||
binary+l //....ubulk
|
||||
text //....ignore
|
||||
```
|
||||
|
||||
## 相关概念
|
||||
### Workspace
|
||||
- 官方工作区文档:https://www.perforce.com/manuals/p4guide/Content/P4Guide/configuration.workspace.options.html
|
||||
|
||||
Workspace可以理解为,depot到本地的一个映射,对应本地的一个目录,**存储了该工作区域的相关设置以及历史记录**。
|
||||
新建Workspace,在p4admin中depot查看在服务器中存放的所有Ddepot仓库
|
||||
|
||||
开发的过程中可以有多个Workspace(例如一个用来开发,一个用来更新验证保证提交没有错误),但一般只推荐有一个Workspace。
|
||||
|
||||
### WorkspaceView
|
||||
- 官方工作区文档:https://www.perforce.com/manuals/p4guide/Content/P4Guide/configuration.workspace_view.html
|
||||
|
||||
PS. 非流用户可以通过以下方式更新客户端工作区视图
|
||||
1. 调用 **[p4 client](https://www.perforce.com/manuals/cmdref/Content/CmdRef/p4_client.html)** 命令,打开客户端规范。
|
||||
2. 编辑 **View:** 客户端规范中的字段。
|
||||
### AltSync
|
||||
这是一种2024.1推出的新的同步技术,允许您减少从库同步到客户端工作区时的初始等待时间,从而加快工作速度。您可以节省时间、磁盘空间和网络带宽,因为您只在需要时下载所需的内容。相关文档:
|
||||
- 文档:
|
||||
- https://www.perforce.com/manuals/p4vfs/Content/P4VFS/p4vfs-intro.html
|
||||
- https://www.perforce.com/manuals/p4vfs/Content/P4VFS/p4vfs-and-p4v.html
|
||||
- p4vfs(需要额外安装)
|
||||
- https://www.perforce.com/downloads/helix-core-virtual-file-service
|
||||
|
||||
### P4ExcludeList
|
||||
|
||||
### .p4ignore
|
||||
创建`.p4ignore`文件后,执行命令行设置ignore
|
||||
```bash
|
||||
p4 set P4IGNORE=.p4ignore
|
||||
p4 ignores
|
||||
```
|
||||
|
||||
```text
|
||||
# Ignore project files in the root
|
||||
*.sln
|
||||
!*\*.sln
|
||||
.vs
|
||||
*.suo
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.pdb
|
||||
*-Debug.dll
|
||||
*.xcodeproj
|
||||
.\Makefile
|
||||
.\CMakeLists.txt
|
||||
.\.ue4dependencies
|
||||
|
||||
ipch\*
|
||||
|
||||
# Packaged engine builds
|
||||
LocalBuilds\*
|
||||
|
||||
# DDC should never be checked in
|
||||
Engine\DerivedDataCache\*
|
||||
Templates\**\DerivedDataCache\*
|
||||
|
||||
# Engine intermediates & binaries
|
||||
Engine\Intermediate\*
|
||||
Engine\Plugins\**\Intermediate\*
|
||||
Engine\Programs\**\Intermediate\*
|
||||
Engine\Binaries*
|
||||
Engine\Plugins\**\Binaries\*
|
||||
|
||||
# Feature Packs (they might get updated with langauge packs?)
|
||||
FeaturePacks\*
|
||||
|
||||
# Samples & Templates
|
||||
Templates\**\Intermediate\*
|
||||
Templates\**\Saved\*
|
||||
Samples\**\Intermediate\*
|
||||
|
||||
# C# Intermediate folders
|
||||
Engine\Source\Programs\**\obj\*
|
||||
Engine\Platforms\**\Programs\**\obj\*
|
||||
|
||||
# Saved folders for programs should not be checked in
|
||||
Engine\Programs\**\Saved\*
|
||||
Engine\Programs\UnrealBuildTool\*
|
||||
|
||||
# Ignore any saved local files
|
||||
Engine\Saved\*
|
||||
|
||||
# Ignore any build receipts
|
||||
Engine\Build\Receipts\*
|
||||
|
||||
# Ignore Unix backup files
|
||||
*~
|
||||
|
||||
# Ignore Mac desktop services store files
|
||||
.DS_Store
|
||||
|
||||
# Ignore crash reports
|
||||
crashinfo--*
|
||||
|
||||
# Ignore linux project files
|
||||
*.user
|
||||
*.pro
|
||||
*.pri
|
||||
*.kdev4
|
||||
|
||||
#
|
||||
# Setup.bat Ignores
|
||||
#
|
||||
# There already might be some files pushed into the repo that would otherwise be
|
||||
# filtered: those are from the initial commit, coming directly from UE4-GitHub.
|
||||
# After running Setup.bat, the folders below will be populated with ~46GB of
|
||||
# files. Hence we'll be blanked ignoring some directories such as ThirdParty,
|
||||
# Media, Content, etc. If we want to change anything in those blanked-ignored
|
||||
# folders, we should unignore the specific thing we're adding.
|
||||
#
|
||||
.git\*
|
||||
Samples\**\Content\*
|
||||
Samples\**\Media\*
|
||||
Templates\**\Content\*
|
||||
Templates\**\Media\*
|
||||
Templates\Media\*
|
||||
Engine\Platforms\**\Content\*
|
||||
Engine\Documentation\*
|
||||
Engine\Extras\*
|
||||
Engine\Content\*
|
||||
Engine\Build\*
|
||||
Engine\Source\ThirdParty\*
|
||||
Engine\Source\Programs\*
|
||||
Engine\Source\Developer\*
|
||||
Engine\Plugins\*
|
||||
|
||||
# Specific files
|
||||
Engine\Config\ShaderCategories.csv
|
||||
.tgitconfig
|
||||
.ue4dependencies
|
||||
|
||||
# After all this above, there's still a couple folders and files left that doesn't
|
||||
# fit the filtering criteria above, so we handle them individually here.
|
||||
Engine\Source\Runtime\Navmesh\RecastDemo*
|
||||
Engine\Source\Runtime\Launch\Resources\Mac*
|
||||
Engine\Source\Runtime\Launch\Resources\Linux*
|
||||
Engine\Source\Runtime\Experimental\Voronoi\Private\voro++*
|
||||
|
||||
Engine\Source\Runtime\Apple\MetalRHI\Public\ue4_stdlib.metal
|
||||
Engine\Source\Runtime\AVEncoder\Private\Microsoft\Windows\ThirdParty\NvEncoder\LicenseAgreement.pdf
|
||||
Engine\Source\Runtime\Experimental\Chaos\.clang-format
|
||||
Engine\Source\Runtime\TraceLog\Private\Trace\LZ4\Epic.patch
|
||||
Templates\TemplateResources\Standard\*.FBX
|
||||
|
||||
|
||||
#
|
||||
# PLUGINS
|
||||
#
|
||||
# Plugins that come with Setup.bat are ignored above altogether, so we un-ignore
|
||||
# the custom plugins we want to ship with the customized UE4.
|
||||
!Engine\Plugins\Marketplace*
|
||||
!Engine\Plugins\Runtime\HoudiniEngine*
|
||||
# ... but keep ignoring their Build & Intermediate
|
||||
Engine\Plugins\Marketplace\**\Intermediate\*
|
||||
Engine\Plugins\Marketplace\**\Binaries\*
|
||||
Engine\Plugins\Runtime\**\Intermediate\*
|
||||
Engine\Plugins\Runtime\**\Binaries\*
|
||||
|
||||
#
|
||||
# PackageEngine.bat Ignores
|
||||
#
|
||||
# Packaging the engine will generate some .ini files which are safe to ignore
|
||||
#
|
||||
Samples\**\Saved\*
|
||||
```
|
||||
|
||||
### Job
|
||||
- https://www.bilibili.com/video/BV13C4y1s73M/?spm_id_from=333.999.0.0&vd_source=d47c0bb42f9c72fd7d74562185cee290
|
||||
可以关联多个Commit并且可以设置状态,以此追踪一个功能或者Bug的工作状态。比较像git的Issue以及工单系统。
|
||||
|
||||
### 分支合并
|
||||
分支切换需要修改设置以防止增加工作区:Preference - Stream - "Work in this Stream" menu behavior选项设置为Reuse current workspace。
|
||||
|
||||
## Helix4Git
|
||||
- 官方文档
|
||||
- https://www.perforce.com/manuals//helix-for-git/Content/Helix4Git/install-config.install.html
|
||||
- https://www.perforce.com/manuals//helix-for-git/Content/Helix4Git/install-config.config.html
|
||||
- 代理商知乎
|
||||
- https://zhuanlan.zhihu.com/p/545765248
|
||||
|
||||
DockerFile搞起来太麻烦……
|
||||
|
||||
# Perforce Proxy
|
||||
- 官方文档
|
||||
- https://www.perforce.com/manuals/p4dist/Content/P4Dist/chapter.proxy.html
|
||||
|
||||
一种用于同步主Perforce服务器数据的远程服务器。适合远程的分布式协作。
|
||||
|
||||
# 其他
|
||||
## 注册源码引擎到EpicGames
|
||||
经过上面的步骤,源码引擎已经构建成功,但是在对项目就行选择引擎版本的时候,发现并没有这个版本 。这是因为,构建的引擎没有注册到EpicGames中,找到EpicGames安装目录下的注册器。复制到源码工程并且运行即可。
|
||||
```text
|
||||
Launcher\Engine\Binaries\Win64\UnrealVersionSelector.exe
|
||||
```
|
||||
|
||||
# Perforce问题解决
|
||||
## 大小写问题解决
|
||||
官方的相关解释:
|
||||
- [Changing the Case of a Filename](https://portal.perforce.com/s/article/3448)
|
||||
- [Case Sensitivity](https://portal.perforce.com/s/article/3081)
|
||||
|
||||
我想到一个解决方案,就是删除这个文件夹,之后分别以为大写与小写文件名,再拉新就可以把资产都拉下来。
|
||||
1. 删除文件夹。
|
||||
2. 新建 Nailin_Birthday2024_V02,拉新备份后比较效果。
|
||||
3. 新建 NaiLin_Birthday2024_V02,拉新备份后比较效果。
|
||||
4. 替换旧与错误资产。
|
||||
5. 删除服务器上的Nailin_Birthday2024_V02与NaiLin_Birthday2024_V02文件夹。
|
||||
6. 重新上传。
|
||||
|
||||
## 使用Trigger进行检查
|
||||
参考:[P4服务器部署、配置、备份流程详解](https://zhuanlan.zhihu.com/p/676332084)
|
||||
|
||||
- 官方文档
|
||||
- [trigger.table.fields](https://www.perforce.com/manuals/p4sag/Content/P4SAG/scripting.trigger.table.fields.html)
|
||||
- [triggers.variables](https://www.perforce.com/manuals/p4sag/Content/P4SAG/scripting.triggers.variables.html)
|
||||
- 中文解析: https://www.cnblogs.com/itech/archive/2011/08/17/2141310.html
|
||||
- [triggers.command](https://www.perforce.com/manuals/p4sag/Content/P4SAG/scripting.triggers.command.html)
|
||||
- 案例
|
||||
1. [ ] 运行Python脚本 https://stackoverflow.com/questions/78156353/perforce-trigger-script-not-found
|
||||
2. [ ] Python检查代码: https://gist.github.com/cmcginty/8d99e0eac345e06dc1ba
|
||||
3. [ ] https://swarm.workshop.perforce.com/files/guest/perforce_software/sdp/dev/Unsupported/Samples/triggers/CheckCaseTrigger.py?v=%40%3D29027
|
||||
4. [ ] https://swarm.workshop.perforce.com/files/guest/perforce_software/sdp/dev/Server/Unix/p4/common/bin/triggers/CheckCaseTrigger.py?v=4
|
||||
|
||||
### 添加一个Trigger
|
||||
字段名称(例如`Triggers:`)必须左对齐(不缩进)并且必须以冒号结尾。字段值(即您添加的一组行,每个触发器一行)必须在字段名称下方的行上使用空格或制表符缩进。
|
||||
|
||||
表单`p4 triggers`如下所示:
|
||||
```bash
|
||||
Triggers:
|
||||
relnotecheck change-submit //depot/bld/... "/usr/bin/rcheck.pl %user%"
|
||||
verify_jobs change-submit //depot/... "/usr/bin/job.py %change%"
|
||||
```
|
||||
|
||||
PS.***脚本内部的换行符需要跟换成unix的!***
|
||||
|
||||
### Trigger Example
|
||||
[P4服务器部署、配置、备份流程详解](https://zhuanlan.zhihu.com/p/676332084)
|
||||
|
||||
on_create_workspace.sh:创建工作区自动填写设置。
|
||||
```bash
|
||||
workspacename=$1
|
||||
workspacefile=$2
|
||||
|
||||
p4="p4 -u perforce_trigger"
|
||||
|
||||
$p4 trust -fy >/dev/null 2>&1
|
||||
if [ -z "$($p4 clients -e $workspacename)" ]; then
|
||||
sed -i '/Options:/{s/noallwrite/allwrite/g}' $workspacefile
|
||||
sed -i '/Options:/{s/noclobber /clobber /g}' $workspacefile
|
||||
|
||||
if grep -q "^SubmitOptions:" $workspacefile; then
|
||||
sed -i 's/^SubmitOptions:.*/SubmitOptions: leaveunchanged/' $workspacefile
|
||||
else
|
||||
echo "SubmitOptions: leaveunchanged" >> $workspacefile
|
||||
fi
|
||||
|
||||
if grep -q "^LineEnd:" $workspacefile; then
|
||||
sed -i 's/^LineEnd:.*/LineEnd: unix/' $workspacefile
|
||||
else
|
||||
echo "LineEnd: unix" >> $workspacefile
|
||||
fi
|
||||
fi
|
||||
```
|
||||
|
||||
check_case_conflict.sh:大小写检查
|
||||
```bash
|
||||
#!/bin/bash
|
||||
|
||||
changelist=$1
|
||||
|
||||
p4="p4 -p 127.0.0.1:1666 -u perforce_trigger"
|
||||
pending_files=($($p4 opened -s -c $changelist | awk '{print $1}'))
|
||||
canSubmit=0
|
||||
|
||||
|
||||
function p4_user_login()
|
||||
{
|
||||
$p4 login -s ${@:2} "$1" 2>/dev/null | grep -q ^//
|
||||
}
|
||||
|
||||
if p4_user_login; then
|
||||
echo nswl123456|$p4 -u perforce_trigger login
|
||||
fi
|
||||
|
||||
function p4_file_exist()
|
||||
{
|
||||
$p4 files -e ${@:2} "$1" 2>/dev/null | grep -q ^//
|
||||
}
|
||||
|
||||
function p4_path_exist()
|
||||
{
|
||||
$p4 dirs ${@:2} "$1" 2>/dev/null | grep -q ^//
|
||||
}
|
||||
|
||||
function check_changelist_file_conflict()
|
||||
{
|
||||
local file=$1
|
||||
local pending_list=(${@:2})
|
||||
local message=
|
||||
|
||||
for other_file in ${pending_list[@]}; do
|
||||
if [ $file != $other_file ] && [ ${file,,} == ${other_file,,} ]; then
|
||||
message="$message\n$other_file"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$message" ]; then
|
||||
message="Changelist File Case Conflict(提交队列大小写冲突:文件):$message"
|
||||
printf "$message"
|
||||
fi
|
||||
}
|
||||
|
||||
function check_changelist_path_conflict()
|
||||
{
|
||||
local path=$(dirname $1)
|
||||
local pending_list=(${@:2})
|
||||
local message=
|
||||
|
||||
while [ $path != '/' ]; do
|
||||
for i in ${!pending_list[@]}; do
|
||||
local other_file=${pending_list[$i]}
|
||||
if [[ "$other_file" != "$path"* ]] && [[ "${other_file,,}" == "${path,,}"* ]]; then
|
||||
message="$message\n$other_file"
|
||||
unset "pending_list[$i]"
|
||||
fi
|
||||
done
|
||||
path=$(dirname $path)
|
||||
done
|
||||
|
||||
if [ "$message" ]; then
|
||||
message="Changelist Path Case Conflict(提交队列大小写冲突:路径):$message"
|
||||
printf "$message"
|
||||
fi
|
||||
}
|
||||
|
||||
for file in ${pending_files[@]}; do
|
||||
# Check File Case Conflicted Or Not
|
||||
canSubmit=0
|
||||
message=
|
||||
if ! p4_file_exist $file && p4_file_exist $file -i; then
|
||||
#===== Output Error Message =====#
|
||||
message="$message\nDepot File Case Conflicted (仓库大小写冲突:文件):\n$($p4 files -i "$file")"
|
||||
#================================#
|
||||
fi
|
||||
|
||||
# Check Path Case Conflicted Or Not
|
||||
path=$(dirname $file)
|
||||
while [ $path != '/' ]
|
||||
do
|
||||
if ! p4_path_exist $path && p4_path_exist $path -i; then
|
||||
#===== Output Error Message =====#
|
||||
message="$message\nDepot Path Case Conflicted (仓库大小写冲突:路径):\n$($p4 dirs -i "$path")"
|
||||
#================================#
|
||||
break
|
||||
fi
|
||||
path=$(dirname $path)
|
||||
done
|
||||
|
||||
temp_message=$(check_changelist_file_conflict "$file" "${pending_files[@]}")
|
||||
if [ "$temp_message" ]; then
|
||||
message="$message\n$temp_message"
|
||||
fi
|
||||
|
||||
temp_message=$(check_changelist_path_conflict "$file" "${pending_files[@]}")
|
||||
if [ "$temp_message" ]; then
|
||||
message="$message\n$temp_message"
|
||||
fi
|
||||
|
||||
if [ "$message" ]; then
|
||||
canSubmit=1
|
||||
message="File(文件):\n$file\n$message"
|
||||
printf "\n==============================\n$message\n==============================\n"
|
||||
fi
|
||||
done
|
||||
exit $canSubmit
|
||||
```
|
||||
|
||||
```text
|
||||
on_create_workspace form-out client "/p4/triggers/on_create_workspace.sh %formname% %formfile%"
|
||||
check_case_conflict change-submit //... "/p4/triggers/check_case_conflict.sh %changelist%"
|
||||
```
|
||||
|
||||
### 自动登录命令
|
||||
```
|
||||
echo password|p4 -u user login
|
||||
```
|
||||
|
||||
### 工作区设置选项
|
||||
https://www.perforce.com/manuals/v22.2/p4guide/Content/P4Guide/configuration.workspace.html
|
42
03-UnrealEngine/流程管理与部署/VPS服务部署/Postfix邮件服务器搭建.md
Normal file
42
03-UnrealEngine/流程管理与部署/VPS服务部署/Postfix邮件服务器搭建.md
Normal file
@@ -0,0 +1,42 @@
|
||||
## 参考网址
|
||||
https://www.kutu66.com//GitHub/article_113357
|
||||
|
||||
## docker后缀
|
||||
在 Docker 容器中运行带有smtp身份验证( sasldb )的postfix。 TLS和OpenDKIM支持是可选的。
|
||||
|
||||
## 需求
|
||||
Docker 1.0
|
||||
## 安装
|
||||
```
|
||||
sudo docker pull catatnight/postfix
|
||||
```
|
||||
|
||||
## 用法
|
||||
使用smtp身份验证创建后缀容器
|
||||
```
|
||||
docker run -p 25:25
|
||||
-e maildomain=mail.example.com -e smtp_user=user:pwd
|
||||
--name postfix -d catatnight/postfix# Set multiple user credentials: -e smtp_user=user1:pwd1,user2:pwd2,...,userN:pwdN
|
||||
```
|
||||
|
||||
本人使用
|
||||
```
|
||||
docker run -p 25:25 -e maildomain=mail.blueroses.top -e smtp_user=gitea@blueroses.top:ljj@12345678 --name postfix -d catatnight/postfix
|
||||
```
|
||||
```
|
||||
$ sudo docker run -p 25:25
|
||||
-e maildomain=mail.example.com -e smtp_user=user:pwd
|
||||
--name postfix -d catatnight/postfix# Set multiple user credentials: -e smtp_user=user1:pwd1,user2:pwd2,...,userN:pwdN
|
||||
启用 OpenDKIM: 在 /path/to/domainkeys 中保存你的域密钥 .private
|
||||
|
||||
$ sudo docker run -p 25:25
|
||||
-e maildomain=mail.example.com -e smtp_user=user:pwd
|
||||
-v/path/to/domainkeys:/etc/opendkim/domainkeys
|
||||
--name postfix -d catatnight/postfix
|
||||
启用 TLS(587): 将SSL证书 .key 和 .crt 保存到 /path/to/certs
|
||||
|
||||
$ sudo docker run -p 587:587
|
||||
-e maildomain=mail.example.com -e smtp_user=user:pwd
|
||||
-v/path/to/certs:/etc/postfix/certs
|
||||
--name postfix -d catatnight/postfix
|
||||
```
|
@@ -0,0 +1,149 @@
|
||||
该脚本仅用于Ubantu或者Debian
|
||||
```bash
|
||||
#/bin/bash
|
||||
echo "获取公网ip中..."
|
||||
ip=$(curl -s ipinfo.io/ip)
|
||||
echo "获取成功,公网地址为 $ip"
|
||||
echo "是否使用域名,是请在10秒内输入该服务器绑定域名,否则将使用公网ip"
|
||||
read -t 10 domain
|
||||
|
||||
if [ -z "$domain" ]; then
|
||||
echo "未输入域名,将使用公网IP $ip"
|
||||
else
|
||||
echo "使用域名 $domain"
|
||||
ip="$domain"
|
||||
fi
|
||||
|
||||
echo "倒计时10秒,请在此期间输入端口号(不输入将使用默认端口50000)..."
|
||||
read -t 10 port
|
||||
if [ -z "$port" ]; then
|
||||
port=50000
|
||||
fi
|
||||
echo "使用的端口号是: $port"
|
||||
#更新软件源,安装docker、二维码输出工具
|
||||
apt update && apt install docker.io qrencode
|
||||
#安装docker-compose
|
||||
curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
|
||||
chmod +x /usr/local/bin/docker-compose
|
||||
docker-compose --version
|
||||
docker-compose down
|
||||
#创建代理文件夹并生成配置文件
|
||||
mkdir /root/xray && cd /root/xray
|
||||
cat > docker-compose.yml <<EOF
|
||||
version: '3.9'
|
||||
services:
|
||||
v2ray:
|
||||
container_name: xray
|
||||
image: teddysun/xray
|
||||
ports:
|
||||
- $port:$port
|
||||
volumes:
|
||||
- ./config:/etc/xray/
|
||||
restart: always
|
||||
EOF
|
||||
#生成所需变量
|
||||
output=$(docker run --rm teddysun/xray /bin/sh -c "xray uuid && xray x25519")
|
||||
uuid=$(echo "$output" | awk 'NR==1 {print $1}')
|
||||
privateKey=$(echo "$output" | awk 'NR==2 {print $3}')
|
||||
publicKey=$(echo "$output" | awk 'NR==3 {print $3}')
|
||||
shortIDs=$(openssl rand -hex 8)
|
||||
#生成配置文件
|
||||
cat > /root/xray/config/config.json <<EOF
|
||||
{
|
||||
"log": {
|
||||
"loglevel": "warning"
|
||||
},
|
||||
"routing": {
|
||||
"domainStrategy": "IPIfNonMatch",
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
"ip": [
|
||||
"geoip:cn"
|
||||
],
|
||||
"outboundTag": "block"
|
||||
}
|
||||
]
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"listen": "0.0.0.0",
|
||||
"port": $port,
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": "$uuid",
|
||||
"flow": "xtls-rprx-vision"
|
||||
}
|
||||
],
|
||||
"decryption": "none"
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"security": "reality",
|
||||
"realitySettings": {
|
||||
"show": true, // 若为 true,输出调试信息
|
||||
"dest": "www.lovelive-anime.jp:443", // 目标网站最低标准:国外网站,支持 TLSv1.3、X25519 与 H2,域名非跳转用(主域名可能被用于跳转到 www)
|
||||
"xver": 0,
|
||||
"serverNames": [
|
||||
"www.lovelive-anime.jp"
|
||||
],
|
||||
"privateKey": "$privateKey",
|
||||
"shortIds": [
|
||||
"$shortIDs"
|
||||
]
|
||||
}
|
||||
},
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"destOverride": [
|
||||
"http",
|
||||
"tls"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"protocol": "freedom",
|
||||
"tag": "direct"
|
||||
},
|
||||
{
|
||||
"protocol": "blackhole",
|
||||
"tag": "block"
|
||||
}
|
||||
],
|
||||
"policy": {
|
||||
"levels": {
|
||||
"0": {
|
||||
"handshake": 2,
|
||||
"connIdle": 120
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
#启动容器
|
||||
docker-compose up -d
|
||||
#输出导入链接
|
||||
echo "vless://$uuid@$ip:$port?headerType=none&type=tcp&encryption=none&fp=chrome&pbk=$publicKey&sid=$shortIDs&spx=%2F&flow=xtls-rprx-vision&security=reality&sni=www.lovelive-anime.jp#los-2"
|
||||
#输出二维码
|
||||
qrcode="vless://$uuid@$ip:$port?headerType=none&type=tcp&encryption=none&fp=chrome&pbk=$publicKey&sid=$shortIDs&spx=%2F&flow=xtls-rprx-vision&security=reality&sni=www.lovelive-anime.jp#los-2"
|
||||
qrencode -t ANSIUTF8 "$qrcode"
|
||||
#输出维护指令
|
||||
echo "维护时请进入docker-compose.yml所在目录执行以下命令"
|
||||
echo "重启命令: docker-compose restart"
|
||||
echo "停止命令: docker-compose down"
|
||||
echo "启动命令: docker-compose up -d"
|
||||
echo "查看日志命令: docker-compose logs -f"
|
||||
echo "查看容器命令: docker-compose ps"
|
||||
```
|
||||
|
||||
# 服务器url
|
||||
```bash
|
||||
vless://4d9c1538-2f99-4781-b1fa-8b1cfb67f441@150.109.145.182:50000?headerType=none&type=tcp&encryption=none&fp=chrome&pbk=68Qo5gmZARkxbVw1ArKnCSMw_t8PBGt76e8nnLUPikI&sid=53f9d10d625ba230&spx=%2F&flow=xtls-rprx-vision&security=reality&sni=www.lovelive-anime.jp#los-2
|
||||
```
|
||||
|
||||
|
||||
vless://bm9uZToyMzRhZmNhYy0xNjIwLTRjOWQtYWU1ZC01Mjg4NzkzZDQ3NTlAMTUwLjEwOS4xNDUuMTgyOjUwMDAw?remarks=los-2&obfs=none&tls=1&peer=www.lovelive-anime.jp&xtls=2&pbk=cjf52COyZtTPsCCicvnGWv6BRt9Izd19j7hSL93bwhs&sid=b43a312c479aaae2
|
@@ -0,0 +1,113 @@
|
||||
```bash
|
||||
#/bin/bash
|
||||
ip=`curl -s ipinfo.io/ip`
|
||||
#更新软件源,安装docker
|
||||
apt update && apt install docker.io
|
||||
#安装docker-compose
|
||||
curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
|
||||
chmod +x /usr/local/bin/docker-compose
|
||||
docker-compose --version
|
||||
#创建代理文件夹并生成配置文件
|
||||
mkdir /root/xray && cd /root/xray
|
||||
cat > docker-compose.yml <<EOF
|
||||
version: '3.9'
|
||||
services:
|
||||
xray:
|
||||
container_name: xray
|
||||
image: teddysun/xray
|
||||
ports:
|
||||
- 50000:50000
|
||||
volumes:
|
||||
- ./config:/etc/xray/
|
||||
restart: always
|
||||
EOF
|
||||
cat > ./config/config.json <<EOF
|
||||
{
|
||||
"log": {
|
||||
"loglevel": "warning"
|
||||
},
|
||||
"routing": {
|
||||
"domainStrategy": "IPIfNonMatch",
|
||||
"rules": [
|
||||
{
|
||||
"type": "field",
|
||||
"ip": [
|
||||
"geoip:cn"
|
||||
],
|
||||
"outboundTag": "block"
|
||||
}
|
||||
]
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"listen": "0.0.0.0",
|
||||
"port": 50000,
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"clients": [
|
||||
{
|
||||
"id": "d45724ee-8d61-4845-dff3-aa24e68bd69b", // 执行 xray uuid 生成,或 1-30 字节的字符串
|
||||
"flow": "xtls-rprx-vision"
|
||||
}
|
||||
],
|
||||
"decryption": "none"
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"security": "reality",
|
||||
"realitySettings": {
|
||||
"show": true, // 若为 true,输出调试信息
|
||||
"dest": "www.lovelive-anime.jp:443", // 目标网站最低标准:国外网站,支持 TLSv1.3、X25519 与 H2,域名非跳转用(主域名可能被用于跳转到 www)
|
||||
"xver": 0,
|
||||
"serverNames": [ // 客户端可用的 serverName 列表,暂不支持 * 通配符
|
||||
"www.lovelive-anime.jp"
|
||||
],
|
||||
"privateKey": "ECQgaNUw3Y6NgO0iSxtVlY-zp0cK6pYaFQ4MRaSgRkg", // 执行 xray x25519 生成,填 "Private key" 的值
|
||||
"shortIds": [ // 客户端可用的 shortId 列表,可用于区分不同的客户端
|
||||
"6ba85179e30d4fc2" // 0 到 f,长度为 2 的倍数,长度上限为 16,可留空,或执行 openssl rand -hex 8 生成
|
||||
]
|
||||
}
|
||||
},
|
||||
"sniffing": {
|
||||
"enabled": true,
|
||||
"destOverride": [
|
||||
"http",
|
||||
"tls"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"outbounds": [
|
||||
{
|
||||
"protocol": "freedom",
|
||||
"tag": "direct"
|
||||
},
|
||||
{
|
||||
"protocol": "blackhole",
|
||||
"tag": "block"
|
||||
}
|
||||
],
|
||||
"policy": {
|
||||
"levels": {
|
||||
"0": {
|
||||
"handshake": 2,
|
||||
"connIdle": 120
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EOF
|
||||
|
||||
#启动容器
|
||||
docker-compose up -d
|
||||
|
||||
#输出导入链接
|
||||
echo vless://d45724ee-8d61-4845-dff3-aa24e68bd69b@$ip:50000?headerType=none&type=tcp&encryption=none&fp=chrome&pbk=aoXo-XpKezaDaZIzia6e8mCHYpIWkKCfLZrbrYj4SHw&sid=6ba85179e30d4fc2&spx=%2F&flow=xtls-rprx-vision&security=reality&sni=www.lovelive-anime.jp#los-2
|
||||
echo "维护时请进入docker-compose.yml所在目录执行以下命令"
|
||||
echo "重启命令: docker-compose restart"
|
||||
echo "停止命令: docker-compose down"
|
||||
echo "启动命令: docker-compose up -d"
|
||||
echo "查看日志命令: docker-compose logs -f"
|
||||
echo "查看容器命令: docker-compose ps"
|
||||
```
|
316
03-UnrealEngine/流程管理与部署/VPS服务部署/VPS账号与Trojan安装命令.md
Normal file
316
03-UnrealEngine/流程管理与部署/VPS服务部署/VPS账号与Trojan安装命令.md
Normal file
@@ -0,0 +1,316 @@
|
||||
## vps 价格
|
||||
### hostkey
|
||||
1核 2G内存 30G硬盘 0.010K贝壳/小时 2M带宽 (≈72元/月)
|
||||
2核 4G内存 40G硬盘 0.020K贝壳/小时 3M带宽 (≈144元/月)
|
||||
|
||||
### 搬瓦工
|
||||
CN2 GIA 1190元/年
|
||||
|
||||
### UCloud
|
||||
1M/2M 225元/年起
|
||||
2M/5M 534元/年起
|
||||
|
||||
### 硅云
|
||||
1核1G 带宽 2M 232 元/1年
|
||||
2核2G 带宽 2M 482 元/1年
|
||||
|
||||
## blueroses.top(阿里云)
|
||||
### DNS
|
||||
alla.ns.cloudflare.com
|
||||
micah.ns.cloudflare.com
|
||||
dns19.hichina.com
|
||||
dns20.hichina.com
|
||||
f1g1ns1.dnspod.net
|
||||
f1g1ns2.dnspod.net
|
||||
|
||||
### cloudflare
|
||||
如果不通可能是cloudflare出问题了。
|
||||
|
||||
默认的域名blueroses.top是指向cloudflare的,所以通过域名来访问SFTP需要访问在cloudflare设置的子域名。
|
||||
- tj.blueroses.top
|
||||
- www.blueroses.top
|
||||
|
||||
因为还添加了阿里云DNS解析,所以更换VPS时需要记得**修改阿里云的DNS设置**。
|
||||
|
||||
## 搬瓦工
|
||||
378100977@qq.com ljj199221
|
||||
|
||||
## 测速网址
|
||||
### SpeedTest
|
||||
https://www.speedtest.net/
|
||||
|
||||
测速命令:`wget -qO- bench.sh | bash`
|
||||
|
||||
### ip测速
|
||||
https://tools.ipip.net/newping.php
|
||||
|
||||
### 检查Ip是否被墙
|
||||
https://bandwagonhoster.com/653.html
|
||||
http://www.ping.pe/
|
||||
https://ping.pe/
|
||||
|
||||
### 搬瓦工免费换ip
|
||||
https://kiwivm.64clouds.com/main-exec.php?mode=blacklistcheck
|
||||
|
||||
## 单位阿里云账号
|
||||
```
|
||||
阿里云账号(拜托华城租的服务器)
|
||||
子账户:zjsjcpzljczx@1042965787832287
|
||||
密码:123456&*()LlL
|
||||
123456&*()LlL
|
||||
zaq1@XSW2
|
||||
登录地址:http://signin.aliyun.com/1042965787832287/login.htm
|
||||
|
||||
116.62.69.44
|
||||
```
|
||||
```
|
||||
门户网站域名:轻工院方工管理。
|
||||
```
|
||||
|
||||
# Trojan
|
||||
## BBR Plus加速脚本
|
||||
wget "https://github.com/chiakge/Linux-NetSpeed/raw/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
|
||||
|
||||
## 一键Trojan脚本
|
||||
curl -O https://raw.githubusercontent.com/atrandys/trojan/master/trojan_centos7.sh && chmod +x trojan_centos7.sh && ./trojan_centos7.sh
|
||||
|
||||
curl -O https://raw.githubusercontent.com/atrandys/trojan/master/trojan_mult.sh && chmod +x trojan_mult.sh && ./trojan_mult.sh
|
||||
|
||||
### 修改密码
|
||||
修改Trojan服务端密码需用到的命令
|
||||
```
|
||||
sudo systemctl stop trojan
|
||||
cd /usr/src/trojan
|
||||
vi server.conf
|
||||
sudo systemctl restart trojan
|
||||
```
|
||||
|
||||
### 安卓Android端Igniter下载地址
|
||||
https://github.com/trojan-gfw/igniter...
|
||||
|
||||
### IOS
|
||||
需要借用他人IOS账号购买ShadowRocket。
|
||||
|
||||
## 使用Docker安装Trojan
|
||||
### 安装Docker
|
||||
1. 卸载老版本的 docker 及其相关依赖
|
||||
sudo yum remove docker docker-common container-selinux docker-selinux docker-engine
|
||||
2. 更新yum
|
||||
yum update
|
||||
3. 安装 yum-utils,它提供了 yum-config-manager,可用来管理yum源
|
||||
sudo yum install -y yum-utils
|
||||
4. 添加yum源
|
||||
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
|
||||
5. 更新索引
|
||||
sudo yum makecache fast
|
||||
6. 安装 docker-ce
|
||||
sudo yum install -y docker-ce
|
||||
指定版本安装
|
||||
yum -y install docker-ce-18.06.3.ce
|
||||
yum install docker-ce docker-ce-cli containerd.io
|
||||
7. 启动 docker
|
||||
sudo systemctl start docker
|
||||
8. 验证是否安装成功
|
||||
sudo docker info
|
||||
9. 开机自启动
|
||||
systemctl enable docker
|
||||
|
||||
### 通过acme.sh脚本来设置证书
|
||||
安装acme.sh
|
||||
```
|
||||
apt-get update && apt-get -y install socat //安装socat
|
||||
yum install socat
|
||||
wget -qO- get.acme.sh | bash //安装脚本
|
||||
source ~/.bashrc
|
||||
```
|
||||
#### 申请证书
|
||||
在你的域名解析服务提供商那里添加好解析记录,假定你的域名是yourdomain.com,记得不要开启CDN,然后执行下面命令申请证书。
|
||||
```
|
||||
acme.sh --issue --standalone -d yourdomain.com -k ec-256
|
||||
```
|
||||
因为本人要有blog,需要与nginx容器共存,所以使用网站目录方式:
|
||||
```
|
||||
acme.sh --issue -d blueroses.top -d www.blueroses.top -d tj.blueroses.top -k ec-256 --webroot /root/docker/nginx/html
|
||||
```
|
||||
|
||||
#### 安装证书和私钥到指定位置
|
||||
```
|
||||
acme.sh --installcert -d blueroses.top \
|
||||
--fullchain-file /root/docker/trojan/trojan.crt \
|
||||
--key-file /root/docker/trojan/trojan.key \
|
||||
--ecc --reloadcmd "docker restart nginx-web trojan"
|
||||
```
|
||||
|
||||
#### 自动续期
|
||||
```
|
||||
acme.sh --upgrade --auto-upgrade
|
||||
```
|
||||
|
||||
#### 证书过期解决方法:手动使用DNS验证(没必要用这个)
|
||||
通过Docker关闭Nginx服务器之后,执行申请证书
|
||||
```
|
||||
acme.sh --issue --standalone -d tj.blueroses.top -k ec-256
|
||||
```
|
||||
2020.9.19遇到证书过期(是cloudflare把我的DNS解析删掉了)
|
||||
如果出错可以考虑用DNS验证
|
||||
```
|
||||
acme.sh --issue --dns -d tj.blueroses.top -k ec-256 --yes-I-know-dns-manual-mode-enough-go-ahead-please
|
||||
```
|
||||
重启Trojan服务。
|
||||
|
||||
#### acme.sh证书签发单位更换
|
||||
因为acme.sh 2.0更换了默认的签发单位为zerossl,所以如果有需要可以更换:
|
||||
```
|
||||
acme.sh --set-default-ca --server letsencrypt
|
||||
acme.sh --set-default-ca --server zerossl
|
||||
```
|
||||
|
||||
### 安装Docker
|
||||
```
|
||||
wget -qO- get.docker.com | bash //安装docker
|
||||
systemctl start docker //启动docker服务
|
||||
systemctl status docker //查看docker运行状态
|
||||
docker -v //查看docker版本
|
||||
systemctl enable docker //将docker服务加入开机自启动
|
||||
```
|
||||
|
||||
### 安装Trojan
|
||||
```
|
||||
docker pull teddysun/trojan
|
||||
```
|
||||
创建并且修改配置文件**(证书路径、密码)**。
|
||||
```cd /docker/trojan && vim config.json```
|
||||
|
||||
password可以设置多个,方便多用户使用.
|
||||
```
|
||||
{
|
||||
"run_type": "server",
|
||||
"local_addr": "0.0.0.0",
|
||||
"local_port": 443,
|
||||
"remote_addr": "127.0.0.1",
|
||||
"remote_port": 80,
|
||||
"password": [
|
||||
"512512512",
|
||||
"512"
|
||||
],
|
||||
"log_level": 1,
|
||||
"ssl": {
|
||||
"cert": "/etc/trojan/trojan.crt",
|
||||
"key": "/etc/trojan/trojan.key",
|
||||
"key_password": "",
|
||||
"cipher": "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384",
|
||||
"cipher_tls13": "TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384",
|
||||
"prefer_server_cipher": true,
|
||||
"alpn": [
|
||||
"http/1.1"
|
||||
],
|
||||
"reuse_session": true,
|
||||
"session_ticket": false,
|
||||
"session_timeout": 600,
|
||||
"plain_http_response": "",
|
||||
"curves": "",
|
||||
"dhparam": ""
|
||||
},
|
||||
"tcp": {
|
||||
"prefer_ipv4": false,
|
||||
"no_delay": true,
|
||||
"keep_alive": true,
|
||||
"reuse_port": false,
|
||||
"fast_open": false,
|
||||
"fast_open_qlen": 20
|
||||
},
|
||||
"mysql": {
|
||||
"enabled": false,
|
||||
"server_addr": "127.0.0.1",
|
||||
"server_port": 3306,
|
||||
"database": "trojan",
|
||||
"username": "trojan",
|
||||
"password": ""
|
||||
}
|
||||
}
|
||||
```
|
||||
#### 启动命令
|
||||
trojan
|
||||
```
|
||||
docker run -d --name trojan --restart always --net host \
|
||||
-p 443:443 \
|
||||
-v /root/docker/trojan:/etc/trojan \
|
||||
teddysun/trojan
|
||||
```
|
||||
|
||||
trojan-go
|
||||
```bash
|
||||
docker run -d --network host --name trojan-go --restart=always \
|
||||
-v /root/docker/trojan-go:/etc/trojan-go \
|
||||
teddysun/trojan-go
|
||||
```
|
||||
|
||||
#### 一键脚本紧急时候使用
|
||||
```bash
|
||||
curl -sL https://raw.githubusercontent.com/phlinhng/v2ray-tcp-tls-web/master/install.sh) && v2script
|
||||
```
|
||||
|
||||
#### ~~带有管理后台的Docker部署~~ 会顶掉我Blog网站所以放弃
|
||||
1. 安装mysql
|
||||
因为mariadb内存使用比mysql至少减少一半, 所以推荐使用mariadb数据库
|
||||
```
|
||||
docker run --name trojan-mariadb --restart=always -p 3306:3306 \
|
||||
-v /root/docker/mariadb:/var/lib/mysql \
|
||||
-e MYSQL_ROOT_PASSWORD=trojan \
|
||||
-e MYSQL_ROOT_HOST=% \
|
||||
-e MYSQL_DATABASE=trojan \
|
||||
-d mariadb:10.2
|
||||
```
|
||||
|
||||
数据库:trojan
|
||||
账号:root
|
||||
密码:trojan
|
||||
|
||||
2. 安装trojan
|
||||
```
|
||||
docker run -it -d --name trojan-web --net=host --restart=always --privileged jrohy/trojan init
|
||||
```
|
||||
|
||||
运行完后进入容器 `docker exec -it trojan-web bash`, 然后输入`trojan`即可进行初始化安装
|
||||
- 启动web服务: `systemctl start trojan-web`
|
||||
- 设置自启动: `systemctl enable trojan-web`
|
||||
- 更新管理程序: `source <(curl -sL https://git.io/trojan-install)`
|
||||
|
||||
#### 查看日志
|
||||
docker logs -f 容器id
|
||||
docker logs -f --tail string 容器id
|
||||
|
||||
# Nginx
|
||||
```bash
|
||||
docker run -d --restart=always --name nginx-web \
|
||||
-v /root/docker/nginx/nginx.conf:/etc/nginx/nginx.conf \
|
||||
-v /root/docker/nginx/html:/usr/share/nginx/html \
|
||||
-v /root/docker/nginx/log:/var/log/nginx \
|
||||
-v /root/docker/trojan/:/root/docker/trojan \
|
||||
-v /etc/localtime:/etc/localtime:ro \
|
||||
-p 80:80 \
|
||||
nginx
|
||||
```
|
||||
|
||||
|
||||
```bash
|
||||
docker run -d --privileged --restart=always --name nginx-web \
|
||||
-v /root/docker/nginx/nginx.conf:/etc/nginx/nginx.conf \
|
||||
-v /root/docker/nginx/html:/usr/share/nginx/html \
|
||||
-v /root/docker/nginx/log:/var/log/nginx \
|
||||
-v /root/docker/trojan/:/usr/share/trojan \
|
||||
-v /etc/localtime:/etc/localtime:ro \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
nginx
|
||||
```
|
||||
|
||||
# X-UI
|
||||
```bash
|
||||
docker run -itd --network=host \
|
||||
-v /root/docker/x-ui/db/:/etc/x-ui/ \
|
||||
-v /root/docker/trojan/:/root/cert/ \
|
||||
--name x-ui --restart=unless-stopped \
|
||||
enwaiax/x-ui
|
||||
```
|
||||
|
2
03-UnrealEngine/流程管理与部署/VPS服务部署/使用Nginx实现访问认证.md
Normal file
2
03-UnrealEngine/流程管理与部署/VPS服务部署/使用Nginx实现访问认证.md
Normal file
@@ -0,0 +1,2 @@
|
||||
## 访问指定页面需要输入账号密码的方法
|
||||
https://www.cnblogs.com/brianzhu/p/8625502.html
|
Reference in New Issue
Block a user