Apache and Gerrit are automatically started in Linux.

Source: Internet
Author: User

Edit/etc/rc. d/rc. Local

Add the command to this file

#! /Bin/sh
#
# This script will be 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/local
/Usr/soft/Apache/bin/apachectl start
/Usr/soft/Gerrit/bin/Gerrit. Sh start

--------------- The following is not easy to use

First, create two files in the/etc/rc. d/init. d directory.

Touch Apache

Touch Gerrit

Then modify it to Executable

Chmod 777 Apache

Chmod 777 Gerrit

Then, use VI to edit the content as follows:

Apache File Content

Chmod 777 Apache
#! /Bin/bash
# Start HTTPd service
/Usr/soft/Apache/bin/apachectl start

Gerrit file content:

#! /Bin/bash
# Start HTTPd service
/Usr/soft/Gerrit/bin/Gerrit. Sh start

Chmod 777 Apache

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.