一、director 安装准备

[root@localhost ~]# useradd stack
[root@localhost ~]# passwd stack
Changing password for user stack.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]# echo "stack ALL=(root) NOPASSWD:ALL" | tee -a /etc/sudoers.d/stack
stack ALL=(root) NOPASSWD:ALL
[root@localhost ~]# chmod 0440 /etc/sudoers.d/stack
[root@localhost ~]# su - stack
[stack@localhost ~]$ pwd
/home/stack
[stack@localhost ~]$ mkdir ~/images
[stack@localhost ~]$ mkdir ~/templates
[stack@localhost ~]$ ls
images  templates
[stack@localhost ~]$ hostname
localhost.localdomain
[stack@localhost ~]$ hostname -f
localhost
[stack@localhost ~]$ sudo hostnamectl set-hostname director.localdomain
[stack@localhost ~]$ hostname
director.localdomain
[stack@localhost ~]$ hostname -f
localhost
[stack@localhost ~]$ sudo hostnamectl set-hostname --transient director.localdomain
[stack@localhost ~]$ hostnamectl
   Static hostname: director.localdomain
         Icon name: computer-desktop
           Chassis: desktop
        Machine ID: 12e731436d9f4f61b645d9473a12e589
           Boot ID: 1b13fcd5b9d644d2874785ab9a485234
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-1062.el7.x86_64
      Architecture: x86-64
[stack@localhost ~]$ sudo vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

172.29.220.8 director.localdomain director
11-21 23:41