mono-3.0.2安装指南
install-mono.sh.zip
mono-3.0.2安装指南.pdf
mod_mono.diff.zip
mono-3.0.2安装指南
一见 2012/12/27
目录
1. 前言
1.1. 什么是mono?
mono是一个由Novell公司主持的一个致力于开创.net在Linux、FreeBSD、Mac OS X和Solaris上使用的开源工程。
1.2. 目的
本文档试图以最简单方式阐明mono-3.0.2版本的安装。mono采用的是automake编译方式,包括它所依赖的库,正因为这种依赖,使用得编译安装稍变复杂。
2. 下载网址
mono、xsp和mod_mono的下载网址均为:
http://download.mono-project.com/sources/
3. 依赖关系
1) mono无依赖;
2) xps依赖mono;
3) mod_mono的安装依赖Apache,关于Apache的安装,请参考另一篇文章《apache2.4安装指南》。
4. 安装步骤
4.1. mono
1) ./configure --prefix=/usr/local/mono(注:将mono安装到/usr/local/mono目录下)
2) make
3) make install
4.2. xsp
xps的安装需要注意一下,如果直接以标准的automake方式编译,可能会遇到错误,以下面的步骤操作,可帮助避免错误:
1) export PATH=/usr/local/mono/bin:$PATH(需要用到mono提供的dmcs、gmcs等命令)
2) export PKG_CONFIG_PATH=/usr/local/mono/lib/pkgconfig:$PKG_CONFIG_PATH(XSP依赖mono)
3) sed -i -e 's! test !!' Makefile.am(不编译test,因为test可能编译失败)
4) ./configure --prefix=$XSP_HOME --disable-docs(文档也不编译,减少遇到错误的概率)
5) make
6) make install
4.3. mod_mono
对于mod_mono-2.10版本,如果依赖的是Apache2.4版本,则需要修改mod_mono.c后才可以编译通过,需要修改的地方请参见“附2:mod_mono.diff”。而如果是Apache2.2版本,则不用做任何修改。
1) ./configure --prefix=/usr/local/mod_mono --with-apxs=/usr/local/httpd/bin/apxs(假设将Apache安装在/usr/local/httpd目录下)
2) make
3) make install
5. 修改Apache的httpd.conf
成功安装mono后,需要对Apache的httpd.conf文件进行修改,修改点包括:
1) 加入:include /usr/local/httpd/conf/mod_mono.conf
2) 加入以下内容(这部分需要根据实际进行修改):
<VirtualHost *:80>
ServerName mono.com
ServerAlias mono.com
ServerAdmin web-admin@mono.com
DocumentRoot /usr/local/xsp/lib/xsp/test
# MonoServerPath can be changed to specify which version of ASP.NET is hosted
# mod-mono-server1 = ASP.NET 1.1 / mod-mono-server2 = ASP.NET 2.0
# For SUSE Linux Enterprise Mono Extension, uncomment the line below:
# MonoServerPath mono.com "/opt/novell/mono/bin/mod-mono-server2"
# For Mono on openSUSE, uncomment the line below instead:
MonoServerPath mono.com "/usr/local/xsp/bin/mod-mono-server4"
# To obtain line numbers in stack traces you need to do two things:
# 1) Enable Debug code generation in your page by using the Debug="true"
# page directive, or by setting <compilation debug="true" /> in the
# application's Web.config
# 2) Uncomment the MonoDebug true directive below to enable mod_mono debugging
MonoDebug mono.com true
# The MONO_IOMAP environment variable can be configured to provide platform abstraction
# for file access in Linux. Valid values for MONO_IOMAP are:
# case
# drive
# all
# Uncomment the line below to alter file access behavior for the configured application
MonoSetEnv mono.com MONO_IOMAP=all
#
# Additional environtment variables can be set for this server instance using
# the MonoSetEnv directive. MonoSetEnv takes a string of 'name=value' pairs
# separated by semicolons. For instance, to enable platform abstraction *and*
# use Mono's old regular expression interpreter (which is slower, but has a
# shorter setup time), uncomment the line below instead:
# MonoSetEnv mono.com MONO_IOMAP=all;MONO_OLD_RX=1
MonoApplications mono.com "/:/usr/local/xsp/lib/xsp/test"
<Location "/">
Allow from all
Order allow,deny
MonoSetServerAlias mono.com
SetHandler mono
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary
</Location>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript
</IfModule>
</VirtualHost>
6. 附1:一键脚本
6.1. 一键脚本前提
1) 使用root用户操作;
2) Apache安装在/usr/local/httpd目录下;
3) mono、xps和mod_mono安装包都放在同一个目录下,如:
~/app # ls
mod_mono-2.10.tar.bz2 mono-3.0.2.tar.bz2 xsp-2.10.2.tar.bz2
4) 如果是Apache2.4,还需要将mod_mono.diff文件和安装包放在同一个目录下。
6.2. 一键脚本全文
#!/bin/sh
# Writed by yijian on 2012/12/27
# A key to install mono on linux
export APACHE_HOME=/usr/local/httpd
export MONO_HOME=/usr/local/mono
export XSP_HOME=/usr/local/xsp
export MOD_MONO_HOME=/usr/local/mod_mono
mono=`basename mono-*.tar.bz2 .tar.bz2`
xsp=`basename xsp-*.tar.bz2 .tar.bz2`
mod_mono=`basename mod_mono-*.tar.bz2 .tar.bz2`
basedir=`pwd`
apache_version=`$APACHE_HOME/bin/httpd -V|awk -F"[/ .]" '/Server version/{print $5}'`
echo "Apache version: $apache_version"
# Compile & install mono
echo "tar xjf $mono.tar.bz2"
cd $basedir
#tar xjf $mono.tar.bz2
cd $basedir/$mono
#./configure --prefix=$MONO_HOME
#if test $? -ne 0; then
# exit 1
#fi
#make
#make install
# Compile & install XSP
export PATH=$MONO_HOME/bin:$PATH
export PKG_CONFIG_PATH=$MONO_HOME/lib/pkgconfig:$PKG_CONFIG_PATH
cd $basedir
tar xjf $xsp.tar.bz2
cd $basedir/$xsp
sed -i -e 's! test !!' Makefile.am
./configure --prefix=$XSP_HOME --disable-docs
if test $? -ne 0; then
exit 1
fi
make
if test $? -ne 0; then
exit 1
fi
make install
if test $? -ne 0; then
exit 1
fi
# Compile & install mod_mono
cd $basedir
tar xjf $mod_mono.tar.bz2
if test $apache_version -gt 2; then
if test -f ./mod_mono.diff; then
echo "cp ./mod_mono.diff $mod_mono/src/"
cp ./mod_mono.diff $mod_mono/src/
if test $? -ne 0; then
exit 1
fi
fi
fi
cd $basedir/$mod_mono/src
if test -f ./mod_mono.diff; then
echo "patch mod_mono.c mod_mono.diff"
patch mod_mono.c mod_mono.diff
fi
cd $basedir/$mod_mono
./configure --prefix=$MOD_MONO_HOME --with-apxs=$APACHE_HOME/bin/apxs
if test $? -ne 0; then
exit 1
fi
make
if test $? -ne 0; then
exit 1
fi
make install
if test $? -ne 0; then
exit 1
fi
cd $basedir
echo "finished!"
exit 0
7. 附2:mod_mono.diff
389c389
< return unixd_config.user_id;
---
> return ap_unixd_config.user_id;
399c399
< return unixd_config.group_id;
---
> return ap_unixd_config.group_id;
409c409
< return unixd_config.user_name;
---
> return ap_unixd_config.user_name;
488c488
< rv = unixd_set_global_mutex_perms (xsp->dashboard_mutex);
---
> rv = ap_unixd_set_global_mutex_perms (xsp->dashboard_mutex);
850,857c850
< #if defined(APACHE22)
< return c->remote_addr->port;
< #else
< apr_port_t port;
< apr_sockaddr_port_get (&port, c->remote_addr);
< return port;
< #endif
<
---
> return c->client_addr->port;
863d855
< #if defined(APACHE22)
865,869d856
< #else
< apr_port_t port;
< apr_sockaddr_port_get (&port, r->connection->local_addr);
< return port;
< #endif
1981c1968
< info.remote_ip_len = strlen (r->connection->remote_ip);
---
> info.remote_ip_len = strlen (r->connection->client_ip);
2029c2016
< ptr += write_string_to_buffer (ptr, 0, r->connection->remote_ip, info.remote_ip_len);
---
> ptr += write_string_to_buffer (ptr, 0, r->connection->client_ip, info.remote_ip_len);
阅读(1089) | 评论(1) | 转发(0) |
-->
mono-3.0.2安装指南的更多相关文章
- Mono 4.0 Mac上运行asp.net mvc 5.2.3
Mono 4.0 已经发布,二进制包已经准备好,具体的发布说明参见:http://www.mono-project.com/docs/about-mono/releases/4.0.0/. 今天在Ma ...
- Mono 3.0.12 支持可移植类库
Mono 3.0.12已于6月19日发布.对跨平台开发者而言,对可移植类库的支持可能是该版本最重要的变化.该技术可以使一个DLL支持.NET.Windows Store.Windows Phone.S ...
- 从Mono 4.0观C# 6.0部分新特性
Struct的默认构造函数 struct Complex { public Int32 Re { get; set; } public Int32 Im { get; set; } public Co ...
- CentOS 7.2下安装Mono 5.0
微软Build2017大会期间.NET领域的.NET core之外,就是Visual Studio For Mac,大家都知道Visual Studio For Mac 是基于Mono运行的,Mono ...
- grid control 11.1.0.1 安装指南
grid control 11.1.0.1 安装指南 废话少说,进入正题 系统版本号 [root@gridcontrol ~]# lsb_release -a LSB Version: :bas ...
- HBase-0.98.0和Phoenix-4.0.0分布式安装指南
目录 目录 1 1. 前言 1 2. 约定 2 3. 相关端口 2 4. 下载HBase 2 5. 安装步骤 2 5.1. 修改conf/regionservers 2 5.2. 修改conf/hba ...
- Mono.Cecil - 0.6
原文:Mono.Cecil - 0.6 项目地址:Mono.Cecil 项目描述:In simple English, with Cecil, you can load existing manage ...
- Mono 4.0 发布,开源跨平台 .Net 框架
快速使用Romanysoft LAB的技术实现 HTML 开发Mac OS App,并销售到苹果应用商店中. <HTML开发Mac OS App 视频教程> 土豆网同步更新:http: ...
- Storm 0.9安装指南
Storm 0.9.2安装指南 0 Storm0.9的亮点 引用网上的描述: "Storm 0.9.0.1版本的第一亮点是引入了netty transport.Storm网络传输机制实现可插 ...
随机推荐
- ACM学习历程—HDU5667 Sequence(数论 && 矩阵乘法 && 快速幂)
http://acm.hdu.edu.cn/showproblem.php?pid=5667 这题的关键是处理指数,因为最后结果是a^t这种的,主要是如何计算t. 发现t是一个递推式,t(n) = c ...
- C#程序性能优化
http://blog.csdn.net/scalzdp/article/details/34421639 程序中我们每一丝动作都会加大程序运行的负担,当刚开始学习程序的时候常常不会去考虑程序运行的效 ...
- 在asp.net中使JQuery的Ajax用总结
自从有了JQuery,Ajax的使用变的越来越方便了,但是使用中还是会或多或少的出现一些让人短时间内痛苦的问题.本文暂时总结一些在使用JQuery Ajax中应该注意的问题,如有不恰当或者不完善的地方 ...
- C# XML反序列化与序列化举例:XmlSerializer
using System; using System.IO; using System.Xml.Serialization; namespace XStream { /// <summary&g ...
- ExtJs中获得当前选中行号(Grid中多选或者是单选)及Grid的反选(取消选中行)
多选,如何获得每行的行号: function getlineNum(){ var sm=titleGird.getSelectionModel(); // 获得grid的SelectionMod ...
- 14.Selenium+Python使用火狐浏览器问题解决
一开始使用的是IE浏览器作为自动化浏览器,但是由于想学习无头模式,故选择FireFox作为浏览器,以下是遇到的相关问题: 1.简单代码 from selenium import webdriver d ...
- QtCreator开启-O编译优化的方式
首先,编译优化必须是在Release模式下进行,保证程序没有任何bug的条件下进行执行.编译优化能极大提升程序的运行效率,级别越高速度越快,但是对代码健壮性要求也越高! 选择编译release模式,在 ...
- 基于OpenCV的火焰检测(一)——图像预处理
博主最近在做一个基于OpenCV的火焰检测的项目,不仅可以检测图片中的火焰,还可以检测视频中的火焰,最后在视频检测的基础上推广到摄像头实时检测.在做这个项目的时候,博主参考了很多相关的文献,用了很多种 ...
- adb基本命令总结(Android Debug Bridge)
adb 是PC和设备连接的桥梁,可以通过adb对devices进行相关操作 adb devices 列出你的devices adb kill-server 杀掉ad ...
- Struts2 全局结果集-全局result节点设置,package设置abstract=true的实现
转自:https://blog.csdn.net/u013161278/article/details/41855273 如果我们所有的action均有可能跳到相同的页面,则不妨使用全局result. ...