centos7 安装mono、mod_mono

centos7 安装mono、mod_mono

1.安装依赖

1
yum -y install gcc-c++ cmake mcstrans

2.编译安装

1
2
3
4
5
tar xf mono-5.12.0.226.tar.bz2 -C /usr/src/
cd /usr/src/mono-5.12.0.226/
./configure --prefix=/usr/local/mono
make && make install
mozroots --import --sync #同步证书

3.配置环境变量

1
2
echo "PATH=/usr/local/mono/bin:$PATH" >> /etc/profile
source /etc/profile

4.安装xsp

1
2
3
4
5
#指定mono包的路径
export PKG_CONFIG_PATH=/usr/local/mono/lib/pkgconfig:$PKG_CONFIG_PATH
tar xf xsp-4.7.1.tar.gz -C /usr/src/
./configure --prefix=/usr/local/mono
make && make install

4.编译安装mod_mono

1
2
3
4
yum -y install httpd-devel-2.4.6-99.el7.centos.1
cd /usr/src/mod_mono-3.13
./configure --prefix=/usr/local/mono --with-mono-prefix=/usr/local/mono
make && make install