**For the latest update, please see: **Centos 7.0 install Mono 3.4 and Jexus 5.6
2012 At the beginning of the year, I wrote an article "[Install Mono 2.10.8 and Jexus 5.0 under 32 and 64-bit CentOS 6.0] (http://cloud.tencent.com/developer/article/1024874?from=10680)". Mono 3.2 was released on July 24, 2013. The 3.2 version has many new features that are expected. Refer to "[Cross-platform .NET Runtime Environment Mono 3.2 New Features] (https://cloud.tencent.com/developer/article/1024875?from=10680)", this article is mainly an update of this article.
CentOS is a RHEL-based Linux distribution. Its purpose is to provide a free and free enterprise-level Linux distribution. The name of CentOS comes from "Community ENTerprise Operating System". From the name, you can know that this is a set of operating systems led by the community and targeted at enterprise users.
At present, CentOS is the most widely used set of Linux distributions among the hosts for web server purposes. According to statistics, currently about 30% of Linux servers use CentOS. Many books and websites will also cite CentOS as the operating interface when introducing Linux operating methods. Usually CentOS will launch a new version after RHEL launches a new version, after a short period of modification and testing, and its version number will mostly follow the version number of RHEL. For example, the current latest version of CentOS 6, its corresponding The RHEL version is RHEL 6.
Jexus web server for linux is a high-performance WEB server based on .NET compatible environment, running on Linux/unix operating system and supporting ASP.NET as its core function. It is used to replace Apache+mod_mono, Nginx+FastCgi program operation ASP.NET. Jexus not only has the iconic features of cross-platform ASP.NET server, but also has a series of important functions and proprietary features such as kernel-level security monitoring, intrusion detection, URL rewriting, and fileless routing.
What is the difference between Mono Xsp and Jexus:
Jexus for linux has the following features:
This article is a brief installation tutorial for CentOS 6.3 + Mono 3.2 + Jexus 5.4 on the Windows Azure cloud platform:
1、 Update system
yum –y update
2、 Install Mono source code installation required libraries
yum -y install gcc gcc-c++ bison pkgconfig glib2-devel gettext make libpng-devel libjpeg-devel libtiff-devel libexif-devel giflib-devel libX11-devel freetype-devel fontconfig-devel cairo-devel
When executing yum to update the system, the following error occurred:
Running transaction check
Package gc.x86_64 0:7.1-10.el6 will be installed
Package glibc-headers.x86_64 0:2.12-1.80.el6_3.5 will be installed
Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.80.el6_3.5.x86_64
Processing Dependency: kernel-headers for package: glibc-headers-2.121.80.el6_3.5.x86_64
Finished Dependency Resolution Error: Package: glibc-headers-2.12-1.80.el6_3.5.x86_64 (updates) Requires: kernel-headers
Error: Package: glibc-headers-2.12-1.80.el6_3.5.x86_64 (updates)
Requires: kernel-headers >= 2.2.1
You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows: kernel-2.6.32-220.13.1.el6.x86_64 has missing requires of kernel-firmware >= ('0 ', '2.6.32', '220.13.1.el6')
Solution: modify the file vi /etc/yum.conf and add a comment before exclude=kernel*. This parameter means to exclude the installation or update of the software at the beginning of the kernel, and we need to rely on the kernel-related software glibc- to install gcc headers-2.12-1.80.el6_3.5.x86_64.
3、 Install the GDI+ compatible API library Libgdiplus required by Mono
cd /usr/local/src/
wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.tar.bz2
tar -jxvf libgdiplus-2.10.tar.bz2
cd libgdiplus-2.10
. /configure --prefix=/usr
make
make install
4.1、 Install Mono from source
cd /usr/local/src/
wget http://download.mono-project.com/sources/mono/mono-3.2.1.tar.bz2
tar -jxvf mono-3.2.1.tar.bz2
. /configure --prefix=/usr
make
make install
Enter mono -V If there is mono version information, the installation is successful.
4.2、 Git install mono
cd /usr/local/src/
wget http://download.mono-project.com/sources/mono/mono-2.10.8.tar.bz2
tar -jxvf mono-2.10.8.tar.bz2
cd mono-2.10.8./configure --prefix=/usr
make
make install
Enter mono -V If there is mono version information, the installation is successful.
If it is a 64-bit version of CentOS, after installing Jexus 5 later, the following error will occur during startup:
Sender: jws.exe, Sender TypeName: AppDomain
Exception Source: jws, TargetSite Name: A
Message is:
An exception was thrown by the type initializer for Mono.Unix.Native.Stdlib
StackTrace is:
at A.G.A(System.String[] A)[0x00000]in<filename unknown>:0
IsTerminating: True
It is recommended that you run the command ldconfig. After installing mono, it is recommended that you all ldconfig. (The purpose of the ldconfig command is mainly to search for the shared dynamic link library in the default search directories (/lib and /usr/lib) and the directories listed in the dynamic library configuration file /etc/ld.so.conf ( The format is as described above, lib*.so*), and then create the connection and cache files required by the dynamic loader (ld.so). The cache file defaults to /etc/ld.so.cache, and this file is saved. Good order list of dynamic link library names.)
Another point is also very important. To compile Mono, specify the installation to /usr (./configure --prefix=/usr). If you install to a folder that the system does not understand at all, ldconfig alone will not work. You must add the path in the /etc/ld.so.conf file or /etc/ld.so.conf.d before ldconfig.
Install the dependent packages required by mono before installation:
yum –y install build-essential automake autoconf libtool bison libglib2.0-dev libfreetype6-dev libfontconfig-dev gettext libgif-dev libtiff4-dev libpng12-dev libexif-dev libx11-dev libxft-dev libjpeg-dev
git clone git://github.com/mono/mono.git
. /autogen.sh --prefix=/usr [Pay attention to the target folder, be sure to specify the same place, it is strongly recommended to use the --prefix=/usr parameter]
make
After compiling, enter the source folder where mono 2.10.8 is installed and run "make uninstall" as an administrator.
cd /usr/local/src/mono-2.10.8
sudo make uninstall
Then enter the mono-3.2.0 directory
sudo make install
Run the mono -V command and you can see the following result indicating that the installation was successful:
wget http://www.linuxdot.net/down/jexus-5.4.tar.gz
tar -zvxf jexus-5.4.tar.gz
cd jexus-5.4
sudo ./install
Installation is complete~! ! ! When executing the install script, jexus is installed to /usr/jexus/ by default. If you want to install to other directories, you can add a directory parameter when executing the script (such as sudu install /usr/local/jexus/). For the upgrade is to execute the upgrade script.
Start jexus to check whether it is normal
cd /usr/jexus
sudo ./jws start
Seeing the log that Jexus has been successfully started, we can also check it through the browser: http://mono.cloudapp.net/info
After compiling with VS, upload it to the server via Winscp. For details, please refer to "Use WinSCP Software to Transfer Files in Windows and Linux".
Visit http://mono.cloudapp.net/ to see our success:
**For the latest update, please refer to: **Centos 7.0 install Mono 3.4 and Jexus 5.6
Recommended Posts