製作OpenStack用的RHEL7系統鏡像,openstackrhel7
製作OpenStack使用的RHEL7系統鏡像,並進行相關設定,安裝XRDP以進行遠端存取。
1.在KVM中安裝RHEL7.2客戶機;
2.設定網卡為dhcp並onboot=yes,使得虛擬機器能自動擷取IP地址;
vim /etc/sysconfig/network-scripts/ifcfg-eth0
確保可以連網。
3.查看SELinux狀態:
/usr/sbin/sestatus -v SELinux status: enabled
enabled表示SELinux為開啟狀態
關閉SELinux:
vim /etc/selinux/config
設定"SELINUX=disabled"並注釋掉剩下的行。
重啟機器即可。
4.查看和關閉firewalld
最新的CentOS7/REHL7防火牆已經更新為firewalld。
查看防火牆狀態:
systemctl status firewalld.service
關閉防火牆:
systemctl stop firewalld.service
禁止其開機啟動:
systemctl disable firewalld.service
5.安裝XRDP以遠端存取:
(1)安裝EPEL庫
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpmrpm -ivh epel-release-7-5.noarch.rpm
(2)安裝xrdp
yum updateyum -y install xrdp tigervnc-server
(3)啟動:
systemctl start xrdp.service
允許開機啟動:
systemctl enable xrdp.service
(4)查看xrdp 是否在監聽3389:
netstat -antup | grep xrdp
6.壓縮鏡像檔案並上傳到OpenStack,開啟執行個體,如不出意外就可以通過遠端桌面訪問了。
參考文章及出處:
https://blog.sloong.com/?p=76
http://www.zhongweicheng.com/?p=1419
http://idroot.net/tutorials/how-to-install-xrdp-on-centos-7/
http://www.itzgeek.com/how-tos/linux/centos-how-tos/install-xrdp-on-centos-7-rhel-7.html