openerp 7 在ubuntu上设置开机启动
我们要让openerp开机运行起来。
第一步,先进入系统目录:
cd /etc/init.d
第二步,创建文件。命名为openerp-server
sudo vi openepr-server
第三步:在openerp-server文件中添加下面内容:
#!/bin/sh
### BEGIN INIT INFO
# Provides: openerp-server
# Required-Start:
$remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start:
$network
# Should-Stop: $network
# Default-Start: 2 3 4 5
#
Default-Stop: 0 1 6
# Short-Description: Enterprise Resource Management
software
# Description: Open ERP is a complete ERP and CRM software.
###
END INIT INFOPATH=/bin:/sbin:/usr/bin
DAEMON=/opt/openerp/server/openerp-server
NAME=openerp-server
DESC=openerp-server# Specify the user name (Default: openerp).
USER=openerp# Specify an alternate config file (Default:
/etc/openerp-server.conf).
CONFIGFILE=”/etc/openerp-server.conf”# pidfile
PIDFILE=/var/run/$NAME.pid# Additional options that are passed to the Daemon.
DAEMON_OPTS=”-c
$CONFIGFILE”[ -x $DAEMON ] || exit 0
[ -f $CONFIGFILE ] || exit 0checkpid() {
[ -f $PIDFILE ] || return 1
pid=`cat $PIDFILE`
[ -d
/proc/$pid ] && return 0
return 1
}case “${1}” in
start)
echo -n “Starting ${DESC}: ”start-stop-daemon –start –quiet –pidfile ${PIDFILE} \
–chuid ${USER}
–background –make-pidfile \
–exec ${DAEMON} — ${DAEMON_OPTS}echo “${NAME}.”
;;stop)
echo -n “Stopping ${DESC}: ”start-stop-daemon –stop –quiet –pidfile ${PIDFILE} \
–oknodoecho “${NAME}.”
;;restart|force-reload)
echo -n “Restarting ${DESC}: ”start-stop-daemon –stop –quiet –pidfile ${PIDFILE} \
–oknodosleep 1
start-stop-daemon –start –quiet –pidfile ${PIDFILE} \
–chuid ${USER}
–background –make-pidfile \
–exec ${DAEMON} — ${DAEMON_OPTS}echo “${NAME}.”
;;*)
N=/etc/init.d/${NAME}
echo “Usage: ${NAME}
{start|stop|restart|force-reload}” >&2
exit 1
;;
esacexit 0
注意你安装的路径要和我上一个帖子安装的一致,不然你就得修改上面代码中的文件路径
第四步:测试配置文件。
sudo /etc/init.d/openerp-server start
当执行上面这一条命令后,你访问 http://IP.com:8069能正常访问得到,证明你的配置文件配置成功。
第五步:设置开机启动。
sudo update-rc.d openerp-server defaults
到这里,openerp已经可以在你的ubuntu系统中实现开机启动了。
参考资料:http://www.theopensourcerer.com/2012/12/how-to-install-openerp-7-0-on-ubuntu-12-04-lts/
openerp 7 在ubuntu上设置开机启动的更多相关文章
- Linux上设置开机启动Java程序
在Linux上设置开机启动Java程序,例如:test.jar 在Linux上启动Java程序的命令: nohup java -jar test.jar >/dev/>& & ...
- ubuntu下设置开机启动服务
原文:http://blog.csdn.net/dante_k7/article/details/7213151 在ubuntu10.04之前的版本都是使用chkconfig来进行管理,而在之后的版本 ...
- tomcat在ubuntu中设置开机启动
#!/bin/bash export JAVA_HOME=/usr/lib/jdk/jdk1.7.0_72 WEBROOT_PATH=/home/zhengze/workspace WEBSERVER ...
- ubuntu如何设置开机启动默认命令行界面
图形模式下,首先进入终端: 1. 运行 sudo vi/etc/default/grub 2. 找到 GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” 3.改为 GR ...
- Ubuntu 16.04设置开机启动脚本的方法
需求:公司卡片机容量太小,只有100G,由于使用的人比较的多,开机使用后有时候就会出现磁盘空间占满数据写不进去的情况,影响工作进度,而且每次使用完都得关掉卡片机,所以就有必要写个清理磁盘的脚本,当卡片 ...
- Ubuntu 14.04设置开机启动脚本的方法
rc.local脚本 rc.local脚本是一个ubuntu开机后会自动执行的脚本,我们可以在该脚本内添加命令行指令.该脚本位于/etc/路径下,需要root权限才能修改. 该脚本具体格式如下: #! ...
- ubuntu设置开机启动脚本
rc.local脚本 rc.local脚本是一个ubuntu开机后会自动执行的脚本,我们可以在该脚本内添加命令行指令.该脚本位于/etc/路径下,需要root权限才能修改. 该脚本具体格式如下: #! ...
- Ubuntu 18.04 启用 rc.local 设置开机启动
ubuntu18.04 不再使用initd管理系统,改用systemd. 然而systemd很难用,改变太大,跟之前的完全不同. 使用systemd设置开机启动为了像以前一样,在/etc/rc.loc ...
- Ubuntu 18.04 设置开机启动脚本 rc.local systemd
ubuntu18.04不再使用initd管理系统,改用systemd. ubuntu-18.04不能像ubuntu14一样通过编辑rc.local来设置开机启动脚本,通过下列简单设置后,可以使rc.l ...
随机推荐
- mysql去除重复查询的SQL语句基本思路
SELECT R.* FROM trans_flow R, (SELECT order_no, MAX(status_time) AS status_time FROM trans_flow GROU ...
- php 如何判断一个常量是否已经定义
php 如何判断一个常量是否已经定义 http://blog.csdn.net/raojinpg/article/details/6222882 如果看过手册的人肯定知道,可以直接忽视 不过在实际项目 ...
- POJ 2101
#include <iostream> #include <algorithm> #include <cmath> using namespace std; int ...
- 深入了解linux下的last命令及其数据源
http://www.9usb.net/200902/linux-last.html http://blog.csdn.net/chaofanwei/article/details/11826567
- hadoop疑难杂症解析
1:Shuffle Error: Exceeded MAX_FAILED_UNIQUE_FETCHES; bailing-outAnswer:程序里面需要打开多个文件,进行分析,系统一般默认数量是10 ...
- css:map热点的应用
映射图像(Image Map)可以实现的效果是:一张图片上点不同位置可以跳转到不同的地方, 实例: 1.插入一张图片 2.在底部“属性”栏中选择合适的热点工具,在图片上绘制热点区域,如 3.然后返回代 ...
- *在Win7中安装JDK1.7并配置环境变量
安装的过程就不废话了. 下面是环境变量的配置. 1. 配置环境变量 单机右键‘计算机--属性’ 2.点击高级系统设置 3.点击‘环境变量’ 4.增加"JAVA_HOME"系统变 ...
- MyBatis学习总结_06_调用存储过程
一.提出需求 查询得到男性或女性的数量, 如果传入的是0就女性否则是男性 二.准备数据库表和存储过程 1 create table p_user( 2 id int primary key auto_ ...
- Linux系统文件的隐藏属性
linux系统的文件除了有普通rwx权限外还有一种隐藏权限,例如明明有权限删除某个文件却报错了. 或者仅能为某个文件追加内容而不能减少内容,遇到这种很‘奇怪’的文件,就要怀疑是文件被设置隐藏权限了. ...
- 《Linux shell变量总结回顾》RHEL6(转)
文章版权:http://www.cnblogs.com/linux-super-meng/ 环境变量路径: [root@localhost ~]# set //查看到的是局部变量和全局变量2种 [ ...