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

How to add Mysql and Apache to the system service under Linux

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly explains "how to add Mysql and Apache to the system service under Linux". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to add Mysql and Apache to the system service under Linux".

Apache is added to the system service:

/ apache/bin/apachectl / etc/rc.d/init.d/httpd under cp / installation directory

Modify httpd

Add the following to the header of the file:

# # #

# Comments to support chkconfig on RedHat Linux

# chkconfig: 2345 90 90

# description:http server

# # #

Save

Breaking in

# chkconfig-add httpd

# chkconfig-- level 345 httpd on

MySQL is added to the system service

Cp / usr/local/mysql/share/mysql/mysql.server / etc/init.d/mysqld

# copy the script file of msql to the boot directory of the system

Cd / etc/init.d/

Chkconfig-add mysqld # add mysql to the startup service list

Chkconfig mysqld on # enables the mysql service to be turned on automatically when the system starts up

Apache is added to the startup item:

Echo'/ usr/local/apache2/bin/apachectl start'> > / etc/rc.local

Thank you for reading, the above is the content of "how to add Mysql and Apache to the system service under Linux". After the study of this article, I believe you have a deeper understanding of how to add Mysql and Apache to the system service under Linux, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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