Matt Mills
Matt Mills

Reputation: 8822

Mono 3.0.0 build on CentOS 6

I recently found myself needing to build Mono 3.0 for CentOS 6, with a request from my infrastructure guy to otherwise keep the system as close to CentOS as possible (i.e. no 3rd-party packages if possible).

Because there are currently no Mono 3.0 RPMs that I could find, I went through the exercise of building it from scratch, on a clean Minimal install of CentOS 6.3.

It is possible to build Mono 3.0 with no external packages on CentOS 6.3.

Upvotes: 11

Views: 9340

Answers (2)

MariuszS
MariuszS

Reputation: 31595

Timotheus Pokorra Mono Repository

Use tpokorra repository with mono 3.2.5 for Centos 6.x (and other distros)

Yum repository configuration

Put file mono.repo in directory /etc/yum.repos.d/ with content:

[home_tpokorra_mono]
name=mono and monodevelop (CentOS_CentOS-6)
type=rpm-md
baseurl=http://download.opensuse.org/repositories/home:/tpokorra:/mono/CentOS_CentOS-6/
gpgcheck=1
gpgkey=http://download.opensuse.org/repositories/home:/tpokorra:/mono/CentOS_CentOS-6/repodata/repomd.xml.key
enabled=1

Installation

yum install mono-opt

More

http://software.opensuse.org/download/package?project=home:tpokorra:mono&package=mono-opt

Upvotes: 6

Matt Mills
Matt Mills

Reputation: 8822

Perform a CentOS 6.3 Minimal Install

ifup eth0

yum -y update
yum -y install glib2-devel
yum -y install libpng-devel
yum -y install libjpeg-devel 
yum -y install giflib-devel 
yum -y install libtiff-devel 
yum -y install libexif-devel 
yum -y install libX11-devel 
yum -y install fontconfig-devel 
yum -y install gettext 
yum -y install make 
yum -y install gcc-c++

# amusing hack to fix the mono make file

export echo=echo

# build libgdiplus
curl -O http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.9.tar.bz2
bunzip2 libgdiplus-2.10.9.tar.bz2
tar xvf libgdiplus-2.10.9.tar
cd libgdiplus-2.10.9
./configure --prefix=/usr/local
make
make install

# build mono
curl -O http://download.mono-project.com/sources/mono/mono-3.0.0.tar.bz2
bunzip2 mono-3.0.0.tar.bz2
tar xvf mono-3.0.0.tar
cd mono-3.0.0
./configure --prefix=/usr/local
make
make install

# tell binfmt how to launch CLR executables
echo ':CLR:M::MZ::/usr/local/bin/mono:' > /proc/sys/fs/binfmt_misc/register

Upvotes: 10

Related Questions