Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux runs asp.net,c# website Construction configuration under Centos7-mono+nginx

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

In this paper, all kinds of small errors in the actual correction operation are not posted until the correct results are finally called out. I hope it can be useful to the students in need. Please criticize and correct the omissions, and welcome to discuss.

Please indicate the source when reprinting, thank you.

First, install some required software packages first

First install some of the required libraries:

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 httpd bzip2 glib-devel httpd-devel freetype fontconfig pango-devel ruby wget automake autoconf libtool cmake

There are many of the above packages, but to be on the safe side, install them all. There may be a lack of packages in the future, so you can install them yourself using yum.

Download the required software packages

Nginx installation package: download address: http://nginx.org/en/download.html

Mkdir-p / downcd / downwget http://nginx.org/download/nginx-1.14.2.tar.gz

Mono download: official website: http://download.mono-project.com/sources/mono/

Wget http://download.mono-project.com/sources/mono/ mono-3.10.0.tar.bz2

Libgdiplus:

Wget http://download.mono-project.com/sources/libgdiplus/libgdiplus0-5.6.tar.gz

Xsp:

Wget http://download.mono-project.com/sources/xsp/xsp-3.8.tar.gz

Pcre:

Wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.23.tar.gz III. Installation package

Install libgdiplus:

Cd / usr/local/srctar-zxvf / down/libgdiplus0-5.6.tar.gzcd libgdiplus-5.6./configure-- prefix=/usrmake & & make install

Install pcre:

Cd / usr/local/srctar-zxvf / down/pcre2-10.23.tar.gzcd pcre2-10.23./configure-- prefix=/usrmake & & make install

Install Nginx

Cd / usr/local/srctar zxvf / down/nginx-1.14.2.tar.gzcd nginx-1.14.2./configuremake & & make installcd.. / whereis nginx# query nginx installation location vi / usr/local/nginx/conf/nginx.conf#37 Line modify server_name _ launch nginxps aux for server_name your ipcd / usr/local/nginx/sbin./nginx# | grep nginx# query status

Open port 80:

Firewall-cmd-permanent-zone=public-add-port=80/tcp

Add boot self-startup, add as system service, please search by yourself.

Enter the access address http://45.127.66.79( on the browser according to the personal local address page), and you will normally see the default nginx page

IV. Compile and install Mono

Install Mono:

Cd / downtar-jxvf mono-3.10.0.tar.bz2cd mono-3.10.0./configure-prefix=/usrmake make installcd.. /

Enter mono-V if you have mono version information, the installation is successful.

Install xsp:

Cd / down/xsp-3.8./autogen.sh-- prefix=/usr#error: Package requirements (mono > = 2.10.0) error handling find / | after grep pkg-config# finds the path, export PKG_CONFIG_PATH=/usr/lib/pkgconfigmake & & make install 5. Modify the configuration

Configure nginx

The server content required to replace the existing server with mono is as follows:

Vi / usr/local/nginx/conf/nginx.confserver {listen 80; server_name your ip; location / {root / data0/web/www; index index.html index.htm index.aspx default.aspx Default.aspx; fastcgi_index default.aspx; fastcgi_pass 127.0.0.1 listen 9000; include fastcgi_params }}

Configure fastcgi_params by adding the following two lines:

Vi / usr/local/nginx/conf/fastcgi_paramsfastcgi_param PATH_INFO ""; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; VI. Launch:

Start the fastcgi_mono server

Mkdir-p / data0/web/www # stores the mono-processed website fastcgi-mono-server4 / applications=/:/data0/web/www / socket=tcp:127.0.0.1:9000 &

Restart nginx:

Cd / usr/local/nginx/sbin./nginx-s reload# restart nginx

Put a default.aspx in / data0/web, then access the machine's Ip through a browser, and OK when you see the contents of the default.aspx. The default.aspx content is as follows:

Sample Calendar

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report