Centos6. X using Apache+mono to build an ASP. NET Environment

Source: Internet
Author: User

Mark Time January 19, 2016 09:42:49

Mono is defined by Novell (launched by Xamarin and led by Miguel de Lcaza, a dedicated pioneer · NET open source projects used on Linux

Previously used packages to build the environment, found not too many pits. Many online tutorials, but most do not say there is a hole in the existence, here we do not say the old version of the problem.

Use the official website all the latest software to solve the old version of the bug such as.

Apr and Apr-util are also 1.5 oh.

Software download package 2016 latest Download link (official website yo)

wget Http://apache.fayea.com/httpd/httpd-2.4.18.tar.gzwget http://mirrors.noc.im/apache//apr/ Apr-1.5.2.tar.gzwget Http://mirrors.noc.im/apache//apr/apr-util-1.5.4.tar.gzwget/HTTP Download.mono-project.com/sources/mono/mono-4.2.2.10.tar.bz2wget Http://download.mono-project.com/sources/mod_ Mono/mod_mono-3.12.tar.gzwget Http://download.mono-project.com/sources/xsp/xsp-4.2.tar.gzwget/HTTP Download.mono-project.com/sources/libgdiplus/libgdiplus-4.2.tar.gz

Start talking about installation steps

1. Install the dependency package first

Yum-y Install Bison pkgconfig glib2-devel gettext make libpng-devel libjpeg-devel libtiff-devel libexif-devel giflib-deve L libx11-devel freetype-devel fontconfig-devel cairo-devel libtiff libtiff-devel libjpeg libjpeg-devel giflib Giflib-devel libpng libpng-devel libX11 libx11-devel freetype freetype-devel fontconfig fontconfig-devel libexif Libexif-devel libxft-devel ghostscript-devel gnome-doc-utils unzipyum install glib2-devel libtiff libtiff-devel libjpeg Libjpeg-devel giflib giflib-devel libpng libpng-devel libX11 libx11-devel freetype freetype-devel fontconfig Fontconfig-devel libexif Libexif-devel (may have duplicates)

Installing apache,apache2.4 requires APR and Apr-util 1.4 or higher.

So we'll unpack all 3 packs first.

Then the APR and the Apr-util are renamed Apr and Apr-util and copied into the/usr/local/httpd-2.4.18/srclib/(the specific command below)

#解压就不说了mv apr-1.5.2 aprmv apr-util-1.5.4 apr-utilmv apr/usr/local/httpd-2.4.18/srclib/mv apr-util/usr/local/ HTTPD-2.4.18/SRCLIB/CD httpd-2.4.18./configure--prefix=/usr/local/apache;make; Make install    #Author: v# The boot will have a warning, we first process the warning vim/usr/local/apache/conf/httpd.conf    #找到Servername and cancel the comment, Change the domain name to Localhost#start Apache

So that Apache will be installed successfully.

2. Install Libgdiplus below this is a file showing the image type. If the installation succeeds and the picture shows an exception, it is not installed.

TAR-ZXF LIBGDIPLUS-4.2.TAR.GZCD libgdiplus-4.2./configure--prefix=/usr/local/libgdiplusmake; Make install            #Author: V

3, install the core program Mono (pro-Test time 30 minutes)

TAR-JXVF MONO-4.2.2.10.TAR.BZ2CD mono-4.2.2./configure--prefix=/usr/local/monomake; Make install# set system environment variables for mono export pkg_config_path=/usr/local/mono/lib/pkgconfig: $PKG _config_pathexport path=/usr/ Local/mono/bin: $PATH # Enter mono-v display version OK

4. Installing Apache Mono Module

TAR-ZXF MOD_MONO-3.12.TAR.GZCD mod_mono-3.12./configure--prefix=/usr/local/monomake; Make install

5, Installation xSP

TAR-ZXF XSP-4.2.TAR.GZCD Xsp-4.2./configure=/usr/local/mono

All applications are now installed. Next, set up the associations for these apps, which is to modify the configuration file

6, first give a test page in the Apache publishing directory.

<%@ page language= "C #"%>

7. Configure Mono

Vim/usr/local/mono/etc/mono/config

#添加一行 <dllmap dll= "Gdiplus.dll" target= "/usr/local/libgdiplus/lib/libgdiplus.so.0"/>

8. Modify Apache configuration file

Vim/usr/local/apache/conf/httpd.conf

#这里统一一下加的标准. You only need to add 2 lines of text. author:v# loading Mono module LoadModule mono_module modules/mod_mono.so# Referencing the generated configuration file from Mono Include/usr/local/apache/conf/mod_ Mono.conf

(opening will show 503, viewing Apache Error_log will show that the connection is not monoserver)

9. Modify the Mono configuration file

Vim/usr/local/apache/conf/mod_mono.conf

#在文件末尾添加MonoServerPath/usr/local/mono/bin/mod-mono-server4monoautoapplication enabled# This file defines what I believe you can understand, Syw won't say.

Restarting Apache will show a lot of Hello World at this time. Successfully parse ASPX

Have doubts can in blog message Oh refuse reprint Author:v

Centos6. X using Apache+mono to build an ASP. NET Environment

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.