宝塔面板添加定时重启任务

网站运营6461

长时间使用BT宝塔面板会存在一个问题,就是系统会有残留的进程,单纯的清理内存是不管用的。重启各种系统服务才会降低内存,我们可以将下列命令添加在定时任务里面!

重启Nginc文章源自SEO视频网-https://www.seoshipin.cn/wzyunying/4148.html

/etc/init.d/nginx restart

 文章源自SEO视频网-https://www.seoshipin.cn/wzyunying/4148.html

重启Mysql文章源自SEO视频网-https://www.seoshipin.cn/wzyunying/4148.html

/etc/init.d/mysqld restart

 文章源自SEO视频网-https://www.seoshipin.cn/wzyunying/4148.html

重启PHP
(根据安装PHP版本号做更改,例如:/etc/init.d/php-fpm-54 restart )文章源自SEO视频网-https://www.seoshipin.cn/wzyunying/4148.html

/etc/init.d/php-fpm-{52|53|54|55|56|70|71} restart

 文章源自SEO视频网-https://www.seoshipin.cn/wzyunying/4148.html

重启Memcached文章源自SEO视频网-https://www.seoshipin.cn/wzyunying/4148.html

/etc/init.d/memcached restart

 文章源自SEO视频网-https://www.seoshipin.cn/wzyunying/4148.html

重启Apache文章源自SEO视频网-https://www.seoshipin.cn/wzyunying/4148.html

/etc/init.d/httpd restart

 文章源自SEO视频网-https://www.seoshipin.cn/wzyunying/4148.html

重启FTP

/etc/init.d/pure-ftpd restart
有时候打开网站显示数据库连接错误,我就知道这是MySQL数据库自动停止了导致的网站打不开。我们可以在计划任务那里添加一个定时...
7491

如需更多命令请参考BT命令大全,参考文档:https://www.bt.cn/btcode.html

 
  • 本文由 潮涌SEO 发表于 2022年2月8日 15:01:25
  • 转载请务必保留本文链接:https://www.seoshipin.cn/wzyunying/4148.html