將Apache service加入到開機啟動中

2022-07-16 17:15:15 字數 509 閱讀 7321

最近vps有的時候會無故重啟,每次都要手動開啟apache太麻煩,加到啟動項裡好了:

$ cp  /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/

$ sudo vim /etc/rc.d/init.d/apachectl

檔案頭加入以下內容

#!/bin/sh

# chkconfig: 35 65 15

# description:startup script for apache sevice

執行chkconfig加入啟動專案

$ sudo /sbin/chkconfig --add apachectl
完畢,檢查一下:

$ sudo /sbin/chkconfig --list apachectl

apachectl 0:off 1:off 2:off 3:on 4:off 5:on 6:off

好了,level3和5下會啟動了。

MySQL將指定的日期往後加幾天

update t security work set alarm time date add alarm time,interval 1 day where id 4 update 表名 set 列名 date add 列名,interval n day table push msg overvie...

UImageview加邊框 加陰影

uiimageview imgvphoto uiimageview alloc init 新增邊框 calayer layer imgvphoto layer layer.bordercolor uicolor whitecolor cgcolor layer.borderwidth 5.0f 新增...

夢想加正式發布OaaS體系 聯合辦公空間將達16個

9月10日訊息,聯合辦公空間品牌夢想加舉辦 辦公情緒展 正式發布 oaas office as a service,辦公即服務 服務體系,同時宣布將在年底前開放運營16個聯合辦公空間。發布會上,夢想加創始人王曉魯提出,辦公體驗不僅依賴空間設計 人性化的運營體系,更主要的是要依靠先進的科技智慧型來驅動...