CentOS上搭建Nginx+Mono运行asp.net环境配置教程
来源:才华咖 本文已影响1.4W人
来源:才华咖 本文已影响1.4W人
安装步骤:
一、获取开源相关程序:
1、利用CentOS Linux系统自带的命令安装、升级所需的程序库:
sudo -s
LANG=C
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel bison pkgconfig glib2-devel gettext make
2、下载程序源码包:
Nginx安装包:下载地址:
mkdir -p /down
cd /down
wget
Mono下载:官网:(请下载最新版)
wget
libgdiplus下载:(请下载最新版)
wget
xsp下载:(请下载最新版)
wget
pcre下载(Nginx所需的pcre库):(请下最新版)
wget
二、安装编译Nginx:
1、安装安装Nginx所需的pcre库:
cd /down
tar zxvf
cd pcre-8.21/
./configure
make && make install
cd ../
2、创建www用户和组
/usr/sbin/groupadd www
/usr/sbin/useradd -g www www
mkdir -p /data0/web
chmod +w /data0/web
chown -R www:www /data0/web
3、安装Nginx
tar zxvf
cd nginx-1.1.11/
./configure --user=www --group=www --prefix=/opt/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install
cd ../
4、开放80端口:
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
启动nginx
/opt/nginx/sbin/nginx
在浏览器上输入访问地址 (根据个人本机地址页定),正常会看到默认nginx页面
三、安装编译Mono
1、安装libgdiplus:
cd /down
tar -jxvf 2
cd libgdiplus-2.10
./configure --prefix=/opt/mono
make && make install
echo "/opt/mono/lib" > /etc/.d/
ldconfig
2、安装Mono:
tar –jxvf 2
cd mono-2.10.7
./configure --prefix=/opt/mono
make && make install //此处时间较长
echo export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig:$PKG_CONFIG_PATH>>~/_profile
echo export LD_LIBRARY_PATH=/opt/mono/lib:$LD_LIBRARY_PATH>>~/_profile
echo export PATH=/opt/mono/bin:$PATH>>~/_profile
source ~/_profile
输入 mono -V 如有mono版本信息,则安装成功.
3、安装XSP:
cd /down
tar –jxvf 2
./configure --prefix=/opt/mono
make && make install
四、配置Nginx
vi /opt/nginx/conf/
server {
listen 80;
server_name localhost;
location / {
root /data0/web;
index ;
fastcgi_index ;
fastcgi_pass ;
include fastcgi_params;
}
}
五、配置fastcgi_params增加下面两行:
vi /opt/nginx/conf/fastcgi_params
fastcgi_param PATH_INFO "";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
六、启动:
1、重启nginx:
/opt/nginx/sbin/nginx -s reload
2、启动 fastcgi_mono服务器
fastcgi-mono-server2 /applications=/:/data0/web /socket=tcp: &
七、测试:
新建一个 web项目上传至 /data0/web目录下,测试运行。
An Exciting Sports Meeting英语作文
Passage Eighteen (Strictly Ban smoking)英语阅读理解
Sentence Completion训练SAT备考习题
英语作文学习:103 famous faces in one painting
Is a Test of Spoken English Necessary英语四级作文
Unit 13 Lesson50 Standing Room Only说课稿
The Sprint in College Entrance Exam英语作文
七年级上 Unit One Topic One Section A说课材料
SAT官方指南Senctence Completion的练习题
The place of Science and Technology in Modern Life英语作文
英语高分作文:The importance of protecting the environment
The Impact of Information Explosion高中英语作文
SAT Sentence Completion英语选择题
分享SAT阅读练习题:Reading Comprehension Test 14
提示operating system not found的解决方法
My experience with foreign coins初中英文作文
英语阅读:VIT declines to acquire Ang Mo Kio property
Wanna prensent you guys a touching英语美文
How to Enhance the Sense of Happiness英语四级作文
搭配的教案
大学英语演讲稿:Opening Statement
the importance of innovation英语作文
Fancy the original or movie ones大学英语作文
四级作文:Create a Conservation-Oriented Campus
英语作文范文:Teaching Machines to Learn on Their Own
华为HCNP-OTN Transmission认证考试大纲
面试技巧之配饰搭配
奥运英语作文:中国跳水队(Diving into Gold: Chinas Dream Team
资产配置预算购置程序
Unit 5 It must belong to Caral section A英语评课稿
The Opinions of Using WeChat英语作文
The Opinion of Buying Cars英语作文
CentOS上搭建Nginx+Mono运行asp.net环境配置教程
the most interesting subjuct and thing英语作文
Some Great Wonders in London英语作文
八年级英语下册Unit 6 An old man tried to move a Mountain period one说课稿
《the most interesting stories》湘少版六下Unit7的相关知识及
英语作文:The Importance of Self-confidence
Diaspora Finance Powers Global Development美文欣赏
六年级英语上册Unit2 New York is in the east of America说课稿