First, the preparatory work
1. Upgrading related libraries
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 (since the desktop was previously installed , so do not take this step, the specific need to be tested)
2. Related software download
Nginx Download: http://nginx.org/
(official website), the version used here is 1.8.1, so download the package nginx-1.8.1.tar.gz
Mono Download: http://download.mono-project.com/sources/mono/
, the version used here is 3.10.0, so download the package mono-3.10.0.tar.bz2
Libgdiplus Download: http://download.mono-project.com/sources/libgdiplus/
, the version used here is 3.8, so download the package libgdiplus-3.8.tar.gz
XSP Download: http://download.mono-project.com/sources/xsp/
, the version used here is 3.8, so download the package xsp-3.8.tar.gz
Pcre Download: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
, the version used here is 8.37, so download the package pcre-8.37.tar.gz
Statement: Mono, Libgdiplus, XSP 4.0 and above are beyond the scope of system support.
Second: Install related software
1. Install the Pcre library (Nginx dependency)
Tar zxvf pcre-8.37.tar.gz (unpack package)
CD pcre-8.37 (switch directory, go to pcre extract directory)
./configure
Make
Make install
2. Create users and groups for Nginx
/usr/sbin/groupadd www/usr/sbin/useradd-g www wwwmkdir-p/data0/webchmod +w/data0/web
Chown-r Www:www/data0/web
3. Installing Nginx
Tar zxvf nginx-1.8.1.tar.gz (unpack package)
CD nginx-1.8.1 (switch directory, go to Nginx extract directory)
./configure--user=www--group=www--prefix=/opt/nginx--with-http_stub_status_module--with-http_ssl_module
Make
Make install
Start Nginx:/opt/nginx/sbin/nginx
Error: If cannot find Libpcre.so.1, then enter/lib64 directory, do soft connection: Ln-s libpcre.so.0.0.1 libpcre.so.1
4. Installing Libgdiplus
Tar zvxf libgdiplus-3.8.tar.gz (unpack package)
CD libgdiplus-3.8 (switch directory, go to Libgdiplus extract directory)
./configure--prefix=/opt/mono
Make
Make install
echo "/opt/mono/lib" >/etc/ld.so.conf.d/mono.conf (placed under standard library)
Ldconfig (Load Library)
5. Install Mono
Tar jxvf mono-3.10.0.tar.bz2 (unpack package)
CD mono-3.10.0 (switch directory, enter mono extract directory)
./configure--prefix=/opt/mono (Time longer)
Make
Make install
echo Export pkg_config_path=/opt/mono/lib/pkgconfig: $PKG _config_path>>~/.bash_profileecho Export LD_LIBRARY_ Path=/opt/mono/lib: $LD _library_path>>~/.bash_profile
echo Export Path=/opt/mono/bin: $PATH >>~/.bash_profile
SOURCE ~/.bash_profile (make configuration Effective)
Verify installation: Use MONO-V to see relevant information.
6. Install XSP:
Tar jxvf xsp-3.8.tar.gz (unpack package)
CD xsp-3.8 (switch directory, go to xsp extract directory)
./configure--prefix=/opt/mono
Make
Make install
Third, configuration related software
1. Configure Nginx
vim/opt/nginx/conf/nginx.conf (enter config file)
server {
Listen 80;
server_name 192.168.1.81; --Native IP
Location/{
Root/data0/web; --Home directory of the website
Index index.html index.htm; --Home
Fastcgi_index index.aspx; --Site default home page
Fastcgi_pass 127.0.0.1:9000;
Include Fastcgi_params;
}
}
2. Configure Fastcgi_params
Vim/opt/nginx/conf/fastcgi_params
Fastcgi_param Path_info "";
Fastcgi_param script_filename $document _root$fastcgi_script_name;
--Add these two lines to the configuration file
Iv. software Startup
1. Loading Nginx
/opt/nginx/sbin/nginx-s Reload
2. Start Fastcgi_mono
fastcgi-mono-server2/applications=/:/data0/web/socket=tcp:127.0.0.1:9000 &
V. Testing the WHOLE
Upload related programs to the website home Directory/data0/web (test program connection: Http://pan.baidu.com/s/1pL4Dh8J)
Test the following program to display the page correctly:
The following Web program displays the page correctly:
Centos6.5+mono+nginx Run ASP.