2013年1月26日星期六

CentOS 5.5 安装 Wine 方法

Wine 是一个在 Linux 下运行 Windows 应用程序的软件环境,其核心是一个 Windows 应用程序接口(API)库,作为 Linux 和 Windows 程序之间的桥梁。Wine 的官网是:http://www.winehq.org/

    Wine 安装包里的描述:

    Description:
             While Wine is usually thought of as a Windows(TM) emulator, the Wine
           : developers would prefer that users thought of Wine as a Windows
           : compatibility layer for UNIX. This package includes a program loader,
           : which allows unmodified Windows 3.x/9x/NT binaries to run on x86 and x86_64
           : Unixes. Wine does not require MS Windows, but it can use native system
           : .dll files if they are available.
           :
           : The wine package is actually a meta-package which will install everything
           : you need for wine to work smoothly. If you don't want to install everything
           : take a look at the wine-* packages.

    Wine 在 CentOS5.5 里并不是预装的软件包,所以需要先配置 CentOS 的非官方软件源 RPMForge,参见(http://www.linuxidc.com/Linux/2011-01/31505.htm),然后通过 RPMForge 来安装 Wine。

具体命令如下:
rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm

运行命令:
yum install wine


    来安装 wine。Wine-1.2-1 安装包大概有 50M 容量。

    安装包会自动安装依赖的软件包,安装一般不会有什么问题。完整完毕,接着就是配置了。

    首先输入命令 winecfg 运行 wine 配置命令否则没有.wine文件夹,再把 Windows/system32 下的 MFC42.dll、msxml.dll、msvcp60.dll、riched20.dll、riched32.dll 等 .dll 文件复制到 ~/.wine/drive_c/windows/system32 里。
   
      再输入命令:winecfg (我安装的时候重启了下才可以运行),在弹出的wine设置中选择函数库,将msxml.dll riched20.dll riched32.dll 设置成原生优于内建(需要在libiaries下选择对应的DLL然后点ADD ),确定退出.

    其实一般不需要再做特别的配置,wine 就能工作了。

    还有一点得注意,做完这些以后运行 Windows 程序时,SELinux 可能会弹出阻止窗口。我们用下面的方法禁用 SELinux:

    用文本编辑器编辑 /etc/sysconfig/selinux 文件,把 SELINUX=enforcing 变为 SELINUX=disabled,关闭 SELinux,存盘退出,重启系统。

    运行 Windows 程序的方法,执行以下命令将Gomez PEER软件下载到你的VPS上。 
    wget http://lastmile.gomez.com/PEERInstall.exe
进入“我的电脑”中的“root”中,就可以看到下载的Gomez PEER软件了,右击它,选择“用Wine打开”。

  

没有评论:

发表评论