GitHub has a one-click mono installation script. For more information, see https://github.com/nathanb/iws-snippets/tree/master/mono-install-scripts/fedora.
1. Install the latest mono environment mono-2.11
mkdir mono-2.11
cd mono-2.11
wget --no-check-certificate https://github.com/nathanb/iws-snippets/tree/master/mono-install-scripts/fedora/install_mono-2.11.sh
chmod 755 install_mono-2.11.sh
./install_mono-2.11.sh
2. Set mono environment variables on centos
The installation script installs mono/Opt/mono-2.11/, you need to add the mono directory to the system $ PATH variable
Method 1: Add a variable to the/etc/profile file [effective for all users (permanent )]
Use VI to add a variable to the/etc/profile file. This variable will be valid for all users in Linux and will be "permanent ".
[root@SNDA-192-168-15-161 ~]# vi /etc/profile
Add the following two lines of code to the end of the file:
Path =/opt/mono-2.11/bin
: $ Pathexport path
If the modification takes effect immediately, run the following code:
[root@SNDA-192-168-15-161 ~]# source /etc/profile
Method 2: Create a mono configuration under the/etc/profile. d/directory.
Create a new mono. Sh
Initialize environment variables in this file
Export Path = $ path:/opt/mono-2.11/bin
If the modification takes effect immediately, run the following code:
[Root @ SNDA-192-168-15-161 profile. d] # source mono. Sh
Now you can directly execute the mono command.
[Root @ SNDA-192-168-15-161 profile. d] # mono-V
Mono JIT compiler version 2.11.3 (tarball Thu Oct 11 07:46:58 CST 2012)
Copyright (c) 2002-2012 Novell, Inc, xamarin INC and contributors. www.mono-project.com
TLS: _ thread
SIGSEGV: altstack
Specifications: epoll
Architecture: amd64
Disabled: None
Misc: softdebug
Llvm: supported, not enabled.
GC: encoded ded Boehm (with typed GC and parallel mark)
Running ASP. NET mvc4 on Ubuntu 12.04