LoginSignup
4
4

More than 5 years have passed since last update.

Monoをコンパイルしてインストールする自動Shell

Last updated at Posted at 2015-02-27

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

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4