CentOS7 (mini) Rapid Deployment of ASP. NET applications, centos7asp.net
From mono 2.8 +, I began to pay attention to some messages about linux running. NET.
I was idle recently and found that mono has already provided compiled sources, which greatly facilitates the deployment process and does not need to compile mono by myself.
I used Nancy. Owin to write a small program, some of which have been filled in. Here is the source code:
Https://github.com/ss22219/Booker
Here we use a brand new system upload program to decompress the package:
Use cmder to package tar zcf product.tar.gz productscp product.tar.gz root@gool.ss22219.cn under windows:/root/ssh root@gool.ss22219.cn # tar zxvf product.tar.gz
Decompressed files:
# lsbin Booker.exe Booker.exe.config content html scripts views
Because I use a new mini system, I need to install yum-config-manager to facilitate the configuration of the third-party source officially provided by mono.
# yum -y install yum-utils > /dev/null
Follow mono official instructions (http://www.mono-project.com/docs/getting-started/install/linux/#centos-7-fedora-19-and-later-and-derivatives)
Add Source Address:
# rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"# yum-config-manager --add-repo http://download.mono-project.com/repo/centos/ > /dev/null
OK. Install mono:
# yum install -y mono-devel > /dev/null
Run my Booker:
# mono Booker.exeSiteRoot:/root/product/server is start on http://+:80press enter to exit
It is running and cannot be accessed from the Internet. It should be blocked by the firewall.
CentOS7 has replaced the new firewall. iptables is no longer used by default. Run the following command to disable it:
# systemctl stop firewalld.service
Run it again and access is normal: