linux上搭建asp网站

CentOS下Nginx与Mono配置教程
本文详细介绍在CentOS系统中如何配置Nginx服务器与Mono运行环境,包括依赖包安装、Nginx与Mono的下载、编译及安装过程,以及配置Nginx与fastcgi_mono服务器的具体步骤。

1、需要安装一些依赖包
yum –y update
yum -y 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
2.centos6.5上(尽量不要去更改包的版本,坑很多)
cd /usr/local/src
(1)Nginx安装包:下载地址:http://nginx.org/en/download.html
wget http://nginx.org/download/nginx-1.12.2.tar.gz
tar zxvf nginx-1.12.2.tar.gz
cd nginx-1.12.2.tar.gz
./configure --prefix=/opt/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install

(2)Libgdiplus下载
wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.9.tar.bz2
tar -jxvf libgdiplus-2.10.9.tar.bz2
cd libgdiplus-2.10.9
./configure --prefix=/opt/mono
make && make install
echo “/opt/mono/lib” > /etc/ld.so.conf.d/mono.conf
ldconfig

(3)Mono下载:官网:http://download.mono-project.com/sources/mono
wget http://download.mono-project.com/sources/mono/mono-3.2.3.tar.bz2
tar –jxvf mono-3.2.3.tar.bz2
cd mono-3.2.3
./configure --prefix=/opt/mono
make && make install //此处时间较长

echo export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig:$PKG_CONFIG_PATH>>~/.bash_profile

echo export LD_LIBRARY_PATH=/opt/mono/lib:$LD_LIBRARY_PATH>>~/.bash_profile

echo export PATH=/opt/mono/bin:$PATH>>~/.bash_profile
source ~/.bash_profile
输入 mono -V 如有mono版本信息,则安装成功
在这里插入图片描述
(4)xsp从github上下载最新的3.0版本
yum –y intall git
git clone https://github.com/mono/xsp.git
cd xsp
./autogen.sh
./configure --prefix=/opt/mono
make && make install
3、配置nginx
vim /opt/nginx/conf/nginx.conf
server {
listen 80;
server_name 192.168.159.128;
location / {
root /data/web;
index login.aspx Login.aspx index.html index.htm;
fastcgi_index Login.aspx; //asp页面根据实际名称进行修改
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
}

4、配置fastcgi_params增加下面两行
vim /opt/nginx/conf/fastcgi_params
fastcgi_param PATH_INFO “”;
fastcgi_param SCRIPT_FILENAME documentrootdocument_rootdocumentrootfastcgi_script_name;
5、启动:
1、重启nginx:
/opt/nginx/sbin/nginx -s reload
2、启动 fastcgi_mono服务器
mkdir -p /data/web //然后将页面上传到此文件下
nohup fastcgi-mono-server4 /applications=/:/data/web /socket=tcp:127.0.0.1:9000 &
6、centos7
版本为:mono-5.20.1.27.tar.bz2 libgdiplus-6.0

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值