Running Linux binaries on Openbsd

2009-05-13 06:37:26来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

openbsd.org FAQ 9.5 Running Linux binaries on Openbsd
=====================================================
9.4 - Running Linux binaries on OpenBSD
OpenBSD/i386 is able to run Linux binaries when the kernel is compiled
with the COMPAT_LINUX option and the runtime sysctl kern.emul.linux is
also set.
If you are using the GENERIC kernel (which you should be), COMPAT_LINUX
is already enabled, and you will just need to do:
# sysctl kern.emul.linux=1
For this to be done automatically each time the computer boots,
remove the # (comment) character at the beginning of the line
#kern.emul.linux=1      # enable running Linux binaries
in /etc/sysctl.conf, so that it reads
kern.emul.linux=1       # enable running Linux binaries
and reboot your system to have it take effect.
To run any Linux binaries that are not statically linked (most of them),
you need to follow the instructions on the
compat_linux(8)

manual page.
A simple way to get most of the useful Linux libraries is
to install the redhat/base package from your nearest FTP mirror.
To find out more about the packages and ports system read
FAQ 15 - The OpenBSD Packages and Ports System
.
To install the above mentioned package you would issue
# export PKG_PATH=ftp://your.ftp.mirror/pub/OpenBSD/4.0/packages/i386/
# pkg_add redhat_base-8.0p8.tgz
Note that since OpenBSD 3.7,
pkg_add(1)
will automatically execute sysctl to set kern.emul.linux to the correct
value upon adding this package.
However, it does not change /etc/sysctl.conf, so if you wish
Linux emulation to be enabled by default, you need to modify
kern.emul.linux there.
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/22965/showart_236493.html

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:Web 状态机一招鲜, 第一部、Python 状态机入门

下一篇:COMPAT_LINUX(8) OpenBSD Man