如果使用ubuntu,可使用apg-get安装完mono,xsp,mod_mono,我的yum源并没有找到mono可安装,网上也没找到CentOS的源,最后选择下载编译安装。
*上的文章Install Mono on Centos5.5 using YUM 提到的链接已经失效,评论里有个rpm包 我没验证,不知是否可以。
下载编译安装Mono
参考:http://wiki.phonicuk.com/Installing-Mono-in-CentOS-5-x.ashx
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
#安装编译的需组件,可以先rpm -qa检测是否已经安装
yum install bison gettext glib2 freetype fontconfig libpng libpng-devel libX11 libX11-devel glib2-devel libgdi* libexif glibc-devel urw-fonts java unzip gcc gcc-c++ automake autoconf libtool make bzip2 wget
#下载编译安装mono
cd /usr/local/src
wget http://download.mono-project.com/sources/mono/mono-2.10.8.tar.gz
tar zxvf mono-2.10.8.tar.gz
cd mono-2.10.8
./configure --prefix=/usr/local
make && make install
下载编译安装xsp
wget http://download.mono-project.com/sources/xsp/xsp-2.10.tar.bz2
tar jxvf xsp-2.10.tar.bz2
cd xsp-2.10
./configure --prefix=/usr/local
make && make install
configure时出错,需设置环境变量 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig,否则可能导致下一步安装mod_mono不完整,找不到mod-mono-server
下载编译安装mod_mono
wget http://download.mono-project.com/sources/mod_mono/mod_mono-2.10.tar.bz2
tar jxvf mod_mono-2.10.tar.bz2
cd mod_mono-2.10
./configure --prefix=/usr/local
make && make install
configure时出错,"apxs was not found, DSO compilation will not be available", 需安装apxs (apxs是apache的一个辅助工具软件,它通常用来为apache安装扩展模块。)
yum search apxs, 找到合适的包,再安装。或者直接安装httpd-devel也可。
apahe配置文件详解
http://www.phpchina.com/resource/manual/apache/index.html
mod mono的配置
http://www.mono-project.com/Mod_mono
MonoServerPath /usr/local/bin/mod-mono-server4
# httpd.conf
Include /etc/httpd/conf/mod_mono.conf
Mono的安装挺简单,最麻烦的是mod mono的配置,centos跟ubuntu有所差别,直接安装跟编译安装也有差别,不过大体一致,细节还需再摸索。
参考:http://www.cnblogs.com/SW515/p/3180871.html