Set Mono environment variables in CentOS

Source: Internet
Author: User

Set Mono environment variables in CentOS

Set Mono environment variables in CentOS

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 to/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: $ PATH
Export 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)

Deploying. NET, Mono and DNX in Ubuntu 15.04 and CentOS 7

Configure ASP. NET (Apache + Mono) in Linux (Ubuntu/openSUSE/CentOS)

Configure the Linux (Apache) + Mono to run asp.net

How to upgrade Mono

Idea about running ASP. NET 4 website in Mono 3.0

Install Mono and Jexus on Ubuntu to build the. NET Runtime Environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.