In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.