Linux系统提供各种系统服务(如进程管理、登录、syslog、cron等)和网络服务。
Linux支持不同的方法来管理服务(启动、停止、重启、在系统启动时的自动启动等),通常通过流程或服务管理器。
大多数现代Linux发行版现在使用相同的进程管理器:systemd

systemctl命令是管理systemd的主要工具
Systemd是Linux的系统和服务管理器; 
init进程的替代品,与SysV和LSB init脚本兼容。
systemctl将显示所有已加载的systemd单元
(有关systemd单元的更多信息,请阅读systemd文档)的列表,包括服务,并显示它们的状态(是否处于活动状态)

systemct

要列出系统上所有已加载的服务(无论是活动的,运行的,退出的还是失败的,请使用 list-units子命令和--type开关,其值为service。

//键入systemctl -- ##补充tab键就会出现下面的参数列表
[root@etcd2 conf]# systemctl --
--after --full --no-block --quiet --system
--all --global --no-legend --recursive --type
--before --help --no-pager --reverse --version
--defaults --host --no-reload --root
--fail --ignore-dependencies --no-wall --runtime
--failed --kill-who --privileged --signal
--force --no-ask-password --property --state
[root@etcd2 conf]# systemctl --
--after --full --no-block --quiet --system
--all --global --no-legend --recursive --type
--before --help --no-pager --reverse --version
--defaults --host --no-reload --root
--fail --ignore-dependencies --no-wall --runtime
--failed --kill-who --privileged --signal
--force --no-ask-password --property --state //tab键补全就会显示下面的命令列表

[root@etcd2 conf]# systemctl list-
list-dependencies list-jobs list-sockets list-timers list-unit-files list-units

[root@etcd2 conf]# systemctl --version
systemd 219
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN

[root@ht8 ~]# systemctl list-units --type=service
UNIT LOAD ACTIVE SUB DESCRIPTION
abrt-ccpp.service loaded active exited Install ABRT coredump hook
abrt-oops.service loaded active running ABRT kernel log watcher
abrtd.service loaded active running ABRT Automated Bug Reporting Tool
atd.service loaded active running Job spooling tools
auditd.service loaded active running Security Auditing Service
calico-node.service loaded active running calico node
● cloud-set-guest-password.service loaded failed failed SYSV: Password Download Client
crond.service loaded active running Command Scheduler
dbus.service loaded active running D-Bus System Message Bus
docker.service loaded active running Docker Application Container Engine
getty@tty1.service loaded active running Getty on tty1
gssproxy.service loaded active running GSSAPI Proxy Daemon
irqbalance.service loaded active running irqbalance daemon
kmod-static-nodes.service loaded active exited Create list of required static device nodes for the current kernel
kube-proxy.service loaded active running Kubernetes Kube-Proxy Server
kubelet.service loaded active running Kubernetes Kubelet Server
libstoragemgmt.service loaded active running libstoragemgmt plug-in server daemon
lvm2-lvmetad.service loaded active running LVM2 metadata daemon
lvm2-monitor.service loaded active exited Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress p
lvm2-pvscan@8:0.service loaded active exited LVM2 PV scan on device 8:0
lvm2-pvscan@8:18.service loaded active exited LVM2 PV scan on device 8:18
network.service loaded active exited LSB: Bring up/down networking
NetworkManager-wait-online.service loaded active exited Network Manager Wait Online
NetworkManager.service loaded active running Network Manager 或者 [root@ht8 ~]# systemctl --type=service
UNIT LOAD ACTIVE SUB DESCRIPTION
abrt-ccpp.service loaded active exited Install ABRT coredump hook
abrt-oops.service loaded active running ABRT kernel log watcher
abrtd.service loaded active running ABRT Automated Bug Reporting Tool
atd.service loaded active running Job spooling tools
auditd.service loaded active running Security Auditing Service
calico-node.service loaded active running calico node
● cloud-set-guest-password.service loaded failed failed SYSV: Password Download Client
crond.service loaded active running Command Scheduler
dbus.service loaded active running D-Bus System Message Bus
docker.service loaded active running Docker Application Container Engine
getty@tty1.service loaded active running Getty on tty1
gssproxy.service loaded active running GSSAPI Proxy Daemon
irqbalance.service loaded active running irqbalance daemon
kmod-static-nodes.service loaded active exited Create list of required static device nodes for the current kernel
kube-proxy.service loaded active running Kubernetes Kube-Proxy Server
kubelet.service loaded active running Kubernetes Kubelet Server
libstoragemgmt.service loaded active running libstoragemgmt plug-in server daemon
lvm2-lvmetad.service loaded active running LVM2 metadata daemon
lvm2-monitor.service loaded active exited Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress p
lvm2-pvscan@8:0.service loaded active exited LVM2 PV scan on device 8:0
lvm2-pvscan@8:18.service loaded active exited LVM2 PV scan on device 8:18
network.service loaded active exited LSB: Bring up/down networking
NetworkManager-wait-online.service loaded active exited Network Manager Wait Online
NetworkManager.service loaded active running Network Manager
lines 1-25

要列出所有已加载但处于活动状态的服务,包括正在运行的服务和已退出的服务,可以添加--state选项,其值为active,如下所示。

[root@ht8 ~]# systemctl list-units --type=service --state=active
UNIT LOAD ACTIVE SUB DESCRIPTION
abrt-ccpp.service loaded active exited Install ABRT coredump hook
abrt-oops.service loaded active running ABRT kernel log watcher
abrtd.service loaded active running ABRT Automated Bug Reporting Tool
atd.service loaded active running Job spooling tools
auditd.service loaded active running Security Auditing Service
calico-node.service loaded active running calico node
crond.service loaded active running Command Scheduler
dbus.service loaded active running D-Bus System Message Bus
docker.service loaded active running Docker Application Container Engine
getty@tty1.service loaded active running Getty on tty1
gssproxy.service loaded active running GSSAPI Proxy Daemon
irqbalance.service loaded active running irqbalance daemon
kmod-static-nodes.service loaded active exited Create list of required static device nodes for the current kernel
kube-proxy.service loaded active running Kubernetes Kube-Proxy Server
kubelet.service loaded active running Kubernetes Kubelet Server
libstoragemgmt.service loaded active running libstoragemgmt plug-in server daemon
lvm2-lvmetad.service loaded active running LVM2 metadata daemon
lvm2-monitor.service loaded active exited Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress pol
lvm2-pvscan@8:0.service loaded active exited LVM2 PV scan on device 8:0
lvm2-pvscan@8:18.service loaded active exited LVM2 PV scan on device 8:18
network.service loaded active exited LSB: Bring up/down networking
NetworkManager-wait-online.service loaded active exited Network Manager Wait Online
NetworkManager.service loaded active running Network Manager
nginx-proxy.service loaded active running kubernetes apiserver docker wrapper
lines 1-25

如果要快速浏览所有正在运行的服务(即所有已加载和正在运行的服务),请运行以下命令。

systemctl命令                  说明
systemctl 列出所有的系统服务
[root@etcd2 system]# systemctl
UNIT LOAD ACTIVE SUB DESCRIPTION
proc-sys-fs-binfmt_misc.automount loaded active waiting Arbitrary Executable File Formats File System Automoun
sys-devices-pci0000:00-0000:00:07.1-ata1-host0-target0:0:0-0:0:0:0-block-sr0.device loaded active plugged VMware_Virtual_IDE_CDROM
sys-devices-pci0000:00-0000:00:07.1-ata1-host0-target0:0:1-0:0:1:0-block-sda-sda1.device loaded active plugged VMware_Virtual_IDE_
sys-devices-pci0000:00-0000:00:07.1-ata1-host0-target0:0:1-0:0:1:0-block-sda-sda2.device loaded active plugged LVM PV dJcKYm-10WN-
sys-devices-pci0000:00-0000:00:07.1-ata1-host0-target0:0:1-0:0:1:0-block-sda.device loaded active plugged VMware_Virtual_IDE_Hard_
sys-devices-pci0000:00-0000:00:15.0-0000:03:00.0-host2-port\x2d2:0-end_device\x2d2:0-target2:0:0-2:0:0:0-block-sdb.device loaded act
....
//列出所有启动unit
[root@etcd2 system]# systemctl list-units
UNIT LOAD ACTIVE SUB DESCRIPTION
proc-sys-fs-binfmt_misc.automount loaded active waiting Arbitrary Executable File Formats File System Automoun
sys-devices-pci0000:00-0000:00:07.1-ata1-host0-target0:0:0-0:0:0:0-block-sr0.device loaded active plugged VMware_Virtual_IDE_CDROM
sys-devices-pci0000:00-0000:00:07.1-ata1-host0-target0:0:1-0:0:1:0-block-sda-sda1.device loaded active plugged VMware_Virtual_IDE_
sys-devices-pci0000:00-0000:00:07.1-ata1-host0-target0:0:1-0:0:1:0-block-sda-sda2.device loaded active plugged LVM PV dJcKYm-10WN-
.....
//列出所有启动文件
[root@etcd2 system]# systemctl list-unit-files
UNIT FILE STATE
proc-sys-fs-binfmt_misc.automount static
dev-hugepages.mount static
dev-mqueue.mount static
proc-fs-nfsd.mount static
proc-sys-fs-binfmt_misc.mount static
sys-fs-fuse-connections.mount static
sys-kernel-config.mount static
sys-kernel-debug.mount static
tmp.mount disabled
var-lib-nfs-rpc_pipefs.mount static
brandbot.path disabled
systemd-ask-password-console.path static
systemd-ask-password-plymouth.path static
systemd-ask-password-wall.path static
session-153.scope static
...
// 列出所有service类型的unit [root@etcd2 system]# systemctl list-units --type=service --all
UNIT LOAD ACTIVE SUB DESCRIPTION
abrt-ccpp.service loaded active exited Install ABRT coredump hook
abrt-oops.service loaded active running ABRT kernel log watcher
abrt-vmcore.service loaded inactive dead Harvest vmcores for ABRT
abrt-xorg.service loaded inactive dead ABRT Xorg log watcher
abrtd.service loaded active running ABRT Automated Bug Reporting Tool
atd.service loaded active running Job spooling tools
auditd.service loaded active running Security Auditing Service
auth-rpcgss-module.service loaded inactive dead Kernel Module supporting RPCSEC_GSS
brandbot.service loaded inactive dead Flexible Branding Service
calico-node.service loaded active running calico node
● cloud-set-guest-password.service loaded failed failed SYSV: Password Download Client
...
//列出 kube-proxy的服务
[root@etcd2 system]# systemctl list-units --type=service --all | grep kube-proxy
kube-proxy.service loaded active running Kubernetes Kube-Proxy Server //列出所有target
[root@etcd2 system]# systemctl list-units --type=target --all
UNIT LOAD ACTIVE SUB DESCRIPTION
basic.target loaded active active Basic System
cryptsetup.target loaded active active Encrypted Volumes
emergency.target loaded inactive dead Emergency Mode
final.target loaded inactive dead Final Step
getty.target loaded active active Login Prompts
graphical.target loaded inactive dead Graphical Interface
local-fs-pre.target loaded active active Local File Systems (Pre)
local-fs.target loaded active active Local File Systems
multi-user.target loaded active active Multi-User System
.... [root@etcd2 system]# systemctl list-units --type=service --all
UNIT LOAD ACTIVE SUB DESCRIPTION
abrt-ccpp.service loaded active exited Install ABRT coredump hook
abrt-oops.service loaded active running ABRT kernel log watcher
abrt-vmcore.service loaded inactive dead Harvest vmcores for ABRT
abrt-xorg.service loaded inactive dead ABRT Xorg log watcher
abrtd.service loaded active running ABRT Automated Bug Reporting Tool
atd.service loaded active running Job spooling tools [root@ht8 ~]# systemctl list-units --type=service --state=running
UNIT LOAD ACTIVE SUB DESCRIPTION
abrt-oops.service loaded active running ABRT kernel log watcher
abrtd.service loaded active running ABRT Automated Bug Reporting Tool
atd.service loaded active running Job spooling tools
auditd.service loaded active running Security Auditing Service
calico-node.service loaded active running calico node
crond.service loaded active running Command Scheduler
dbus.service loaded active running D-Bus System Message Bus
docker.service loaded active running Docker Application Container Engine
getty@tty1.service loaded active running Getty on tty1
gssproxy.service loaded active running GSSAPI Proxy Daemon
irqbalance.service loaded active running irqbalance daemon
kube-proxy.service loaded active running Kubernetes Kube-Proxy Server
kubelet.service loaded active running Kubernetes Kubelet Server
libstoragemgmt.service loaded active running libstoragemgmt plug-in server daemon
lvm2-lvmetad.service loaded active running LVM2 metadata daemon
NetworkManager.service loaded active running Network Manager
nginx-proxy.service loaded active running kubernetes apiserver docker wrapper
ntpd.service loaded active running Network Time Service
polkit.service loaded active running Authorization Manager
postfix.service loaded active running Postfix Mail Transport Agent
rngd.service loaded active running Hardware RNG Entropy Gatherer Daemon
rpcbind.service loaded active running RPC bind service
rsyslog.service loaded active running System Logging Service loaded active running Network Time Service

一、service常用管理,kube-proxy服务为例

k8s注册到系统的服务一般有
kube-apiserver.service
kube-controller-manager.service
kubelet.service
kube-proxy.service
kube-scheduler.service
nginx-proxy.service
//cni网络
calico-node.service
//引擎
docker.service
//时间对于很多应用,例如:打卡,社交等必须的
ntpd.service
ntpdate.service
下面是常用操作
// 开机启动
[root@ht23 net.d]#systemctl enable kube-proxy.service
//关闭开机启动
[root@ht23 net.d]#systemctl disable kube-proxy.service
//启动服务
[root@ht23 net.d]#systemctl start kube-proxy.service
//停止服务
[root@ht23 net.d]#systemctl stop kube-proxy.service
// 重启服务
[root@ht23 net.d]#systemctl restart kube-proxy.service
//查看服务状态
[root@ht23 net.d]# systemctl status kube-proxy.service
//查看服务是否激活状态
[root@ht23 net.d]#systemctl is-active kube-proxy.service
active
//查看是否开机启动
[root@ht23 net.d]#systemctl is-enabled kube-proxy.service
enabled
//杀死服务进程
systemctl kill kube-proxy.service

二、服务启动的配置文件,下面以自建的kube-proxy.service为例

配置文件主要都放在 /usr/lib/systemd/system 或/lib/systemd/system 目录.

[root@ht23 k8snode]# ls   /usr/lib/systemd/system
abrt-ccpp.service lvm2-lvmpolld.service runlevel2.target
abrtd.service lvm2-lvmpolld.socket runlevel2.target.wants
abrt-oops.service lvm2-monitor.service runlevel3.target
abrt-pstoreoops.service lvm2-pvscan@.service runlevel3.target.wants
abrt-vmcore.service machine.slice runlevel4.target
abrt-xorg.service machines.target runlevel4.target.wants
arp-ethers.service mdadm-grow-continue@.service runlevel5.target
......

kube-proxy.service配置文件举例:

 
# 查看 kube-proxy.service 服务对应的启动配置文件

[root@ht23 net.d]# systemctl cat kube-proxy.service
# /usr/lib/systemd/system/kube-proxy.service
[Unit]
Description=Kubernetes Kube-Proxy Server
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
After=network.target

[Service]
EnvironmentFile=-/etc/kubernetes/conf/config
EnvironmentFile=-/etc/kubernetes/conf/proxy
ExecStart=/usr/local/bin/hyperkube proxy \
$KUBE_LOGTOSTDERR \
$KUBE_LOG_LEVEL \
$KUBE_MASTER \
$KUBE_PROXY_ARGS
Restart=on-failure
LimitNOFILE=65536

[Install]
WantedBy=multi-user.target //WantedBy:表示该服务所在的 Target(服务组)

//保存后
 cp 文件--->/usr/lib/systemd/system 或/lib/systemd/system下
systemctl daemon-reload //重载配置文件

Service启动配置文件讲解

EnvironmentFile:许多软件都有自己的环境参数文件,该字段指定文件路径
注意:/etc/profile 或者 /etc/profile.d/ 这些文件中配置的环境变量仅对通过 pam 登录的用户生效,而 systemd 是不读这些配置的。
systemd 是所有进程的父进程或祖先进程,它的环境变量会被所有的子进程所继承,如果需要给 systemd 配置默认参数可以在 /etc/systemd/system.conf 和 /etc/systemd/user.conf 中设置。
加载优先级 system.conf 最低,可能会被其他的覆盖。 Type:定义启动类型。可设置:simple,exec,forking,oneshot,dbus,notify,idle
simple(设置了 ExecStart= 但未设置 BusName= 时的默认值):ExecStart 字段启动的进程为该服务的主进程
forking:ExecStart 字段的命令将以 fork() 方式启动,此时父进程将会退出,子进程将成为主进程 ExecStart:定义启动进程时执行的命令
上面的例子中,启动 sshd 执行的命令是 /usr/sbin/sshd -D $OPTIONS,其中的变量 $OPTIONS 就来自 EnvironmentFile 字段指定的环境参数文件。类似的,还有如下字段:
ExecReload: 重启服务时执行的命令
ExecStop: 停止服务时执行的命令
ExecStartPre: 启动服务之前执行的命令
ExecStartPost:启动服务之后执行的命令
ExecStopPost: 停止服务之后执行的命令
RemainAfterExit:设为yes,表示进程退出以后,服务仍然保持执行
KillMode:定义 Systemd 如何停止服务,可以设置的值如下:
control-group(默认值):当前控制组里面的所有子进程,都会被杀掉
process:只杀主进程
mixed:主进程将收到 SIGTERM 信号,子进程收到 SIGKILL 信号
none:没有进程会被杀掉,只是执行服务的 stop 命令
Restart:定义了退出后,Systemd 的重启方式。可以设置的值如下:
no(默认值):退出后不会重启
on-success:只有正常退出时(退出状态码为0),才会重启
on-failure:非正常退出时(退出状态码非0),包括被信号终止和超时,才会重启
on-abnormal:只有被信号终止和超时,才会重启
on-abort:只有在收到没有捕捉到的信号终止时,才会重启
on-watchdog:超时退出,才会重启
always:不管是什么退出原因,总是重启
RestartSec:表示 Systemd 重启服务之前,需要等待的秒数

关于 Target,运行级别

# 查看默认 Target

[root@etcd2 system]# systemctl get-default
   multi-user.target

 multi-user.target表示默认的启动Target是multi-user.target。在这个组里的所有服务,都将开机启动。这就是为什么 systemctl enable 命令能设置开机启动的原因
# 查看 multi-user.target 包含的所有服务

[root@etcd2 system]# systemctl list-dependencies multi-user.target
 multi-user.target
 ● ├─abrt-ccpp.service
 ● ├─abrt-oops.service
 ● ├─abrt-vmcore.service
 ● ├─abrt-xorg.service
 ● ├─abrtd.service
 ● ├─atd.service
 ● ├─auditd.service
 ● ├─brandbot.path
 ● ├─calico-node.service
 ● ├─cloud-set-guest-password.service
 ● ├─crond.service
 ● ├─dbus.service
 ● ├─docker.service
 ● ├─etcd.service
 ● ├─irqbalance.service
 ● ├─kube-apiserver.service
 ......

# shutdown.target表示关机状态的

[root@etcd2 system]# systemctl list-dependencies shutdown.target
shutdown.target
● └─dracut-shutdown.service

# 常用的 Target 有两个:一个是 multi-user.target,表示多用户命令行状态;另一个是 graphical.target,表示图形用户状态,

[root@etcd2 system]# systemctl list-dependencies graphical.target //它依赖于 multi-user.target

graphical.target

● ├─cloud-set-guest-password.service
● ├─display-manager.service
● ├─network.service
● ├─systemd-update-utmp-runlevel.service
● ├─vmware-tools.service
● └─multi-user.target
● ├─abrt-ccpp.service
● ├─abrt-oops.service
● ├─abrt-vmcore.service
● ├─abrt-xorg.service
● ├─abrtd.service
● ├─atd.service
● ├─auditd.service
● ├─brandbot.path
● ├─calico-node.service
● ├─cloud-set-guest-password.service
● ├─crond.service
● ├─dbus.service
● ├─docker.service
● ├─etcd.service
● ├─irqbalance.service
● ├─kube-apiserver.service
● ├─kube-controller-manager.service
● ├─kube-proxy.service
.....

[root@etcd2 system]# systemctl status shutdown.target
● shutdown.target - Shutdown
Loaded: loaded (/usr/lib/systemd/system/shutdown.target; static; vendor preset: disabled)
Active: inactive (dead)
Docs: man:systemd.special(7)

这里补充下Linux下的7个运行级别:

0:系统停机状态,系统默认运行级别不能设置为0,否则不能正常启动,机器关闭。
1:单用户工作状态,root权限,用于系统维护,禁止远程登陆,就像Windows下的安全模式登录。
2:多用户状态,没有NFS支持。
3:完整的多用户模式,有NFS,登陆后进入控制台命令行模式。
4:系统未使用,保留一般不用,在一些特殊情况下可以用它来做一些事情。例如在笔记本电脑的电池用尽时,可以切换到这个模式来做一些设置。
5:X11控制台,登陆后进入图形GUI模式,XWindow系统。
6:系统正常关闭并重启,默认运行级别不能设为6,否则不能正常启动。运行init6机器就会重启。

  标准的Linux运行级别为3或5

运行级别原理:

1.在目录/etc/rc.d/init.d下有许多服务器脚本程序,一般称为服务(service)
2.在/etc/rc.d下有9个文件,rc{n}.d对应系统的7个运行级别

[root@etcd2 system]# cat /etc/rc.d/
   init.d/ rc0.d/ rc1.d/ rc2.d/ rc3.d/ rc4.d/ rc5.d/ rc6.d/ rc.local

3.rc{n}.d目录下都是一些符号链接文件,这些链接文件都指向init.d目录下的service脚本文件,命名规则为K+nn+服务名或S+nn+服务名,其中nn为两位数字。
4.系统会根据指定的运行级别进入对应的rcN.d目录,并按照文件名顺序检索目录下的链接文件:对于以K(Kill)开头的文件,系统将终止对应的服;对于以S(Start)开头的文件,系统将启动对应的服务
5.查看运行级别用:runlevel
6.进入其它运行级别用:initN,如果init3则进入终端模式,init5则又登录图形GUI模式
7.另外init0为关机,init6为重启系统

标准的Linux运行级别为3或5,如果是3的话,系统就在多用户状态;如果是5的话,则是运行着XWindow系统。不同的运行级别有不同的用处,也应该根据自己的不同情形来设置。例如,如果丢失了root口令,那么可以让机器启动进入单用户状态来设置。在启动后的lilo提示符下输入: init=/bin/shrw

这样就可以使机器进入运行级别1,并把root文件系统挂为读写。它会路过所有系统认证,让你使用passwd程序来改变root口令,然后启动到一个新的运行级。

建完配置文件设置自启动

# 添加或修改配置文件后,需要重新加载
systemctl daemon-reload # 设置自启动,实质就是在 /etc/systemd/system/multi-user.target.wants/ 添加服务文件的链接
systemctl enable zdy

其他请查看官方手册 https://www.freedesktop.org/software/systemd/man/systemd.service.html

Linux centos7系统列出systemd下所有正在运行的服务的更多相关文章

  1. Linux CentOS7系统中phpMyAdmin安装配置

    今天介绍的是如何在Linux CentOS7系统中配置phpMyAdmin. 目录 环境准备 安装包 基本设置 网站预览 环境准备 linux centos7系统 ssh软件 php语言环境 mysq ...

  2. Linux CentOS7系统中mysql8安装配置

    mysql是世界上最流行的关系型数据库管理系统,由瑞典MySQL AB公司开发,目前属于Oracle公司所有.今天我将记录一下如何在Linux centos7系统上安装和配置MySQL. 目录 环境准 ...

  3. Linux CentOS7系统中ssh的用法

    大家都知道,公司买上服务器,不可能实时在线操作虚拟机,也没有那个时间和精力登录到公司的云服务商官网进行操作,一来不安全,二来也效率不高. 如果是购买的虚拟主机,你可以使用ftp进行本地程序文件传输和从 ...

  4. 在Linux CentOS7系统中搭建LNMP

    LNMP就是Linux+Nginx+MySQL+PHP,既然是在Linux CentOS7那么Linux就是已经安装好了.所以接下百度一下接下来的教程,整理测试如下: 教程是centos6.2的有点老 ...

  5. Linux CentOS7系统中php安装配置

    本篇讲解如何配置php开发环境,让你的php代码可以正常的在网页中运行. 准备工作 linux centos7操作系统 ssh软件 nginx php资源 想要了解更多关于php的内容,请访问: ph ...

  6. Linux(CentOS7)系统中部署Django web框架

    1. 概述 部署django和vue架在逻辑上可以分为web层与数据库层:web前端通过实现了WSGI协议的模块对python代码进行解析,而python代码中则通过特定于数据库的操作接口对数据库进行 ...

  7. 通过Dapr实现一个简单的基于.net的微服务电商系统(十三)——istio+dapr构建多运行时服务网格之生产环境部署

    之前所有的演示都是在docker for windows上进行部署的,没有真正模拟生产环境,今天我们模拟真实环境在公有云上用linux操作如何实现istio+dapr+电商demo的部署. 目录:一. ...

  8. Linux centos7系统下svn的安装与配置

    一.安装svn # yum -y install svn 二.查看svn版本信息 # svnserve --version 三.搭建svn版本库(假设项目名称为project) 1.首先创建版本库目录 ...

  9. CentOS7系统64位下搭建Python3.6环境及相关细节工具部署文章收集

    (1)http://blog.csdn.net/chen798213337/article/details/70767902 问题描述: 安装Navicat管理数据库时,启动界面出现乱码情况. 解决办 ...

随机推荐

  1. CF1278F题解

    这不是傻逼题吗?????? 考虑到第一张是王牌的概率为 \(\frac{1}{m}\),答案就是: \[\sum_{i=0}^n\binom{n}{i}(\frac{1}{m})^i(1-\frac{ ...

  2. LGP6442题解

    和SP13106是双倍经验哦 我们首先发现 \(m=20\),所以一言不合先状压. 然后发现状压了之后我们实际上要求的是有多少个子集按位或的值为全集,相当于求有多少个子集按位与的值为 \(0\).(把 ...

  3. 内置方法 __new__ __del__

    1.__new__ 构造方法 实例化对象是先执行__new__方法,但是类中没有__new__方法,所以先到父类object类中的new方法,开辟一个属于对象的空间,然后再执行init方法 设计模式: ...

  4. pip国内镜像,提升下载速度和安装成功率

    对于Python开发用户来讲,PIP安装软件包是家常便饭.但国外的源下载速度实在太慢,浪费时间.而且经常出现下载后安装出错问题.所以把PIP安装源替换成国内镜像,可以大幅提升下载速度,还可以提高安装成 ...

  5. c# winform 窗体 对话框绑定的值如何填到主窗体问题

    这段代码放在主窗体中 private void txt_KeJiaAModel_DoubleClick(object sender, EventArgs e) { TimerEvent(); } // ...

  6. C#中的类型转换-自定义隐式转换和显式转换

    目录 前言 基础知识 示例代码 实际应用 问题 答案 报错 用户定义的转换必须是转换成封闭类型,或者从封闭类型转换 参考 其他 应用和设计 读音 参考 前言 有时我们会遇到这么一种情况:在json数据 ...

  7. windows 访问 CentOS 的防火墙及其 网关开放

    1.防火墙开放端口 firewall-cmd --zone=public --add-port=8848/tcp --permanent firewall-cmd --list-ports 开放cen ...

  8. Oracle问题解决记录

    一.前言 oracle这么一个庞大的东西,出点问题真是太常见了.开个博客,用于记录遇到的问题吧. 持续更新. 二.问题列表 归档日志满,引起的问题. 一台服务器,用了很久了,某天,出现了磁盘空间占满的 ...

  9. 如何在自定义端口上运行 Spring Boot 应用程序?

    为了在自定义端口上运行 Spring Boot 应用程序,您可以在 application.properties 中指定端口. server.port = 8090

  10. thrift使用和源码分析

    1 前言 thrift的官方文档比较差,很多细节没有介绍清楚,比如require.optional和default字段的区别是什么,为什么字段前面要写序号等,带着这些疑问,我们需要阅读生成的源码来了解 ...