centos tftp和samba的安裝與配置

來源:互聯網
上載者:User

標籤:

Tftp伺服器的安裝於配置

1 安裝: 命令:#yum –y install tftp

2 安裝完畢之後,將tftp伺服器設定為開機啟動,方法:(命令)#setup→選擇system server→選中tftp選項。

3 輸入命令(#netstat -a | grep  tftp 檢查tftp是否已經啟動)

4 配置:命令:#gedit /etc/xinted.d/tftp

           主要修改   disable    =   no

                     Server =   -s /tftpboot

 1 service tftp 2 { 3     socket_type     = dgram 4     protocol        = udp  5     wait            = yes  6     user            = root 7     server          = /usr/sbin/in.tftpd 8     server_args     = -s /var/lib/tftpboot 9     disable         = no  //預設為yes10     per_source      = 1111     cps         = 100 212     flags           = IPv4

 

5 重新啟動服務    命令:#/etc/init.d/xinetd   restart

6 再次檢查是否已經啟動 命令:#netstat      -a | grep tftp

  出現: udp  0   0   *:tftp *:* 即可!!!

samba伺服器的安裝

2 安裝smaba伺服器:命令:#yum –y install samba

3 配置samba

   通常我們編譯一下smb.conf檔案即可,為了安全起見,應備份一下此設定檔

   a備份:命令:#cp /etc/samba/smb.conf  /etc/samba/smb.conf.bak

   b 通過編譯器vim或gedit編譯設定檔。命令:#vim /etc/samba/smb.conf

   c 在檔案的最後添加如下內容,之後儲存退出:           

 1   [share] 2  3              comment = share  //描述資訊 4  5              path = /home/yan(使用者)/share  //設定共用路徑 6  7              pubilc = yes 8  9              writable  =  yes  //是否可寫10 11              write list = yan   //可以寫入的使用者列表

4 建立共用檔案:(注意:設定的samba使用者必須是linux上的合法使用者!!)

  命令:#mkdir /home/yan/share            建立共用目錄

       #chmod 777 /home/yan/share         更改目錄許可權

5 添加samba使用者

    命令:#smbpasswd  -a  yan

    此時會提示輸入兩次smb使用者密碼,即為win登入liunx  samba的密碼

6 重啟samba服務。

    命令:#    /etc/init.d/smb   restart

最後通過在window中訪問linux的samba服務為例介紹

步驟:開始→運行→輸入(//liunx主機的ip地址,如://192.168.1.120)→斷行符號鍵

輸入samba使用者名稱(如:yan),密碼:***,點登入即可。

centos tftp和samba的安裝與配置

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.