问题标签 [rhel5]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
380 浏览

php - 使用 selinux 从 apache+php 查询 rpm

我有一个在 RHEL5 安装上的 apache 服务器中运行的 php 脚本。此脚本在“rpm -q --info packagename”上运行 exec。

问题是它在许可模式下与 selinux 一起正常工作,但在完全启用时不能正常工作。所以我认为这是一个selinux问题。

我已经开始使用 audit2allow 根据我发现的拒绝条目创建规则,但现在审核日志中不再有拒绝,但它仍然无法在启用 selinux 的情况下运行。

在我的世界里,它似乎会询问系统是否允许运行,当 selinux 说“如果你尝试这个,我会阻止你”。所以系统不运行exec。如果是这样,我假设我会得到一个“拒绝”,我可以根据它创建一个新的 selinux 规则。在允许 selinux 的情况下,我也没有被拒绝,但它可以工作..

所以看来我将不得不以艰难的方式处理这个问题并为 selinux 创建一个自定义规则。说了又做了,我做了一个:

不幸的是,这对我的问题没有任何影响,但假设我的 selinux 规则有点混乱:P

有没有人尝试在启用 selinux 的情况下从 php 执行 rpm 并侥幸逃脱?

0 投票
2 回答
390 浏览

compatibility - 在 RHEL5 上运行 G-WAN?

我想尝试 G-WAN,但我们的服务器在 RHEL5 上运行。我知道 G-WAN 在 G-WAN 3 中需要 glibc 2.11 (GLIBC_2.6)。是否有 RHEL5 的版本、源代码、G-WAN 2 或任何其他方式解决这个问题?

0 投票
1 回答
875 浏览

python - 无法使用 pip 在 rhel 5.8 上安装 ipython

我正在尝试在我的 rhel 5.8 服务器上安装 ipython,但它给出了以下错误。

0 投票
1 回答
220 浏览

linux - RHEL中的git密码提示

我在 RHEL 机器上,当我尝试克隆私有存储库时,似乎 git 使用了 GUI 密码提示。我希望它使用终端本身。如何设置 git 以这种方式运行?

0 投票
1 回答
596 浏览

python - 在 RHEL5 上使用 python 中的 selenium 时无法创建浏览器进程

我正在尝试使用 python 中的 selenium,但在 RHEL5.5 服务器上运行它时遇到问题。我似乎无法真正启动Firefox。

在我的带有 ubuntu 的笔记本电脑上,这可以正常工作,它会启动一个 Firefox 窗口。当我使用 ssh 登录服务器时,我可以从命令行运行 firefox 并将其显示在我的笔记本电脑上。它显然是来自服务器的 Firefox,因为它具有 RHEL5.5 主页。

当我在服务器上运行上面的 python 脚本(或在 ipython 中运行)时,脚本挂在 webdriver.Firefox()

我也试过

这也挂在最后一行。

我正在使用 /opt/python2.7 中安装的 python2.7。在使用 /opt/python2.7/pip-2.7 安装的 selenium 中。

我可以看到服务器上的 Firefox 进程,它正在使用大量 CPU。我还可以从 /proc/#/environ 看到 DISPLAY 设置为 localhost:10.0 ,这似乎是正确的。

如何在 RHEL5.5 上使用 selenium 启动浏览器?我怎样才能弄清楚为什么 Firefox 没有启动?

0 投票
2 回答
1594 浏览

c++ - execve /bin/bash: h: No such file or directory

On couple of RHEL 5.8, I am facing problem with execve calls. The execve is not failing however, getting the following error:

I am using it the following way in C++ code:

The exec call here is not failing, but I was getting above error when trying to interact with the above script.sh. The strace output for this process looks like following:

There is no file "h" being referenced here, but the last character of the script name is "h". Also, the script that I am trying to exec does exist at expected location and is having sufficient permissions.

I have no clue from where the "h" is coming.

I changed my execve call to following:

With this, it worked properly, but down the code below, I am seeing similar error for another execl call. The difference in the second exec is that the binary is different, but the error remains the same.

I am not sure, if this is server specific issue.

Any clues, any troubleshooting steps would be of great help.

My Bad, I should have mentioned it earlier itself, the <script.sh> is a placeholder. I tried to indicate that a shell script is what I am trying to exec. Also, writefd and readfd are char* here. It can be clearly seen in the strace output I have pasted here. Again, the exec is not failing here as i am not seeing the "Failed to launch Launcher.sh" message.

0 投票
1 回答
422 浏览

vmware - Jython 2.5.3 和 time.sleep

我正在开发一个小型的内部替代 Tripwire,所以我编写了一个小脚本来散列 JBoss EAP 服务器中的文件,并将路径和散列存储在 MySQL 数据库中。

脚本每天都会将文件系统中的哈希值与数据库中保存的哈希值进行比较,因此任何更改都会被记录并最终使用 JasperServer 进行报告。

该脚本在晚上使用 cron 运行,以避免大量脚本在执行有趣的事情之前同时使用 time.sleep(RANDOM_NUMBER_OF_SECONDS) 来查询数据库,但有时 time.sleep 似乎永远处于休眠状态并且脚本结束时没有任何错误,我检查邮件 cron 发送并且没有记录错误。任何帮助,将不胜感激。我正在使用 jython-standalone-2.5.3、IBM 的 JDK 和在 VMWare 中运行的 RHEL 5.6。

我刚刚发现http://bugs.jython.org/issue1974并且代码注释似乎指出操作系统信号可能导致这种行为,但不确定这是否是我的情况。

如果您想在http://code.google.com/p/pysnapshot/上查看代码结帐

路易斯·加西亚·布斯托斯。

0 投票
1 回答
233 浏览

bash - 如何以编程方式或通过脚本增加主机的总交换使用百分比

主机是 RHEL5,我想通过运行某个进程或脚本触发的警报是 TotalSwapUsedPercent .. 有没有快速简便的方法?

0 投票
1 回答
597 浏览

git - 在 RHEL 5 上安装 git 文档包

我正在尝试在 RHEL 5 系统上安装 git 1.8.1,并且在处理构建的文档部分时遇到了很多困难。即,asciidoc。Docbook 在 RHEL5 上确实过时存在问题。

所以,我想使用安装自述文件中指定的make quick-install-doc,make quick-install-man和命令。make quick-install-html但是,我完全不知道在哪里实际下载文件以实现这一点。根据自述文件:

要使用这些构建目标,您需要在 git 本身的克隆旁边克隆两个单独的 git-htmldocs 和 git-manpages 存储库。

“git-htmldocs”和“git-manpages”到底在哪里?

编辑:我想我找到了它的位置。

此 git url 用于手册页:git://git.kernel.org/pub/scm/git/git-manpages.git

这个 git url 用于 html 页面:git://git.kernel.org/pub/scm/git/git-htmldocs.git

我还在这个 Google 代码网站上找到了它们:http ://code.google.com/p/git-core/downloads/list

现在...我如何安装它们?我不明白它说的是什么意思:“在 git 本身的克隆旁边”。这意味着git 源目录中,还是直接在它之外?

0 投票
1 回答
409 浏览

c - 设置 configure.ac 以在 EL5 上启用 asprintf(),需要 _GNU_SOURCE

使用 autoconf 启用asprintfstrndupa在 EL5 上使用的正确正确方法是什么?

目前我的configure.ac中有这个:

但是 autoconf 正在缓存测试的负面测试结果,所以第二个AC_CHECK_FUNCS失败了。

我可以从第二个测试中排除asprintfstrndupa,但是如果定义_GNU_SOURCE不起作用,我们将不知道失败,直到 make 失败。在 autoconf 中使用这些新的 GNU 扩展的正确方法是什么?