Installation steps:
1. Obtain open-source programs:
1. Use the yum Command provided by CentOS Linux to install and upgrade the required libraries:
Sudo-s
LANG = C
Yum-y install gcc-c ++ autoconf libjpeg-devel libpng-devel freetype-devel libxml2 libxml2-devel zlib-devel 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 Site: 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 (pcre Library required for Nginx): ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ (Please download the latest version)
Wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.21.tar.gz
Ii. Install and compile Nginx:
1. Install the pcre Library required for Nginx installation:
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
Mkdir-p/data0/web
Chmod + w/data0/web
Chown-R www: www/data0/web
3. Install 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 Port 80:
Iptables-I INPUT-p tcp -- dport 80-j ACCEPT
Start nginx
/Opt/nginx/sbin/nginx
Enter the access address http: // 192.168.1.1 in the browser (based on the personal address page). The default nginx page is displayed normally.
Iii. Install and compile Mono
1. Install libgdiplus:
Cd/down
Tar-jxvf libgdiplus-2.10.tar.bz2
Cd libgdiplus-2.10
./Configure -- prefix =/opt/mono
Make & make install
Echo "/opt/mono/lib">/etc/ld. so. conf. d/mono. conf
Ldconfig
2. Install Mono:
Tar-jxvf mono-2.10.7.tar.bz2
Cd mono-2.10.7
./Configure -- prefix =/opt/mono
Make & make install // This process takes a long time
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
If mono-V has mono version information, the installation is successful.
3. Install XSP:
Cd/down
Tar-jxvf xsp-2.10.2.tar.bz2
./Configure -- prefix =/opt/mono
Make & make install
4. Configure 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;
Fastcgi_pass 127.0.0.1: 9000;
Include fastcgi_params;
}
}
5. Configure fastcgi_params and add the following two lines:
Vi/opt/nginx/conf/fastcgi_params
Fastcgi_param PATH_INFO "";
Fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name;
6. Start:
1. Restart nginx:
/Opt/nginx/sbin/nginx-s reload
2. Start the fastcgi_mono Server
Fastcgi-mono-server2/applications =/:/data0/web/socket = tcp: 127.0.0.1: 9000 &
VII. test:
Create an asp.net web project and upload it to the/data0/web directory for testing.
From wandrew.900