制作OpenStack用的RHEL7系统镜像

 制作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.rpm

rpm -ivh epel-release-7-5.noarch.rpm

(2)安装xrdp

yum update
yum -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

原文地址:https://www.cnblogs.com/vdvvdd/p/5045336.html