Yum 源构建

  • 进入指定目录下载/配置 yum

    • /etc/yum.repos.d/
  • panel **yum** ```shell wget http://10.202.80.189/gdp/<版本>/panel/panel.repo


[panel-1.9.1.0-0] name=panel Version - panel-1.9.1.0-0 baseurl=http://10.136.98.40/gdp/arm/1.9.1/panel gpgcheck=0 enabled=1 priority=1

  1. - `kylin_aarch64.repo` **`yum`**
  2. ```shell
  3. ###Kylin Linux Advanced Server 10 - os repo###
  4. [ks10-adv-os]
  5. name = Kylin Linux Advanced Server 10 - Os
  6. baseurl = http://update.cs2c.com.cn:8080/NS/V10/V10SP1/os/adv/lic/base/$basearch/
  7. gpgcheck = 0
  8. enabled = 1
  9. [ks10-adv-updates]
  10. name = Kylin Linux Advanced Server 10 - Updates
  11. baseurl = http://update.cs2c.com.cn:8080/NS/V10/V10SP1/os/adv/lic/updates/$basearch/
  12. gpgcheck = 0
  13. enabled = 0
  14. [ks10-adv-addons]
  15. name = Kylin Linux Advanced Server 10 - Addons
  16. baseurl = http://update.cs2c.com.cn:8080/NS/V10/V10SP1/os/adv/lic/addons/$basearch/
  17. gpgcheck = 0
  18. enabled = 0

Centos6系统请用下边的链接,下载后将文件名后边的”.6”去掉。

wget http://10.202.80.189/gdp/tools/Centos.repo.6 -P /etc/yum.repos.d/

——————————————— Centos 7 —————————————————————- [Centos7-Tsinghua-base] name=Centos7-Tsinghua-base baseurl=http://yum.internal.gridsumdissector.com:8080/Centos7-Tsinghua-base gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos7-Tsinghua-GPG-KEY [Centos7-Tsinghua-updates] name=Centos7-Tsinghua-updates baseurl=http://yum.internal.gridsumdissector.com:8080/Centos7-Tsinghua-updates gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos7-Tsinghua-GPG-KEY [Centos7-Tsinghua-extras] name=Centos7-Tsinghua-extras baseurl=http://yum.internal.gridsumdissector.com:8080/Centos7-Tsinghua-extras gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos7-Tsinghua-GPG-KEY [epel-7] name=epel-7 baseurl=http://yum.internal.gridsumdissector.com:8080/epel gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/EPEL-7-GPG-KEY [Centos7-163-base] name=Centos7-163-base baseurl=http://yum.internal.gridsumdissector.com:8080/Centos7-163-base gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos7-163-GPG-KEY [Centos7-163-updates] name=Centos7-163-updates baseurl=http://yum.internal.gridsumdissector.com:8080/Centos7-163-updates gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos7-163-GPG-KEY [Centos7-163-extras] name=Centos7-163-extras baseurl=http://yum.internal.gridsumdissector.com:8080/Centos7-163-extras gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos7-163-GPG-KEY

——————————————— Centos 6 —————————————————————-

[Centos6-Tsinghua-base] name=Centos6-Tsinghua-base baseurl=http://yum.internal.gridsumdissector.com:8080/Centos6-Tsinghua-base gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos6-Tsinghua-GPG-KEY

[Centos6-Tsinghua-updates] name=Centos6-Tsinghua-updates baseurl=http://yum.internal.gridsumdissector.com:8080/Centos6-Tsinghua-updates gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos6-Tsinghua-GPG-KEY

[Centos6-Tsinghua-extras] name=Centos6-Tsinghua-extras baseurl=http://yum.internal.gridsumdissector.com:8080/Centos6-Tsinghua-extras gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos6-Tsinghua-GPG-KEY

[Centos6-163-base] name=Centos6-163-base baseurl=http://yum.internal.gridsumdissector.com:8080/Centos6-163-base gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos6-163-GPG-KEY

[Centos6-163-updates] name=Centos6-163-updates baseurl=http://yum.internal.gridsumdissector.com:8080/Centos6-163-updates gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos6-163-GPG-KEY

[Centos6-163-extras] name=Centos6-163-extras baseurl=http://yum.internal.gridsumdissector.com:8080/Centos6-163-extras gpgcheck=1 gpgkey=http://yum.internal.gridsumdissector.com:8080/Centos6-163-GPG-KEY

[epel-6] name=epel-6 baseurl=http://yum.internal.gridsumdissector.com:8080/epel-6 gpgcheck=0

  1. ---
  2. <a name="mRiOY"></a>
  3. ## 其他的初始化服务
  4. <a name="zvihX"></a>
  5. ### 1. postgresql
  6. <a name="yitMz"></a>
  7. #### 1. yum 下载
  8. ```shell
  9. ### 1.通过 yum 源下载 postgresql *
  10. yum install postgresql*

2. 初始化数据库

安装完成之后,不能直接启动数据库,需要先执行初始化,初始化之后,会生成postgresql相关配置文件和数据库文件,他们都会存放在路径 /var/lib/pgsql/data 下。

  • postgresql-setup initdb

    1. [root@localhost data]# postgresql-setup initdb

    3. 修改配置文件

  • vim pg_hba.conf ```shell

    修改

    (修改前) local all postgres peer (peer 改为 trust)

    (修改后) local all postgres trust

填充一行

host all postgres 0.0.0.0/0 md5

  1. ![image.png](https://cdn.nlark.com/yuque/0/2021/png/667110/1618206920950-09d122af-15da-49a7-96c4-77266f43655f.png#align=left&display=inline&height=163&margin=%5Bobject%20Object%5D&name=image.png&originHeight=325&originWidth=790&size=99749&status=done&style=none&width=395)
  2. - `vim postgresql.conf`
  3. ```shell
  4. #### 开启所有 IP 请求
  5. listen_addresses = '*'
  6. #### 设置最大连接数
  7. max_connections = 1000

image.png

4. 启动数据库

  • service postgresql start
  • chkconfig postgresql on

    1. [root@localhost data]# service postgresql start
    2. Redirecting to /bin/systemctl start postgresql.service
    3. ##### 设置开机自启
    4. [root@panel-5 data]# chkconfig postgresql on
    5. 注意:正在将请求转发到“systemctl enable postgresql.service”。

    5. 登录数据库

  • su - postgres -c psql

  • alter role postgres with password 'postgres'; ```shell
    登录到数据库
    [root@panel-5 data]# su - postgres -c psql psql (10.5) 输入 “help” 来获取帮助信息.
修改 postgres 用户密码

postgres=# alter role postgres with password ‘postgres’; ALTER ROLE

查看修改后的最大连接数是否生效

postgres=# show max_connections ;

max_connections

1000 (1 行记录)

退出

postgres=# \q [root@panel-5 data]#

  1. <a name="7SB1L"></a>
  2. #### 6. 可能会出现的问题
  3. 1. org.postgresql.util.PSQLException: ��������: ���� "postgres" Password ��������
  4. - 类似上面的错误可能是密码错误
  5. 2. `service postgresql restart` 重启 `postgresql` 失败
  6. - 详细信息查看 `systemctl status postgresql.service` 的输出
  7. ---
  8. <a name="p5MH7"></a>
  9. ### 2. Kerberos
  10. <a name="XBFyi"></a>
  11. #### 1. yum 下载
  12. ```shell
  13. ##### Server 端操作下面命令
  14. yum install -y krb5-server krb5-workstation krb5-libs
  15. ##### Client 端操作下面命令
  16. yum install -y krb5-workstation krb5-libs

2. 修改配置文件

  • vim /var/kerberos/krb5kdc/kdc.conf
  • 该文件只有在 Server上有,Client 是没有的
    ```shell [kdcdefaults] kdc_ports = 88 kdc_tcp_ports = 88

[realms]
GRIDSUM.COM = {

master_key_type = aes256-cts

acl_file = /var/kerberos/krb5kdc/kadm5.acl dict_file = /usr/share/dict/words admin_keytab = /var/kerberos/krb5kdc/kadm5.keytab supported_enctypes = aes128-cts:normal des3-hmac-sha1:normal arcfour-hmac:normal des-hmac-sha1:normal des-cbc-md5:normal des-cbc-crc:normal }

supported_enctypes:支持的校验方式。注意把aes256-cts去掉,JAVA使用aes256-cts验证方式需要安装额外的jar包,所有这里不用。

  1. - `vim /etc/krb5.conf`
  2. - **`Server``/Client`** 都是一样的
  3. ```shell
  4. [logging]
  5. default = FILE:/var/log/krb5libs.log
  6. kdc = FILE:/var/log/krb5kdc.log
  7. admin_server = FILE:/var/log/kadmind.log
  8. [libdefaults]
  9. default_realm = GRIDSUM.COM
  10. dns_lookup_realm = false
  11. dns_lookup_kdc = false
  12. ticket_lifetime = 24h
  13. renew_lifetime = 7d
  14. forwardable = true
  15. udp_preference_limit = 1
  16. [realms]
  17. GRIDSUM.COM = {
  18. kdc = localhost
  19. admin_server = localhost
  20. }
  21. [domain_realm]
  22. .example.com = GRIDSUM.COM
  23. example.com = GRIDSUM.COM
  • vim /var/kerberos/krb5kdc/kadm5.acl
  • 只有 Server 有该文件 (给管理员实例的所有主体授权)

    1. */admin@GRIDSUM.COM *

    3. 初始化 生成 Kerberos 数据库

  • 以下在 Server 节点执行 ```shell [root@panel-5 ~]# kdb5_util create -s


Loading random data Initializing database ‘/var/kerberos/krb5kdc/principal’ for realm ‘XXX.COM’, master key name ‘K/M@XXX.COM’ You will be prompted for the database Master Password. It is important that you NOT FORGET this password. Enter KDC database master key: (输入密码 kerberos) Re-enter KDC database master key to verify: (确认密码 kerberos)

》注: 》 这里会在Loading random data卡很久,属于正常现象

  1. - 创建实例
  2. ```shell
  3. [root@panel-5 ~]# kadmin.local
  4. Authenticating as principal admin/admin@GRIDSUM.COM with password.
  5. kadmin.local: add
  6. addpol add_policy addprinc add_principal
  7. kadmin.local: addprinc "test/admin@GRIDSUM.COM" (实例名称)
  8. WARNING: no policy specified for test/admin@GRIDSUM.COM; defaulting to no policy
  9. Enter password for principal "test/admin@GRIDSUM.COM": (该实例密码)
  10. Re-enter password for principal "test/admin@GRIDSUM.COM": (该实例密码)
  11. Principal "test/admin@GRIDSUM.COM" created.
  12. kadmin.local: listprincs (查看用户列表)
  13. K/M@GRIDSUM.COM
  14. admin/admin@GRIDSUM.COM
  15. kadmin/admin@GRIDSUM.COM
  16. kadmin/changepw@GRIDSUM.COM
  17. kadmin/panel-5@GRIDSUM.COM
  18. kiprop/panel-5@GRIDSUM.COM
  19. krbtgt/GRIDSUM.COM@GRIDSUM.COM
  20. test/admin@GRIDSUM.COM (刚创建的实例 ---《)
  21. kadmin.local: exit (退出local)

4. 启动 Kerberos - Server 服务

  • Server 节点

    1. service krb5kdc start
    2. service kadmin start
    3. # 设置开机自启
    4. chkconfig krb5kdc on
    5. chkconfig kadmin on

    5. Kerberos - Client 初始化 /etc/krb5.conf

  • vim /etc/krb5.conf (配置域信息,直接把 Server 配好的 krb5.conf内容 Copy 过来)

6. kinit 管理员验证

  1. [root@panel-5 ~]# kinit test/admin@GRIDSUM.COM (验证在上面创建的实例)
  2. Password for test/admin@GRIDSUM.COM:
  3. kinit: Password incorrect while getting initial credentials
  4. [root@panel-5 ~]# klist (查询登录状态)
  5. Ticket cache: FILE:/tmp/krb5cc_0
  6. Default principal: test/admin@GRIDSUM.COM (《--》 登录成功)
  7. Valid starting Expires Service principal
  8. 2021-04-11T21:57:18 2021-04-12T21:57:18 krbtgt/GRIDSUM.COM@GRIDSUM.COM
  9. renew until 2021-04-11T21:57:18

7. 其他命令 (下面的可以不用试)

  1. ##### 退出 【kdestroy】
  2. [root@panel-5 ~]# kdestroy
  3. [root@panel-5 ~]# klist
  4. klist: No credentials cache found (filename: /tmp/krb5cc_0)
  5. ##### 查看用户列表 【listprincs】
  6. kadmin.local: listprincs
  7. K/M@GRIDSUM.COM
  8. admin/admin@GRIDSUM.COM
  9. kadmin/admin@GRIDSUM.COM
  10. kadmin/changepw@GRIDSUM.COM
  11. kadmin/panel-5@GRIDSUM.COM
  12. kiprop/panel-5@GRIDSUM.COM
  13. krbtgt/GRIDSUM.COM@GRIDSUM.COM
  14. test/admin@GRIDSUM.COM
  15. #### 删除用户 【delete_principal】
  16. kadmin.local: delete_principal test/admin
  17. Are you sure you want to delete the principal "test/admin@GRIDSUM.COM"? (yes/no): yes
  18. Principal "test/admin@GRIDSUM.COM" deleted.
  19. Make sure that you have removed this principal from all ACLs before reusing.
  20. kadmin.local: listprincs
  21. K/M@GRIDSUM.COM
  22. admin/admin@GRIDSUM.COM
  23. kadmin/admin@GRIDSUM.COM
  24. kadmin/changepw@GRIDSUM.COM
  25. kadmin/panel-5@GRIDSUM.COM
  26. kiprop/panel-5@GRIDSUM.COM
  27. krbtgt/GRIDSUM.COM@GRIDSUM.COM
  28. ##### 只导出用户keytab文件(并且不要修改密码)
  29. kadmin.local: xst -k admin.keytab -norandkey admin/admin@GRIDSUM.COM
  30. Entry for principal admin/admin@GRIDSUM.COM with kvno 1, encryption type aes128-cts-hmac-sha1-96 added to keytab WRFILE:admin.keytab.
  31. Entry for principal admin/admin@GRIDSUM.COM with kvno 1, encryption type des3-cbc-sha1 added to keytab WRFILE:admin.keytab.
  32. Entry for principal admin/admin@GRIDSUM.COM with kvno 1, encryption type arcfour-hmac added to keytab WRFILE:admin.keytab.
  33. Entry for principal admin/admin@GRIDSUM.COM with kvno 1, encryption type des-hmac-sha1 added to keytab WRFILE:admin.keytab.
  34. Entry for principal admin/admin@GRIDSUM.COM with kvno 1, encryption type des-cbc-md5 added to keytab WRFILE:admin.keytab.

8. 可能会出现的问题

Server 端的错误
  1. kdb5_util: Improper format of Kerberos configuration file while initializing Kerberos code
  • 原因以及解决办法:这是由于/etc/krb5.conf 配置错了或者配置了无效项。检查这个文件。
    • 注意大小学 (Keberos 域信息区分大小写)

  1. klist: Credentials cache keyring 'persistent:0:0' not found 或者是
  • kinit: Cannot contact any KDC for realm 'GRIDSUM.COM' while getting initial credentials
  • 解决:出现上述错误是由于 krb5kdc 服务以及 kadmin 服务没有启动导致或者在当前的客户端没有配置服务端主机的主机名映射关系,修改 hosts 文件 或者查看 /etc/krb5.conf 下的 该参数 (需要跟hosts 中的名称一致,或者直接改成 ip 地址)

image.png


  1. 查看ticket是否是renewable
  2. ticket无法更新

Client 的错误
  1. 使用 kinit 如下命令时 kinit admin/admin 出现
  • kinit: Unknown credential cache type while getting default ccache

  • 清除 /etc/krb5.conf 缓存

  • sed -ri "s/^ default_ccache_name = (.*)/# default_ccache_name = \1/g" /etc/krb5.conf

参考:


大数据平台管理初始化

1. 创建 Panel 用户

  • useradd panel (添加 Panell 用户)
  • vim /etc/sudoers.d/panel (增加 sudo 权利) ```shell

    Created by cloud-init v. 0.7.5 on Thu, 22 Nov 2018 14:39:22 +0000

Panel: sudo default

Defaults exempt_group = panel Defaults !env_reset,env_delete-=PATH Defaults: panel !requiretty

Panel Server : Service Command

panel ALL=(ALL) NOPASSWD:SETENV:/usr/sbin/kadmin.local, /usr/bin/env service postgresql-10 ,/bin/sh -c ulimit , /sbin/service krb5kdc ,/sbin/service kadmin

Panel Agent : For Customizable Users

panel ALL=(ALL) NOPASSWD:SETENV:/bin/su postgres ,/bin/su zookeeper ,/bin/su ams ,/bin/su ambari-qa ,/bin/su hdfs ,/bin/su yarn ,/bin/su mapred ,/bin/su hive ,/bin/su tez ,/bin/su livy ,/bin/su spark ,/bin/su kafka ,/bin/su hbase ,/bin/su hcat ,/bin/su slider ,/bin/su infra-solr ,/bin/su impala ,/bin/su redis ,/bin/su atlas ,/bin/su airflow ,/bin/su METASPACE ,/bin/su liveinsight ,/bin/su ranger ,/bin/su dimmetrics ,/bin/su testA ,/bin/su testB ,/bin/su panel ,/bin/su admin,/bin/su panel-qa ,/bin/su logsearch ,/bin/su elasticsearch ,/bin/su janusgraph ,/bin/su metaspace ,/bin/su taskflow ,/bin/su datasocket ,/bin/su datastudio ,/bin/su taskcenter *

Panel Agent : Core System Commands

panel ALL=(ALL) NOPASSWD:SETENV: /usr/bin/yum,/usr/bin/zypper,/usr/bin/apt-get, /bin/mkdir, /usr/bin/test, /bin/ln, /bin/ls, /bin/chown, /bin/chmod, /bin/chgrp, /bin/cp, /usr/sbin/setenforce, /usr/bin/test, /usr/bin/stat, /bin/mv, /bin/sed, /bin/rm, /bin/kill, /bin/readlink, /usr/bin/pgrep, /bin/cat, /usr/bin/unzip, /bin/tar, /usr/bin/tee, /bin/touch, /usr/bin/mysql, /sbin/service mysqld , /usr/bin/dpkg , /bin/rpm , /usr/sbin/hst , /sbin/chkconfig —add impala-catalog, /sbin/service impala-catalog ,/sbin/service impala-server , /sbin/chkconfig —add impala-server, /sbin/chkconfig —add impala-state-store, /sbin/service impala-state-store , /bin/echo, /sbin/service redis-sentinel ,/sbin/service redis *,/bin/sh

Panel Agent : Hadoop and Configuration Commands

panel ALL=(ALL) NOPASSWD:SETENV: /usr/bin/hdp-select, /usr/bin/conf-select, /usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh, /usr/lib/hadoop/bin/hadoop-daemon.sh, /usr/lib/hadoop/sbin/hadoop-daemon.sh, /usr/bin/ambari-python-wrap ,/usr/bin/impala-shell,/var/lib/ambari-agent/tmp/create-python-wrap.sh,/usr/bin/python ,/usr/sbin/panel-server ,/usr/sbin/panel-agent

Panel Agent : System User and Group Commands

panel ALL=(ALL) NOPASSWD:SETENV: /usr/sbin/groupadd, /usr/sbin/groupmod, /usr/sbin/useradd, /usr/sbin/usermod

Panel Agent : Ranger Commands

panel ALL=(ALL) NOPASSWD:SETENV: /usr/hdp//ranger-usersync/setup.sh, /usr/bin/ranger-usersync-stop, /usr/bin/ranger-usersync-start, /usr/hdp//ranger-admin/setup.sh , /usr/hdp//ranger-hbase-plugin/disable-hbase-plugin.sh , /usr/hdp//ranger-hdfs-plugin/disable-hdfs-plugin.sh , /usr/hdp/current/ranger-admin/ranger_credential_helper.py, /usr/hdp/current/ranger-kms/ranger_credential_helper.py, /usr/hdp//ranger-/ranger_credential_helper.py,/usr/bin/ranger-usersync ,/usr/local/jdk/bin/java *

Panel Agent : Infra and logSearch Commands

panel ALL=(ALL) NOPASSWD:SETENV: /usr/lib/ambari-infra-solr/bin/solr , /usr/lib/ambari-logsearch-logfeeder/run.sh , /usr/sbin/ambari-metrics-grafana , /usr/lib/ambari-infra-solr-client/solrCloudCli.sh

  1. - `ssh-keygen –t rsa` (切换到 `panel` 用户生成ssh密钥)
  2. - `ssh-copy-id –i /home/panell/.ssh/id_rsa all_host` (将主节点的 `Panell` 用户的公钥拷贝到每个节点)
  3. ---
  4. <a name="WDEpS"></a>
  5. ### 2. 安装 Panel - server
  6. `yum install -y ambari-server` (使用 **`root`** 用户安装 `panel server`)
  7. ---
  8. <a name="Ko2Ie"></a>
  9. ### 3. 初始化 Panel - Server
  10. - 使用 root 用户初始化
  11. - 选择使用的 JDK
  12. ```shell
  13. #使用root用户初始化
  14. $ panel-server setup
  15. Using python /usr/bin/python
  16. Setup panel -server
  17. Checking SELinux...
  18. SELinux status is 'disabled'
  19. Customize user account for ambari-server daemon [y/n] (n)? 回车
  20. Adjusting ambari-server permissions and ownership...
  21. Checking firewall status...
  22. Checking JDK...
  23. [1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
  24. [2] Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
  25. [3] Custom JDK
  26. =========================================================================
  27. Enter choice (1): 3 #选择Custom JDK
  28. WARNING: JDK must be installed on all hosts and JAVA_HOME must be valid on all hosts.
  29. WARNING: JCE Policy files are required for configuring Kerberos security. If you plan to use Kerberos,please make sure JCE Unlimited Strength Jurisdiction Policy Files are valid on all hosts.
  30. Path to JAVA_HOME: /usr/local/jdk #输入JAVA_HOME
  31. Validating JDK on panel Server...done.
  32. Checking GPL software agreement...
  33. GPL License for LZO: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
  34. Enable panel Server to download and install GPL Licensed LZO packages [y/n] (n)? Y
  35. Completing setup...
  36. Configuring database...
  37. Enter advanced database configuration [y/n] (n)? 回车
  38. Configuring database...
  39. Default properties detected. Using built-in database.
  40. Configuring ambari database...
  41. Checking PostgreSQL...
  42. Running initdb: This may take up to a minute.
  43. Initializing database: [ OK ]
  44. About to start PostgreSQL
  45. Configuring local database...
  46. Configuring PostgreSQL...
  47. Restarting PostgreSQL
  48. Creating schema and user...
  49. done.
  50. Creating tables...
  51. done.
  52. Extracting system views...
  53. ..ambari-admin-2.6.1.0.0.jar
  54. .
  55. Adjusting ambari-server permissions and ownership...
  56. Panel Server 'setup' completed successfully. #出现此提示表示成功

4. 启动 Panel - Server

  • panel-server start

出现的问题

  1. INFO:root:BootStrapping hosts ['panel-5'] using /usr/lib/python2.6/site-packages/ambari_server cluster primary OS: kylin linux advanced server release v10 with user 'panel'with ssh Port '22' sshKey File /var/run/ambari-server/bootstrap/3/sshKey password File null using tmp dir /var/run/ambari-server/bootstrap/3 ambari: panel-5; server_port: 8080; ambari version: 1.8.2.0; user_run_as: panel
  2. INFO:root:Executing parallel bootstrap

image.png

Panel-server与Panel-agent冲突

image.png

  • 使用 rpm -ivh ./ambari-agent-1.9.1.0-0.ky10.aarch64.rpm --replacefiles 安装

卸載 Panel

yum erase + 组件名完全删除时开始运行以下脚本 (remove_panel.sh)

  1. #!/bin/bash
  2. # author 朱学通
  3. #需要在所有panel节点执行,此脚本会清除panel相关的文件及大数据安装文件
  4. echo 停止panel serverpanel agent
  5. panel-server stop
  6. panel-agent stop
  7. user_array=(ams elasticsearch flink gsadmin hbase hcat hdfs hive infra-solr kafka livy mapred panel panel-qa spark tez user yarn zookeeper impala janusgraph ranger hadoop redis postgres slider)
  8. for user in "${user_array[@]}";
  9. do
  10. egrep "^$user" /etc/passwd 2>/dev/null
  11. if [ $? -eq 0 ]
  12. then
  13. echo 关闭用户${user}的进程
  14. ps -u${user} 2>/dev/null|awk '{if (NR>1){print $1}}'|xargs kill -9
  15. fi
  16. done
  17. echo 删除安装包
  18. yum remove -y ambari*
  19. yum remove -y hadoop*
  20. yum remove -y spark*
  21. yum remove -y flink*
  22. yum remove -y impala*
  23. yum remove -y hive*
  24. yum remove -y oozie*
  25. yum remove -y pig*
  26. yum remove -y zookeeper*
  27. yum remove -y tez*
  28. yum remove -y hbase*
  29. yum remove -y ranger*
  30. yum remove -y knox*
  31. yum remove -y hdp-select*
  32. yum remove -y livy*
  33. yum remove -y janusgraph*
  34. yum remove -y bigtop*
  35. yum remove -y elasticsearch*
  36. yum remove -y redis*
  37. yum remove -y postgresql10*
  38. yum clean all
  39. echo 删除库文件
  40. rm -rf /var/lib/ambari*
  41. rm -rf /var/lib/ambari-agent
  42. rm -rf /var/lib/hadoop*
  43. rm -rf /var/lib/elasticsearch
  44. rm -rf /var/lib/hive
  45. rm -rf /var/lib/impala
  46. rm -rf /var/lib/redis
  47. rm -rf /var/lib/slider
  48. rm -rf /var/lib/zookeeper
  49. rm -rf /usr/lib/ambari*
  50. rm -rf /usr/lib/python2.6/site-packages/ambari_*
  51. rm -rf /usr/lib/python2.6/site-packages/resource_management
  52. rm -rf /usr/lib/flume
  53. rm -rf /usr/lib/storm
  54. rm -rf /var/lib/ranger
  55. rm -rf /tmp/hadoop-hdfs
  56. rm -rf /var/log/webhcat
  57. rm -rf /hadoop/zookeeper
  58. rm -rf /hadoop/hdfs
  59. rm -rf /hadoop/yarn
  60. rm -rf /kafka-logs
  61. rm -rf /tmp/hive
  62. echo 删除/etc下的配置目录
  63. rm -rf /etc/elasticsearch
  64. rm -rf /etc/janusgraph
  65. rm -rf /etc/ranger*
  66. rm -rf /etc/ambari*
  67. rm -rf /etc/hadoop
  68. rm -rf /etc/hbase
  69. rm -rf /etc/hive*
  70. rm -rf /etc/impala
  71. rm -rf /etc/livy*
  72. rm -rf /etc/oozie
  73. rm -rf /etc/sqoop
  74. rm -rf /etc/zookeeper
  75. rm -rf /etc/flume
  76. rm -rf /etc/storm
  77. rm -rf /etc/tez
  78. rm -rf /etc/spark*
  79. rm -rf /etc/phoenix
  80. rm -rf /etc/pig
  81. rm -rf /etc/tez
  82. rm -rf /etc/falcon
  83. rm -rf /etc/knox
  84. rm -rf /etc/kafka
  85. rm -rf /etc/slider
  86. rm -rf /etc/ssoconf
  87. echo 删除/var/runPID文件
  88. rm -rf /var/run/elasticsearch
  89. rm -rf /var/run/ranger*
  90. rm -rf /var/run/ambari*
  91. rm -rf /var/run/hadoop*
  92. rm -rf /var/run/hbase
  93. rm -rf /var/run/janusgraph
  94. rm -rf /var/run/hive*
  95. rm -rf /var/run/impala
  96. rm -rf /var/run/livy*
  97. rm -rf /var/run/oozie
  98. rm -rf /var/run/sqoop
  99. rm -rf /var/run/zookeeper
  100. rm -rf /var/run/flume
  101. rm -rf /var/run/storm
  102. rm -rf /var/run/tez
  103. rm -rf /var/run/spark*
  104. rm -rf /var/run/phoenix
  105. rm -rf /var/run/pig
  106. rm -rf /var/run/tez
  107. rm -rf /var/run/falcon
  108. rm -rf /var/run/knox
  109. rm -rf /var/run/kafka
  110. rm -rf /var/run/slider
  111. echo 删除/var/log的日志文件
  112. rm -rf /var/log/elasticsearch
  113. rm -rf /var/log/ranger*
  114. rm -rf /var/log/ambari*
  115. rm -rf /var/log/hadoop*
  116. rm -rf /var/log/hbase
  117. rm -rf /var/log/hive*
  118. rm -rf /var/log/impala
  119. rm -rf /var/log/livy*
  120. rm -rf /var/log/oozie
  121. rm -rf /var/log/sqoop
  122. rm -rf /var/log/zookeeper
  123. rm -rf /var/log/flume
  124. rm -rf /var/log/storm
  125. rm -rf /var/log/tez
  126. rm -rf /var/log/spark*
  127. rm -rf /var/log/phoenix
  128. rm -rf /var/log/pig
  129. rm -rf /var/log/tez
  130. rm -rf /var/log/falcon
  131. rm -rf /var/log/knox
  132. rm -rf /var/log/kafka
  133. rm -rf /var/log/slider
  134. rm -rf /var/log/janusgraph
  135. rm -rf /var/log/redis
  136. rm -rf /var/log/panel-agent
  137. rm -rf /var/log/panel-server
  138. rm -rf /var/log/krb5kdc.log*
  139. rm -rf /var/log/kadmind.log*
  140. echo 临时文件
  141. rm -rf /var/tmp/*
  142. echo 删除数据库
  143. rm -rf /var/lib/pgsql
  144. rm -rf /usr/pgsql-10
  145. rm -rf /pg_data
  146. echo 删除符号连接
  147. cd /usr/bin
  148. rm -rf accumulo
  149. rm -rf atlas-start
  150. rm -rf atlas-stop
  151. rm -rf beeline
  152. rm -rf falcon
  153. rm -rf flume-ng
  154. rm -rf hbase
  155. rm -rf hcat
  156. rm -rf hdfs
  157. rm -rf hive
  158. rm -rf hiveserver2
  159. rm -rf kafka
  160. rm -rf mahout
  161. rm -rf mapred
  162. rm -rf oozie
  163. rm -rf oozied.sh
  164. rm -rf phoenix-psql
  165. rm -rf phoenix-queryserver
  166. rm -rf phoenix-sqlline
  167. rm -rf phoenix-sqlline-thin
  168. rm -rf pig
  169. rm -rf python-wrap
  170. rm -rf ranger-admin
  171. rm -rf ranger-admin-start
  172. rm -rf ranger-admin-stop
  173. rm -rf ranger-kms
  174. rm -rf ranger-usersync
  175. rm -rf ranger-usersync-start
  176. rm -rf ranger-usersync-stop
  177. rm -rf slider
  178. rm -rf sqoop
  179. rm -rf sqoop-codegen
  180. rm -rf sqoop-create-hive-table
  181. rm -rf sqoop-eval
  182. rm -rf sqoop-export
  183. rm -rf sqoop-help
  184. rm -rf sqoop-import
  185. rm -rf sqoop-import-all-tables
  186. rm -rf sqoop-job
  187. rm -rf sqoop-list-databases
  188. rm -rf sqoop-list-tables
  189. rm -rf sqoop-merge
  190. rm -rf sqoop-metastore
  191. rm -rf sqoop-version
  192. rm -rf storm
  193. rm -rf storm-slider
  194. rm -rf worker-lanucher
  195. rm -rf yarn
  196. rm -rf zookeeper-client
  197. rm -rf zookeeper-server
  198. rm -rf zookeeper-server-cleanup
  199. #echo 删除kerberos安装包
  200. #yum remove -y krb5-server krb5-workstation
  201. #echo 删除kerberos文件
  202. #rm -rf /var/kerberos/
  203. #rm /etc/krb5.conf
  204. #rm -rf /usr/lib64/krb5
  205. #rm -rf /etc/krb5.conf.d
  206. echo 删除hadoop数据文件
  207. rm -rf /hadoop
  208. rm -rf /kafka-logs
  209. rm -rf /impalad
  210. echo 删除服务的启动脚本
  211. rm -rf /etc/init.d/impala*
  212. rm -rf /etc/init.d/panel-server
  213. #echo 修改panel.repo文件权限
  214. #chown root.root /etc/yum.repos.d/panel.repo
  215. echo panel及hadoop集群移除完成,请重启服务器,然后重新安装panel