方案一、Nginx+mono+ fastcgi-mono-server

nginx_web發表於2012-06-11

 

 

    在這個方案裡我使用了最古老的fastcgi-mono-server,雖然它已經古老,但是畢竟也是一個古老的解決方案。

 

環境部署

 

    在環境部署中我們安裝了monofastcgi-mono-server,當然根據具體的應用可能還要安裝具體的軟體包。

 

安裝mono

 

[root@nas ~]# http://mono.ximian.com/daily/mono-20110609.tar.bz2

[root@nas ~]# tar -jxvf mono-20110609.tar.bz2

[root@nas ~]# cd mono-20110609

[root@nas mono-20110609]# ./configure --prefix=/usr/local/

 

    ……

 

        mcs source:    mcs

        olive source: 

 

   Engine:

        GC:            sgen and bundled Boehm GC with typed GC and parallel mark

        TLS:           __thread

        SIGALTSTACK:   yes

        Engine:        Building and using the JIT

        oprofile:      no

        BigArrays:     no

        DTrace:        no

        Parallel Mark: yes

        LLVM Back End: no (dynamically loaded: no)

 

    Libraries:

        Moon Profile:  no (boehm)

        MonoDroid:     no

        MonoTouch:     no

        JNI support:   IKVM Native

        libgdiplus:    assumed to be installed

        zlib:          system zlib

[root@nas mono-20110609]# make

[root@nas mono-20110609]# make install

  

檢視安裝情況

 

[root@nas mono-2.10.2]# type mono

mono is hashed (/usr/local/bin/mono)

[root@nas mono-2.10.2]# mono -V 

Mono JIT compiler version 20110609 (tarball 2011年 10月 23日 星期日 10:27:17 CST)

Copyright (C) 2002-2011 Novell, 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)

   

安裝fastcgi-mono-server

 

下載fastcgi-mono-server

 

[root@nas ~]# wget http://wcoserver.googlecode.com/  \

> files/fastcgi-mono-server.tar.gz

[root@nas ~]# tar -zxvf fastcgi-mono-server.tar.gz

[root@nas ~]# cd fastcgi-mono-server

   

    或者使用下載:

 

[root@nas ~]# svn co http://mono-soc-2007.googlecode.com/svn/trunk/brian/FastCgi/ fastcgi-mono-server

A    fastcgi-mono-server/fastcgi-mono-server.in

A    fastcgi-mono-server/Mono.FastCgi.snk

A    fastcgi-mono-server/fastcgi-mono-server2.in

 

    ……

 

A    fastcgi-mono-server/NEWS

A    fastcgi-mono-server/README

取出修訂版 1533

   

安裝fastcgi-mono-server

 

    執行autogen.sh安裝指令碼:

 

[root@nas fastcgi-mono-server]# ./autogen.sh   --prefix=/usr/local/fastcgi-mono-server

Running aclocal  ...

Running automake --gnu  ...

Running autoconf ...

Running ./configure --enable-maintainer-mode --enable-compile-warnings --prefix=/usr/local/fastcgi-mono-server ...

checking build system type... i686-pc-linux-gnu

checking host system type... i686-pc-linux-gnu

checking target system type... i686-pc-linux-gnu

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking whether to enable maintainer-specific portions of Makefiles... yes

checking for a BSD-compatible install... /usr/bin/install -c

checking for pkg-config... /usr/bin/pkg-config

checking pkg-config is at least version 0.9.0... yes

checking for MONO... configure: error: Package requirements (mono >= 1.1.9) were not met:

 

No package 'mono' found

 

Consider adjusting the PKG_CONFIG_PATH environment variable if you

installed software in a non-standard prefix.

 

Alternatively, you may set the environment variables MONO_CFLAGS

and MONO_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.

   

安裝出錯,根據提示設定環境變數:

 

[root@nas fastcgi-mono-server]# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:/usr/local/lib

   

    再次進行配置:

 

[root@nas fastcgi-mono-server]# ./autogen.sh   --prefix=/usr/local/fastcgi-mono-server

Running aclocal  ...

Running automake --gnu  ...

Running autoconf ...

Running ./configure --enable-maintainer-mode --enable-compile-warnings --prefix=/usr/local/fastcgi-mono-server ...

checking build system type... i686-pc-linux-gnu

checking host system type... i686-pc-linux-gnu

checking target system type... i686-pc-linux-gnu

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for gawk... gawk

checking whether make sets $(MAKE)... yes

checking whether to enable maintainer-specific portions of Makefiles... yes

checking for a BSD-compatible install... /usr/bin/install -c

checking for pkg-config... /usr/bin/pkg-config

checking pkg-config is at least version 0.9.0... yes

checking for MONO... yes

checking for mcs... /usr/local/bin/mcs

checking for gmcs... /usr/local/bin/gmcs

checking for mono... /usr/local/bin/mono

checking for gacutil... /usr/local/bin/gacutil

configure: creating ./config.status

config.status: creating Makefile

config.status: creating src/Makefile

config.status: creating src/AssemblyInfo.cs

config.status: creating fastcgi-mono-server

config.status: creating fastcgi-mono-server2

Now type `make' to compile

       

    執行配置指令碼通過,繼續安裝:

 

[root@nas fastcgi-mono-server]# make

[root@nas fastcgi-mono-server]# make install

   

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27043155/viewspace-732477/,如需轉載,請註明出處,否則將追究法律責任。

相關文章