Linux mono环境,linux+mono+xsp+apache搭建asp.net环境

linux+mono+xsp+apache搭建asp.net环境

发布时间:2020-10-09 18:20:35

来源:51CTO

阅读:3101

作者:huilinux

环境:

系统:centos 6.5  x64

libgdiplus-2.10.9

mono-3.4.0

jexus-5.5.2

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

1、安装必要的库

# yum install gcc

gcc-c++ bison pkgconfig glib2-devel gettext make libpng-devel libjpeg-devel

libtiff-devel libexif-devel giflib-devel libX11-devel freetype-devel

fontconfig-devel  cairo-devel httpd

httpd-devel

2、安装libgdiplus

# wget http://download.mono-project.com/sources/libgdiplus-1.1/libgdiplus-2.10.9.tar.bz2

# tar -jxvf

libgdiplus-2.10.9.tar.bz2

# cd

libgdiplus-2.10.9

#

./configure --prefix=/usr/local/mono

#

make && make install

# echo  "/usr/local/mono/lib/" >

/etc/ld.so.conf.d/mono.conf

# ldconfig

3、安装mono

# wget  http://download.mono-project.com/sources/mono/mono-3.4.0.tar.bz2

# tar -jxf

mono-3.4.0.tar.bz2

# cd mono-3.4.0

#

./configure --prefix=/usr/local/mono/

#

make && make install

# echo export

PKG_CONFIG_PATH=/usr/local/mono/lib/pkgconfig:$PKG_CONFIG_PATH >>

~/.bash_profile

# echo export

LD_LIBRARY_PATH=/usr/local/mono/lib:$LD_LIBRARY_PATH >> ~/.bash_profile

# echo export

PATH=/usr/local/mono/bin:$PATH >> ~/.bash_profile

# source

~/.bash_profile

# mono -V有版本信息,则安装成功。

4、安装xsp

# wget https://github.com/mono/xsp/archive/3.0.11.tar.gz

# tar -zxf 3.0.11

# cd xsp-3.0.11/

#

./autogen.sh --prefix=/usr/local/mono/

xsp-3.0

Build Environment

Install prefix:          /usr/local/mono

Datadir:                 /usr/local/mono/share

Libdir:                  /usr/local/mono/lib

Build documentation:     yes

Mono 2.0 compiler:       /usr/local/mono/bin/gmcs

Mono 4.0 compiler:       /usr/local/mono/bin/dmcs

Target frameworks:       .NET 2.0, .NET 4.0

Build SQLite samples:    yes

#

make && make install

测试启动一个临时的asp.net

#

/usr/local/mono/bin/xsp4

xsp4

Listening on

address: 0.0.0.0

Root directory:

/usr/local/mono/bin

Listening on port:

8080 (non-secure)

Hit Return to stop

the server.

20689aeac548df2354886dd674cacf1b.png

5、安装mod_mono

# wget http://download.mono-project.com/sources/mod_mono/mod_mono-2.10.tar.bz2

# tar -jxf

mod_mono-2.10.tar.bz2

# cd mod_mono-2.10

#

./configure --prefix=/usr/local/mono

Configuration

summary for mod_mono

* Installation prefix = /usr/local/mono

* Apache version = 2.2

* Apache modules directory =

/usr/lib64/httpd/modules

* apxs = /usr/sbin/apxs

* apr-config = /usr/bin/apr-1-config

* apu-config = /usr/bin/apu-1-config

* CFLAGS = -g -O2 -I/usr/include/httpd -O2

-g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector

--param=ssp-buffer-size=4 -m64 -mtune=generic -Wformat-security

-fno-strict-aliasing -pthread

-I/usr/include/apr-1

-pthread  -I/usr/include/apr-1

* Verbose logging (debug) = no

* GCOV options used = no

* Profiling enabled = no

* mono prefix =

/usr/local/mono/lib/pkgconfig/../..

* Default MonoApplicationsConfigDir =

/etc/httpd/conf/mod-mono-applications

#

make && make install

# vim

/etc/httpd/conf/mod_mono.conf

文件最后添加

MonoServerPath

/usr/local/mono/bin/mod-mono-server4

# vim

/etc/httpd/conf/httpd.conf

Include conf.d/*.conf系统默认存在

Include conf/mod_mono.conf新添加

6、测试

# vim

/var/www/html/default.aspx

in linux"%>

#  /etc/init.d/httpd restart

34fc3f06ef179b2a92717e9460f89141.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值