CentOS 配置的开机自启动。

vim /etc/rc.local

  1. #!/bin/sh
  2. #
  3. # This script will be executed *after* all the other init scripts.
  4. # You can put your own initialization stuff in here if you don't
  5. # want to do the full Sys V style init stuff.
  6.  
  7. touch /var/lock/subsys/local
  8.  
  9. echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
  10. ip route add default via 192.168.1.1 dev eth0
  11. /opt/product/zookeeper/node-/bin/zkServer.sh start
  12. /opt/product/activemq/node-/bin/activemq start
  13. redis-server /etc/redis.conf
  14. /opt/product/mongodb/bin/mongod --port --dbpath /data/db/ &
  15. /opt/product/dubbo-admin-tomcat/bin/startup.sh

CentOS开机自启动的更多相关文章

  1. centOS 开机自启动自己的脚本

    centOS 开机自启动自己的脚本 1. 自己脚本 myservice 如下: #!/bin/bash # chkconfig: # description: myservice .... echo ...

  2. Centos开机自启动脚本的制作

    原文地址:http://www.2cto.com/os/201306/220559.html 我的一个Centos开机自启动脚本的制作   一.切换到/etc/init.d/   二.制作sh脚本 v ...

  3. Centos 开机自启动一些软件配置

    CentOS设置服务开机启动的方法   CentOS设置服务开机启动的两种方法 1.利用 chkconfig 来配置启动级别 在CentOS或者RedHat其他系统下,如果是后面安装的服务,如http ...

  4. Centos开机自启动redis

    修改redis.conf,打开后台运行选项: # By default Redis does not run as a daemon. Use 'yes' if you need it. # Note ...

  5. CentOS开机自启动/etc/rc.local不执行的解决办法

    放置在开机自启动里面没有自动启动 查看文件/etc/rc.local发现是一个软连接 修改源文件的执行权限即可 chmod 755 /etc/rc.d/rc.local 查看日志可以看到开机自启动过程 ...

  6. CentOS 开机自启动脚本

    开机时执行自己的脚本. 1.编写自己的服务脚本 进入系统服务脚本目录: cd /etc/rc.d/init.d/ vi test 内容如下: #!/bin/bash # # chkconfig: - ...

  7. [转]CentOS开机启动脚本

    转载自http://www.2cto.com/os/201306/220559.html   我的一个Centos开机自启动脚本的制作   一.切换到/etc/init.d/   二.制作sh脚本 v ...

  8. CentOS 程序开机自启动方法总结

    1.把启动程序的命令添加到/etc/rc.d/rc.local文件中 CentOS系统下管理开机自启动的配置文件是/etc/rc.d/rc.local,所以只需编辑这个文件,在里面加入相应的启动命令即 ...

  9. CentOS 7安装Mysql并设置开机自启动

    CentOS 7不带Mysql数据库了,默认的数据库是MariaDB(Mysql的一个分支). 可以按照以下步骤手动安装Mysql数据库. 1. 下载rpm安装文件 wget http://repo. ...

随机推荐

  1. .Net web 关于表单标题

    今天跟以前同事学到一个好东西,就是后台web界面表单标题展示的一个方法,新学到的一个方法...赶紧分享一下 在model 属性上加  [DisplayName("标题"), Req ...

  2. Thinking in java note1

    Part information collecting from http://blog.csdn.net/leonliu06/article/details/78638841 1. 如果已经定义了一 ...

  3. bin log、redo log、undo log和MVVC

    logs innodb事务日志包括redo log和undo log.redo log是重做日志,提供前滚操作,undo log是回滚日志,提供回滚操作. undo log不是redo log的逆向过 ...

  4. Java线程池Executor使用

    合理利用线程池能够带来三个好处.第一:降低资源消耗.通过重复利用已创建的线程降低线程创建和销毁造成的消耗.第二:减少系统对于,外部 服务的响应时间的等待.第三:提高线程的可管理性.线程是稀缺资源,如果 ...

  5. Java网络编程学习A轮_06_NIO入门

    参考资料: 老外写的教程,很适合入门:http://tutorials.jenkov.com/java-nio/index.html 上面教程的译文:http://ifeve.com/overview ...

  6. 关联规则&Apriori算法

    2017-12-02 14:27:18 一.术语 Items:项,简记I Transaction:所有项的一个非空子集,简记T Dataset:Transaction的一个集合,简记D 关联规则: 一 ...

  7. C#使用(NamedPipe)命名管道通信的例子

    https://blog.csdn.net/yl2isoft/article/details/20228279

  8. sqlserver存储过程分页

    create  procedure [dbo].[SqlPager]@sqlstr nvarchar(4000), --查询字符串@currentpage int, --第N页@pagesize in ...

  9. php---------取汉字的第一个字的首字母

    开发中用到的方法,取出第一个汉字的首字母: /** * 取汉字的第一个字的首字母 * @param string $str * @return string|null */ function getF ...

  10. 前端jsp页面script引入url项目名使用${appName}

    <script src="/${appName}/commons/jslib/CommonValue.js"></script> 新建一个com.autum ...