1. 程式人生 > >12月7日 vsftp tftp samba

12月7日 vsftp tftp samba

 一、總結 

1.linux中的一切都是由檔案構成。

2.要想配置裝置或服務,其實就是在配置與裝置及服務相關的 檔案

3.要想配置檔案永久生效,必須配置其主配置檔案

4.配置檔案修改完成後,請重啟其相對應的服務:systemctl restart +服務名稱並加入開機啟動項,systemctl enable +服務名稱

5.主配置檔案一般格式 : /etc/服務名稱/服務名稱.conf

二、vsftp配置

前面配置yum倉庫步驟省略 

[[email protected] ~]# yum install vsftpd (vsftp的服務名稱)

[email protected] ~]# iptables -F   清空防火牆設定

[[email protected] ~]# service iptables save   儲存防火牆設定

iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]  儲存成功

 

[[email protected] ~]# mv /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf_bak 將vsftpd主配置檔案改名為
/etc/vsftpd/vsftpd.conf_bak
[[email protected] ~]# grep -v "#" /etc/vsftpd/vsftpd.conf_bak > /etc/vsftpd/vsftpd.conf 
篩選出不帶註釋文字的字元輸入到
/etc/vsftpd/vsftpd.conf
[[email protected] ~]# cat /etc/vsftpd/vsftpd.conf 
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=NO listen_ipv6=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES