最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Linux下如何用Supervisor管理Springboot進(jìn)程?

 更新時(shí)間:2026年07月21日 14:53:40   作者:孤島千風(fēng)  
還在為進(jìn)程意外退出而煩惱嗎?本文手把手教你使用Supervisor這個(gè)強(qiáng)大的進(jìn)程管理工具,輕松實(shí)現(xiàn)Springboot等程序的守護(hù)、自動(dòng)重啟和Web界面管理,從安裝部署到配置文件詳解,讓你快速掌握supervisord和supervisorctl的實(shí)戰(zhàn)用法,運(yùn)維效率瞬間提升

Supervisor簡(jiǎn)介

Supervisor是一個(gè)C/S架構(gòu)進(jìn)程管理工具,通過它可以監(jiān)控和控制其他的進(jìn)程,同時(shí)它自身提供了一個(gè)WebUI,可以在WebUI進(jìn)行start、stop、restart操作。由Supervisor管理的進(jìn)程,都是它的子進(jìn)程。

Supervisor的服務(wù)器端稱為supervisord,主要負(fù)責(zé)在啟動(dòng)自身時(shí)啟動(dòng)管理的子進(jìn)程,響應(yīng)客戶端的命令,重啟崩潰或退出的子進(jìn)程,記錄子進(jìn)程stdout和stderr輸出,生成和處理子進(jìn)程生命周期中的事件??梢栽谝粋€(gè)配置文件中配置相關(guān)參數(shù),包括Supervisord自身的狀態(tài),其管理的各個(gè)子進(jìn)程的相關(guān)屬性。

Supervisor的客戶端稱為supervisorctl,它提供了一個(gè)類shell的接口(即命令行)來使用supervisord服務(wù)端提供的功能。通過supervisorctl,用戶可以連接到supervisord服務(wù)器進(jìn)程,獲得服務(wù)器進(jìn)程控制的子進(jìn)程的狀態(tài),啟動(dòng)和停止子進(jìn)程,獲得正在運(yùn)行的進(jìn)程列表??蛻舳送ㄟ^Unix域套接字或者TCP套接字與服務(wù)端進(jìn)行通信,服務(wù)器端具有身份憑證認(rèn)證機(jī)制,可以有效提升安全性。

當(dāng)客戶端和服務(wù)器位于同一臺(tái)機(jī)器上時(shí),客戶端與服務(wù)器共用同一個(gè)配置文件,通過不同標(biāo)簽來區(qū)分兩者的配置。

部署

安裝Supervisor

Supervisor由Python開發(fā),所以除了yum方式外也可以通過pip進(jìn)行安裝。

yum安裝

yum install -y epel-release && yum install -y supervisor

pip安裝

pip install supervisor

安裝jdk

由于是Springboot服務(wù)所以還需要安裝jdk。

yum install java-1.8.0-openjdk

Supervisor配置文件

在etc目錄下生成Supervisor配置文件。

echo_supervisord_conf > /etc/supervisord.conf

完整配置文件如下,也可以根據(jù)以下內(nèi)容直接創(chuàng)建配置文件。

; Sample supervisor config file.
;
; For more information on the config file, please see:
; http://supervisord.org/configuration.html
;
; Notes:
;  - Shell expansion ("~" or "$HOME") is not supported.  Environment
;    variables can be expanded using this syntax: "%(ENV_HOME)s".
;  - Quotes around values are not supported, except in the case of
;    the environment= options as shown below.
;  - Comments must have a leading space: "a=b ;comment" not "a=b;comment".
;  - Command will be truncated if it looks like a config file comment, e.g.
;    "command=bash -c 'foo ; bar'" will truncate to "command=bash -c 'foo ".
;
; Warning:
;  Paths throughout this example file use /tmp because it is available on most
;  systems.  You will likely need to change these to locations more appropriate
;  for your system.  Some systems periodically delete older files in /tmp.
;  Notably, if the socket file defined in the [unix_http_server] section below
;  is deleted, supervisorctl will be unable to connect to supervisord.

[unix_http_server]
file=/tmp/supervisor.sock   ; the path to the socket file
;chmod=0700                 ; socket file mode (default 0700)
;chown=nobody:nogroup       ; socket file uid:gid owner
;username=user              ; default is no username (open server)
;password=123               ; default is no password (open server)

; Security Warning:
;  The inet HTTP server is not enabled by default.  The inet HTTP server is
;  enabled by uncommenting the [inet_http_server] section below.  The inet
;  HTTP server is intended for use within a trusted environment only.  It
;  should only be bound to localhost or only accessible from within an
;  isolated, trusted network.  The inet HTTP server does not support any
;  form of encryption.  The inet HTTP server does not use authentication
;  by default (see the username= and password= options to add authentication).
;  Never expose the inet HTTP server to the public internet.

;[inet_http_server]         ; inet (TCP) server disabled by default
;port=127.0.0.1:9001        ; ip_address:port specifier, *:port for all iface
;username=user              ; default is no username (open server)
;password=123               ; default is no password (open server)

[supervisord]
logfile=/tmp/supervisord.log ; main log file; default $CWD/supervisord.log
logfile_maxbytes=50MB        ; max main logfile bytes b4 rotation; default 50MB
logfile_backups=10           ; # of main logfile backups; 0 means none, default 10
loglevel=info                ; log level; default info; others: debug,warn,trace
pidfile=/tmp/supervisord.pid ; supervisord pidfile; default supervisord.pid
nodaemon=false               ; start in foreground if true; default false
silent=false                 ; no logs to stdout if true; default false
minfds=1024                  ; min. avail startup file descriptors; default 1024
minprocs=200                 ; min. avail process descriptors;default 200
;umask=022                   ; process file creation umask; default 022
;user=supervisord            ; setuid to this UNIX account at startup; recommended if root
;identifier=supervisor       ; supervisord identifier, default is 'supervisor'
;directory=/tmp              ; default is not to cd during start
;nocleanup=true              ; don't clean up tempfiles at start; default false
;childlogdir=/tmp            ; 'AUTO' child log dir, default $TEMP
;environment=KEY="value"     ; key value pairs to add to environment
;strip_ansi=false            ; strip ansi escape codes in logs; def. false

; The rpcinterface:supervisor section must remain in the config file for
; RPC (supervisorctl/web interface) to work.  Additional interfaces may be
; added by defining them in separate [rpcinterface:x] sections.

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

; The supervisorctl section configures how supervisorctl will connect to
; supervisord.  configure it match the settings in either the unix_http_server
; or inet_http_server section.

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL  for a unix socket
;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
;username=chris              ; should be same as in [*_http_server] if set
;password=123                ; should be same as in [*_http_server] if set
;prompt=mysupervisor         ; cmd line prompt (default "supervisor")
;history_file=~/.sc_history  ; use readline history if available

; The sample program section below shows all possible program subsection values.
; Create one or more 'real' program: sections to be able to control them under
; supervisor.

;[program:theprogramname]
;command=/bin/cat              ; the program (relative uses PATH, can take args)
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
;numprocs=1                    ; number of processes copies to start (def 1)
;directory=/tmp                ; directory to cwd to before exec (def no cwd)
;umask=022                     ; umask for process (default None)
;priority=999                  ; the relative start priority (default 999)
;autostart=true                ; start at supervisord start (default: true)
;startsecs=1                   ; # of secs prog must stay up to be running (def. 1)
;startretries=3                ; max # of serial start failures when starting (default 3)
;autorestart=unexpected        ; when to restart if exited after running (def: unexpected)
;exitcodes=0                   ; 'expected' exit codes used with autorestart (default 0)
;stopsignal=QUIT               ; signal used to kill process (default TERM)
;stopwaitsecs=10               ; max num secs to wait b4 SIGKILL (default 10)
;stopasgroup=false             ; send stop signal to the UNIX process group (default false)
;killasgroup=false             ; SIGKILL the UNIX process group (def false)
;user=chrism                   ; setuid to this UNIX account to run the program
;redirect_stderr=true          ; redirect proc stderr to stdout (default false)
;stdout_logfile=/a/path        ; stdout log path, NONE for none; default AUTO
;stdout_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
;stdout_logfile_backups=10     ; # of stdout logfile backups (0 means none, default 10)
;stdout_capture_maxbytes=1MB   ; number of bytes in 'capturemode' (default 0)
;stdout_events_enabled=false   ; emit events on stdout writes (default false)
;stdout_syslog=false           ; send stdout to syslog with process name (default false)
;stderr_logfile=/a/path        ; stderr log path, NONE for none; default AUTO
;stderr_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
;stderr_logfile_backups=10     ; # of stderr logfile backups (0 means none, default 10)
;stderr_capture_maxbytes=1MB   ; number of bytes in 'capturemode' (default 0)
;stderr_events_enabled=false   ; emit events on stderr writes (default false)
;stderr_syslog=false           ; send stderr to syslog with process name (default false)
;environment=A="1",B="2"       ; process environment additions (def no adds)
;serverurl=AUTO                ; override serverurl computation (childutils)

; The sample eventlistener section below shows all possible eventlistener
; subsection values.  Create one or more 'real' eventlistener: sections to be
; able to handle event notifications sent by supervisord.

;[eventlistener:theeventlistenername]
;command=/bin/eventlistener    ; the program (relative uses PATH, can take args)
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
;numprocs=1                    ; number of processes copies to start (def 1)
;events=EVENT                  ; event notif. types to subscribe to (req'd)
;buffer_size=10                ; event buffer queue size (default 10)
;directory=/tmp                ; directory to cwd to before exec (def no cwd)
;umask=022                     ; umask for process (default None)
;priority=-1                   ; the relative start priority (default -1)
;autostart=true                ; start at supervisord start (default: true)
;startsecs=1                   ; # of secs prog must stay up to be running (def. 1)
;startretries=3                ; max # of serial start failures when starting (default 3)
;autorestart=unexpected        ; autorestart if exited after running (def: unexpected)
;exitcodes=0                   ; 'expected' exit codes used with autorestart (default 0)
;stopsignal=QUIT               ; signal used to kill process (default TERM)
;stopwaitsecs=10               ; max num secs to wait b4 SIGKILL (default 10)
;stopasgroup=false             ; send stop signal to the UNIX process group (default false)
;killasgroup=false             ; SIGKILL the UNIX process group (def false)
;user=chrism                   ; setuid to this UNIX account to run the program
;redirect_stderr=false         ; redirect_stderr=true is not allowed for eventlisteners
;stdout_logfile=/a/path        ; stdout log path, NONE for none; default AUTO
;stdout_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
;stdout_logfile_backups=10     ; # of stdout logfile backups (0 means none, default 10)
;stdout_events_enabled=false   ; emit events on stdout writes (default false)
;stdout_syslog=false           ; send stdout to syslog with process name (default false)
;stderr_logfile=/a/path        ; stderr log path, NONE for none; default AUTO
;stderr_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
;stderr_logfile_backups=10     ; # of stderr logfile backups (0 means none, default 10)
;stderr_events_enabled=false   ; emit events on stderr writes (default false)
;stderr_syslog=false           ; send stderr to syslog with process name (default false)
;environment=A="1",B="2"       ; process environment additions
;serverurl=AUTO                ; override serverurl computation (childutils)

; The sample group section below shows all possible group values.  Create one
; or more 'real' group: sections to create "heterogeneous" process groups.

;[group:thegroupname]
;programs=progname1,progname2  ; each refers to 'x' in [program:x] definitions
;priority=999                  ; the relative start priority (default 999)

; The [include] section can just contain the "files" setting.  This
; setting can list multiple files (separated by whitespace or
; newlines).  It can also contain wildcards.  The filenames are
; interpreted as relative to this file.  Included files *cannot*
; include files themselves.

;[include]
;files = relative/directory/*.ini

生成的配置文件模板由多段配置組成,使用英文分號(hào)“;”標(biāo)識(shí)注釋。

[unix_http_server]

這個(gè)配置段,配置http服務(wù)監(jiān)聽的 socket,它的作用是為了讓supervisorctl 能連接supervisord http server獲取進(jìn)程狀態(tài)信息,包括管理子進(jìn)程。

[unix_http_server]
file=/tmp/supervisor.sock   ; the path to the socket file
;chmod=0700                 ; socket file mode (default 0700)
;chown=nobody:nogroup       ; socket file uid:gid owner
;username=user              ; default is no username (open server)
;password=123               ; default is no password (open server)

[inet_http_server]

Supervisor提供了一個(gè)WebUI的管理界面,如果需要打開的話,就在這個(gè)配置段設(shè)置,port指定監(jiān)聽ip和端口,username 和password指定訪問WebUI需要的認(rèn)證信息。

[supervisord]

Supervisor服務(wù)的配置項(xiàng)。

[supervisord]
logfile=/tmp/supervisord.log ; main log file; default $CWD/supervisord.log
logfile_maxbytes=50MB        ; max main logfile bytes b4 rotation; default 50MB
logfile_backups=10           ; # of main logfile backups; 0 means none, default 10
loglevel=info                ; log level; default info; others: debug,warn,trace
pidfile=/tmp/supervisord.pid ; supervisord pidfile; default supervisord.pid
nodaemon=false               ; start in foreground if true; default false
silent=false                 ; no logs to stdout if true; default false
minfds=1024                  ; min. avail startup file descriptors; default 1024
minprocs=200                 ; min. avail process descriptors;default 200
;umask=022                   ; process file creation umask; default 022
;user=supervisord            ; setuid to this UNIX account at startup; recommended if root
;identifier=supervisor       ; supervisord identifier, default is 'supervisor'
;directory=/tmp              ; default is not to cd during start
;nocleanup=true              ; don't clean up tempfiles at start; default false
;childlogdir=/tmp            ; 'AUTO' child log dir, default $TEMP
;environment=KEY="value"     ; key value pairs to add to environment
;strip_ansi=false            ; strip ansi escape codes in logs; def. false

[supervisorctl]

Supervisor的客戶端程序supervisorctl的相關(guān)配置,注意serverurl對(duì)應(yīng)的sock就是[unix_http_server]中file的配置項(xiàng),如果上面配置了用戶名密碼,此處也需要配置。

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL  for a unix socket
;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
;username=chris              ; should be same as in [*_http_server] if set
;password=123                ; should be same as in [*_http_server] if set
;prompt=mysupervisor         ; cmd line prompt (default "supervisor")
;history_file=~/.sc_history  ; use readline history if available

[include]

指定包含的配置文件的路徑,通常被監(jiān)控的程序配置文件,一個(gè)程序一個(gè),更加清晰方便管理??梢詫⑹纠械?ini后綴改為.conf。

;[include]
;files = relative/directory/*.ini

[program:theprogramname]

具體需要監(jiān)控的程序配置項(xiàng),program冒號(hào)后面的內(nèi)容就是程序名稱。

;[program:theprogramname]
;command=/bin/cat              ; the program (relative uses PATH, can take args)
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
;numprocs=1                    ; number of processes copies to start (def 1)
;directory=/tmp                ; directory to cwd to before exec (def no cwd)
;umask=022                     ; umask for process (default None)
;priority=999                  ; the relative start priority (default 999)
;autostart=true                ; start at supervisord start (default: true)
;startsecs=1                   ; # of secs prog must stay up to be running (def. 1)
;startretries=3                ; max # of serial start failures when starting (default 3)
;autorestart=unexpected        ; when to restart if exited after running (def: unexpected)
;exitcodes=0                   ; 'expected' exit codes used with autorestart (default 0)
;stopsignal=QUIT               ; signal used to kill process (default TERM)
;stopwaitsecs=10               ; max num secs to wait b4 SIGKILL (default 10)
;stopasgroup=false             ; send stop signal to the UNIX process group (default false)
;killasgroup=false             ; SIGKILL the UNIX process group (def false)
;user=chrism                   ; setuid to this UNIX account to run the program
;redirect_stderr=true          ; redirect proc stderr to stdout (default false)
;stdout_logfile=/a/path        ; stdout log path, NONE for none; default AUTO
;stdout_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
;stdout_logfile_backups=10     ; # of stdout logfile backups (0 means none, default 10)
;stdout_capture_maxbytes=1MB   ; number of bytes in 'capturemode' (default 0)
;stdout_events_enabled=false   ; emit events on stdout writes (default false)
;stdout_syslog=false           ; send stdout to syslog with process name (default false)
;stderr_logfile=/a/path        ; stderr log path, NONE for none; default AUTO
;stderr_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
;stderr_logfile_backups=10     ; # of stderr logfile backups (0 means none, default 10)
;stderr_capture_maxbytes=1MB   ; number of bytes in 'capturemode' (default 0)
;stderr_events_enabled=false   ; emit events on stderr writes (default false)
;stderr_syslog=false           ; send stderr to syslog with process name (default false)
;environment=A="1",B="2"       ; process environment additions (def no adds)
;serverurl=AUTO                ; override serverurl computation (childutils) 

準(zhǔn)備springboot程序

準(zhǔn)備兩個(gè)Springboot程序demo01.jar、demo02.jar用于測(cè)試。程序內(nèi)容沒什么好說的,主要是提供一個(gè)接口來確認(rèn)程序是否正常運(yùn)行,并將兩個(gè)jar包上傳至/usr/app目錄下。。

package com.zzp;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
public class Demo01Application {

    @GetMapping("/hello")
    public String hello(){
        return "hello,demo01";
    }

    public static void main(String[] args) {
        SpringApplication.run(Demo01Application.class, args);
    }

}

package com.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
public class Demo02Application {

    @GetMapping("/hello")
    public String hello(){
        return "hello demo02";
    }

    public static void main(String[] args) {
        SpringApplication.run(Demo02Application.class, args);
    }

}

Springboot Supervisor程序配置

在/etc/supervisor目錄下準(zhǔn)備兩個(gè)Springboot對(duì)應(yīng)的Supervisor程序配置文件demo01.conf、demo02.conf,具體的配置文件含義可以參考注釋。

[program:demo01]
directory = /usr/app ; 程序的啟動(dòng)目錄
command = java -jar /usr/app/demo01.jar ; 啟動(dòng)命令,可以看出與手動(dòng)在命令行啟動(dòng)的命令是一樣的
autostart = true     ; 在 supervisord 啟動(dòng)的時(shí)候也自動(dòng)啟動(dòng)
startsecs = 30        ; 啟動(dòng) 30 秒后沒有異常退出,就當(dāng)作已經(jīng)正常啟動(dòng)了
autorestart = true   ; 程序異常退出后自動(dòng)重啟
startretries = 3     ; 啟動(dòng)失敗自動(dòng)重試次數(shù),默認(rèn)是 3
redirect_stderr = true  ; 把 stderr 重定向到 stdout,默認(rèn) false
stdout_logfile_maxbytes = 20MB  ; stdout 日志文件大小,默認(rèn) 50MB
stdout_logfile_backups = 20     ; stdout 日志文件備份數(shù)
; stdout 日志文件,需要注意當(dāng)指定目錄不存在時(shí)無法正常啟動(dòng),所以需要手動(dòng)創(chuàng)建目錄(supervisord 會(huì)自動(dòng)創(chuàng)建日志文件)
stdout_logfile = /usr/app/demo01.log ;應(yīng)用日志目錄
[program:demo02]
directory = /usr/app ; 程序的啟動(dòng)目錄
command = java -jar /usr/app/demo02.jar ; 啟動(dòng)命令,可以看出與手動(dòng)在命令行啟動(dòng)的命令是一樣的
autostart = true     ; 在 supervisord 啟動(dòng)的時(shí)候也自動(dòng)啟動(dòng)
startsecs = 30        ; 啟動(dòng) 30 秒后沒有異常退出,就當(dāng)作已經(jīng)正常啟動(dòng)了
autorestart = true   ; 程序異常退出后自動(dòng)重啟
startretries = 3     ; 啟動(dòng)失敗自動(dòng)重試次數(shù),默認(rèn)是 3
redirect_stderr = true  ; 把 stderr 重定向到 stdout,默認(rèn) false
stdout_logfile_maxbytes = 20MB  ; stdout 日志文件大小,默認(rèn) 50MB
stdout_logfile_backups = 20     ; stdout 日志文件備份數(shù)
; stdout 日志文件,需要注意當(dāng)指定目錄不存在時(shí)無法正常啟動(dòng),所以需要手動(dòng)創(chuàng)建目錄(supervisord 會(huì)自動(dòng)創(chuàng)建日志文件)
stdout_logfile = /usr/app/demo02.log ;應(yīng)用日志目錄

修改Supervisor配置文件

修改/etc/supervisord.conf文件中的[include]這段配置,將注釋放開并把上面兩個(gè)程序配置文件加入進(jìn)去。

[include]
files = /etc/supervisor/*.conf

啟動(dòng)supervisord

通過“-c”指定配置文件啟動(dòng)supervisord,否則會(huì)默認(rèn)到當(dāng)前目錄下去尋找。

supervisord -c /etc/supervisord.conf

驗(yàn)證程序

supervisord服務(wù)啟動(dòng)成功后,我們就可以通過supervisorctl命令進(jìn)行交互了。

# 查看管理進(jìn)程狀態(tài)
supervisorctl status
# 停止指定進(jìn)程,如果是all則是操作全部管理的進(jìn)程
supervisorctl stop [進(jìn)程名稱]
# 啟動(dòng)指定進(jìn)程,如果是all則是操作全部管理的進(jìn)程
supervisorctl start [進(jìn)程名稱]
# 重啟指定進(jìn)程,如果是all則是操作全部管理的進(jìn)程
supervisorctl restart [進(jìn)程名稱]
# 配置文件修改后使用該命令加載新的配置
supervisorctl update
# 重新啟動(dòng)配置中的所有程序
supervisorctl reload

輸入supervisorctl status如果看到以下內(nèi)容則表示兩個(gè)springboot服務(wù)啟動(dòng)成功。

[root@supervisor etc]# supervisorctl status
demo01                           RUNNING   pid 3853, uptime 0:01:50
demo02                           RUNNING   pid 3852, uptime 0:01:50

同樣通過ps -ef也能看到對(duì)應(yīng)進(jìn)程信息。

[root@supervisor etc]# ps -ef| grep java
root      3852  3851  0 16:36 ?        00:00:07 java -jar /usr/app/demo02.jar
root      3912  3851  1 16:40 ?        00:00:07 java -jar /usr/app/demo01.jar
root      3945  1643  0 16:49 pts/0    00:00:00 grep --color=auto java

訪問程序中的接口驗(yàn)證程序正常啟動(dòng)。

[root@supervisor ~]# curl http://127.0.0.1:8001/hello
hello,demo01
[root@supervisor ~]# curl http://127.0.0.1:8002/hello
hello,demo02

總結(jié)

以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • linux下使用cmake編譯安裝mysql的詳細(xì)教程

    linux下使用cmake編譯安裝mysql的詳細(xì)教程

    這篇文章主要介紹了linux下使用cmake編譯安裝mysql的詳細(xì)教程,非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2019-10-10
  • Linux五種IO模型的使用解讀

    Linux五種IO模型的使用解讀

    文章系統(tǒng)解析了Linux的五種IO模型(阻塞、非阻塞、IO復(fù)用、信號(hào)驅(qū)動(dòng)、異步),重點(diǎn)區(qū)分同步與異步IO的本質(zhì)差異,強(qiáng)調(diào)同步由用戶發(fā)起,異步由內(nèi)核觸發(fā),通過對(duì)比各模型的優(yōu)缺點(diǎn),幫助理解IO效率提升的關(guān)鍵機(jī)制
    2025-09-09
  • 虛擬機(jī)ubuntu16.04無法連網(wǎng)的解決方法

    虛擬機(jī)ubuntu16.04無法連網(wǎng)的解決方法

    這篇文章主要為大家詳細(xì)介紹了虛擬機(jī)ubuntu16.04無法連網(wǎng)的解決方法,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2019-03-03
  • LNMP自動(dòng)安裝部署腳本

    LNMP自動(dòng)安裝部署腳本

    LNMP是一個(gè)基于CentOS/Debian編寫的Nginx、PHP、MySQL、phpMyAdmin、eAccelerator一鍵安裝包,這篇文章主要為大家分享了LNMP自動(dòng)安裝部署腳本
    2016-10-10
  • Ubuntu20.04安裝配置GitLab的方法步驟

    Ubuntu20.04安裝配置GitLab的方法步驟

    這篇文章主要介紹了Ubuntu20.04安裝配置GitLab的方法步驟,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2020-08-08
  • linux磁盤管理軟RAID的實(shí)現(xiàn)原理分析和方法分享

    linux磁盤管理軟RAID的實(shí)現(xiàn)原理分析和方法分享

    這篇文章主要介紹了linux磁盤管理中做軟RAID的實(shí)現(xiàn)原理分析和方法分享,需要的朋友跟著學(xué)習(xí)下。
    2017-12-12
  • ubuntu系統(tǒng)theano和keras的安裝方法

    ubuntu系統(tǒng)theano和keras的安裝方法

    這篇文章主要介紹了ubuntu系統(tǒng)theano和keras的安裝方法,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2019-12-12
  • Linux內(nèi)核參數(shù)調(diào)整方法

    Linux內(nèi)核參數(shù)調(diào)整方法

    由于Linux的內(nèi)核參數(shù)信息都存在內(nèi)存中,因此可以通過命令直接修改,并且修改后直接生效。但是,當(dāng)系統(tǒng)重新啟動(dòng)后,原來設(shè)置的參數(shù)值就會(huì)丟失,而系統(tǒng)每次啟動(dòng)時(shí)都會(huì)自動(dòng)去/etc/sysctl.conf文件中讀取內(nèi)核參數(shù),因此將內(nèi)核的參數(shù)配置寫入這個(gè)文件中,是一個(gè)比較好的選擇。
    2017-11-11
  • 在Linux中限制root用戶SSH遠(yuǎn)程登錄的流程詳解

    在Linux中限制root用戶SSH遠(yuǎn)程登錄的流程詳解

    在Linux系統(tǒng)中,root用戶擁有最高權(quán)限,因此為了增強(qiáng)系統(tǒng)安全性,我們通常會(huì)限制root用戶通過SSH遠(yuǎn)程登錄,本文將介紹如何在Linux系統(tǒng)中限制root用戶的SSH遠(yuǎn)程登錄,需要的朋友可以參考下
    2024-03-03
  • 查看linux文件的命令詳解

    查看linux文件的命令詳解

    在本篇文章里小編給大家整理的是關(guān)于查看linux文件的命令總結(jié)內(nèi)容,有需要的朋友們可以學(xué)習(xí)下。
    2020-02-02

最新評(píng)論

咸宁市| 新郑市| 牡丹江市| 长沙县| 朔州市| 道孚县| 健康| 山东省| 伽师县| 星子县| 城固县| 牟定县| 仁布县| 济阳县| 柳河县| 洛浦县| 皋兰县| 内黄县| 阳新县| 温州市| 奇台县| 彭泽县| 广西| 涪陵区| 内丘县| 和平县| 讷河市| 沾益县| 宜章县| 留坝县| 临澧县| 察哈| 泗水县| 富锦市| 芦溪县| 清镇市| 湾仔区| 资阳市| 通渭县| 焦作市| 大姚县|