使用 YUM 在 Centos 5.5 上安装 Mono

发布于 2024-09-15 13:43:47 字数 709 浏览 4 评论 0原文

如何在 Mono 2.6.7 运行时安装http://en.wikipedia.org/wiki/CentOS" rel="nofollow noreferrer">CentOS 5.5 使用 好吃

我知道如何从源代码构建 Mono。但是,根据页面Getting Started With Mono Tools,它是可以直接安装二进制文件。我更愿意安装二进制文件,以避免在磁盘空间很小的服务器上安装所有开发先决条件。

我应该向 YUM 添加新的存储库描述吗?我尝试这样做,但我一定做错了,因为“yum list mono-core”仍然显示旧版本(1.2.4-2.el5.centos)。

而且,为什么 .rpm 在发布服务器上被称为“mono-addon-”?这有点令人困惑。听起来 .rpm 是 Mono 的附加组件。我猜他们的意思是它们是服务器的“附加组件”(?)。

How do I install the Mono 2.6.7 runtime on CentOS 5.5 using YUM?

I know how to build Mono from the source. However, according to the page Getting Started With Mono Tools it is possible to install the binaries directly. I'd prefer to install the binaries to avoid having to install all the development pre-requisites on a server with little disk space.

Am I supposed to add a new repository description to YUM? I tried doing that, but I must have done it wrong, because "yum list mono-core" still says the old version (1.2.4-2.el5.centos).

And, why are the .rpm's called "mono-addon-" on the release server? It's a bit confusing. It sounds like the .rpm's are an add-on to Mono. I guess they mean they are an "add-on" to the server(?).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

尤怨 2024-09-22 13:43:47

我想通了。

创建新的存储库配置文件

cd /etc/yum.repos.d
vi mono.repo

将以下行添加到文件中

[Mono]
name=Mono Stack (RHEL_5)
type=rpm-md
baseurl=http://ftp.novell.com/pub/mono/download-stable/RHEL_5/
gpgcheck=1
gpgkey=http://ftp.novell.com/pub/mono/download-stable/RHEL_5/repodata/repomd.xml.key
enabled=1

更新 YUM 缓存以确保安全

yum clean all

安装 Mono 服务器堆栈

yum install monotools-addon-server

安装的二进制文件最终将位于“/opt/novell/mono/bin”中。

您应该发出以下命令来设置您的 shell 环境,以便它找到 Mono、mcs 和其他 Mono 工具

source /opt/novell/mono/bin/mono-addon-environment.sh

验证版本

mono --version

Mono JIT compiler version 2.6.7 (tarball Mon Jul 19 18:28:58 UTC 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        GC:            Included Boehm (with typed GC and Parallel Mark)
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none

如果您希望 Mono 环境永久存在,您可以发出遵循命令。

cp /opt/novell/mono/bin/mono-addon-environment.sh /etc/profile.d

快乐 Mono'ing!!!

I figured it out.

Create a new repository configuration file

cd /etc/yum.repos.d
vi mono.repo

Add the following lines to the file

[Mono]
name=Mono Stack (RHEL_5)
type=rpm-md
baseurl=http://ftp.novell.com/pub/mono/download-stable/RHEL_5/
gpgcheck=1
gpgkey=http://ftp.novell.com/pub/mono/download-stable/RHEL_5/repodata/repomd.xml.key
enabled=1

Update the YUM cache to be on the safe side

yum clean all

Install the Mono server stack

yum install monotools-addon-server

The installed binaries will end up in "/opt/novell/mono/bin".

You should issue the following command to set up your shell environment so that it finds Mono, mcs and the other Mono tools

source /opt/novell/mono/bin/mono-addon-environment.sh

Verify the version

mono --version

Mono JIT compiler version 2.6.7 (tarball Mon Jul 19 18:28:58 UTC 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        GC:            Included Boehm (with typed GC and Parallel Mark)
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none

If you want the Mono environment to be permanent you can issue the following command.

cp /opt/novell/mono/bin/mono-addon-environment.sh /etc/profile.d

Happy Mono'ing!!!

坏尐絯℡ 2024-09-22 13:43:47

除了octonion的帖子之外,如果,像我一样,您想使用 Apache mod_mono,您需要通过运行以下命令来确保安装正确版本的 mod_mono,并且它将获得正确的版本:

yum install mod_mono-addon

不要只发出 yum install mod_mono。它可能会从 CentOS extras 存储库安装 mod_mono 1.2 版本,而不是您实际想要的版本。

作为参考,当运行不正确的 mod_mono 版本时,我在 /var/log/httpd/error_log 中收到以下错误:

根目录:/
mod_mono 和 xsp 有不同的版本。预期为“9”,结果为 6
System.InvalidOperationException:mod_mono 和 xsp 具有不同的版本。预期为“9”,结果为 6

如果你像我一样刚接触这个,这是一个愚蠢但很容易犯的错误。

In addition to octonion's post, if, like me, you want to use Apache mod_mono, you need to ensure you install the correct version of mod_mono by running the following, and it will get the right one:

yum install mod_mono-addon

Don't just issue yum install mod_mono. It may install mod_mono 1.2 version from the CentOS extras repository and not what you're actually after.

As a reference, I was getting the following error in /var/log/httpd/error_log when running the incorrect mod_mono version:

Root directory: /
mod_mono and xsp have different versions. Expected '9', got 6
System.InvalidOperationException: mod_mono and xsp have different versions. Expected '9', got 6

It is a silly, but easy mistake to make if you new to this like me.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文