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网络传输机制实现可插 ...
随机推荐
- 团队开发中Git冲突解决
正常来说我们团队协作开发过程中,冲突是常有的事,下面介绍下本人在开发中的解决办法. 冲突的主要原因就是由于我们开发人员在分支的同一位置写入了不一样的代码,然后合并到主干上导致我们冲突. 方法: 当冲突 ...
- LeetCode Shopping Offers
原题链接在这里:https://leetcode.com/problems/shopping-offers/description/ 题目: In LeetCode Store, there are ...
- JSP Servlet中的Request和Response的简单研究
本文参考了几篇文章所得,参考目录如下: 1.http://www.cnblogs.com/guangshan/p/4198418.html 2.http://www.iteye.com/problem ...
- set和get的用法
import { Map} from 'immutable'; let a = Map({ select: 'users', filter: Map({ name: 'Cam' }) }) let b ...
- 第9章 DOM对象,控制HTML元素
学习地址:http://www.imooc.com/learn/10
- PyCharm 2017.2.2+PyQt5+Python3.6.0
PyCharm注册地址 http://idea.imsxm.com/ 安装的是miniconda激活虚拟环境执行pip install PyQt5pip install PyQt5-tools 从官网 ...
- 转载:trap 的用法 /etc/init.d/rcS trap :1 2 3 24
在有些情况下,我们不希望自己的shell脚本在运行时刻被中断,比如说我们写得shell脚 本设为某一用户的默认shell,使这一用户进入系统后只能作某一项工作,如数据库备份, 我 们可不希望用户使用c ...
- Day3-Python基础3--函数参数及调用
一.return返回值 return的两个作用: 1)需要用一个变量来接受程序结束后返回的结果 2)它是作为一个结束符,终止程序运行 def test(): print("我是return前 ...
- HTTP:HTTP清单
ylbtech-HTTP:HTTP清单 1.返回顶部 2.返回顶部 3.返回顶部 4.返回顶部 5.返回顶部 6.返回顶部 作者:ylbtech出处:http://ylbt ...
- 2014.12.22 几个有用的oracle正则表达式
SELECT REGEXP_REPLACE('LSS12345', '[^0-9]') FROM DUAL 结果:12345 '[^0-9]'中的^表示‘非’上述表达式的含义是“将LSS12345中的 ...