Last update at :2024-04-03,Edit by888u
Build a Samba server under Linux and use aria2 offline download to easily read the server's files on your computer.
Environment:
- CentOS 7
- Windows 10
- Samba
Install Samba service
After su obtains permissions
yum -y install samba
When the display is complete.
Modify Samba configuration file
nano /etc/samba/smb.conf
Modify the workgroup in [global]
Reference:
[global]
workgroup=WORKGROUP
security=user
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
cups options = raw
Add the directory you want to share later.
[wwwroot]
comment=wwwroot
path = /www/wwwroot
browseable=yes
writable=yes
public = no
The wwwroot can be customized, and the path is a shared directory.
Modify permissions later
mkdir /www/wwwroot
#If the directory does not exist, remember to create it
chmod 777 /www/wwwroot
Create Samba user
pdbedit -a username
Create a user named username
You will then be asked to enter the password for the new user.
pdbedit -L
This command will display existing users.
Start the Samba service and set it to start automatically at boot
First remember to release port 455 in the server
Then start Samba
systemctl start smb
systemctl start nmb
Set auto-start at boot
chkconfig smb on
chkconfig nmb on
Mount Samba in Windows 10
Open my computer and see Map network drive at the top
Click and enter in Folder
//192.168.123.197
Then click Browser on the right to select the corresponding folder
Where wwwroot is [wwwroot] previously in the Samba configuration file, and the previous ip is the server's ip. You can also use the domain name.
Click Finish when finished
You will then be asked to enter your account password, which is the account password you created earlier.
After completion, you can see it in my computer.
Recommended site search: free virtual space, free virtual host, free trial of virtual space, vps foreign server, server space, cn domain name price, Hong Kong vps recommendation, Hong Kong host high defense mainland China proxy server IP, US multi-IP station group vps,
发表评论