[英]JFrog Xray installation Docker install on CentOS - permission denied
Trying to install JFrog Xray on a CentOS machine, using the Docker installer. 尝试使用Docker安装程序在CentOS计算机上安装JFrog Xray。 I've created a /opt/xray directory, where I've downloaded the install file into.
我创建了/ opt / xray目录,将安装文件下载到其中。
Then ran chmod +x xray on this file. 然后在此文件上运行chmod + x xray。
When I try to install using sudo "./xray install", I get the following output: 当我尝试使用sudo“ ./xray install”安装时,得到以下输出:
[root@xray xray]# sudo ./xray install
INFO: Using XRAY_MOUNT_ROOT=/root/.jfrog/xray
Verifying Xray prerequisites ...
WARNING: Running with 3GB Total RAM
WARNING: Running with 1 CPU Cores
The System resources are not aligned with Xray minimal prerequisites, Do you want to proceed with the process? [Y
touch: cannot touch '/data/installer.info': Permission denied
Are you adding this node to an existing cluster? (not relevant for the first cluster node) [Y/n]: n
mkdir: cannot create directory '/xray_global_mount_root/xray': Permission denied
./wrapper.sh: line 583: /xray_global_mount_root/xray/ha/ha-node.properties: No such file or directory
./wrapper.sh: line 586: /data/installer.info: Permission denied
./wrapper.sh: line 589: /data/installer.info: Permission denied
./wrapper.sh: line 592: /data/installer.info: Permission denied
ERROR: Installation failed
Any ideas what may be causing this? 任何想法可能是什么原因造成的?
I had a similar issue on RHEL and it was selinux getting in the way. 我在RHEL上也遇到了类似的问题,这是selinux造成的。 To fix it, change the following line in the xray script: -
要解决此问题,请在xray脚本中更改以下行:-
XRAY_VOLUMES="-v ${XRAY_MOUNT_ROOT}/xray-installer:/data -v ${XRAY_MOUNT_ROOT}:/xray_global_mount_root"
To this: - 为此:-
XRAY_VOLUMES="-v ${XRAY_MOUNT_ROOT}/xray-installer:/data:z -v ${XRAY_MOUNT_ROOT}:/xray_global_mount_root:z"
(basically adding :z to each volume). (基本上将:z添加到每个卷中)。
This makes sure the folder is labelled to be used by multiple containers in selinux. 这样可以确保该文件夹被标记为供selinux中的多个容器使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.