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.
我应该向YUM添加新的存储库描述吗?我试过这样做,但我一定做错了,因为"yum list mono-core"仍然说旧版本(1.2.4-2.el5.centos).
而且,为什么.rpm在发布服务器上被称为"mono-addon-"?这有点令人困惑.听起来像.rpm是Mono的附加组件.我猜他们的意思是他们是服务器的"附件"(?).
我想到了.
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 clean all
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
快乐的单声道!
除了octonion的帖子之外,如果像我一样,你想使用Apache mod_mono,你需要确保通过运行以下命令安装正确版本的mod_mono,它将得到正确的版本:
yum install mod_mono-addon
不要只发出yum install mod_mono
.它可能会从CentOS extras存储库安装mod_mono 1.2版本,而不是你真正想要的版本.
作为参考,我在/var/log/httpd/error_log
运行不正确的mod_mono版本时收到以下错误:
根目录:/
mod_mono和xsp有不同的版本.得到'9',得到6个System.InvalidOperationException:mod_mono和xsp有不同的版本.预计'9',得到6
如果你像我这样的新手,这是一个愚蠢但很容易犯的错误.