Raspberry Pi build file server

1. Introduction to file server:

In a computer local area network, with file data sharing as the goal, files shared by multiple computers need to be stored in one computer. This computer is called a file server. The file server is a computer responsible for data file management so that other computers in the same network can access these files. The file server allows users to share information on the network without physically moving files through floppy disks or some other external storage devices.

2. Introduction to Samba:

How to share files in different systems? Samba is an application that allows communication between LINUX server and Windows system, but we can achieve cross-platform mutual access

1. Installation of SMBA

sudo apt-get update

sudo apt-get install samba

2. Configure Samba

Enter folder

sudo vim /etc/samba/smb.conf

Add at the end

[yang1]

  comment = yang1 Storage # 共享文件夹说明

  path = /home/pi/yang1 # 共享文件夹目录

  read only = no # 不只读

  create mask = 0777 # 创建文件的权限

  directory mask = 0777 # 创建文件夹的权限

  guest ok = yes # guest访问,无需密码

  browseable = yes # 可见

Save and exit
Ctrl X
Y

Restart Samba service

sudo samba restart

3. Visit Raspberry Pi

Next, we enter "\your Raspberry Pi IP" in the "Run" of the "Start Menu" of our computer.
Insert picture description here
Then you can see your shared folder you set. Here you can upload or download files , And finally you can choose to fix it to the start interface to open it later
Insert picture description here

4. Add self-start after booting

sudo update-rc.d samba defaults 

note. The selected shared folder must be a folder in the home, not a random name.

Guess you like

Origin blog.csdn.net/qq_41676577/article/details/112856582