强制 Apache HTTPD 以 32 位运行
我通过从二进制文件(以及 ppc 部分)中剥离 32 位架构,以 64 位模式运行 Apache HTTPD。 我这样做是为了使其与 python 和 mysql 更加兼容。
然而,我有另一台机器需要它以 32 位模式运行(它仍然包含所有四种原始架构)。 是否可以确保它在 32 位模式下运行,并且针对它编译的任何内容都使用所述模式。
我的选择仅限于剥离它,还是有我不知道的启动选项。
I have been running Apache HTTPD in 64bit mode by stripping out the 32bit architecture from the binary (along with the ppc parts). I did this to make it more compatible for python and mysql.
However I have another machine that needs it to be run in 32bit mode (it has all four original architectures still in it). Is it possible to make sure that it is running in 32 bit mode and that anything compiled against it uses said mode.
Are my options limited to stripping it, or are there start up optiosn that I do not know about.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用
arch(1)< /code>
命令更改使用的架构。 这将首先尝试 Intel 32 位,然后尝试 PPC 32 位:
You can use the
arch(1)
command to change the which architecture is used. This will try Intel 32-bit first and then PPC 32-bit:此方法将复制 Apache 二进制文件并确保 apachectl(以及正常的操作系统配置)能够正确启动 32 位版本:
首先,创建 httpd 的 32 位版本:
其次,编辑系统配置,以便它使用新版本而不是默认版本。 将“/usr/sbin/httpd”更改为“/usr/sbin/httpd.i386”:
最后,重新启动 Apache:
This method will make a copy of the Apache binary and ensure that apachectl (and hence, the normal OS config) will properly start the 32-bit version:
First, create the 32-bit version of httpd:
Second, edit the system configuration so it uses the new version instead of the default. Change "/usr/sbin/httpd" to "/usr/sbin/httpd.i386":
Lastly, restart Apache:
请注意,这样做将阻止 apache 加载任何 64 位共享模块 - 例如,如果您使用 EntropyPHP,这可能是一个问题。
Note that doing so will prevent apache from loading any 64bit shared modules - if you're using EntropyPHP, for instance, this can be a problem.