Centos5.5 install mono2.10.8 and jexus 5.0 to open a new chapter in the Linux platform. NET application

Source: Internet
Author: User

Note: This article is only for personal record use and is also for your reference. If you are interested, you can discuss it together.

Installation Steps

1. Yum-y update2, install the required library 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-devel3, library libgdipluscd/usr/local/src/that installs mono required/

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

(The error "Configure: Error: no acceptable C compiler found in $ path" is reported in config to solve the problem of GCC installation)

(After GCC is installed, run configure again, and then report the error "Configure: Error: *** libpng12 not found. see http://www.libpng.org/pub/png/libpng.html#, Cause Analysis: LibTIFF, libjpeg, libgif, LibPNG, and other libraries are missing. install these libraries: yum install LibTIFF-devel libjpeg-devel giflib-devel libpng-devel libx11 libX11-devel FreeType-devel fontconfig-devel libexif exlibif-devel)

 

Make

Make install

4. 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

(In config, "Configure: Error: You need to install g ++" is reported. Cause Analysis: G ++ is not installed. Solution: Yum install gcc-C ++

"Configure: Error: You need to install bison" is reported in config. Cause Analysis: Bison is not installed. Solution: Yum install bison

)

Make

Make install

5. Install jexus 5.0

CD/usr/local/src/

Wget http://www.linuxdot.net/down/jexus-5.0.2.tar.gz

Tar-zxvf jexus-5.0.2.tar.gz

 

New installation:
1) create a jexus installation folder (usually/etc/JWS/). I will install it to/usr/jexus /:
Sudo mkdir/usr/jexus/

2) copy or move all the extracted files and folders to the/etc/JWS folder.
For example: sudo MV */usr/jexus/

3) set JWS. regsvr, JWS. Start, JWS. Restart, and JWS. Stop to executable (chmod + x JWS. Start)
4) register the global assembly (* very important *)
Go to the jexus installation target folder (CD/usr/jexus/) and run:
Sudo./JWS. regsvr

 

 

 

6. Run the test
After copying the jexus file, jexus can work normally.
Therefore, if your system is successfully installed with mono, jexus can be used directly, or even further configuration is not required.

To upgrade and install JWS, you only need to use JWS. start starts JWS, and jexus can work normally. If it cannot work properly, the configuration method of the new version may change. You can check JWS. conf and other configuration files.

NOTE: If your server has another Web server installed and the service is running, stop it to prevent jexus from starting due to port conflict.

If the installation is completely new, first create a default website Folder:/var/www/default (mkdir/var/www/default)

Then run the JWS. Start command (root identity required) in the jexus working folder (/usr/jexus/) to start (./jexus. Start ).
1. Use cat log/JWS. log to check if any error occurs in the JWS log file.
2. If there is no error message, visit this server to see if there is a jexus welcome page, such as accessing http: // server IP Address/info:

 

Set jexus to run automatically after startup

Reference VI/etc/rc. Local
Add in the last line
/Usr/local/jexus/JWS. Start

 

 

Jexus usage Configuration:

 

Now there are two configuration files in/etc/JWS. The first one is JWS under the JWS directory. conf, the other is the default file in/JWS/siteconf/, JWS. the conf name is fixed and points to the website configuration file and website log file path. By default, it is specified as the website configuration file in siteconf, which automatically reads configuration information from all files in the directory, for example, I have two more files: The first default file and the second mysite file. The content of the default file is as follows:

# For default

Port = 80

Root = // var/www/Default

Hosts = *

... The following are the comments starting with #, which can be selected.

The content in mysite is as follows:

Port = 81

Root = // var/www/mysite

Hosts = *

... The following is the # initial annotation information, which can be selected.

It indicates that different ports are mapped to different directories. Note root = // var/www ...., there is a space in the middle of the two // "// var ..... ", the first/indicates the absolute directory of the port. When the space is followed by the user input/absolute directory, it is mapped to the location of the file directory.

Finally, run mono/etc/JWS/jws.exe to enable the JWS process. You can Ctrl + C to stop the service. After the service is enabled, put your website programs in the/var/www/directory, for example, under the default folder and under the mysite folder.

 

Jexus mvc3 Configuration

 

1. Install mono v2.10.2;

2. Install jexus v4.2.4

3. Modify JWS. conf and add the following sentence: runtime = v4.0.30319.

4. Modify the website configuration in the siteconf folder and add the following sentence: rewrite = ^/$/home/index.

 

 

Configure the Asp.net MVC environment in Mono

1. Install mono2.10.2 or later with the source code

2. in C: \ Program Files (x86) \ Microsoft ASP. net \ ASP. net MVC 3 \ assemblies and c: \ Program Files (x86) \ Microsoft ASP. net \ ASP. net web pages \ V1.0 \ assemblies directory, find the following DLL to copy to the bin directory of the website respectively

System.Web.Mvc.dllSystem.Web.Razor.dllSystem.Web.WebPages.dllSystem.Web.WebPages.Deployment.dllSystem.Web.WebPages.Razor.dll 

3. Copy the following three files to the bin directory of the mono installation directory/opt/MONO/lib/MONO/4.0

Microsoft.Web.Infrastructure.dllSystem.Web.Extensions.dll 

4. Possible solutions:

Error: storage scopes cannot be created when _ appstart is executing.

Cause: Microsoft. Web. Infrastructure. dll was localcopied to the bin directory.

Resolution: delete Microsoft. Web. Infrastructure. dllAnd use the mono version.

Error: Invalid il code in system. Web. Handlers. scriptmodule:. ctor (): Method body is empty.

Cause: system. Web. Extensions. dll somehow gets localcopied to the bin directory.

Resolution: delete system. Web. Extensions. dllAnd use the mono version.

Error: the classes in the module cannot be loaded. Description: HTTP 500. Error Processing request.

Cause: system. Web. webpages. Administration. dll was localcopied to the bin directory.

Resolution: delete system. Web. webpages. Administration. dllAnd unreference it

Error: cocould not load type

'System. web. webpages. razor. razorbuildprovider 'from assemb' system. web. webpages. razor, version = 1.0.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35 ′. description: HTTP 500. error Processing request.

Cause: system. Web. Razor. dll is invalid upt or missing(Or x64 instead of x32 or vice-versa)...

Resolution: GetUninitialized uptedVersion of system. Web. Razor. dll and localcopy to the bin directory

Unfortunately, the physical framework has limited support.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.