forked from 10362227/DFGDGDDHDHFDHDHDHD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
3.sh
376 lines (309 loc) · 12.9 KB
/
3.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
yum install git -y
yum install wget -y
yum groupinstall "Development Tools" -y
#安装python3.8
yum -y install gcc zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel
wget https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz
tar -zxvf Python-3.8.3.tgz
mkdir /usr/local/python3
cd Python-3.8.3
./configure --prefix=/usr/local/python3
make && make install
ln -s /usr/local/python3/bin/python3.8 /usr/bin/python3.8
ln -s /usr/local/python3/bin/pip3.8 /usr/bin/pip3.8
pip3 install wheel
#安装python3.9
yum -y install gcc zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel
wget https://www.python.org/ftp/python/3.9.3/Python-3.9.3.tgz
tar -zxvf Python-3.9.3.tgz
mkdir /usr/local/python3.9.3
cd Python-3.9.3
./configure --prefix=/usr/local/python3.9.3
make && make install
ln -s /usr/local/python3.9.3/bin/python3.9 /usr/bin/python3.9
ln -s /usr/local/python3.9.3/bin/pip3.9 /usr/bin/pip3.9
#安装streamlink
pip3.8 install --user --upgrade git+https://github.com/streamlink/streamlink.git
cp /root/.local/bin/streamlink /usr/local/bin
#安装gdown
pip3.8 install --user --upgrade git+https://github.com/wkentaro/gdown.git
cp /root/.local/bin/gdown /usr/local/bin
#安装spotdl
export SPOTIPY_CLIENT_ID='a145db3dcd564b9592dacf10649e4ed5'
export SPOTIPY_CLIENT_SECRET='389614e1ec874f17b8c99511c7baa2f6'
pip3.8 install --user --upgrade git+https://github.com/spotDL/spotify-downloader.git
cp /root/.local/bin/spotdl /usr/local/bin
#安装spotify-dl 可以下新西兰区歌曲
pip3.8 install --user --upgrade git+https://github.com/SathyaBhat/spotify-dl.git
cp /root/.local/bin/spotify_dl /usr/local/bin
#安装v2ray
wget -N --no-check-certificate -q -O install.sh "https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/master/install.sh" && chmod +x install.sh && bash install.sh
#wget -N --no-check-certificate -q -O install.sh "https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/master/install.sh" && chmod +x install.sh && bash install.sh
#旧方法 bash -c "$(curl -fsSL https://raw.githubusercontent.com/p1956/DFGDGDDHDHFDHDHDHD/master/V2ray.fun.sh)"
#安装KOD
wget https://raw.githubusercontent.com/10362227/DFGDGDDHDHFDHDHDHD/master/Aria2%2BAriaNG%2BKodExplorer_Install.sh
#wget https://raw.githubusercontent.com/p1956/DFGDGDDHDHFDHDHDHD/master/Aria2%2BAriaNG%2BKodExplorer_Install.sh
chmod +x Aria2+AriaNG+KodExplorer_Install.sh
./Aria2+AriaNG+KodExplorer_Install.sh
#安装yarn
curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash -
sudo yum install nodejs -y
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg
sudo yum install yarn -y
#安装git
yum install git -y
#安装7z
yum install -y p7zip p7zip-plugins
#安装rar和unrar方法
wget https://www.rarlab.com/rar/rarlinux-x64-5.9.1.tar.gz --no-check-certificat
tar -zxvf rarlinux-x64-5.9.1.tar.gz
cd rar
cp -v rar unrar /usr/local/bin/
cd
#安装python3.6
#wget --no-check-certificate https://raw.githubusercontent.com/LunacyZeus/Python3.6-for-Centos7.0/master/install.sh && sh install.sh
#安装RSSHub
git clone https://github.com/10362227/RSSHub.git
cd RSSHub
yarn install --production
#screen yarn start
cd /var/spool/cron
touch hello.sh
cat > /var/spool/cron/hello.sh <<EOF
chmod -R 777 /usr/share/nginx/kodexplorer/data/User/admin/home/
EOF
cat > /var/spool/cron/root <<EOF
46 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null
0 0 1 */2 * lsof -i:80 | awk '{print $2}' | grep -v "PID" | xargs kill -9 && acme.sh --issue --standalone --force --renew -m [email protected] -d 362227.top && systemctl restart nginx
* * * * * /usr/share/nginx/kodexplorer/a.sh
* * * * * sleep 30; /usr/share/nginx/kodexplorer/a.sh
*/20 * * * * /usr/share/nginx/kodexplorer/b.sh
0 2 * * * cd /usr/share/nginx/kodexplorer/rss/huginn/ && php huginn备份.php
0 2 * * * /usr/share/nginx/kodexplorer/GitHub-Backup/backup-gdhdhdh1441414.sh & /usr/share/nginx/kodexplorer/GitHub-Backup/backup-362227.sh & /usr/share/nginx/kodexplorer/GitHub-Backup/backup-10362227.sh
0 3 * * * tar -zcvf /usr/share/nginx/kodexplorer/backup.tar.gz --exclude=挂载 --exclude=remote --exclude=igvid --exclude=config --exclude=plugins --exclude=static --exclude=data --exclude=app --exclude=aria2c --exclude backup.tar.gz --exclude=*.mp4 --exclude=*.mov --exclude=*.mkv --exclude=*.webm --exclude=*.ts --exclude=*.m2ts --exclude *.vob --exclude=*.mpg --exclude *.avi --exclude=*.MP4 --exclude=*.MOV --exclude=*.MKV --exclude=*.WEBM --exclude=*.TS --exclude *.M2TS --exclude *.VOB --exclude *.MPG --exclude=*.AVI /usr/share/nginx/kodexplorer
0 4 * * * rclone copy /usr/share/nginx/kodexplorer/backup.tar.gz 10362227:backup --exclude --local-no-check-updated --config=/usr/share/nginx/kodexplorer/rclone.conf
0 5 * * * rclone move /usr/share/nginx/kodexplorer/igvid/ ysf2020:vimeo --transfers=1 -P --stats-one-line --contimeout 5h --max-depth 1 --size-only --include "*.{mp4,flv}" --min-age 600m -P
0 7 * * * find / -name "*.log" | xargs rm -rf && rm -rf /var/log/journal/*
* * * * * /usr/share/nginx/kodexplorer/autostartrsshub.sh
*/49 * * * * 暂停/usr/share/nginx/kodexplorer/rss/ig.php
* * * * * 暂停 python3.8 /usr/share/nginx/kodexplorer/selenium/uc.py
*/44 * * * * 暂停 curl -L http://362227.top/rss/FlareSolverrIG.php > /usr/share/nginx/kodexplorer/flaresolverr/IG.html
*/10 * * * * 暂停 systemctl restart php-fpm
*/15 * * * * php /usr/share/nginx/kodexplorer/rss/ytb.php > /usr/share/nginx/kodexplorer/rss/ytb.xml
*/5 * * * * // curl -L "https://www.362227.top/flaresolverr/flaresolverr.php?url=https://rarbg.to/rss.php?category=42;46;17;47;50;51;44;54;52;45" > /usr/share/nginx/kodexplorer/rss/rarbg.xml
0 0 * * * yum -y update google-chrome-stable
#
EOF
#1.安装transmission
wget -N --no-check-certificate https://raw.githubusercontent.com/91yun/91yuncode/master/transmission-centos.sh && bash transmission-centos.sh
wget https://github.com/ronggang/transmission-web-control/raw/master/release/install-tr-control-cn.sh --no-check-certificate && bash install-tr-control-cn.sh
##(注:如要更新新版,执行此命令即可)
##开机启动:
chkconfig transmission-daemon on
#修改密码transmission
##停止
systemctl stop transmission-daemon
cat > /var/lib/transmission/.config/transmission-daemon/settings.json <<EOF
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": false,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4,
"dht-enabled": true,
"download-dir": "/usr/share/nginx/kodexplorer/data/User/admin/home/",
"download-queue-enabled": true,
"download-queue-size": 5,
"encryption": 1,
"idle-seeding-limit": 500,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/var/lib/transmission/Downloads",
"incomplete-dir-enabled": false,
"lpd-enabled": false,
"message-level": 1,
"peer-congestion-algorithm": "",
"peer-id-ttl-hours": 6,
"peer-limit-global": 2000,
"peer-limit-per-torrent": 2000,
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
"peer-socket-tos": "default",
"pex-enabled": true,
"port-forwarding-enabled": true,
"preallocation": 1,
"prefetch-enabled": true,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 2,
"ratio-limit-enabled": false,
"rename-partial-files": true,
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-host-whitelist": "",
"rpc-host-whitelist-enabled": true,
"rpc-password": "y362227",
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-username": "",
"rpc-whitelist": "127.0.0.1",
"rpc-whitelist-enabled": false,
"scrape-paused-torrents-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"seed-queue-enabled": false,
"seed-queue-size": 10,
"speed-limit-down": 100,
"speed-limit-down-enabled": false,
"speed-limit-up": 100,
"speed-limit-up-enabled": false,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 18,
"upload-slots-per-torrent": 14,
"utp-enabled": true
}
EOF
systemctl stop transmission-daemon
systemctl start transmission-daemon
# 安装FFMPEG
yum install yasm -y
cd ~
wget http://www.ffmpeg.org/releases/ffmpeg-4.1.tar.gz
tar -xvf ffmpeg-4.1.tar.gz
cd ffmpeg-4.1
./configure --enable-libmp3lame && make && make install
#安装mediainfo
yum -y install mediainfo
#安装youtube-dl
wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
chmod a+rx /usr/local/bin/youtube-dl
#安装youtube-dl
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
chmod a+rx /usr/local/bin/yt-dlp
#安装SSR
wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocksR.sh && chmod +x shadowsocksR.sh && ./shadowsocksR.sh 2>&1 | tee shadowsocksR.log
#安装Pip:
#yum -y install python-pip
iptables -F
iptables -F -t nat
iptables -X
iptables -X -t nat
#安装dos2unix:
yum install -y dos2unix
#dos2unix proxychains
#安装证书HTTPS
#先关闭80端口
lsof -i:80 | awk '{print $2}' | grep -v "PID" | xargs kill -9
yum install lsof -y
yum install install socat -y
curl https://get.acme.sh | sh
source ~/.bashrc
#acme.sh --issue --standalone -m [email protected] -d 362227.top
#acme.sh --issue --standalone -m [email protected] -d rsshub.362227.top
#acme.sh --issue --standalone -m [email protected] -d transmission.362227.top
#acme.sh --issue --standalone -m [email protected] -d ariang.362227.top
#重新生成证书覆盖v2ray (换主机用,记得先修改DNS)
#rm -rf /root/.acme.sh/a.362227.top_ecc
#rename /root/.acme.sh/a.362227.top mv /root/.acme.sh/a.362227.top_ecc
mkdir /usr/share/nginx/kodexplorer/data/User/admin/home/hls
/etc/nginx/conf/nginx.conf
#重启nginx
sudo systemctl restart nginx
#安装psmisc
yum -y install psmisc
sudo pip install requests
easy_install beautifulsoup4
pip install beautifulsoup4
easy_install PyRSS2Gen
pip install PyRSS2Gen
easy_install beautifulsoup
pip install beautifulsoup
#安装proxychains
git clone https://github.com/rofl0r/proxychains-ng.git
cd proxychains-ng
./configure --prefix=/usr --sysconfdir=/etc
make && make install
make install-config
cd .. && rm -rf proxychains-ng
#vim /etc/proxychains.conf //修改配置文件
#socks5 127.0.0.1 1080 //ip和port改成自己的ip和端口
#proxychains4 wget http://xxx.com/xxx.zip
#安装googledriver
pip3 install --upgrade --no-cache-dir gdown
chmod -R 777 /usr/share/nginx/kodexplorer/
chmod -R 777 /usr/share/nginx/
#0.安装goflyway
wget -N --no-check-certificate https://github.com/p1956/DFGDGDDHDHFDHDHDHD/raw/master/goflyway.sh && chmod +x goflyway.sh && bash goflyway.sh
#http://kernel.ubuntu.com/~kernel-ppa/mainline/
#安装rclone
yum install fuse -y
curl https://rclone.org/install.sh | sudo bash
rclone config
touch /etc/nginx/conf/conf.d/kodexplorer.conf
#cat > /etc/nginx/conf/conf.d/kodexplorer.conf <<EOF
server {
listen 80;
server_name 362227.top;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/kodexplorer;
index index.html index.htm index.php;
}
location ~ \.php$ {
root /usr/share/nginx/kodexplorer;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/kodexplorer$fastcgi_script_name;
include fastcgi_params;
}
}
EOF
touch /etc/nginx/conf/conf.d/ariang.conf
#cat > /etc/nginx/conf/conf.d/ariang.conf <<EOF
server {
listen 80;
server_name ariang.362227.top;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/ariang;
index index.html index.htm index.php;
}
}
EOF
touch /etc/nginx/conf/conf.d/rsshub.conf
#cat > /etc/nginx/conf/conf.d/rsshub.conf <<EOF
server {
listen 80;
server_name rsshub.362227.top;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
proxy_pass http://localhost:1200;
}
}
EOF
touch /etc/nginx/conf/conf.d/transmission.conf
#cat > /etc/nginx/conf/conf.d/transmission.conf <<EOF
server {
listen 80;
server_name transmission.362227.top;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
proxy_pass http://localhost:9091;
}
}
EOF