|
Overview
In this article we will discuss how to install jexus, mono and configure jexus on the CentOS 7 operating system, so it will be able to run an asp.net mvc 4 application in this environment. This article is part of an application that describes how to run .NET with Mono in a Linux / Unix environment.
Install Mono 4
First of all, you need to have a CentOS 7 environment, you can use the DVD CD-ROM can be installed locally or through Ali cloud, Tencent cloud or Windows Azure upload a, this is the Windows Azure environment on the deployment of CentOS 7, can refer to "How Windows Azure Deploying OpenLogic CentOS Mirrors on Virtual Machines. "
Yum package installation
CentOS has a Yum package management, which greatly simplifies the installation of CentOS programs. As long as you do not need the latest updated software packages, the Yum package management is the easiest, especially for novice Linux / CentOS users.
Install Mono through the Yum package
See the official documentation: Install Mono on Linux:
Mono package is not included in the CentOS warehouse, we need to import the Mono warehouse to the warehouse, the root user privileges to execute the following command:
Rpm --import "http://keyserver.Ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
Yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
May be unable to find yum-config-manager, this is because the system does not install this command by default, the command in the yum-utils package, you can use the command yum-y install yum-utils installation.
[Root @ Mono ~] # yum-y install yum-utils
[Root @ Mono ~] # rpm-qa | grep yum
Yum-utils-1.1.31-25.el7_0.noarch
Yum-3.4.3-118.el7.centos.noarch
Yum-metadata-parser-1.1.4-10.el7.x86_64
Yum-plugin-fastestmirror-1.1.31-25.el7_0.noarch
Then execute
Yum -y install mono-complete Install all the packages
Mono-core.x86_64 0: 4.0.1-4 mono-data.x86_64 0: 4.0.1-4
Mono-data-Oracle.x86_64 0: 4.0.1-4 mono-data-sqlite.x86_64 0: 4.0.1-4
Mono-devel.x86_64 0: 4.0.1-4 mono-extras.x86_64 0: 4.0.1-4
Mono-locale-extras.x86_64 0: 4.0.1-4 mono-mvc.x86_64 0: 4.0.1-4
Mono-nunit.x86_64 0: 4.0.1-4 mono-reactive.x86_64 0: 4.0.1-4
Mono-wcf.x86_64 0: 4.0.1-4 mono-web.x86_64 0: 4.0.1-4
Mono-winforms.x86_64 0: 4.0.1-4 mono-winfxcore.x86_64 0: 4.0.1-4
Monodoc-core.x86_64 0: 4.0.1-4
Run mono -V to confirm that the installation was successful
[Root @ Mono ~] # mono -V
Mono JIT compiler version 4.0.1 (tarball Tue May 12 16:19:40 BST 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. Www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
Install Jexus 5.6
Jexus 5.3.1 release, Jexus installation process is simplified, built-in two new scripts, they are "install" and "upgrade", corresponding to the original "installation" and "upgrade", the Jexus installation process automation . Jexus installation and upgrade their own way and no more changes, so the user has been accustomed to the pre-5.3.1 version of the way you use, you can still use the previous installation.
Wget linuxdot.net/down/jexus-5.6.4.tar.gz
Tar -zxvf jexus-5.6.4.tar.gz
Cd jexus-5.6.4
./install
Installation is complete ~! . . (The above installation process can also use this command to complete the curl jexus.org/5.6.x/install | sh) in the implementation of the install script, jexus is installed by default to / usr / jexus /, if you want to install to another directory, you can In the implementation of the script to add a directory of parameters (such as sudu install / usr / local / jexus /). For the upgrade is the implementation of the upgrade script.
Start the jexus check is normal
Start / usr / jexus / jws start
Stop / usr / jexus / jws stop
Restart / usr / jexus / jws restart
Add as a system service, with the system startup
Zendic wrote Centos, Ubuntu install Mono, Jexus, which has added Jexus system services for the code:
Cd /etc/init.d/
Vi jws
Press i Edit mode and paste the following
#! / Bin / bash
#chkconfig: 2345 80 05
#description: jws
#
. /etc/rc.d/init.d/functions
Case "$ 1" in
Start)
Echo "Jexus Start .."
/ Usr / jexus / jws start
;
Stop)
Echo "Jexus Stop .."
/ Usr / jexus / jws stop
;
Restart)
Echo "Jexus Restart"
/ Usr / jexus / jws restart
;
Status)
/ Usr / jexus / jws status
;
*)
Exit 1
;
Gt;
Exit $ RETVAL
After pressing ESC, enter: wq to save the file
Add this script as a "service"
Chmod 766 jws
Chkconfig --add jws
At this point, JEXUS has to follow the system boot, you can reboot a try
You can also modify the site configuration by modifying the files in / usr / jexus / siteconf.
Run an asp.net mvc 4 program
Use Visual Studio to create a new ASP.NET MVC 4 program, publish it to the jexus server, remember not to copy Microsoft.Web.Infrastructure.dll also, and this is a strong dependence on IIS and the assembly, we now visit http : //mono.cloudapp.net/, you can see the familiar page |
|
|
|