began to focus on. NET cross-platform, recently just tested the next with EF6 to connect MySQL, so I want to directly put the site into Linux. Looked up a lot of information, Tinker for two nights, finally succeeded.
Here I am using the BUDGETVM 1G OpenVZ vps,centos7 64 bit. Originally in accordance with the common practice of compiling mono, various failures, and then on the official web site to see the officially recommended installation methods, simple and effective.
1. Execute under root authority
" Http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF "
Yum-config-manager--add-repo http://download.mono-project.com/repo/centos/
(If the second row above fails, execute the following line first and then re-execute the second row above)
Yum Install Yum-utils
After successful execution of the first two lines, install mono all packages
Yum Install Mono-complete
After the installation is complete, perform
Mono–v
The mono version information will be displayed and the latest stable version will be installed. March 20, 2016 latest stable version mono-4.2.3.4
2. Installing jexus5.8.1
CD/tmpwget linuxdot.net/down/jexus-5.8. 1. Tar tar -zxvf jexus-5.8. 1. Tar . GZ CD Jexus-5.8. 1 sudo ./Install
Startup Jexus will fail at this point, view Log Discovery 80 port is occupied, view 80 port occupancy, found that CentOS comes with Apache takes up 80 ports
3. Uninstall Apache that occupies 80 ports
rpm-qa| grep -E httpd
4. Start Jexus
Start:sudo /usr/jexus/jws start stop:sudo /usr/jexus/jws stop restart:sudo /usr/ jexus/JWs Restart Restart the specified Web site:sudo /usr/jexus/jws Restart sitename Stop the specified Web site:sudo /usr/ Jexus/jws Stop SiteName
80 ports are required due to CentOS firewall setup issues:
vi /etc/sysconfig/iptables in which added a line -J accept saved. Restart Firewall service iptables restart
At this point, we can open http://your Ip/info to see if your Jexus has started successfully, such as Http://www.jenyunet.com/info
5. Configure the Web site
Enter the directory/usr/jexus/siteconf modify the site configuration, specifically see Jexus official website.
6. Supported. NET versions and MVC issues
Some people say that mono since 4.2.1 began to support the MVC5, but I put MVC5 site on the error, can not be resolved.
After reviewing the error message, we found that the. NET version supported by mono-4.2.3.4 is 4.0.30319.17020 and the. net4.5 version is 4.0.30319.17929. net4.5.1 version 4.0.30319.34003,
So mono-4.2.3.4 is not supported. net4.5 and later versions, so MVC5 should also be unsupported
The site from mvc5.2 modified to Mvc4, which also scrapped the Httpclint this new thing, pass up to run normal. My Project
centos7+mono4.2.3.4+jexus5.8.1 Cross-platform takeoff