systemd

Kubernetes探秘—配置文件目录结构

微笑、不失礼 提交于 2019-11-27 05:44:01
Kubernetes的配置目录包括/etc/kubernetes、/home/supermap/.kube和/var/lib/kubelet目录。 下面我们来看一看,这些目录里到底有些什么文件(操作系统使用Ubuntu 18.04LTS desktop)。 安装tree命令: sudo apt install tree 1、kubernetes主配置目录 显示/etc/kubernetes目录结构: supermap@podc01:/etc/kubernetes$ tree . . ├── admin.conf ├── controller-manager.conf ├── kubelet.conf ├── manifests │ ├── etcd.yaml │ ├── kube-apiserver.yaml │ ├── kube-controller-manager.yaml │ └── kube-scheduler.yaml ├── pki │ ├── apiserver.crt │ ├── apiserver-etcd-client.crt │ ├── apiserver-etcd-client.key │ ├── apiserver.key │ ├── apiserver-kubelet-client.crt │ ├── apiserver-kubelet-client

Linux常用命令

南楼画角 提交于 2019-11-27 05:04:27
systemctl:服务管理命令 systemctl是一个系统管理守护进程、工具和库的集合,用于取代System V、service和chkconfig命令,初始进程主要负责控制systemd系统和服务管理器 systemctl #列出所有的系统服务 systemctl status docker #显示服务状态 systemctl list-dependencies docker #列出服务层级和依赖关系 systemctl start docker #启动服务 systemctl stop docker #关闭服务 systemctl restart docker #重启服务 systemctl enable docker #设置服务自启动 systemctl disable docke #禁止服务自启动 systemctl is-active docker #查看服务是否运行systemctl is-enabled docker #查看服务是否自启动 systemctl list-units --type=service #列出系统所有服务的启动情况 systemctl list-unit-files|grep enabled #列出所有自启动服务 centos6 没有使用 systemd,所以没有 systemctl 命令。对应的旧指令(chkconfig、service)

【RHEL7/CentOS7服务控制之systemctl命令】

假如想象 提交于 2019-11-27 02:52:28
原文: http://106.13.73.98/__/85/ Systemd 对于Linux来说,就是一个 init 程序,可以作为 sysVinit 和 Upstat 的替代。 RHEL7监控和控制Systemd的主要命令是 systemctl ,该命令可 查看系统状态 和 管理系统及服务 。 RHEL7的服务systemctl脚本存放在: /usr/lib/systemd ,有 系统(system) 和 用户(user) 之分。 . 像一些需要开机不登陆就得运行的程序,就存在系统服务里,即: /usr/lib/systemd/system 目录下。而关于用户的存放在 /usr/lib/systemd/user 目录下。 . 其中每一个服务以 .service 结尾,一般分为3部分: [Unit] 、 [Service] 、 [Install] . 如下图(sshd服务): [Unit] 这部分是对这个服务的说明,主要内容包括Description和After。 Description用于描述服务;After用于描述服务类型。 . [Service] 这部分是服务的关键,是服务的一些具体运行参数的设置。 Type=forking 表示此服务是后台运行的形式。 PIDFile 指定存放PID的文件路径。 ExecStart 为服务的具体运行命令。 ExecReload 为重载命令。

chapter10作业

时光怂恿深爱的人放手 提交于 2019-11-27 02:41:37
1 、通过 ps 命令的两种选项形式查看进程信息 [root@localhost ~]# ps aux | head USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.5 60516 5144 ? Ss 08:28 0:02 /usr/lib/systemd/systemd --switched-root --system --deserialize 21 root 2 0.0 0.0 0 0 ? S 08:28 0:00 [kthreadd] root 3 0.0 0.0 0 0 ? S 08:28 0:00 [ksoftirqd/0] root 5 0.0 0.0 0 0 ? S< 08:28 0:00 [kworker/0:0H] root 6 0.0 0.0 0 0 ? S 08:28 0:00 [kworker/u256:0] root 7 0.0 0.0 0 0 ? S 08:28 0:00 [migration/0] root 8 0.0 0.0 0 0 ? S 08:28 0:00 [rcu_bh] root 9 0.0 0.0 0 0 ? S 08:28 0:00 [rcuob/0] root 10 0.0 0.0 0 0 ? S 08:28 0:00 [rcuob/1]

Fixing a systemd service 203/EXEC failure (no such file or directory)

被刻印的时光 ゝ 提交于 2019-11-27 00:50:33
问题 I'm trying to set up a simple systemd timer to run a bash script every day at midnight. systemctl --user status backup.service fails and logs the following: backup.service: Failed at step EXEC spawning /home/user/.scripts/backup.sh: No such file or directory. backup.service: Main process exited, code=exited, status=203/EXEC Failed to start backup. backup.service: Unit entered failed state. backup.service: Failed with result 'exit-code'. I'm lost, since the files and directories exist. The

systemd and systemctl within Ubuntu Docker images [closed]

筅森魡賤 提交于 2019-11-27 00:20:10
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . It seems systemd is not active or available in Ubuntu Docker images. I'm running Docker containers from the ubuntu:16.04 and ubuntu:16.10 images. If I execute systemctl status ssh in the 16,04 container the result is the error Failed to connect to bus: No such file or directory . In the 16.10 container the error

【RHEL7/CentOS7基本配置】 -- 2019-08-11 19:43:39

蹲街弑〆低调 提交于 2019-11-27 00:16:50
目录 原文: http://106.13.73.98/__/83/ @ 相比于6.x的版本,Rhel7/CentOS7增加或改进了以下7大特性。 1.身份管理 kerberos 的跨平台信任机制:kerberos将完全兼容微软活动目录,实现完全使用活动目录进行认证。 REALMD :该功能简化了RHEL加入微软活动目录的配置,支持自动发现域信息。 RHEL7增加了这两个关键性的新特征改善了RHEL对AD的处理方式。 现在,RHEL7和AD之间建立了跨域信任(Cross-realm trusts),因此AD用户可以在Linux端无需登录就能访问资源。 RHEL7增加的另外一个AD相关的功能是realmd,实现自动化查询与添加AD(或其它红帽认证服务)DNS 信息。 2.性能管理 性能辅助工具 :RHEL7 提供了一个新的框架和一个新的通用图形界面来提供性能辅助管理。 可以收集、分析系统瓶颈。 调优和调优配置 :RHEL7 提供了动态调优方案,来解决系统性能瓶颈问题。系统管理员也 可以手动修改系统预置的方案来达到调优的效果 3.虚拟化 增强RHEL7虚拟机 :完全兼容vmwarevshpere架构,RHEL7 自带open vmtool 、3D图形驱动和OpenGLX11的支持。使得 RHEL7部署在vmware平台更加方便。RHEL7 同时支持 vmware esxi之间快速通信。

How to redirect output of systemd service to a file

喜欢而已 提交于 2019-11-26 21:16:22
I am trying to redirect output of a systemd service to a file but it doesn't seem to work: [Unit] Description=customprocess After=network.target [Service] Type=forking ExecStart=/usr/local/bin/binary1 agent -config-dir /etc/sample.d/server StandardOutput=/var/log1.log StandardError=/var/log2.log Restart=always [Install] WantedBy=multi-user.target Please correct my approach. Valerio Versace I think there's a more elegant way to solve the problem: send the stdout/stderr to syslog with an identifier and instruct your syslog manager to split its output by program name. Use the following properties

CentOS7 升级 openssh 到 openssh-8.0p1版本

半城伤御伤魂 提交于 2019-11-26 18:28:27
centos7.3和centos7.6升级完毕测试登录ssh以及重启后登录ssh均无问题。 前期请自行配置好yum源(如果不会请百度) 整个过程不需要卸载原先的openssl包和openssh的rpm包。不影响我们的操作 本文的环境都是系统自带的openssh,没有经历过手动编译安装方式。如果之前有手动编译安装过openssh,请参照本文自行测试是否能成功。 如果严格参照本文操作,我保证你升级没问题 centos7.6升级后的效果 1 2 3 4 5 6 7 8 [root@testssh ~] # ssh -V OpenSSH_8.0p1, OpenSSL 1.0.2r 26 Feb 2019 [root@testssh ~] # openssl version OpenSSL 1.0.2r 26 Feb 2019 [root@testssh ~] # cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) [root@testssh ~] #    centos7.3升级后的效果 1 2 3 4 5 6 7 [root@linux-node3 ~] # openssl version OpenSSL 1.0.2r 26 Feb 2019 [root@linux-node3 ~] # ssh -V OpenSSH

kubernetes 使用cri-o 替换docker

淺唱寂寞╮ 提交于 2019-11-26 18:02:06
部署环境 # 操作系统:CentOS Linux release 8.0.1905 (Core) # kubelet 版本: v1.14.0 # runc版本:v1.0.0-rc9 # crictl 版本:v1.16.1 #crio版本:v1.15.2 #conmon版本:v2.0.1 # cni版本:v0.8.2 # 网络插件: kube-router #工作目录: /apps # 二进制文件目录: /usr/bin # cni 目录:/apps/cni # 工作节点:win10 on Ubuntu 19.10 # 工作目录:/mnt/g/work/crio # 节点IP:192.168.2.196 # 节点名:node05 准备所需二进制文件 mkdir -p /mnt/g/work/crio cd /mnt/g/work/crio wget https://github.com/opencontainers/runc/releases/download/v1.0.0-rc9/runc.amd64 wget https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.16.1/crictl-v1.16.1-linux-amd64.tar.gz wget https://github.com/cri-o