Objective
After trying to install a variety of online mono technology paste, the installation process went through about 2 weeks, tried many kinds of installation methods, there are a variety of different problems, connection MSSQL database anomalies, and so on various conditions, virtual also deleted N. After finishing the personal feel most convenient, and more secure installation of mono mode. and record the full installation process.
1, install the required library
Yum-y install wget glib2-devel libtiff libtiff-devel libjpeg libjpeg-devel giflib giflib-devel libpng libpng-devel libX11 Libx11-devel freetype freetype-devel fontconfig fontconfig-devel libexif libexif-devel gcc-c++ gettext unzip zip bzip2 BZ Ip2-devel Curl-devel Gtk2-devel Boost-devel
2. Add RPM Source
" Http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF " Yum-config-manager--add-repo http://jenkins.mono-project.com/repo/centos/
3. Find available versions
Yum Search Mono-snapshot
4, choose to install the latest version of the snapshot
Yum-y Install Mono-snapshot-latest
PS: If you want to install a version of the snapshot command for
Yum-y Install Mono-snapshot-xxxxxxxxx
5. View available Mono snapshots
Mono-snapshot
6. Execute the specified snapshot
Mono-snapshot Mono
Or
Mono-snapshot mono/xxxxxxxxx
Show Results:
mono-20150520032320 represents the snapshot used by mono
7. Confirm that mono is installed successfully
Mono--version
Show Results:
Mono JIT Compiler version 4.1.0 (tarball Tue may 23:45:50 EDT2002-2014 Novell, INC, Xamarin Inc and Contr Ibutors. www.mono-project.com TLS: __thread SIGSEGV: altstack notifications:epoll Architecture: amd64 Disabled: none Misc: softdebug LLVM: supported, not Enabled. GC: sgen
8. Set the mono environment variable on CentOS
Find the installation address of the version with the Find/-name ' libmonoposixhelper.so ' command;
Find/-name ' libmonoposixhelper.so '/opt/mono-20150520032320/lib/libmonoposixhelper.so
Make a note of/opt/mono-20150520032320 (will be used later)
If you install multiple versions, you will have multiple records.
The following main references Zhang Shanyu's article (http://www.cnblogs.com/shanyou/archive/2012/10/11/2720597.html)
安装脚本将Mono安装到了/opt/mono-20150520032320/,需要将Mono的目录加入系统$PATH变量
Method One: Add the variable "to all users (permanent)" in the/etc/profile file
Using VI to add a variable to the file/etc/profile file, the variable will be valid for all users under Linux and is "permanent".
Vi/etc/profile
Add the following two lines of code at the end of the file
Path=/opt/mono-20150520032320/bin:$PATH export PATH
The modification takes effect and requires executing the following code (otherwise restarting reboot)
Source/etc/profile
Method Two: Create a mono configuration in the/etc/profile.d/directory
cd/etc/profile.d/
Create a new mono.sh
VI mono.sh
Write something inside this file
Export path=$PATH:/opt/mono-20150520032320/bin
The "mono-20150520032320" in the path is shown above, and if you need to configure the update version then the path is available.
The modification takes effect and requires the following code to be executed
SOURCE mono.sh
Now you can execute Mono's command directly.
Mono-4.1.0 (tarball Tue may 23:45:50 EDT2002-2014 Novell, INC, Xamarin Inc and Contributors. WW w.mono-project.com TLS: __thread SIGSEGV: altstack notifications:epoll Architecture: amd64 Disabled: none Misc: softdebug LLVM: supported, not Enabled. GC: sgen
The execution results are consistent. Mono installation is complete.
Linux CentOS7 install mono via yum command