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
When using vue to develop projects, the front end...
1. Use of CSS scope (style division) In Vue, make...
1. Add a hard disk 2. Check the partition status:...
Table of contents 1. ChildNodes attribute travers...
Copy code The code is as follows: <html xmlns=...
When you log in to MySQL remotely, the account yo...
Written in front Weibo components are component p...
This article shares the specific code of js to im...
The PC version of React was refactored to use Ama...
Although head and DTD will not be displayed on th...
The utf8mb4 encoding is a superset of the utf8 en...
Migration is unavoidable in many cases. Hardware ...
Table of contents Creating an SSL Certificate 1. ...
Before I start, let me emphasize that process.env...
I am currently developing a new app project. This...