Writing /home/infogasy/domains/wiki.infogasy.net/public_html/data/cache/d/d7636e1c92d11f24d5876798a152901e.xhtml failed

19/04/05 Mpanoratra : FRAZ

Fanodinana page ASP.Net @ Linux

Ireo zavatra ilaina

  • Mono Runtime 1.0.4
  • Apache module mod_mono-1.0.4
  • XSP Web Server xsp-1.0.4

Ireo rehetra ireo dia afaka alainao @ rohy ofisialy : http://www.mono-project.com/downloads/index.html

Fomba fametrahana

Ny nametrahana an’i Mono Runtime dia t@ alalan’ny fonosana efa vita ho an’distribution fa betsaka loatra ny dependance dia mandreraka be ny manao azy tsirairay. Distribution Mandrake no nanaovana ny fametrahana.

Mono Runtime

Ny Mono runtime dia napetraka tamin’ny alalan’ny fonosana efa vita rafitra. Toy izao ny baiko nametrahana azy raha ho an’ny Distribution Mandrake .

  # urpmi mono

Andrana tsotsotra hijerena raha mandeha tsara. Hanandrana hanao programme faran’izay tsotra :

using System;
class Hello {
    static void Main(string[[]] args) {
        Console.WriteLine ("Tonga soa eto @ IFG");
    }
}

Rehefa vita io dia omentsika anarana ilay fichier atao hoe hello.cs ohatra ary toy izao ny fanandramana azy.Ny anaran’ny compilateur dia mcs dia ny mpandefa azy dia mono :

$ mcs hello.cs

Ary raha handefa azy kosa dia :

$ mono hello.exe
$ Tonga soa eto @ IFG

mod_mono-1.0.4

Ny nametrahana ny mod_mono dia tamin’ny alalan’ny code source .Mametraka module ho an’apache izy ity ka mila ny apache extension script (apxs) hanamboarana azy.Miaraka @ fonosana apache-devel ny apxs. Ny baiko eo ampanaovana compilation dia toy izao:

    $./configure --with-apxs2 na apxs raha Apache 1
    $ make
    $ sudo make install

Marihina fa manamboatra module mod_mono.so ho an’i apache izy eto ka mila tenenina izany Apache ao @ fichier de configuration hampiasa azy io.Ny mod_mono dia manao asa proxy eo @ apache sy xsp (mod-mono-server).

xsp-1.0.4

Ny nametrahana ny xsp dia tamin’ny alalan’ny code source ihany koa.Marihina fa mampiasa ny Assembly System.Web.dll izy ity . Ao anatin’ny fonosana mono-web no misy azy io izay apetrany ao @ GAC (Global Assembly Cache) n’i Mono avy eo.

    $./configure --prefix=/usr
    $ make
    $ sudo make install

Fandefasana

Configuration ho an’i Apache

Ho an’i Apache dia ao anaty httpd.conf ny mikasika ny configuration rehetra. Afaka mampiasa include koa anefa dia tondroina fotsiny hoe aiza no misy ny fichier de configuration hafa tiana alaina.

Ny fametrahany ny fichier include rehetra dia ataony ao anatin’ny conf.d ohatra hoe /etc/httpd/conf.d/ dia ao anatin’io fotsiny no asiana fichier misy extension .conf dia alain’apache daholo izay ao.

Hanampy fichier iray isika izany atao hoe mod_mono.conf izay toy izao no atao ao anatiny :

Raha Apache 1.3 dia toy izao :

    LoadModule mono_module /usr/lib/apache/1.3/mod_mono.so

    AddModule mod_mono.c

    Alias /mono "/usr/local/share/doc/xsp/test"

    MonoApplications "/mono:/usr/local/share/doc/xsp/test"

    <Directory /usr/local/share/doc/xsp/test>

      SetHandler mono

    <IfModule mod_dir.c>

    DirectoryIndex index.aspx

    </IfModule>

    </Directory> 

Raha Apache 2.0 dia toy izao :

    LoadModule mono_module modules/mod_mono.so

    Alias /mono "/usr/local/share/doc/xsp/test"

    MonoApplications "/mono:/usr/local/share/doc/xsp/test"

    <Directory /usr/local/share/doc/xsp/test>

       SetHandler mono

    </Directory> 

Fandefasana ny mod-mono-server

Misy fanitsiana kely izy ity raha oharina tamin’ny version teo aloha fa @ izao dia tsy mila alefa tanana instony ny mod-mono-server fa anjaran’ny module mod_mono no miantso azy .

Fanandramana azy

Dia rehefa vita ireo dia azonao andramana @ izay. Raha miheno @ port 8080 ohatra ny apache dia azonao atao ny manao hoe : http://localhost:8080/mono/index.aspx

Misy ohatra maromaro ao anatiny ao.Ka anjaranao ny mitrandraka azy.

Izay ary ny @ iny fa dia hita tokoa aloha izany @ zao fa dia azo atao ny manodina tsara ny ASP.Net @ Linux miaraka @ mono.Izay antenaina ny hiroboroboiny hatrany.


LahatsoratraDotNET

 

fanodinanaasp.netaminnylinux.txt · Novaina farany:: 2008/09/11 12:43