使用 YUM 在 Centos 5.5 上安装 Mono [英] Install Mono on Centos 5.5 using YUM

查看:21
本文介绍了使用 YUM 在 Centos 5.5 上安装 Mono的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何在 Mono 2.6.7 运行时href="http://en.wikipedia.org/wiki/CentOS" rel="nofollow noreferrer">CentOS 5.5 使用 YUM?

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

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

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.

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

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).

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

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(?).

推荐答案

我想通了.

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"中.

The installed binaries will end up in "/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 快乐!!!

这篇关于使用 YUM 在 Centos 5.5 上安装 Mono的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆