`

CentOS 5 下安装 Mono 1.9

阅读更多

在/etc/yum.repos.d/ 下建立Mono的更新源 Mono.repo
[Mono]
name=Mono Stack (RHEL_5)
type=rpm-md
baseurl=http://widehat.opensuse.org/repositories/Mono/RHEL_5/
gpgcheck=1
gpgkey=http://widehat.opensuse.org/repositories/Mono/RHEL_5/repodata/repomd.xml.key
enabled=1

,之前直接用的参考连接里说的download.opensuse.org,但老是出现下载超时并无其他镜像可试的错误,如:
Error Downloading Packages:
  mono-core - 1.9.1-3.1.i386: failure: i386/mono-core-1.9.1-3.1.i386.rpm from Mono: [Errno 256] No more mirrors to try.
  glade-sharp2 - 2.10.4-86.1.i386: failure: i386/glade-sharp2-2.10.4-86.1.i386.rpm from Mono: [Errno 256] No more mirrors to try.
  libgdiplus0 - 1.9-2.1.i386: failure: i386/libgdiplus0-1.9-2.1.i386.rpm from Mono: [Errno 256] No more mirrors to try.
  glib-sharp2 - 2.10.4-86.1.i386: failure: i386/glib-sharp2-2.10.4-86.1.i386.rpm from Mono: [Errno 256] No more mirrors to try.
  gtk-sharp2 - 2.10.4-86.1.i386: failure: i386/gtk-sharp2-2.10.4-86.1.i386.rpm from Mono: [Errno 256] No more mirrors to try.

,所以就换成了widehat.opensuse.org,之后
[root@magic yum.repos.d]$ yum install mono* xsp mod_mono
安装后应该得到:
[root@magic yum.repos.d]$ rpm -qa|grep mono
mono-data-oracle-1.9.1-3.1
mono-extras-1.9.1-3.1
mono-nunit-1.9.1-3.1
mono-complete-1.9.1-3.1
mono-data-1.9.1-3.1
mono-data-firebird-1.9.1-3.1
mono-locale-extras-1.9.1-3.1
mono-jscript-1.9.1-3.1
mono-data-sqlite-1.9.1-3.1
mono-core-1.9.1-3.1
mono-data-postgresql-1.9.1-3.1
mono-winforms-1.9.1-3.1
mono-devel-1.9.1-3.1
mono-data-sybase-1.9.1-3.1
mono-web-1.9.1-3.1
mod_mono-1.9-3.1
[root@magic yum.repos.d]$ rpm -qa|grep xsp
xsp-1.9.1-1.3
xsp-devel-1.2.1-1.el5.centos

然后配置mod_mono,测试能否与apache整合:
[root@magic yum.repos.d]$ vim /etc/httpd/conf.d/mod_mono.conf
添加:
Alias /test "/usr/lib/xsp/test"
MonoApplications "/test:/usr/lib/xsp/test"
<Location /test>
        SetHandler mono
</Location>
[root@magic yum.repos.d]$ /usr/sbin/httpd -t
Syntax OK
[root@magic yum.repos.d]$ chown apache.apache /usr/lib/mono/ -Rf
[root@magic yum.repos.d]$ chown apache.apache /usr/lib/xsp/ -Rf
[root@magic yum.repos.d]$ /sbin/service httpd restart
停止 httpd:                                               [确定]
启动 httpd:                                               [确定]
=============================
参考链接:

http://hi.chinaunix.net/index.php?uid-531441-action-viewspace-itemid-30819
http://mono-project.com/Mod_mono

=============================

0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics