Install mono and jexus on Ubuntu to build the. NET Runtime Environment

Source: Internet
Author: User
Tags automake

Mono has been applied more and more in China. Nowadays, many companies do not dare to use it in the production environment due to commercial copyright issues, but this cannot block Mono's charm .. Net programmers, it would be a pity if you do not know mono.

The "mono + jexus" Architecture mode is an extremely important architecture mode for Linux to host ASP. NET enterprise-level applications. In this architecture, jexus is well installed and configured, which is basically a process of downloading, extracting, and copying, but mono installation will be troublesome. This article will record the use of Mono source code for installation in the Ubuntu operating system. Install jexus later and use a test page to verify that jexus has been installed successfully. The combination of jexus and mono will be introduced in the next article.

1. Select the Operating System

We recommend that you use Ubuntu server because the entire process runs on a virtual machine and is based on the Linux release version. The version I use is Ubuntu server 12.04.2:

ansen@ansen:~$ cat  /etc/issueUbuntu 12.04.2 LTS \n \l

To upgrade the Ubuntu system, run the following two commands:

sudo apt-get updatesudo apt-get upgrade

Ubuntu server is usually "clean" during installation, so we also need to compile the environment. These compilation environments are necessary for the successful installation of Mono source code:

sudo apt-get install build-essentialsudo apt-get install automake autoconfsudo apt-get install bison gettext libtool libglib2.0-dev libfreetype6-dev libfontconfig-dev

In addition to installing these compiling environments, you must install libgdiplus before installing mono. Before installing libgdiplus, you must install the following compiling environments and library files:

sudo apt-get install libgif-dev libtiff4-dev libpng12-dev libexif-dev libx11-dev libxft-dev libjpeg62-dev

After running the preceding command, an error is reported:

ansen@ansen:~$ sudo apt-get install libgif-dev libtiff4-dev libpng12-dev libexif-dev libx11-dev libxft-dev libjpeg62-devReading package lists... DoneBuilding dependency tree       Reading state information... DoneSome packages could not be installed. This may mean that you haverequested an impossible situation or if you are using the unstabledistribution that some required packages have not yet been createdor been moved out of Incoming.The following information may help to resolve the situation:The following packages have unmet dependencies: libtiff4-dev : Depends: libjpeg-devE: Unable to correct problems, you have held broken packages.

The error message is also displayed because the libtiff4-dev needs to depend on libjpeg-dev instead of the libjpeg62-dev, so you need to change the last argument of the command to libjpeg-Dev:

sudo apt-get install libgif-dev libtiff4-dev libpng12-dev libexif-dev libx11-dev libxft-dev libjpeg-dev

In this way, the operation is successful.

Ii. Install libgdiplus

After the preparations are completed, it is actually easy to follow, just like installing other applications using the source code. Before installing mono, remember to install libgdiplus first:

wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.tar.bz2

The latest version can be found here: Last Modified

After the download is complete, decompress:

tar jvxf libgdiplus-2.10.tar.bz2

Then, install the three steps:

cd libgdiplus-2.10./configure --prefix=/usrmakesudo make installcd ..

3. Install mono

After libgdiplus is installed, you can download and install the mono source code. The installation steps are basically the same as those for libgdiplus installation:

wget http://download.mono-project.com/sources/mono/mono-3.0.10.tar.bz2

The latest mono version can be found here: Last Modified

After the download is complete, decompress:

tar jvxf mono-3.0.10.tar.bz2

Then, install the three steps:

cd mono-3.0.10./configure --prefix=/usrmakesudo make installcd ..
4. Another mono Installation Method for Linux in virtual machines. /configure, which may cause internal GCC compilation errors, which are often clueless. In this case, you can use the following methods to install Mono: 1. Install the dependencies required by mono
sudo apt-get install build-essential bison gettext pkg-config autoconf libtool automake

2. Install mono3.0

Download the installation package, decompress it, and run the installed sh file:
Wget http://download.mono-project.com/sources/mono/
tar -xjvf mono-3.0.0.tar.bz2cd mono-3.0.0./autogen.shmakesudo make installcd ..

Note that./autogen. Sh can be followed by installation path parameters. The default installation path is/usr/local.

After the installation is successful, check the mono version: 5. Install jexus

Jexus installation is relatively simple. You can download it from its official website: http://www.linuxdot.net /. The download link is located in the "important downloads" column on the right of the official website. We installed jexus Web Server v5.3.1 in the official version. The installation command is as follows:

wget http://www.linuxdot.net/down/jexus-5.3.1.tar.gz tar -zxv -f jexus-5.3.1.tar.gz 

Jexus-5.3.1 folder, under which there is an install, run install unzip, enter

cd jexus-5.3.1./install

The installation is successful.

Check the default jexus configuration file in/usr/jexus/siteconf/default:

There are examples in the configuration, which is quite understandable. Next we will create a new index.html page under/var/www/default. the page contains some simple HTML code, as shown below:

Return to/usr/jexus and run the following command:

./jws startcurl http://localhost/index.html

The displayed result is as follows:

The jexus service has been started successfully.

The next article will introduce mono running. NET web programs under the jexus server.

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.