Install Mono 3.2 and Jexus 5.4 under CentOS 6.3

**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:

  1. **Speed: **For ASP.NET web pages, Jexus is faster when accessed under high pressure; for static files, Jexus is much faster than XSP, and the requirements and impact on the disk are N times smaller;
  2. **Functional aspects: ** XSP is developed based on ASP.NET testing work, with monotonous functions, while Jexus is developed as a real WEB service used in the production environment with comprehensive functions. Therefore, xsp and Jexus are functionally comparable
  3. **In terms of stability: ** Jexus has good fault tolerance and automatic error correction capabilities, and can run uninterrupted for a long time, while XSP is a single-process program without any automatic error correction mechanism and cannot maintain uninterrupted operation.
  4. **Security: ** Jexus has a key intrusion detection function, XSP does not have any security detection function, there is no comparison;
  5. **Multi-site support: ** XSP supports one site, Jexus supports any number of sites.

Jexus for linux has the following features:

  1. Support for multiple operating systems: Jexus was originally designed to be a "cross-platform ASP.NET WEB server". Since IIS is already an excellent platform for ASP.NET on Windows systems, the current Jexus supports Linux and FreeBSD, etc. Non-Windows system is the main design goal. For this reason, Jexus is of great significance in terms of ASP.NET construction on platforms such as Linux/FreeBSD.
  2. High performance: "High performance" is an important design goal of Jexus. Although Jexus runs based on the Mono environment, Jexus is not entirely composed of Mono's .NET components. For key performance-related code, Jexus very cleverly uses a large number of outstanding features of Linux/Unix itself, ensuring the performance advantages of Jexus from the code layer. .
    At the same time, Jexus's framework features also provide a basic guarantee for high performance. Jexus is not like XSP. Pure HTML also needs to be processed by ASP.NET. Unlike servers such as Apache and Nginx, it needs to support ASP.NET indirectly through plug-ins. Jexus uses HMTL static file processing module and ASP.NET. The processing module, static file cache mechanism, epoll/poll data transmission mechanism, etc. are highly integrated, starting from the architecture itself to maximize the processing capacity and transmission speed of the WEB server.
  3. Security: The Jexus kernel contains a security monitoring mechanism, and most malicious visits will be directly prohibited by Jexus before entering the website. This is another major feature of Jexus that is different from other WEB servers. Therefore, Jexus is especially suitable for those with security requirements. Use of higher corporate websites or government websites.
  4. Stability: In terms of operating mechanism, in the Jexus system, there is a management unit that specifically detects the execution status of the work process. Any process exit or any ASP.NET website application domain exit will be discovered by the management unit and restarted. This ensures that Jexus can work uninterrupted 7*24 hours; in terms of the program itself, the Jexus program code strives to be concise and has few bugs. At the same time, each version of Jexus must undergo strict stress testing before being officially released. The stability factor has been completely eliminated almost before the official release.
  5. Powerful: Jexus supports URL rewriting, reverse proxy for multi-target servers, PHP, GZIP compression transmission, and can use different ports, different virtual paths, and different domain names to set up any number of websites. These functional elements indicate Jexus is a complete and powerful WEB server.
  6. Installation, configuration, and operation are extremely simple, the service is community-based, various problems can be quickly dealt with, and there is a good follow-up service support ability.

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 the system, install the compilation environment, and prepare for the compilation of Mono source code. Mono 3.2 source code compilation requires a Mono 2.4 or higher environment in the system, so we compile and install according to the 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)" 2.10. 8 Environment, let me briefly list below:

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:

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.

  1. The source code compilation mono is upgraded to the latest version 3.2. I used Git to install it. The compiled code from Mono's trunk is version 3.3:

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:

  1. Install Jexus 5.4: Starting from version 5.3.1, the installation process of Jexus has been simplified. Two new scripts are built-in. They are "install" and "upgrade", corresponding to the original "install" and "upgrade". Automate the Jexus installation process. The installation and upgrade method of jexus itself has not undergone more changes, so for users who are accustomed to the use of the version before 5.3.1, you can still use the previous installation method.
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

  1. Put a website to test it, I will put a Mono compatible code version of a little loach here, you can get it from here https://github.com/geffzhang/LoachsMono

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

Install Mono 3.2 and Jexus 5.4 under CentOS 6.3
Install Mono 2.10.8 and Jexus 5.0 under 32- and 64-bit CentOS 6.0
CentOS 7 install Mono and MonoDevelop
Install and configure keepalived under CentOS 5.9
Compile and install LAMP under Centos 5.2
Install Python3 and ansible under CentOS8
Install and use docker under CentOS 6.8
Install Python3 and Py under CentOS7
Install centos7 and connect
Install mysql5.7 under CentOS7
Install ActiveMQ under Centos7
Install PostgreSQL12 under CentOS7
Install CentOS under VMware
Install mysql under Centos 7
Install Jenkins under Centos 7
Install MariaDB under MariaDB Centos7
Install mysql5.1 under CentOS6.5
Install svn and configuration through yum under CentOS
centos7 install python3 and ipython
Know Linux and install CentOS
CentOs7.3 compile and install Nginx 1.9.9
CentOS6.5 install Java 8 and Tomcat8
Centos compile and install Git
Install Oracle11gR2 database under CentOS6.9
Install MySQL under Linux (CentOS 7)
CentOS7 install python3 and pip3
Install Java JDK8 under CentOS6
CentOS6.5 install Java 8 and Tomcat8
CentOS6 install and crack Jira 7
CentOS6.5 install Java 8 and Tomcat8
Centos7 compile and install ntp-4.2.8p11
CentOS 6.9 compile and install python
CentOS6 install and crack confluence
CentOS 6 compile and install python 3
Install MongoDB database under CentOS7
CentOS6 install and crack Jira 7
CentOS 6.8 under linux install mongodb
Install Mesos tutorial under CentOS7
Compile and install Lnmp shell script under Linux centos
Centos 7 install jdk and package service service
CentOS7 yum install and start mysql
Install and use dig under ubuntu/debian
CentOS Yum compile and install MySQL 5.6
CentOS 8 install Git and basic configuration
Use Nginx and u under CentOS
Upgrade OpenSSL and OpenSSH under CentOS7
CentOS 6.x compile and install Nginx
CentOS7 compile and install L(A|N)MP environment
CentOS7.3 install iptables and detailed use
CentOS quickly install Python3 and pip3
CentOS7 yum install and start mysql
Install and deploy Gerrit under Ubuntu
CentOS 8 - install and configure NFS service
Install Harbor mirror warehouse under CentOS
Install nodejs and npm under Ubuntu 16.04
Centos7 and centos8 install mysql5.6 5.7 8.0 so simple
Centos7 uninstall openJdk, and install JDK1.8
Java-JDK installation and configuration under CentOS
Install the latest OpenCV4.3 under Centos8
1.5 Install Centos7
CentOS7 install and use SQL Server