Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The easiest way for linux to make a program run automatically when it starts up

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Collected a lot, all ended in failure, and finally found that this method is good, and does not affect the use, for the installation of the xampp system, more important, I hope you agree. The methods are as follows:

Create a new file in the / etc/init.d directory and set the file permissions to runnable. Take whatever name you want. My name is: xamppv. The contents are as follows, especially the first few lines with a # sign, which are indispensable and cannot be changed.

#! / bin/sh### BEGIN INIT INFO# Default-Start: 2 3 4 5# Default-Stop: 0 1 6### END INIT INFOPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/binsudo / opt/lampp/xampp start

Save the above files in the / etc/init.d directory and execute the following command. Sudo systemctl enable xamppv,sudo systemctl start xamppv can start the program immediately. The following command can be used, and it doesn't matter if you don't need it. Update-rc.d xampp defaults 400 .

Setup is complete, restart the computer!

The above is the method and code content of this introduction about linux to let the program boot automatically. Thank you for your study and support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report