One installation of mono
installation process : Download mono installation Source, configure, compile, install, set environment variables.
# wget http://download.mono-project.com/sources/mono/mono-5.4.0.201.tar.bz2# tar-jxvf mono-5.4.0.201.tar.bz2# CD mono-5.4.0.201#./configure--prefix=/usr/local/mono# make && make install# vi/etc/profile Add environment variable at the end: path=$ Path:/usr/local/mono/binexport path Save and exit # Source/etc/profile set Effective # echo $PATH output environment variable PATH value to verify that the added variable is in effect # Mono-v Viewing the mono version
Note :--prefix=/usr/local/mono is the directory where the mono installation is set up, so path adds the bin directory path under that installation directory.
Two-Test
# vi hello.csusing system;using system.text;namespace hello{ class Hello { static void Main (string[] args) c5/>{ Console.WriteLine ("Hello world!"); Console.readkey ();}}} Save and Exit # MCS Hello.cs Build executable program hello.exe# Mono hello.exe Execute executable program
End!
[centos_7.4] Linux compile and install the mono environment