1、Ensure that the samba service is installed on Server A:
yum install samba
2、After installation is complete, create a samba user and password on server A:
To create a samba user:
useradd sbuSet the sbu password and enter 123456 when prompted:
smbpasswd -a sbu
3、Modify the samba configuration file /etc/samba/smb.conf on server A, and add the following at the end of the smb.conf file:
[ccmonitor]
path = /var/spool/asterisk/monitor
comment = Home Directories
browseable = no
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S
create mask= 777
directory mask = 777
force user = asterisk
4、restart the server A on the samba service:
service smb restart
5、On server B, perform the mount operation:
mount -t cifs -o username=sbu,password=123456 //192.168.1.81/ccmonitor /var/spool/asterisk/monitor
6、Server B, set the boot automatically mount:
VIM Edit /etc/fstab, add the following file, as follows.
//192.168.1.81/ccmonitor /var/spool/asterisk/monitor cifs defaults,username=sbu,password=123456 0 0
7、To check if Server B is mounted:
df -hT
8、Unmount on Server B:
umount //192.168.1.81/ccmonitor
To increase the inbound rules:
iptables -I INPUT -p tcp -m multiport --dports 139,445 -j ACCEPT iptables -I INPUT -p udp -m multiport --dports 137,138 -j ACCEPTTo increase the outbound rule:
iptables -I OUTPUT -p tcp -m multiport --sports 139,445 -j ACCEPT iptables -I OUTPUT -p udp -m multiport --sports 137,138 -j ACCEPT