In centos7, the permissions of the /etc/rc.d/rc.local file have been reduced and there is no execution permission. You need to add executable permissions to it.
Then you can add the command you want to start automatically.
Additional knowledge: centOS7.2 sets the custom script as a service and starts it at boot When the spring boot jar package is deployed online, it is hoped that it can be set as a service and started at boot. The steps are as follows: 1. Prepare the script (there are many on the Internet, so I won’t write it here) 2. Create a soft link to the /etc/rc.d/init.d directory
3. Add execution permissions:
4. When executing service abc start, if an error is reported:
Then check the script and add the full path of java as follows:
5. Execute service biz start again and it starts successfully 6. Set the startup and modify the script. Add the following to the second line:
7. Add startup:
The above article about how to automatically start or execute specified commands on Centos7.3 at startup is all I want to share with you. I hope it can give you a reference, and I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Native JS implements a very good-looking counter
>>: Summary of commonly used SQL statements for creating MySQL tables
Table of contents 1. Understanding the stack stru...
Preface Sometimes file copies amount to a huge wa...
What is the function of this key attribute? Let’s...
Preface The reason for writing this article is mai...
Table of contents Preface 1. Custom focus command...
Table of contents Preface style-loader css-loader...
Previous This is a classic old question. Since a ...
Table of contents Preface Understanding a stack a...
Because frameset and body are on the same level, y...
Table of contents What is axios? Axios request ty...
Are you still looking for a way to enable Hyper-v...
Experimental environment • A minimally installed ...
Background: During the development process, we of...
Preface The string types of MySQL database are CH...
I recently used a Mac system and was preparing to...