http://www.linuxdot.net/
Http://www.cnblogs.com/wander1129/archive/2011/12/16/mono.html
Installation steps: First, access to open source related programs:
1. Install and upgrade the required libraries using the Yum command that comes with the CentOS Linux system:
Sudo-s
Lang=c
Yum-y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-deve L zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel bison pkgconfig glib2-devel gettext make
2, download the program source code package:
Nginx installation package:: http://nginx.org/en/download.html
Mkdir-p/down
Cd/down
wget http://nginx.org/download/nginx-1.1.11.tar.gz
Mono Download: official website: http://download.mono-project.com/sources/mono/(please download the latest version)
wget http://download.mono-project.com/sources/mono/mono-2.10.7.tar.bz2
Libgdiplus Download: http://download.mono-project.com/sources/libgdiplus/(please download the latest version)
wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.tar.bz2
XSP Download: http://download.mono-project.com/sources/xsp/(please download the latest version)
wget http://download.mono-project.com/sources/xsp/xsp-2.10.2.tar.bz2
Pcre Download (nginx required Pcre Library): ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/(please click the latest version)
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.21.tar.gz
Second, install and compile Nginx:
1. Install the Pcre library required for installation of Nginx:
Cd/down
Tar zxvf pcre-8.21.tar.gz
CD pcre-8.21/
./configure
Make && make install
Cd.. /
2. Create WWW users and groups
/usr/sbin/groupadd www
/usr/sbin/useradd-g www www
Mkdir-p/data0/web
chmod +w/data0/web
Chown-r Www:www/data0/web
3. Installing Nginx
Tar zxvf nginx-1.1. 11.tar.gz
CD nginx-1.1. 11/
./configure--user=www--group=www--prefix=/opt/nginx--with-http_stub_status_module--with-http_ssl_module
Make && make install
Cd.. /
4. Open 80 Port:
80-j ACCEPT
Start Nginx
/opt/nginx/sbin/nginx
Enter the access address on the browser http://192.168.1.1 (according to the personal local address page), normal will see the default Nginx page
Iii. Installing and Compiling mono
1, installation Libgdiplus:
Cd/down
TAR-JXVF libgdiplus-2.10.tar.bz2
CD libgdiplus-2.10
Make && make install
"/opt/mono/lib" >/etc/ld.so.conf.d/mono.conf
2. Install Mono:
TAR–JXVF mono-2.10. 7.tar.bz2
CD mono-2.10. 7
./configure--prefix=/opt/mono
Make && make install//time here is longer
echo Export pkg_config_path=/opt/mono/lib/pkgconfig: $PKG _config_path>>~/.bash_profile
echo Export ld_library_path=/opt/mono/lib: $LD _library_path>>~/.bash_profile
echo Export Path=/opt/mono/bin: $PATH >>~/.bash_profile
SOURCE ~/.bash_profile
Enter Mono-v If you have mono version information, the installation is successful.
3, installation XSP:
Cd/down
TAR–JXVF xsp-2.10. 2.tar.bz2
./configure--prefix=/opt/mono
Make && make install
Four, configuration Nginx
Vi/opt/nginx/conf/nginx.conf
server {
Listen 80;
server_name localhost;
Location/{
Root/data0/web;
Index index.html index.htm;
Fastcgi_index Default.aspx;
127.0.0.1:9000;
Include Fastcgi_params;
}
}
Five, configuration Fastcgi_params add the following two lines:
Vi/opt/nginx/conf/fastcgi_params
Fastcgi_param path_info "";
Fastcgi_param script_filename $document _root$fastcgi_script_name;
Six, start:
1. Restart Nginx:
/opt/nginx/sbin/nginx-s Reload
2. Start Fastcgi_mono Server
FASTCGI-MONO-SERVER2/APPLICATIONS=/:/DATA0/WEB/SOCKET=TCP:127.0. 0.1:9000 &
Seven, test:
Create a new ASP. NET Web project to upload to the/data0/web directory, test run.
Build Nginx + Mono running asp.net[on CentOS]