|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们!1、猎取开源相干步伐
1、使用CentOSLinux体系自带的yum下令装置、晋级所需的步伐库:
sudo-s
LANG=C
yum-yinstallgccgcc-c++autoconflibjpeglibjpeg-devellibpnglibpng-develfreetypefreetype-devellibxml2libxml2-develzlibzlib-develglibcglibc-develglib2glib2-develbzip2bzip2-develbisonpkgconfigglib2-develgettextmake
2、下载步伐源码包
Nginx装置包:下载地点:http://nginx.org/en/download.html
mkdir-p/down
cd/down
wgethttp://nginx.org/download/nginx-1.1.11.tar.gz
Mono下载:官网:http://download.mono-project.com/sources/mono/(请下载最新版)
wgethttp://download.mono-project.com/sources/mono/mono-2.10.7.tar.bz2
libgdiplus下载:http://download.mono-project.com/sources/libgdiplus/(请下载最新版)
wgethttp://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.tar.bz2
xsp下载:http://download.mono-project.com/sources/xsp/(请下载最新版)
wgethttp://download.mono-project.com/sources/xsp/xsp-2.10.2.tar.bz2
pcre下载(Nginx所需的pcre库):FTP://ftp.csx.cam.ac.uk/pub/software/programming/pcre/(请下最新版)
wgetftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.21.tar.gz
2、装置编译Nginx
1、装置装置Nginx所需的pcre库
cd/down
tarzxvfpcre-8.21.tar.gz
cdpcre-8.21/
./configure
make&&makeinstall
cd../
2、创立www用户和组
/usr/sbin/groupaddwww
/usr/sbin/useradd-gwwwwww
mkdir-p/data0/web
chmod+w/data0/web
chown-Rwww:www/data0/web
3、装置Nginx
tarzxvfnginx-1.1.11.tar.gz
cdnginx-1.1.11/
./configure--user=www--group=www--prefix=/opt/nginx--with-http_stub_status_module--with-http_ssl_module
make&&makeinstall
cd../
4、开放80端口
iptables-IINPUT-ptcp--dport80-jACCEPT
启动nginx
1
/opt/nginx/sbin/nginx
在扫瞄器上输出会见地点http://192.168.1.1(依据团体本机地点页定),一般会看到默许nginx页面
3、装置编译Mono
1、装置libgdiplus
cd/down
tar-jxvflibgdiplus-2.10.tar.bz2
cdlibgdiplus-2.10
./configure--prefix=/opt/mono
make&&makeinstall
echo"/opt/mono/lib">/etc/ld.so.conf.d/mono.conf
ldconfig
2、装置Mono
tar–jxvfmono-2.10.7.tar.bz2
cdmono-2.10.7
./configure--prefix=/opt/mono
make&&makeinstall//此处工夫较长
echoexportPKG_CONFIG_PATH=/opt/mono/lib/pkgconfig:$PKG_CONFIG_PATH>>~/.bash_profile
echoexportLD_LIBRARY_PATH=/opt/mono/lib:$LD_LIBRARY_PATH>>~/.bash_profile
echoexportPATH=/opt/mono/bin:$PATH>>~/.bash_profilesource~/.bash_profile
输出mono-V若有mono版本信息,则装置乐成.
3、装置XSP
cd/down
tar–jxvfxsp-2.10.2.tar.bz2
./configure--prefix=/opt/mono
make&&makeinstall
4、设置Nginx
vi/opt/nginx/conf/nginx.conf
server{
listen80;
server_namelocalhost;
location/{
root/data0/web;
indexindex.htmlindex.htm;
fastcgi_indexDefault.aspx;
fastcgi_pass127.0.0.1:9000;
includefastcgi_params;
}
}
5、设置fastcgi_params增添上面两行
vi/opt/nginx/conf/fastcgi_params
fastcgi_paramPATH_INFO"";
fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;
6、启动
1、重启nginx
/opt/nginx/sbin/nginx-sreload
2、启动fastcgi_mono办事器
fastcgi-mono-server2/applications=/:/data0/web/socket=tcp:127.0.0.1:9000&
7、测试
新建一个asp.netWeb项目上传至/data0/web目次下,测试运转。
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的好朋友们! |
|