CentOS6.X系にMonoをコンパイルしてインストールするまでのまとめShell
monoinstall.sh
# !/bin/bash
# TAG="タグ名"
TAG=mono-3.12.0.77
DIR=`dirname "${0}"`
cd ${DIR}
mkdir monotemp
cd monotemp
yum install autoconf libtool automake gcc gcc-c++ gettext wget git -y
git clone https://github.com/mono/mono.git
cd mono/
sh autogen.sh
git checkout ${TAG}
make get-monolite-latest
make
make install
mono -V
インストール確認
インストール終了でバージョンを表示しています。
Mono JIT compiler version 3.12.0 ((no/de2f33f 2015年 2月 27日 金曜日 21:20:59 JST)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
Monoテストコード
csファイルの作成
vi qiita.cs
qiita.cs
class TestClass
{
static void Main(string[] args)
{
System.Console.WriteLine("Hello Mono!!");
}
}
コンパイルと実行
mcs qiita.cs
mono qiita.exe