Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd9a0eb5

Browse files
committed
家庭云之一键安装Samba和files.photo.gallery
1 parent550ac1e commitd9a0eb5

File tree

3 files changed

+85
-0
lines changed

3 files changed

+85
-0
lines changed

‎cloud/README.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
##家庭云之一键安装Samba
2+
Samba,是种用来让UNIX系列的操作系统与微软Windows操作系统的SMB/CIFS(Server Message Block/Common Internet File System)网络协议做链接的自由软件。第三版不仅可访问及分享SMB的文件夹及打印机,本身还可以集成入Windows Server的网域,扮演为网域控制站(Domain Controller)以及加入Active Directory成员。简而言之,此软件在Windows与UNIX系列操作系统之间搭起一座桥梁,让两者的资源可互通有无。
3+
4+
```bash
5+
wget 262235.xyz/samba.sh&& bash samba.sh
6+
```
7+
8+
##家庭云之一键安装`php`相册 files.photo.gallery
9+
files.photo.gallery 是一个单文件 PHP 应用程序,可以将其放入服务器上的任何文件夹中,从而立即创建一个文件和文件夹库。它支持所有文件类型,并允许您预览图像、视频、音频和文本文件。
10+
11+
```bash
12+
wget 262235.xyz/photo.sh&& bash photo.sh
13+
```
14+
15+
##`samba.sh``photo.sh` 脚本源码
16+
https://github.com/hongwenjun/vps_setup/tree/remove/cloud/

‎cloud/photo.sh‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# 部署 nginx-php 和 php 相册
2+
photo_install(){
3+
downloads=/var/www/html
4+
5+
docker run -d -p 80:80 -p 443:443 \
6+
--cpus 0.6 --restart=always \
7+
-v${downloads}:/var/www/html \
8+
--name nginx-php \
9+
hongwenjun/nginx-php
10+
11+
wget -q -O - https://262235.xyz/photo.tar.gz| tar -xzf - -C${downloads}
12+
13+
cd${downloads}
14+
mkdir -p _files
15+
chown -R www-data:www-data _files
16+
chmod 0777 _files/
17+
}
18+
19+
apt install curl -y
20+
wget https://262235.xyz/wgmtu&& bash wgmtu docker
21+
22+
photo_install
23+

‎cloud/samba.sh‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
install_samba()
2+
{
3+
# 安装和设置 samba
4+
apt update -y&& apt install samba -y
5+
mkdir -p /var/www/html/u
6+
chown -R nobody:nogroup /var/www/html/u
7+
8+
cat<<EOF >/etc/samba/smb.conf
9+
[global]
10+
workgroup = WORKGROUP
11+
max log size = 1000
12+
logging = file
13+
panic action = /usr/share/samba/panic-action %d
14+
server role = standalone server
15+
obey pam restrictions = yes
16+
unix password sync = yes
17+
18+
passwd program = /usr/bin/passwd %u
19+
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
20+
21+
pam password change = yes
22+
map to guest = bad user
23+
usershare allow guests = yes
24+
25+
[homes]
26+
comment = Home Directories
27+
browseable = no
28+
read only = yes
29+
create mask = 0700
30+
directory mask = 0700
31+
valid users = %S
32+
33+
[cloud]
34+
comment = Network Logon Service
35+
path = /var/www/html/u
36+
guest ok = yes
37+
read only = no
38+
39+
EOF
40+
41+
systemctl restart smbd.service
42+
43+
}
44+
45+
install_samba
46+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp