Centos下安装最新版Mono并为windwos服务配置开机启动项
一:安装Mono,此步骤参照官网
1:配置Yum仓库
#Centos 7
yum install yum-utils
rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
yum-config-manager --add-repo http://download.mono-project.com/repo/centos7/ 如若yum安装失败,可自己手动写repo文件,vim /etc/yum.repos.d/mono.repo' [mono]
name=mono
baseurl=http://download.mono-project.com/repo/centos/
enabled=1
gpgcheck=0
保存退出之后,再进行后续步骤!
#Centos
yum install yum-utils
rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
yum-config-manager --add-repo http://download.mono-project.com/repo/centos6/
2:安装mono
yum install mono-devel
#这里面是官网的安装说明,一般情况下安装devel就可以了!,安装所有,可以把对应的包名都加上! The package mono-devel should be installed to compile code. The package mono-complete should be installed to install everything - this should cover most cases of "assembly not found" errors. The package referenceassemblies-pcl should be installed for PCL compilation support - this will resolve most cases of "Framework not installed: .NETPortable" errors during software compilation. The package xsp should be installed for running ASP.NET applications.
二:配置windows程序的开机启动项
1: vim /etc/init.d/mfgRemotingServer,并输入以下内容
#!/bin/bash
#
#chkconfig:
#description:remotingservice
start()
{
#这里面的-l是指定lock文件,后面跟的是exe程序所在的绝对路径,可以通过mono-service命令查看帮助
mono-service -l:/root/remotingservice-lock /home/setquestion/Mfg.Setquestion.RemotingServer.exe
}
stop()
{
kill `cat /root/remotingservice-lock`
}
case "$1" in
start)
start
;; stop)
stop
;; restart)
stop
start
;;
*)
echo
$"Usage: $0 {start|stop|restart}"
exit
esac
2:执行时service mfgRemotingServer stop 会遇到 env: /etc/init.d/mfgRemotingServer: Permission denied,解决办法如下:
chmod +x /etc/init.d/mfgRemotingServer
service mfgRemotingServer stop
#加入到开机启动项
chkconfig --add mfgRemotingServer
chkconfig mfgRemotingServer on
3:mono-service的相关参数如下:
You must specify at least the assembly name
Usage is: /usr/bin/mono-service [options] service
-d:<directory> Working directory
-l:<lock file> Lock file (default is /tmp/<service>.lock)
-m:<syslog name> Name to show in syslog
-n:<service name> Name of service to start (default is first defined)
--debug Do not send to background nor redirect input/output
--no-daemon Do not send to background nor redirect input/output
Controlling the service:
kill -USR1 `cat <lock file>` Pausing service
kill -USR2 `cat <lock file>` Continuing service
kill `cat <lock file>` Ending service
PS:如果给为在安装和配置过程中有任何疑问,望留言。
Centos下安装最新版Mono并为windwos服务配置开机启动项的更多相关文章
- Centos下安装FTP并进行虚拟用户访问方式配置
1. 安装认证所需包 [root@localhost]#yum install pam* [root@localhost]#yum install db4* 首先安装PAM(用于用户认证)和DB4(用 ...
- centos下安装最新版本git(通过master分支下载最新版)
centos6.7下安装最新版本git 本文参考:http://www.01happy.com/centos-install-latest-git/ 按照原博主所提供的思路安装可能会出现下列问题 解决 ...
- CentOS下安装hadoop
CentOS下安装hadoop 用户配置 添加用户 adduser hadoop passwd hadoop 权限配置 chmod u+w /etc/sudoers vi /etc/sudoers 在 ...
- CentOS下安装使用start-stop-daemon
CentOS下安装使用start-stop-daemon 在centos下下了个自启动的服务器脚本 执行的时候发现找不到start-stop-daemon命令 好吧 执行手动编译一下 加上这个命令 w ...
- 从零开始学 Java - CentOS 下安装 Tomcat
生活以痛吻我,我仍报之以歌 昨天晚上看到那个冯大辉老师的微信公众号,「小道消息」上的一篇文章,<生活以痛吻我,我仍报之以歌>.知乎一篇匿名回答,主题为<冯大辉到底是不是技术大牛,一个 ...
- CentOS 下安装
2016年12月5日15:25:58 ----------------------------------- 通常情况下在centos下安装软件就用yum. 关键是,使用yum你要知道安装包的名字是什 ...
- [Linux]CentOS下安装和使用tmux
前天随意点开博客园,看到了一篇关于tmux的文章 Tmux - Linux从业者必备利器,特意还点进去看了.毕竟Linux对于做游戏服务端开发的我来说,太熟悉不过了.不过我就粗略地看了一眼,就关掉了. ...
- CentOS下安装JDK7 转载
转载地址:http://www.cnblogs.com/rilley/archive/2012/02/02/2335395.html CentOS下安装JDK7 下载地址:http://www.ora ...
- Centos下安装mysql 总结
一.MySQL安装 Centos下安装mysql 请点开:http://www.centoscn.com/CentosServer/sql/2013/0817/1285.html 二.MySQL的几个 ...
随机推荐
- java基础-day11
第11天 综合练习 今日内容介绍 u 综合练习 第1章 综合练习 1.1 综合练习一 A:键盘录入3个学生信息(学号,姓名,年龄,居住地)存入集合,要求学生信息的学号不能重复 B:遍历集 ...
- html5打开摄像头并用canvas模拟拍照 - 转
<video id="video" width="640" height="480" autoplay></video&g ...
- 在Ubuntu上安装pyenv
因为找到一个域名枚举的脚本使用Python3编写的,而我一直习惯的是使用Python2.7,在自己的Windows7上再安装个Python怕混了,于是想着在VPS上装个Python的版本管理工具,也方 ...
- idea2018.2.4的安装激活与热部署插件JRebel的激活方法
去Idea的官网下载如上版本的Idea安装文件 并且在网上搜索下载如下破解工具 放置在相应的Idea安装目录下 然后在Idea中输入激活码 { "licenseId": " ...
- poj 2352 stars 【树状数组】
题目 题意:按y递增的顺序给出n颗星星的坐标(y相等则x递增),每个星星的等级等于在它左边且在它下边(包括水平和垂直方向)的星星的数量,求出等级为0到n-1的星星分别有多少个. 因为y递增的顺序给出, ...
- 《mysql必知必会》学习_第10章_20180731_欢
第10章,计算字段. P64 select concat (vend_name,'(',vend_country,')') from vendors order by vend_name; # 拼接, ...
- handsontable 排序问题
排序是表格的基础功能,handsontable也会支持. 有时需求会很复杂,需要自定义排序,或者调用其他排序方法:自定义排序,比较复杂,没做过:今天要用的是调用R中的排序方法. 有两个事件before ...
- 提示 make: 没有什么可以做的为 `all'
提示 make: 没有什么可以做的为 `all'. make clean 一次,编译过程又有了.
- c#依参数自动生成控件
很多系统都带有自定义报表的功能,而此功能都需依参数自动生成控件,举例如下: 如上图,一条查询语句当中,包含了3个参数,其中两个是日期型(使用:DATE!进行标识),一个是字符型(使用:进行标识),要生 ...
- PHP 获取两个时间之间的月份
## 获取两个时间之间的间距时间 $s = '2017-02-05'; $e = '2017-07-20'; $start = new \DateTime($s); $end = new \DateT ...