查看操作系统版本

  1. cat /etc/centos-release
  • 查看操作系统资源

httpd服务启动了,但是无法正常访问

Linux 命令详解(三)./configure、make、make install 命令


Linux 安装 phantomjs-2.1.1-linux-arm

  1. ![image.png](https://cdn.nlark.com/yuque/0/2021/png/667110/1617885301443-605400f4-1c0c-42b6-9e17-8d54aa04509a.png#align=left&display=inline&height=174&margin=%5Bobject%20Object%5D&name=image.png&originHeight=348&originWidth=1161&size=32661&status=done&style=none&width=580.5)
  2. ---
  3. - 2. (失败) [通过克隆 编译源码](https://www.v2ex.com/t/163044)
  4. ```shell
  5. sudo yum install gcc gcc-c++ make git openssl-devel freetype-devel fontconfig-devel
  6. git clone git://github.com/ariya/phantomjs.git
  7. cd phantomjs
  8. git checkout 1.9
  9. ./build.sh

image.png


    1. (失败) 自己编译 (里面涉及到编译后 包的位置以及重启 httpd 服务)
      1. git clone git://github.com/ariya/phantomjs.gitcdphantomjs
      2. git checkout 2.0
      3. ./build.sh

image.png


image.png


image.png

(失败) phantomjs-2.1.0-linux-x86_64.tar.bz2 2016-01-24T15:22:52.960446 23417774(22.33MB)

  • 非 rpm

  1. (失败) 使用 bzip2 方式解压 并建立软链接 ```shell

    下载好后进行解压(由于是bz2格式,要先进行bzip2解压成tar格式,再使用tar解压)

    bzip2 -d phantomjs-2.1.1-linux-x86_64.tar.bz2

再使用tar进行解压到/usr/local/目录下边

tar xvf phantomjs-2.1.1-linux-x86_64.tar -C /usr/local/

安装依赖软件

yum -y install wget fontconfig

重命名(方便以后使用phantomjs命令)

mv /usr/local/phantomjs-2.1.1-linux-x86_64/ /usr/local/phantomjs

最后一步就是建立软连接了(在/usr/bin/目录下生产一个phantomjs的软连接,/usr/bin/是啥目录应该清楚,不清楚使用 echo $PATH查看)

ln -s /usr/local/phantomjs/bin/phantomjs /usr/bin/

  1. - 8 (失败) [尝试使用新的 clone 编译命令](https://github.com/ariya/phantomjs/issues/13793) 跟第2种效果一样
  2. - 9 [在 phantomjs 社区 提交了新的 issue 并在其他社区提出该 issue ](https://github.com/ariya/phantomjs/issues/15457)
  3. ![image.png](https://cdn.nlark.com/yuque/0/2021/png/667110/1618305153450-044ec8bc-9abb-4cbb-b216-5337f6a2d5ca.png#align=left&display=inline&height=334&margin=%5Bobject%20Object%5D&name=image.png&originHeight=668&originWidth=1106&size=84040&status=done&style=none&width=553)
  4. ---
  5. - 构建yum 源出现的问题
  6. ![image.png](https://cdn.nlark.com/yuque/0/2021/png/667110/1617938542892-dcfda22a-8d6d-4b04-9c0c-6ad033dfff81.png#align=left&display=inline&height=328&margin=%5Bobject%20Object%5D&name=image.png&originHeight=656&originWidth=1586&size=319316&status=done&style=none&width=793)<br />解决办法: 可以忽略
  7. ---
  8. <a name="e7c4be39"></a>
  9. ### 制作镜像仓库补充
  10. 1. yum 构建完成后需要对 xx 路径赋权![image.png](https://cdn.nlark.com/yuque/0/2021/png/667110/1617948870776-7f01b8aa-7efa-413f-9c05-fb6c081c5ceb.png#align=left&display=inline&height=123&margin=%5Bobject%20Object%5D&name=image.png&originHeight=246&originWidth=995&size=170687&status=done&style=none&width=497.5)
  11. 2. 测试: 在跟目录尝试使用 (测试通过)
  12. > wget [http://10.136.98.40/gdp/arm/1.9.1/panel/ambari-metrics-monitor-1.8.2.0-0.ky10.aarch64.rpm](http://10.136.98.40/gdp/arm/1.9.1/panel/ambari-metrics-monitor-1.8.2.0-0.ky10.aarch64.rpm)
  13. ![image.png](https://cdn.nlark.com/yuque/0/2021/png/667110/1617948853566-4b64c84e-ff5a-483f-afab-985d0cbf8ddd.png#align=left&display=inline&height=102&margin=%5Bobject%20Object%5D&name=image.png&originHeight=204&originWidth=1853&size=128054&status=done&style=none&width=926.5)
  14. 3. 如果在 WebUi 界面无法出现该界面
  15. ![image.png](https://cdn.nlark.com/yuque/0/2021/png/667110/1617948921810-9d38d75d-38fa-4fbf-a053-b05328ee1854.png#align=left&display=inline&height=226&margin=%5Bobject%20Object%5D&name=image.png&originHeight=451&originWidth=834&size=46523&status=done&style=none&width=417)
  16. - 需要注意以下原因
  17. - httpd 是否开启
  18. - 防火墙是否关闭
  19. - 是否可以访问外网
  20. -
  21. ---
  22. - `Creating target directory...`
  23. ```shell
  24. Command start time 2021-04-12 19:58:29
  25. chmod: 无法访问 '/var/lib/ambari-agent/data': 没有那个文件或目录
  • Checking 'sudo' package on remote host... ```shell Command start time 2021-04-12 19:58:31 sudo-1.8.27-4.ky10.aarch64

Authorized users only. All activities may be monitored and reported. Connection to panel-5 closed. SSH command execution finished host=panel-5, exitcode=0 Command end time 2021-04-12 19:58:32

========================== Copying required files…

Ambari repo file not found: /etc/yum.repos.d/ambari.repo (?????? 怎么需要这个repo)

Copying setup script file…

  1. - `Running setup agent script...`
  2. - Repository panel-1.9.1.0-0 is listed more than once in the configuration
  3. - Error: Problem: conflicting requests - nothing provides hdp-select needed by ambari-agent-1.8.2.0-0.ky10.aarch64
  4. - Problem: conflicting requests - nothing provides hdp-select needed by ambari-agent-1.8.2.0-0.ky10.aarch64 ("Last metadata expiration check: 0:00:24 ago on 2021\xe5\xb9\xb404\xe6\x9c\x8812\xe6\x97\xa5 \xe6\x98\x9f\xe6\x9c\x9f\xe4\xb8\x80 20\xe6\x97\xb621\xe5\x88\x8620\xe7\xa7\x92. (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages) ", None)
  5. ```shell
  6. Command start time 2021-04-12 20:21:19
  7. Repository panel-1.9.1.0-0 is listed more than once in the configuration
  8. Error:
  9. Problem: conflicting requests
  10. - nothing provides hdp-select needed by ambari-agent-1.8.2.0-0.ky10.aarch64
  11. Repository panel-1.9.1.0-0 is listed more than once in the configuration
  12. Error:
  13. Problem: conflicting requests
  14. - nothing provides hdp-select needed by ambari-agent-1.8.2.0-0.ky10.aarch64
  15. Repository panel-1.9.1.0-0 is listed more than once in the configuration
  16. Error:
  17. Problem: conflicting requests
  18. - nothing provides hdp-select needed by ambari-agent-1.8.2.0-0.ky10.aarch64
  19. ("Last metadata expiration check: 0:00:24 ago on 2021\xe5\xb9\xb404\xe6\x9c\x8812\xe6\x97\xa5 \xe6\x98\x9f\xe6\x9c\x9f\xe4\xb8\x80 20\xe6\x97\xb621\xe5\x88\x8620\xe7\xa7\x92.
  20. (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
  21. ", None)
  22. Authorized users only. All activities may be monitored and reported.
  23. Connection to panel-5 closed.
  24. SSH command execution finished
  25. host=panel-5, exitcode=1
  26. Command end time 2021-04-12 20:21:45
  27. ERROR: Bootstrap of host panel-5 fails because previous action finished with non-zero exit code (1)
  28. ERROR MESSAGE:
  29. Authorized users only. All activities may be monitored and reported.
  30. Connection to panel-5 closed.
  31. STDOUT: Repository panel-1.9.1.0-0 is listed more than once in the configuration
  32. Error:
  33. Problem: conflicting requests
  34. - nothing provides hdp-select needed by ambari-agent-1.8.2.0-0.ky10.aarch64
  35. Repository panel-1.9.1.0-0 is listed more than once in the configuration
  36. Error:
  37. Problem: conflicting requests
  38. - nothing provides hdp-select needed by ambari-agent-1.8.2.0-0.ky10.aarch64
  39. Repository panel-1.9.1.0-0 is listed more than once in the configuration
  40. Error:
  41. Problem: conflicting requests
  42. - nothing provides hdp-select needed by ambari-agent-1.8.2.0-0.ky10.aarch64
  43. ("Last metadata expiration check: 0:00:24 ago on 2021\xe5\xb9\xb404\xe6\x9c\x8812\xe6\x97\xa5 \xe6\x98\x9f\xe6\x9c\x9f\xe4\xb8\x80 20\xe6\x97\xb621\xe5\x88\x8620\xe7\xa7\x92.
  44. (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
  45. ", None)
  • Panel repo file not found: /etc/yum.repos.d/panel.repo
  • ERROR: Bootstrap of host panel-5 fails because previous action finished with non-zero exit code (2) ```shell Command start time 2021-04-12 20:44:03 Panel repo file not found: /etc/yum.repos.d/panel.repo

Authorized users only. All activities may be monitored and reported. Connection to panel-5 closed. SSH command execution finished host=panel-5, exitcode=2 Command end time 2021-04-12 20:44:05

ERROR: Bootstrap of host panel-5 fails because previous action finished with non-zero exit code (2) ERROR MESSAGE: Authorized users only. All activities may be monitored and reported. Connection to panel-5 closed.

STDOUT: Panel repo file not found: /etc/yum.repos.d/panel.repo

  1. - Error: Failed to download metadata for repo 'ks10-adv-os': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
  2. - ERROR: Bootstrap of host panel-5 fails because previous action finished with non-zero exit code (1)
  3. ```shell
  4. Command start time 2021-04-12 20:49:05
  5. Error: Failed to download metadata for repo 'ks10-adv-os': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
  6. Error: Failed to download metadata for repo 'ks10-adv-os': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
  7. Desired version (1.8.2.0) of [panel-agent package is not available.
  8. Authorized users only. All activities may be monitored and reported.
  9. Connection to panel-5 closed.
  10. SSH command execution finished
  11. host=panel-5, exitcode=1
  12. Command end time 2021-04-12 20:51:31
  13. ERROR: Bootstrap of host panel-5 fails because previous action finished with non-zero exit code (1)
  14. ERROR MESSAGE:
  15. Authorized users only. All activities may be monitored and reported.
  16. Connection to panel-5 closed.
  17. STDOUT: Error: Failed to download metadata for repo 'ks10-adv-os': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
  18. Error: Failed to download metadata for repo 'ks10-adv-os': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
  19. Desired version (1.8.2.0) of [panel-agent package is not available.

参考链接

@Tim Dunphy
1. Make sure your below command has same output -
$hostname
$hostname -f
2. Make sure if iptables and selinux are disabled
3. SSH to localhost and make sure it works without password.
4. Once you make sure your passwordless ssh is working you try installing agent manually also - http://docs.hortonworks.com/HDPDocuments/Ambari-2.2.1.0/bk_ambari_reference_guide/content/ch_amb_ref…
View solution in original post