Ubuntu 14.04 configure Mono + Jexus to run ASP. NET
General Office, ASP. NET is a technology developed by Microsoft and a website server. It can dynamically create them on the Web server when using HTTP request documents, dynamic website development depends on programs running in IIS. But in terms of cost, Linux (open-source) systems cost much less than the Windows Server series. Therefore, more enterprises are willing to use Linux as the server system. Because ASP. NET depends on IIS, some entrepreneurial companies will filter out ASP. NET in terms of technology selection. To enable ASP. NET to run on Linux systems, Mono came into being. With the Jexus server, ASP. NET cross-platform deployment has become a reality.
Install and configure Mono + Jexus. The current Linux version is Ubuntu14.04 64-bit.
I. Update the system
Command: sudo apt-get update
Sudo apt-get upgrade
2. Build a compilation environment
Command: sudo apt-get install build-essential automake autoconf bison gettext libtool libglib2.0-dev libfreetype6-dev libfontconfig-dev
Iii. Install dependency Libraries
Run the command: sudo apt-get install libgif-dev libtiff4-dev libpng12-dev libexif-dev libx11-dev libxft-dev libjpeg-dev
4. Download and compile the library Libgdiplus that is required by Mono and is compatible with APIs.
Use command: wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.tar.bz2
Tar jvxf libgdiplus-2.10.tar.bz2
Cd libgdiplus-2.10
./Configure -- prefix =/usr
Make
Sudo make install
Cd .. (back to the previous directory)
5. Download and compile and install Mono
Use command: wget http://download.mono-project.com/sources/mono/mono-4.0.3.20.tar.bz2 (you can download by choosing the desired Mono version in the http://download.mono-project.com/sources/mono/, note: Select mono 2.10.8 or later)
Tar jvxf mono-4.0.3.20.tar.bz2
Cd mono-4.0.3.20
./Configure -- prefix =/usr
Make
Sudo make install
Cd .. (back to the previous directory)
Use mono-V to view the Mono version to check whether the installation is successful, as shown in figure
6. Download and install Jexus
Use command: wget http://www.linuxdot.net/down/jexus-5.6.4.tar.gz
Tar jvxf jexus-5.6.4.tar.gz
Cd jexus-5.6.4
Sudo./install (Jexus is installed in the/usr/jexus folder by default)
Cd/usr/jexus
Sudo./jws start (start Jexus)
When OK is displayed, it indicates that Jexus has been successfully run. Access http: // server IP address (default port 80)/info and see Welcome to Jexus! That is, success.
Here, you may think that this is not an ASP. NET runs on Jexus. Now we create ASP in Visual Studio. NET empty Web project, create an index in it. the form of aspx. Upload the package to/var/www/hellolinux on the Linux Server (tip: sudo mkdir: Create a folder name)
Run the command cd/usr/jexus/siteconf on Linux.
Sudo vi hellolinux
Input: port = 8080
Root = // var/www/hellolinux
: Wq save it
Cd/usr/jexus
./Jws restart
When OK is displayed, access http: // server IP: 8080 (jexus has the default homepage configuration)
In this way. ASP. NET runs on Linux through Mono + Jexus.
You may also like the following Mono and Jexus articles:
Deploy Mono 4 and Jexus 5.6 On CentOS 7
Deploying. NET, Mono and DNX in Ubuntu 15.04 and CentOS 7
Configure ASP. NET (Apache + Mono) in Linux (Ubuntu/openSUSE/CentOS)
Configure the Linux (Apache) + Mono to run asp.net
How to upgrade Mono
Idea about running ASP. NET 4 website in Mono 3.0
Install Mono and Jexus on Ubuntu to build the. NET Runtime Environment