Linux Registration Service Tutorials

Source: Internet
Author: User

This note is a long time after the completion of the project, sorting out the data when the accidental discovery, the operation of the Linux for the winning Kylin, the project needs to start the boot, the llinux is not familiar with, find the Linux service self-starting settings. Several times only to find the solution. Record for reference

The operating system comes with services such as SSH, FTP and so on are self-starting, we can also in this way to let their own development program boot.

1 Enter the Linux interface to open the terminal

Input vi/etc/rc.d/rc.local

Press the keyboard insert key to manipulate the file

Write the following code in the file

Touch/var/lock/subsys/local

Path to the folder where the CD executable file resides

Exprot display=:120

./starup.sh executable File

Press the ESC key to enter: Wq command to exit Edit settings OK to restart

2 If there is no rc.local file in the system, it can be set up in the following way.

First, enter chkconfig in the command box to see which services are self-booting in the system.

Then create a script under/ETC/INIT.D

Write a name in the script, like Local.

#! /bin/bash

#chkcofig: 345 61 61 345 is the start level, 85 and 15 are the start priority, the priority is off, and the following is the description.

#description: Apache

Touch/var/lock/subsys/local

Path to the folder where the CD executable file resides

Exprot display=:120

./starup.sh executable File

Save and exit

In command terminal write Chkconfig--add local first, add as system service, note that add front has two bars

Then enter Chkconfig--list if a local instruction script has been added to the boot start operation

Set the startup level for the newly added local script

Chkconfig--level + Local on (description,3 level represents start in command line mode,5 level represents start in graphical interface, on = open)

To this setting OK to restart

Linux Registration Service Tutorials

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.