Today, we will show you how to configure the Mono2.10 + Nginx environment on UbuntuServer11.10. Refer to the document Ubuntu10.04servermono2.4.4nginx (successful in practice ).
Today, we will show you how to configure the Mono 11.10 + Nginx environment on Ubuntu Server 2.10.
References
Ubuntu 10.04 server mono2.4.4 nginx (practical success) http://www.linuxidc.com/Linux/2012-05/60177.htm
Ubuntu 11.04 + Mono + Nginx run Asp.net HelloWorld http://www.linuxidc.com/Linux/2012-05/60180.htm
First, install Ubuntu Server. This time, we used the new version October released in 11.10. The first time we installed this version, we encountered a problem, that is, we chose the Chinese language for installation. The result was prompted during command execution.
locale: Cannot set LC_CTYPE to default locale: No such file or directorylocale: Cannot set LC_MESSAGES to default locale: No such file or directorylocale: Cannot set LC_ALL to default locale: No such file or directory
Is the problem of language settings, if you have encountered this problem, the solution please refer to this article http://www.linuxidc.com/Linux/2012-05/60178.htm
The key step is to generate the missing region file to solve the problem:
www.linuxidc.com @ubuntu:~$ cd /usr/share/localeswww.linuxidc.com @ubuntu:/usr/share/locales$ lsinstall-language-pack remove-language-packwww.linuxidc.com @ubuntu:/usr/share/locales$ sudo ./install-language-pack en_USGenerating locales... en_US.UTF-8... doneGeneration complete.dpkg-trigger: dpkg-trigger must be called from a maintainer script (or with a --by-package option)
Next, install the mono runtime environment. When searching for information, I found that some of the notes frequently used in Ubuntu are C #. Therefore, the Ubuntu release contains mono, because it is a server version, it is not installed by default. You can run the following command to install it:
sudo apt-get install mono-runtime
The APT tool will be automatically downloaded from the software repository and installed in the ready mono environment. After completing the verification, you can:
mono --version
ECHO is like this
root@www.linuxidc.com ubuntu:/usr/share/nginx/www# mono --versionMono JIT compiler version 2.10.5 (Debian 2.10.5-1)Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notifications: epoll Architecture: x86 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: Included Boehm (with typed GC and Parallel Mark)
Next we need to install some basic support libraries to support the running of our programs.
Sudo apt-get install mono-gmcs libmono-system-data2.0-cil libmono-system-messaging2.0-cil libmono-system-ldap2.0-cil libmono-system-messaging2.0-cil libmono-system-runtime2.0-cil libmono-system-web2.0-cil libmono-system-web-mvc1.0-cil libmono-wcf3.0-cil
Optional:
Libmono-Oracle2.0-cil libmono-npgsql2.0-cil libmono-nunit2.4-cil libmono-sharpzip2.84-cil
After these libraries are installed, we can install the FastCGI interface of mono's. Net platform to prepare for running. Net Web programs.
sudo apt-get install mono-fastcgi-server2 mono-fastcgi-server4
After the installation is complete, let's test:
fastcgi-mono-server4 /version
The ECHO is:
root@www.linuxidc.com ubuntu:/usr/share/nginx/www# fastcgi-mono-server4 /versionfastcgi-mono-server4.exe 2.10.0.0(c) 2007 Brian NickelFastCGI Backend for XSP