W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗(yàn)值獎勵
在我們這套無人值守安裝系統(tǒng)的服務(wù)中,光盤鏡像是通過FTP協(xié)議傳輸?shù)?,因此勢必要用到vsftpd服務(wù)程序。當(dāng)然,也可以使用httpd服務(wù)程序來提供Web網(wǎng)站訪問的方式,只要能確保將光盤鏡像順利傳輸給客戶端主機(jī)即可。如果打算使用Web網(wǎng)站服務(wù)來提供光盤鏡像,一定記得將上面配置文件中的光盤鏡像獲取網(wǎng)址和Kickstart應(yīng)答文件獲取網(wǎng)址修改一下。
[root@linuxprobe ~]# yum install vsftpd
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package vsftpd.x86_64 0:3.0.2-9.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
vsftpd x86_64 3.0.2-9.el7 rhel 166 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 166 k
Installed size: 343 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : vsftpd-3.0.2-9.el7.x86_64 1/1
Verifying : vsftpd-3.0.2-9.el7.x86_64 1/1
Installed:
vsftpd.x86_64 0:3.0.2-9.el7
Complete!
劉遄老師再啰嗦一句,在配置文件修改正確之后,一定將相應(yīng)的服務(wù)程序添加到開機(jī)啟動項(xiàng)中,這樣無論是在生產(chǎn)環(huán)境中還是在紅帽認(rèn)證考試中,都可以在設(shè)備重啟之后依然能提供相應(yīng)的服務(wù)。希望各位讀者一定養(yǎng)成這個(gè)好習(xí)慣。
[root@linuxprobe ~]# systemctl restart vsftpd
[root@linuxprobe ~]# systemctl enable vsftpd
ln -s '/usr/lib/systemd/system/vsftpd.service' '/etc/systemd/system/multi-user.target.wants/vsftpd.service'
在確認(rèn)系統(tǒng)光盤鏡像已經(jīng)正常掛載到/media/cdrom目錄后,把目錄中的光盤鏡像文件全部復(fù)制到vsftpd服務(wù)程序的工作目錄中。
[root@linuxprobe ~]# cp -r /media/cdrom/* /var/ftp
這個(gè)過程大約需要3~5分鐘。在此期間,我們也別閑著,在firewalld防火墻管理工具中寫入使FTP協(xié)議永久生效的允許策略,然后在SELinux中放行FTP傳輸:
[root@linuxprobe ~]# firewall-cmd --permanent --add-service=ftp
success
[root@linuxprobe ~]# firewall-cmd --reload
success
[root@linuxprobe ~]# setsebool -P ftpd_connect_all_unreserved=on
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: