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.
Mono 2.10.8 was released on December 19, 2011. The latest version of Jexus 5.0 is the official version of RC3 and will be released soon, bringing many new features. 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.
Jexus V5.0 has the following features:
01、 Support ASP.NET. This is the core function of Jexus. Whether it is stability, ease of use, concurrent carrying capacity, and parallel processing speed, Jexus's support for ASP.NET is excellent;
02、 Support PHP. Jexus comes with Fast-CGI management module, which can support php in two ways: fcgi and php-fpm;
03、 With powerful URL rewriting function based on regular expressions;
04、 Has a strong reverse proxy function. Support multi-target [load balancing] (https://cloud.tencent.com/product/clb?from=10680), support seamless integration of local and remote websites;
05、 Possess powerful streaming media support capabilities, support FLV/F4V video file drag and play, and support Microsoft smooth streaming media technology;
06、 Supporting "server push" technology, equipped with corresponding server-side and client-side development interfaces, it is a powerful tool for developing modern WEB applications;
07、 With controllable "ASP.NET pre-caching", it can maximize the load-bearing capacity and response speed of ASP.NET websites;
08、 Support Https, with SSL encryption [Data Security] (https://cloud.tencent.com/solution/data_protection?from=10680) transmission capability;
09、 With basic and practical intrusion detection function, it can automatically terminate the identified illegal request;
10、 The installation and deployment are very simple, and the operation and use are extremely simple.
yum –y update
Second, install the libraries needed for Mono source installation
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
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
Fourth, 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.
Add things to /lib and /usr/lib, you don't need to modify /etc/ld.so.conf, but you need to adjust ldconfig after finishing, otherwise the library will not be found
When you want to add something to the above two directories, you must modify /etc/ld.so.conf, and then call ldconfig, otherwise it will not be found
For example, if you install a mysql to /usr/local/mysql, mysql has a lot of libraries under /usr/local/mysql/lib, then you need to add a line under /etc/ld.so.conf /usr/local/mysql/lib, after saving ldconfig, the new library can be found when the program is running.
If you want to put lib outside of these two directories, but don't want to add things in /etc/ld.so.conf (or do not have permission to add things). That's okay, that is, export a global variable LD_LIBRARY_PATH, and then when you run the program, you will find the library in this directory. Generally speaking, this is only a temporary solution, used when there is no permission or temporary need.
These things done by ldconfig are all related to running the program, not at all at compiling time. When compiling, you should add -L, so don't get confused.
In short, no matter what changes are made to the library, it is best to ldconfig, otherwise there will be some unexpected results. It won’t take much time, but it will save a lot of things
Five, install Jexus 5.0
1、 download:
The download address is: http://www.linuxdot.net/down/jexus-5.0.1.tar.gz
wget http://www.linuxdot.net/down/jexus-5.0.1.tar.gz
2、 Unzip:
tar -zxvf jexus-5.0.tar.gz
3、 installation:
Jexus installation is very simple, just a process of copying, pasting and registering global assemblies
Note: Please use root identity for all the following operations.
A. Upgrade installation:
B. New installation:
Create a jexus installation folder (usually /etc/jws/), I installed it to /usr/jexus/:
sudo mkdir /usr/jexus/
Copy or move all the files and folders obtained by decompression to the /etc/jws folder
Such as: sudo mv * /usr/jexus/
Set jws.regsvr, jws.start, jws.restart, jws.stop as executable
Register the global assembly (very important)
Enter the destination folder for installing jexus (cd /usr/jexus/), and then run:
sudo ./jws.regsvr
Six, run the test
After copying the Jexus files, Jexus can work normally.
Therefore, if your system has been successfully installed on mono, jexus can be used directly, and even further configuration is completely unnecessary.
If it is an upgrade installation, you only need to start JWS with jws.start, and Jexus can work normally. If it does not work normally, the configuration method of the new version may change. You can check configuration files such as jws.conf.
Emphasis: If your server is installed with other WEB servers and the service is running, please stop it to avoid port conflicts and cause Jexus to fail to start.
If it is a new installation, please first create a default website folder: /var/www/default
Then execute the jws.start command (root identity required) in the Jexus working folder (/usr/jexus/) to start jexus.
If you see the welcome page, you can put the website content or a simple homepage file in the /var/www/default/ folder, and if you visit again, you can see your own website content.
For configuration, please refer to the Readme file that comes with Jexus
Let jexus be able to read Chinese garbled file names 1. Install GBK and other character sets: Step 1: Modify: /var/lib/locales/supported.d/local file, add a line, the content is "zh_CN GBK". (Of course, you can also add "zh_CN GB18030", etc.); Step 2: Run the command sudo locale-gen 2. In the two files jws.start and jws.restart, add an environment variable: "export ONO_EXTERNAL_ENCODINGS="gbk: gb18030""
Note: The above method is applicable to jexus 5.2
reference:
The first choice for server installation, CentOS 6 brings a quiet revolution
Recommend a WEB server with ASP.NET on Linux/Unix—Jexus
The main points of installing mono and Jexus
Install Mono 2.10 CentOS using yum
Developing and Deploying ASP.NET MVC Applications On Ubuntu Linux with Mono, nginx and MySQL
Centos 6.x compile and install mono to build ASP.NET Mvc3 environment
Install LNMP+Mono on Debian to run asp.net program
CentOS 6.2+Mono 2.10.8+jexus 5.0.2+asp.net mvc3 installation and deployment notes
Recommended Posts