Troubleshooting a CentOS system custom script in rc.local cannot perform issues with a little memory

Source: Internet
Author: User
Tags rabbitmq

Date: 2015.8.27

Troubled the question of the afternoon, and at last the evening was settled, and put him in the record here


There are several situations in CentOS where rc.local cannot start on its own:

  1. Rc.local file does not have executable permissions: Add executable permissions (Note:/etc/rc.d/rc.local is a source file,/etc/rc.local/etc/rc3.d/s99lcoal, etc. are soft connection files)

  2. The environment variable is missing because the system starts with the last execution of rc.local, but some system or user environment variables are not loaded: Workaround: (1) Add the Sleep 10 delay 10 seconds before executing the script, but my side is not successful.

    (2) Add the Source/etc/profile command before executing the script to load the environment variable. This afternoon, the node program script was unsuccessful because of the node variable problem.

  3. Another situation is error: I met the start RABBITMQ times: Erlexec:home must be set Workaround: Add export Home=/usr/local/erlang in Execute script


  4. #!bin/bash###################################################################### #Date:2015-08-13                                                        # #Author: Qingbo.song                                                     # #E-mail:[email  protected]                                       # #Comment: Rabbitmq_start.sh                                             # #Path:/home/apicloud/shell2e                                            # #Vesion:v1.0                                                            ######################################################################## Set up Erlang home directory, otherwise RABBITMQ will not bootSelf-starting Export home=/usr/local/erlang#rabbitmq start/usr/local/rabbitmq/sbin/rabbitmq-server 
  5. Rc.local


  6. #!/bin/sh## This script is executed *after* all the other init scripts.# you can put your own initialization stuff in Here if you don ' t# want to do the full Sys V style init Stuff.touch/var/lock/subsys/localsource/etc/profilesh/home/she Ll/rabbitmq_start.sh#set Push_start.shsh/home/shell/push_start.shecho never >/sys/kernel/mm/transparent_ Hugepage/enabled

This article is from "Dolphin Watching" blog, please be sure to keep this source http://swht1278.blog.51cto.com/7138082/1689053

Troubleshooting a CentOS system custom script in rc.local cannot perform issues with a little memory

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.