环境

openstack 上三个虚拟机
系统: CentOS Linux release 7.3.1611 (Core)
内存:32G --至少20G,16G 安装报错。
cpu:4C
磁盘:50G+50G

1. 设置主机名:

删除/etc/cloud/cloud.cfg文件中与hostname相关的值:
- set_hostname
- update_hostname

修改主机名

[root@tdh1 ~]# hostnamectl set-hostname tdh1.openstacklocal
View Code

修改/etc/hosts文件

[root@tdh1 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

10.32.8.30 tdh1.openstacklocal tdh1
10.32.8.67 tdh2.openstacklocal tdh2
10.32.8.76 tdh3.openstacklocal tdh3
View Code

2. 设置root用户登录

修改配置文件/etc/ssh/sshd_config

[root@tdh1 ~]# cat /etc/ssh/sshd_config | grep -v ^# | grep -v ^$
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
SyslogFacility AUTHPRIV
AuthorizedKeysFile    .ssh/authorized_keys
PasswordAuthentication yes
ChallengeResponseAuthentication no
GSSAPIAuthentication yes
GSSAPICleanupCredentials no
UsePAM yes
X11Forwarding yes
UsePrivilegeSeparation sandbox    # Default for new installations.
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
Subsystem    sftp    /usr/libexec/openssh/sftp-server
View Code

重启sshd服务

[root@tdh1 ~]# systemctl restart sshd
View Code

设置root密码

[root@tdh1 ~]# passwd root
View Code

3. 设置集群免密

生成密钥对

[root@tdh1 ~]# ssh-keygen
View Code

分发公钥文件

[root@tdh1 ~]# ssh-copy-id 10.32.8.30
[root@tdh1 ~]# ssh-copy-id 10.32.8.67
[root@tdh1 ~]# ssh-copy-id 10.32.8.76
View Code

设置验证文件

[root@tdh1 ~]# cat .ssh/config
 Host *
StrictHostKeyChecking no
View Code

查看需要分发的文件(5个)

[root@tdh1 ~]# ls .ssh/
authorized_keys config id_rsa id_rsa.pub known_hosts
View Code

分发.ssh目录

[root@tdh1 ~]# scp -r .ssh/ 10.32.8.67:~
[root@tdh1 ~]# scp -r .ssh/ 10.32.8.76:~
View Code

4. 设置selinux,集群时间同步,防火墙

设置selinux

[root@tdh1 ~]# ./set_selinux.sh 
./set_selinux.sh [ enforcing | permissive | disabled ]
View Code

脚本地址

集群时间同步
修改DNS,以使ntpdate命令可以通过域名来访问外网ntp服务器,从而同步时间。
默认下面,不用修改

[root@tdh2 ~]# cat /etc/resolv.conf
; generated by /usr/sbin/dhclient-script
search openstacklocal
nameserver 10.32.3.10
nameserver 114.114.114.114
nameserver 202.106.0.20
View Code

安装ntp

[root@tdh1 ~]# yum -y install ntp
[root@tdh1 ~]# ntpdate cn.pool.ntp.org
16 Jun 07:20:25 ntpdate[2436]: adjust time server 84.16.73.33 offset -0.005008 sec
View Code

安装防火墙

[root@tdh1 ~]# yum -y install firewalld
[root@tdh1 ~]# systemctl stop firewalld && systemctl disable firewalld
View Code

5. 磁盘设置

磁盘初始状态:

[root@tdh1 ~]# df -h | grep ^/dev
/dev/vda1 50G 2.3G 48G 5% /
/dev/vdb 50G 32K 50G 1% /mnt

[root@tdh1 ~]# fdisk -l | grep ^"Disk /"
Disk /dev/vda: 53.7 GB, 53687091200 bytes, 104857600 sectors
Disk /dev/vdb: 53.7 GB, 53687091200 bytes, 104857600 sectors
View Code

1. 创建目录/var/lib/docker
mkdir -p /var/lib/docker

2. 卸载分区/dev/vdb
umount /dev/vdb 或者 umount /mnt

3. 对分区进行xfs格式化
mkfs.xfs -f -n ftype=1 /dev/vdb

4. 挂载分区
mount /dev/vdb /var/lib/docker

5. 进行验证,检查是否格式化成功
xfs_info /dev/vdb | grep ftype=1
如果该语句返回结果中有ftype=1字样,则说明格式化成功。

6. 配置/etc/fstab
执行语句下述命令查看UUID:
blkid /dev/vdb
将查到的UUID值<UUID>添加在/etc/fstab中:
UUID=<UUID> /var/lib/docker xfs defaults,uquota,pquota 0 0

6 安装

准备安装介质:
TDH-Basic-Component-Transwarp-ce-1.1.0-final.tar.gz
CentOS-7.3-x86_64-Everything-1611.iso

解压安装介质

[root@tdh1 centos-7]# tar zxvf TDH-Basic-Component-Transwarp-ce-1.1.0-final.tar.gz
View Code

释放掉被系统Cache, 可将下面命令添加到crontab 中
*/5 * * * * sync && echo 3 > /proc/sys/vm/drop_caches

进入解压目录执行安装脚本

[root@tdh1 centos-7]# cd transwarp/
[root@tdh1 transwarp]# ls
install java_license manager process-ui script service_meta tos web-installer.jar
installer.yaml linuxdistros native registry service_client tdh_client transwarp
[root@tdh1 transwarp]# ./install
View Code

登录: http://tdh1.openstacklocal:8179/
步骤:
(1)阅读Java许可协议;
(2)检查环境;
(3)提取文件;
(4)配置网络;
(5)配置RPM库; --选“创建新的RPM库(ISO)”
(6)安装Manager

安装完成
您已经成功安装Manager。

接下来,可以在此地址访问Manager:http://tdh1.openstacklocal:8180/,用户名/密码信息为 (admin/admin)

许可证申请地址:https://snowflake.transwarp.io/
注意:
不要上传,打开复制粘贴
后面直接默认下一步即可