In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Compiled and installed services are managed by systemctl
In our door, we usually compile and install a service, and it may be troublesome to start and restart. To call commands, or to manage the service by writing scripts, then we do not write scripts, but only add a systemctl configuration file to manage the compiled and installed services. Take nginx as an example.
We install the nginx compilation into the / usr/local/nginx directory, and we may need / usr/local/nginx/sbin to start when we start, or make a pathecho $PATH output path variable for the nginx command, and add export PATH=$PATH:/usr/lcoal/nginx/sbin/nginx to the profile file so that we can use the nginx command directly, and we use systemctl to manage the nginx. We need to modify the systemctl configuration file * * / usr/lib/systemd/system** this directory is the configuration information of multiple services, we create a nginx configuration file, * * it is best to name the service name * * ``vim nginx.service [unit] Description=nginxAfter= network.target [service] Type=forkingExecStart=/usr/lcoal/nginx/sbin/nginx # here is the startup command Not the absolute path of the command [Install] WantedBy=multi- user.target```If your service is mysql, of course, if it is mysql, you only need to change Description and ExecStart**ExecStart=/usr/local/mysqld start * * systemctl start nginxps aux | grep nginx to check whether the process is present.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.