Browse > Home / Linux, Open Source / Installing Mono (1.9) and Lighttpd on Debian(lenny)

| Subcribe via RSS

Installing Mono (1.9) and Lighttpd on Debian(lenny)

april 27th, 2008 Posted in Linux, Open Source
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

This guide explains how to install the latest version of Mono on Debian (lenny) (with Lighttpd). Mono is a software platform designed to allow developers to easily create cross platform applications. It is an open source implementation of Microsoft’s .Net Framework based on the ECMA standards for C# and the Common Language Runtime

1. Installing required packages

apt-get install build-essential bison pkg-config libglib2.0-dev bzip2 gawk libpng12-dev libexif-dev libx11-dev libjpeg62-dev libfontconfig1-dev libtiff4-dev libgif-dev lighttpd libxrender-dev

2. Downloading and unpacking required Mono sources

Goto http://ftp.novell.com/pub/mono/sources-stable/ and download:

  • mono-1.9.tar.bz2
  • libgdiplus-1.9.tar.bz2
  • xsp-1.9.tar.bz2

to /usr/src on your system.

Unpack them:

cd /usr/src

tar jxf mono-1.9.tar.bz2

tar jxf libgdiplus-1.9.tar.bz2

tar jxf xsp-1.9.tar.bz2

3. Configuring, building and installing

First we will start with Mono itself:

cd /usr/src/mono-1.9

./configure –prefix=/usr

make

make install

Next libgdiplus:

cd /usr/src/libgdiplus-1.9

./configure –prefix=/usr

make

make install

And finally xsp:

cd /usr/src/xsp-1.9

./configure –prefix=/usr

make

make install

4. Configuring Lighttpd

This configuration for lighttpd allowes php to be run in parallel with mono.

FastCGI configuration:

$HTTP["url"] !~ “\.php$” {
include “conf.d/mono.conf”

fastcgi.server = (
“” => ((
“socket” => mono_shared_dir + “fastcgi-mono-server”,
“bin-path” => mono_fastcgi_server,
“bin-environment” => (
“PATH” => “/bin:/usr/bin:” + mono_dir + “bin”,
“LD_LIBRARY_PATH” => mono_dir + “lib:”,
“MONO_SHARED_DIR” => mono_shared_dir,
“MONO_FCGI_LOGLEVELS” => “Standard”,
“MONO_FCGI_LOGFILE” => mono_shared_dir + “fastcgi.log”,
“MONO_FCGI_ROOT” => mono_fcgi_root,
“MONO_FCGI_APPLICATIONS” => mono_fcgi_applications
),
“max-procs” => 1,
“check-local” => “disable”

))
)

}

conf.d/mono.conf:

# Add index.aspx and default.aspx to the list of files to check when a
# directory is requested.
index-file.names += ( “index.aspx”, “default.aspx”, “Default.aspx” )

### The directory that contains your Mono installation.
# The “bin” subdir will be added to the PATH and the “lib” subdir will be
# added to the LD_LIBRARY_PATH.
# For a typical system-wide installation on Linux, use:
var.mono_dir = “/usr/”
# For an installation in a user account (lighttpd need read/exec access):
#var.mono_dir = “/home/username/mono-1.2.6/”

### A directory that is writable by the lighttpd process.
# This is where the log file, communication socket, and Mono’s .wapi folder
# will be created.
# For a typical system-wide installation on Linux, use:
var.mono_shared_dir = “/tmp/”
# For an installation in a user account (dir must exist and be writable):
#var.mono_shared_dir = “/home/username/lighttpd_scratch/”

### The path to the server to launch to handle FASTCGI requests.
# For ASP.NET 1.1 support use:
#var.mono_fastcgi_server = mono_dir + “bin/” + “fastcgi-mono-server”
# For ASP.NET 2.0 support use:
var.mono_fastcgi_server = mono_dir + “bin/” + “fastcgi-mono-server2″

### The root of your applications
# For apps installed under the lighttpd document root, use:
var.mono_fcgi_root = server.document-root
# For apps installed in a user account, use something like:
#var.mono_fcgi_root = “/home/username/htdocs/”

### Application map
# A comma separated list of virtual directory and real directory
# for all the applications we want to manage with this server. The
# virtual and real dirs. are separated by  a  colon.
var.mono_fcgi_applications = “/:.”

That should do the trick, you have now enabled mono 1.9 in lighttpd and can now proceed with some asp.net development! :)

Sources:

http://www.mono-project.com/FastCGI_Lighttpd

2 Responses to “Installing Mono (1.9) and Lighttpd on Debian(lenny)”

  1. coupon websites Says:

    qaLENH Valium


  2. symptoms of bronchitis Says:

    Great goods from you, man. I have take into account your stuff prior to and you’re simply too wonderful. I actually like what you have acquired right here, certainly like what you are saying and the way wherein you assert it. You make it entertaining and you still care for to stay it sensible. I cant wait to read much more from you. This is actually a tremendous web site.


Leave a Reply