Bo's Oracle Station

查看: 1973|回复: 3

课程第10次

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2019-4-24 20:53:47 | 显示全部楼层 |阅读模式
2019-04-24
  1. [root@station60 ~]# ipa-client-install  --realm=BOTANGDB.COM --domain=example.com
  2. WARNING: ntpd time&date synchronization service will not be configured as
  3. conflicting service (chronyd) is enabled
  4. Use --force-ntpd option to disable it and force configuration of ntpd

  5. Provide your IPA server name (ex: ipa.example.com): station61.example.com
  6. The failure to use DNS to find your IPA server indicates that your resolv.conf file is not properly configured.
  7. Autodiscovery of servers for failover cannot work with this configuration.
  8. If you proceed with the installation, services will be configured to always access the discovered server for all operations and will not fail over to other servers in case of failure.
  9. Proceed with fixed values and no DNS discovery? [no]: yes
  10. Client hostname: station60.example.com
  11. Realm: BOTANGDB.COM
  12. DNS Domain: example.com
  13. IPA Server: station61.example.com
  14. BaseDN: dc=botangdb,dc=com

  15. Continue to configure the system with these values? [no]: yes
  16. Skipping synchronizing time with NTP server.
  17. User authorized to enroll computers: admin
  18. Password for admin@BOTANGDB.COM:
  19. Successfully retrieved CA cert
  20.     Subject:     CN=Certificate Authority,O=BOTANGDB.COM
  21.     Issuer:      CN=Certificate Authority,O=BOTANGDB.COM
  22.     Valid From:  2019-04-24 12:29:28
  23.     Valid Until: 2039-04-24 12:29:28

  24. Enrolled in IPA realm BOTANGDB.COM
  25. Created /etc/ipa/default.conf
  26. New SSSD config will be created
  27. Configured sudoers in /etc/nsswitch.conf
  28. Configured /etc/sssd/sssd.conf
  29. Configured /etc/krb5.conf for IPA realm BOTANGDB.COM
  30. trying https://station61.example.com/ipa/json
  31. [try 1]: Forwarding 'schema' to json server 'https://station61.example.com/ipa/json'
  32. trying https://station61.example.com/ipa/session/json
  33. [try 1]: Forwarding 'ping' to json server 'https://station61.example.com/ipa/session/json'
  34. [try 1]: Forwarding 'ca_is_enabled' to json server 'https://station61.example.com/ipa/session/json'
  35. Systemwide CA database updated.
  36. Hostname (station60.example.com) does not have A/AAAA record.
  37. Failed to update DNS records.
  38. Missing A/AAAA record(s) for host station60.example.com: 192.168.0.60, fd00:ac20:2e24:80e2:20c:29ff:fee2:5e6d.
  39. Missing reverse record(s) for address(es): 192.168.0.60, fd00:ac20:2e24:80e2:20c:29ff:fee2:5e6d.
  40. Adding SSH public key from /etc/ssh/ssh_host_rsa_key.pub
  41. Adding SSH public key from /etc/ssh/ssh_host_ecdsa_key.pub
  42. Adding SSH public key from /etc/ssh/ssh_host_ed25519_key.pub
  43. [try 1]: Forwarding 'host_mod' to json server 'https://station61.example.com/ipa/session/json'
  44. Could not update DNS SSHFP records.
  45. SSSD enabled
  46. Configured /etc/openldap/ldap.conf
  47. Configured /etc/ssh/ssh_config
  48. Configured /etc/ssh/sshd_config
  49. Configuring example.com as NIS domain.
  50. Client configuration complete.
  51. The ipa-client-install command was successful
  52. [root@station60 ~]#
复制代码


回复

使用道具 举报

0

主题

2

帖子

24

积分

新手上路

Rank: 1

积分
24
发表于 2019-4-24 21:06:39 | 显示全部楼层
上节课没跟上,有懂得同学顶上
回复 支持 反对

使用道具 举报

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
 楼主| 发表于 2019-4-24 21:12:12 | 显示全部楼层
lint 发表于 2019-4-24 21:06
上节课没跟上,有懂得同学顶上

IPA Server继续配置,做NFS服务器
  1. -bash-4.2# ipa user-find
  2. ---------------
  3. 2 users matched
  4. ---------------
  5.   User login: admin
  6.   Last name: Administrator
  7.   Home directory: /home/admin
  8.   Login shell: /bin/bash
  9.   Principal alias: admin@BOTANGDB.COM
  10.   UID: 590200000
  11.   GID: 590200000
  12.   Account disabled: False

  13.   User login: botang
  14.   First name: Bo
  15.   Last name: Tang
  16.   Home directory: /home/ipa/botang
  17.   Login shell: /bin/sh
  18.   Principal name: botang@BOTANGDB.COM
  19.   Principal alias: botang@BOTANGDB.COM
  20.   Email address: botang@example.com
  21.   UID: 590200001
  22.   GID: 590200001
  23.   Account disabled: False
  24. ----------------------------
  25. Number of entries returned 2
  26. ----------------------------
  27. -bash-4.2# yum list "*rpcbind*"
  28. Loaded plugins: langpacks, ulninfo
  29. Installed Packages
  30. rpcbind.x86_64                    0.2.0-47.el7                     @anaconda/7.6
  31. -bash-4.2# yum list "*nfs*"
  32. Loaded plugins: langpacks, ulninfo
  33. Installed Packages
  34. libnfsidmap.x86_64                       0.25-19.el7               @anaconda/7.6
  35. nfs-utils.x86_64                         1:1.3.0-0.61.0.1.el7      @anaconda/7.6
  36. Available Packages
  37. libnfsidmap.i686                         0.25-19.el7               Base
  38. libstoragemgmt-nfs-plugin.noarch         1.6.2-4.el7               Base
  39. libstoragemgmt-nfs-plugin-clibs.x86_64   1.6.2-4.el7               Base
  40. nfs4-acl-tools.x86_64                    0.3.3-19.el7              Base
  41. nfsometer.noarch                         1.7-1.el7                 Base
  42. nfstest.noarch                           2.1.5-1.el7               Base
  43. pcp-pmda-nfsclient.x86_64                4.1.0-4.el7               Base
  44. sblim-cmpi-nfsv3.i686                    1.1.1-9.el7               Base
  45. sblim-cmpi-nfsv3.x86_64                  1.1.1-9.el7               Base
  46. sblim-cmpi-nfsv4.i686                    1.1.0-10.el7              Base
  47. sblim-cmpi-nfsv4.x86_64                  1.1.0-10.el7              Base
  48. texlive-mfnfss.noarch                    2:svn19410.0-43.el7       Base
  49. texlive-psnfss.noarch                    2:svn23394.9.2a-43.el7    Base
  50. -bash-4.2# cd /home
  51. -bash-4.2# ls
  52. student
  53. -bash-4.2# cd /
  54. -bash-4.2# mkdir /rhost
  55. -bash-4.2# mkdir botang
  56. -bash-4.2# chown 590200001:590200001  botang
  57. -bash-4.2#
复制代码
  1. -bash-4.2# chkconfig rpcbind on
  2. Note: Forwarding request to 'systemctl enable rpcbind.service'.
  3. -bash-4.2# service rpcbind start
  4. Redirecting to /bin/systemctl start rpcbind.service
  5. -bash-4.2# vi /etc/exports
  6. -bash-4.2# cat /etc/exports
  7. /rhost      192.168.0.0/255.255.255.0(rw,sync)

  8. -bash-4.2# chkconfig nfs on
  9. Note: Forwarding request to 'systemctl enable nfs.service'.
  10. Created symlink from /etc/systemd/system/multi-user.target.wants/nfs-server.service to /usr/lib/systemd/system/nfs-server.service.
  11. -bash-4.2# service nfs start
  12. Redirecting to /bin/systemctl start nfs.service
  13. -bash-4.2#
复制代码
客户端:
  1. [root@station60 ~]# chkconfig rpcbind on
  2. Note: Forwarding request to 'systemctl enable rpcbind.service'.
  3. [root@station60 ~]# service rpcbind start
  4. Redirecting to /bin/systemctl start rpcbind.service
  5. [root@station60 ~]# showmount  -e 192.168.0.61
  6. Export list for 192.168.0.61:
  7. /rhost 192.168.0.0/255.255.255.0
复制代码
  1. <p>[root@station60 ~]# mkdir /home/ipa</p><p>[root@station60 ~]# yum list "*autofs*"
  2. Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
  3.               : manager
  4. This system is not registered with an entitlement server. You can use subscripti                                                                             on-manager to register.
  5. Installed Packages
  6. autofs.x86_64                           1:5.0.7-99.el7                     @Base
  7. libsss_autofs.x86_64                    1.16.2-13.el7                      @Base
  8. [root@station60 ~]# cd /etc
  9. [root@station60 etc]# vi auto.master
  10. [root@station60 etc]# tail auto.master
  11. # nsswitch sources.
  12. #
  13. # Note that if there are entries for /net or /misc (as
  14. # above) in the included master map any keys that are the
  15. # same will not be seen as the first read key seen takes
  16. # precedence.
  17. #
  18. +auto.master

  19. /home/ipa    /etc/auto.home
  20. [root@station60 etc]# cp auto.misc   auto.home
  21. [root@station60 etc]# vi auto.home
  22. [root@station60 etc]# cat auto.home
  23. #
  24. # This is an automounter map and it has the following format
  25. # key [ -mount-options-separated-by-comma ] location
  26. # Details may be found in the autofs(5) manpage

  27. botang          -rw,intr,sync         192.168.0.61:/rhost/botang

  28. # the following entries are samples to pique your imagination
  29. #linux          -ro,soft,intr           ftp.example.org:/pub/linux
  30. #boot           -fstype=ext2            :/dev/hda1
  31. #floppy         -fstype=auto            :/dev/fd0
  32. #floppy         -fstype=ext2            :/dev/fd0
  33. #e2floppy       -fstype=ext2            :/dev/fd0
  34. #jaz            -fstype=ext2            :/dev/sdc1
  35. #removable      -fstype=ext2            :/dev/hdd
  36. [root@station60 etc]# chkconfig automount on
  37. error reading information on service automount: No such file or directory
  38. [root@station60 etc]# chkconfig autofs on
  39. Note: Forwarding request to 'systemctl enable autofs.service'.
  40. Created symlink from /etc/systemd/system/multi-user.target.wants/autofs.service to /usr/lib/systemd/system/autofs.service.
  41. [root@station60 etc]# service autofs start
  42. Redirecting to /bin/systemctl start autofs.service
  43. [root@station60 etc]# df -h
  44. Filesystem             Size  Used Avail Use% Mounted on
  45. /dev/mapper/rhel-root   17G  3.8G   14G  23% /
  46. devtmpfs               894M     0  894M   0% /dev
  47. tmpfs                  910M     0  910M   0% /dev/shm
  48. tmpfs                  910M   11M  900M   2% /run
  49. tmpfs                  910M     0  910M   0% /sys/fs/cgroup
  50. /dev/sda1             1014M  178M  837M  18% /boot
  51. tmpfs                  182M   12K  182M   1% /run/user/42
  52. tmpfs                  182M     0  182M   0% /run/user/0
  53. /dev/sr0               4.2G  4.2G     0 100% /mnt
  54. [root@station60 etc]# cd /home
  55. [root@station60 home]# ls
  56. [root@station60 home]# pwd
  57. /home
  58. [root@station60 home]# df -h
  59. Filesystem             Size  Used Avail Use% Mounted on
  60. /dev/mapper/rhel-root   17G  3.8G   14G  23% /
  61. devtmpfs               894M     0  894M   0% /dev
  62. tmpfs                  910M     0  910M   0% /dev/shm
  63. tmpfs                  910M   11M  900M   2% /run
  64. tmpfs                  910M     0  910M   0% /sys/fs/cgroup
  65. /dev/sda1             1014M  178M  837M  18% /boot
  66. tmpfs                  182M   12K  182M   1% /run/user/42
  67. tmpfs                  182M     0  182M   0% /run/user/0
  68. /dev/sr0               4.2G  4.2G     0 100% /mnt
  69. [root@station60 home]# ssh botang@192.168.0.60
  70. Password:
  71. Last login: Wed Apr 24 09:10:06 2019 from station60.example.com
  72. Could not chdir to home directory /home/botang: No such file or directory
  73. -sh-4.2$ pwd
  74. /
  75. -sh-4.2$ df -h
  76. Filesystem             Size  Used Avail Use% Mounted on
  77. /dev/mapper/rhel-root   17G  3.8G   14G  23% /
  78. devtmpfs               894M     0  894M   0% /dev
  79. tmpfs                  910M     0  910M   0% /dev/shm
  80. tmpfs                  910M   11M  900M   2% /run
  81. tmpfs                  910M     0  910M   0% /sys/fs/cgroup
  82. /dev/sda1             1014M  178M  837M  18% /boot
  83. tmpfs                  182M   12K  182M   1% /run/user/42
  84. tmpfs                  182M     0  182M   0% /run/user/0
  85. /dev/sr0               4.2G  4.2G     0 100% /mnt
  86. tmpfs                  182M     0  182M   0% /run/user/590200001
  87. -sh-4.2$ exit
  88. logout
  89. Connection to 192.168.0.60 closed.
  90. [root@station60 home]# showmount  -e 192.168.0.61
  91. Export list for 192.168.0.61:
  92. /rhost 192.168.0.0/255.255.255.0
  93. [root@station60 home]# mount  192.168.0.61:/rhost/botang  /mnt
  94. mount.nfs: mounting 192.168.0.61:/rhost/botang failed, reason given by server: No such file or directory
  95. [root@station60 home]# mount  192.168.0.61:/rhost/botang  /mnt
  96. [root@station60 home]# df -h
  97. Filesystem                  Size  Used Avail Use% Mounted on
  98. /dev/mapper/rhel-root        17G  3.8G   14G  23% /
  99. devtmpfs                    894M     0  894M   0% /dev
  100. tmpfs                       910M     0  910M   0% /dev/shm
  101. tmpfs                       910M   11M  900M   2% /run
  102. tmpfs                       910M     0  910M   0% /sys/fs/cgroup
  103. /dev/sda1                  1014M  178M  837M  18% /boot
  104. tmpfs                       182M   12K  182M   1% /run/user/42
  105. tmpfs                       182M     0  182M   0% /run/user/0
  106. 192.168.0.61:/rhost/botang   19G  7.7G  9.6G  45% /mnt
  107. [root@station60 home]# umount  /mnt
  108. [root@station60 home]# ssh botang@192.168.0.60
  109. Password:
  110. Last login: Wed Apr 24 09:21:42 2019 from station60.example.com
  111. -sh-4.2$ pwd
  112. /home/botang
  113. -sh-4.2$ ls
  114. -sh-4.2$ ls -a
  115. .  ..  .cache  .config
  116. -sh-4.2$ df -h
  117. Filesystem                  Size  Used Avail Use% Mounted on
  118. /dev/mapper/rhel-root        17G  3.8G   14G  23% /
  119. devtmpfs                    894M     0  894M   0% /dev
  120. tmpfs                       910M     0  910M   0% /dev/shm
  121. tmpfs                       910M   11M  900M   2% /run
  122. tmpfs                       910M     0  910M   0% /sys/fs/cgroup
  123. /dev/sda1                  1014M  178M  837M  18% /boot
  124. tmpfs                       182M   12K  182M   1% /run/user/42
  125. tmpfs                       182M     0  182M   0% /run/user/0
  126. /dev/sr0                    4.2G  4.2G     0 100% /mnt
  127. tmpfs                       182M     0  182M   0% /run/user/590200001
  128. 192.168.0.61:/rhost/botang   19G  7.7G  9.6G  45% /home/botang
  129. -sh-4.2$ ls
  130. -sh-4.2$ pwd
  131. /home/botang
  132. -sh-4.2$ ls
  133. -sh-4.2$ vim botang1.txt
  134. -sh-4.2$
  135. </p>
复制代码



回复 支持 反对

使用道具 举报

0

主题

3

帖子

22

积分

新手上路

Rank: 1

积分
22
发表于 2019-4-24 21:15:20 | 显示全部楼层
这几天要在家看一下了,有几节课漏太多了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-12-5 02:52 , Processed in 0.036883 second(s), 24 queries .

快速回复 返回顶部 返回列表