title: 【从零开始配置VPS】05:Lsky Pro + WebP-SH tags: [] id: '2500' categories:
wget https://gosspublic.alicdn.com/ossfs/ossfs_1.80.7_ubuntu20.04_amd64.deb
sudo apt-get install gdebi-core
sudo gdebi ossfs_1.80.7_ubuntu20.04_amd64.deb
echo BucketName:yourAccessKeyId:yourAccessKeySecret > /etc/passwd-ossfs
chmod 640 /etc/passwd-ossfs
mkdir img
ossfs BucketName img -o url=http://oss-cn-shanghai-internal.aliyuncs.com
tar -czvf img.tar.gz img
version: '3.3'
services:
lsky-pro:
container_name: lsky-pro
restart: always
volumes:
- './lsky-pro-data:/var/www/html'
ports:
- '7791:80'
image: 'dko0/lsky-pro'
mkdir -p ~/app/Lsky && cd ~/app/Lsky && nano docker-compose.yml
docker-compose up -d
反向代理 7791 端口
修改 【储存策略】【默认本地策略】【访问网址】为 https://img-cdn.limour.top/i
sudo chmod 777 -R /root/app/Lsky/lsky-pro-data/storage/app/uploads
tar -xzvf img.tar.gz
mv img/* /root/app/Lsky/lsky-pro-data/storage/app/uploads
rm -r img img.tar.gz
version: '3'
mkdir -p ~/app/WebP && cd ~/app/WebP && nano docker-compose.yml
docker-compose up -d
反向代理 3333 端口 到 https://img-cdn.limour.top/
<?php
$arr=file('photos');
$n=count($arr)-1;
$x=rand(0,$n);
header("Location:".$arr[$x],"\n");
header("Cache-Control:no-store, max-age=0");
?>
cd ~/app/WordPress/www
新建 photos 文本文件,一行一个图片地址
nano r.php
将 Sakurairo 主题 的 【主页设置】【封面设置】的随机图片地址换成 https://limour.top/r.php