Linux Learning Article---Start-up script in CentOS

Source: Internet
Author: User

Start-up script in CentOS

In Cenos environment, install JDK, need to configure environment variables, online people say:

1. Write the statement directly into/etc/profile

2. Write the statement to a java.sh file, and then place the file in the/etc/profile.d/directory

Now look at the contents of the/etc/profile file:


In fact, the two effects are the same,/etc/profile file execution will traverse the/etc/profile.d/directory of all *.sh files, and then execute.

But personally, it's better to use the latter:

Because if it is useful, create a new. sh file, if you do not need to delete it directly.


Linux Learning Article---Start-up script in CentOS

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.