做網(wǎng)站的人怎么上傳內(nèi)容的湖南網(wǎng)站建站系統(tǒng)哪家好
實驗前準備
關(guān)閉VMware的dhcp
點擊? 編輯
點擊? 虛擬網(wǎng)絡(luò)編輯器
選擇 NAT模式?將dhcp取消勾選
準備兩臺虛擬機
一臺試驗機,(網(wǎng)絡(luò)環(huán)境正常并且有圖形化的界面的rhel7)? ? ? 一臺測試機?
init 5? ? ? ?-------------->? 開啟圖形化界面
如果沒有圖形化界面
yum group list 查找
安裝 yum group install "Server with GUI" -y
關(guān)閉防火墻? ? ? ? systemctl stop firewalld
關(guān)閉selinux? ? ? ?setenforce 0
試驗機
kickstart
安裝圖形化自動生成kickstart的自動安裝腳本工具
yum install system-config-kickstart -y
啟動圖形制作工具
system-config-kickstart
可寫可不寫? ?可以就寫一個mkdir /aaa? 試驗完成后查看一下有沒有驗證一下就行
LS 查看
ksvalidator ks.cfg? ?檢測文件是否有錯誤
下載http服務(wù)
yum install httpd? -y? ? ? ?安裝http服務(wù)
將ks.cfg文件復(fù)制到/var/www/html中
cp /root/ks.cfg ?/var/www/html/
建一個軟連接指向/rhel7
ln -s /rhel7 ?/var/www/html/rhel7
開啟httpd
systemctl? enable --now httpd
然后打開瀏覽器訪問
http://172.25.119.100/ks.cfg
http://172.25.119.100/rhel7
dhcp+checkkickstar
安裝dhcp服務(wù)
yum install dhcp -y
模版文件覆蓋配置文件
?\cp -f /usr/share/doc/dhcp*/dhcpd.conf.example ?/etc/dhcp/dhcpd.conf
打開配置文件(35行后的都不要? :set nu 顯示行號? ?27/28行注釋)
vim? ?/etc/dhcp/dhcpd.conf
systemctl enable --now dhcpd? ? ? ? 啟動dhcp服務(wù)
PXE
安裝?syslinux.x86_64? ?服務(wù)?
yum install syslinux.x86_64 -y??
安裝tftp? 共享pxelinux.0數(shù)據(jù)文件的的網(wǎng)路服務(wù)
yum install tftp-server.x86_64 -y
啟動服務(wù)
systemctl enable --now tftp
將要分享的資源文件放到這個目錄下
[root@shiyan ~]# cp /rhel7/isolinux/* /var/lib/tftpboot/
[root@shiyan ~]# cp /usr/share/syslinux/pxelinux.0 ? ?/var/lib/tftpboot/
?創(chuàng)建 pxelinux.cfg文件夾? 將系統(tǒng)系統(tǒng)界面的文件放到 pxelinux.cfg下的default中
[root@shiyan tftpboot]# mkdir pxelinux.cfg
[root@shiyan tftpboot]# cp isolinux.cfg ?pxelinux.cfg/default
修改dhcp配置文件? 讓dhcp服務(wù)分配地址的時候告訴主機下一個要訪問的服務(wù)器的位置或者說要安裝的系統(tǒng)資源所在的位置
vim /etc/dhcp/dhcpd.conf
重啟dhcp服務(wù)
[root@shiyan tftpboot]# systemctl restart dhcpd
pxelinux.0文件會告訴主機你要讀取的是? /var/lib/tftpboot/pxelinux.cfg/default
所以我們要修改 /var/lib/tftpboot/pxelinux.cfg/default 內(nèi)的配置
vim??/var/lib/tftpboot/pxelinux.cfg/default
必須是 /var/www/html/? 有的資源否則寫上也無效
退出時 :wq!
測試
從這個位置打開虛擬機
之后等待片刻 自動安裝系統(tǒng)
等待安裝完成后,系統(tǒng)重啟,關(guān)機 ,選擇從硬盤進入系統(tǒng)