The application of mono in China has been more and more. Now because of the commercial copyright problem, many companies are afraid to use it in the production environment, but this can not block the charm of Mono.. NET program apes, it's a shame if you don't know mono.
The "Mono+jexus" architecture pattern is a very important architectural way for Linux to host asp.net enterprise applications. This architecture, Jexus very good installation, configuration, is basically a download, decompression, replication process, but mono installation will be a bit of trouble. This article will be recorded under the Ubuntu operating system, using the mono source installation. Install Jexus later and use a test page to verify the success of the Jexus installation. A combination of Jexus and mono will be introduced in the next article.
First, select the operating system
Because the entire process is running on a virtual machine, and the issue is based on the Linux distribution, it is recommended that you use the Ubuntu Server version, which I am using Ubuntu server 12.04.2:
ansen@ansen:~$ cat /etc/issue
Ubuntu 12.04.2 LTS \ n \l
If you want to upgrade your Ubuntu system, you can run the following two commands:
sudo apt-get update
sudo apt-get upgrade
Since Ubuntu server is generally "clean" when it is installed, we also need to compile the environment, which is the prerequisite for the successful completion of the mono source installation:
sudo apt-get install build-essential
sudo apt-get install automake autoconf
sudo apt-get install Bison gettext Lib Tool Libglib2.0-dev Libfreetype6-dev Libfontconfig-dev
In addition to installing these compilation environments, before installing mono, you need to install Libgdiplus, and before installing libgdiplus, you need to install the following compilation environment and library files first:
sudo apt-get install Libgif-dev libtiff4-dev libpng12-dev libexif-dev libx11-dev libxft-dev Libjpeg62-dev
After running the above command, the error was reported:
ansen@ansen:~$ sudo apt-get install libgif-dev libtiff4-dev libpng12-dev libexif-dev libx11-dev libxft-dev Libjpeg62-dev
Reading Package Lists ... Done
Building Dependency the
Reading state information ... Done
Some packages could is installed. This may mean so you have
requested a impossible situation or if you are using the unstable
distribution ome required packages have not yet been created
or been out of moved.
The following information may help to resolve the situation: The following packages have unmet dependencies
:
LIBTI Ff4-dev:depends:libjpeg-dev
e:unable to correct problems, and have held.
The error message is also displayed because the Libtiff4-dev needs to rely on Libjpeg-dev instead of Libjpeg62-dev, so the last parameter of the command needs to be changed to Libjpeg-dev:
sudo apt-get install Libgif-dev libtiff4-dev libpng12-dev libexif-dev libx11-dev libxft-dev Libjpeg-dev
That's how it works.
Second, install Libgdiplus
After doing a good job in front of the preparation, in fact, the following is simple, and the use of source code to install other applications the same steps. But 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, unpack:
Tar jvxf libgdiplus-2.10.tar.bz2
The installation is then done by installing the "three Steps":
CD libgdiplus-2.10
./configure--prefix=/usr
make
sudo make install
CD.
iii. installation of Mono
After installing the Libgdiplus, you can download the mono source code and install it, the installation steps and installation libgdiplus are basically the same:
wget http://download.mono-project.com/sources/mono/mono-3.0.10.tar.bz2
The latest version of Mono can be found here: Last modified
After the download is complete, unpack:
Tar jvxf mono-3.0.10.tar.bz2
The installation is then done by installing the "three Steps":
CD mono-3.0.10
./configure--prefix=/usr
make
sudo make install
CD.
Four, mono another installation methodLinux under virtual machines sometimes when installing mono, in the./configure this step, there will be GCC internal compilation error, these errors are often without a clue. In this case, you can install mono by using the following methods:
1, install the mono need to rely on the program
sudo apt-get install build-essential bison gettext pkg-config autoconf libtool automake
2, installation mono3.0 download installation package, decompression, and run the installation of the SH file:
wget http://download.mono-project.com/sources/mono/mono-3.0.10.tar.bz2
TAR-XJVF mono-3.0.0.tar.bz2
CD mono-3.0.0
./autogen.sh
make
sudo make install
CD.
The point to note here is that./autogen.sh can be followed by the installation path parameters, the default is the installation path is:/usr/local
After the installation is successful, view the Mono version:
v. Installation of Jexus
Installation Jexus is relatively simple, can be downloaded to its official website: http://www.linuxdot.net/. The download link is in the "Important download" column on the right side of the official website. We are installing the official version of the Jexus Web server V5.3.1. The installation commands are as follows:
jexus-5.3.1 folder, the folder, there is a install, running install decompression, into the
CD jexus-5.3.1
./install
has been successfully installed.
To view the default configuration for the Jexus below, the configuration file is in/usr/jexus/siteconf/default:
There are examples in the configuration, which are fairly well understood, and there is little to say. Below we create a new index.html page under/var/www/default, which contains some simple HTML code, as follows:
Then go back to/usr/jexus and run the following command:
./jws Start
Curl http://localhost/index.html
As you can see, the results shown are as follows:
The service has been Jexus successfully started.
The next article will introduce the Web programs running. NET under the Jexus server mono.