systemd

openstack实验(五):网络服务

限于喜欢 提交于 2019-11-27 16:06:08
一、网络的概念 OpenStack网络(neutron)管理OpenStack环境中所有虚拟网络基础设施(VNI),物理网络基础设施(PNI)的接入层。OpenStack网络允许租户创建包括像 firewall, :term:"load balancer"和 :term:"virtual private network (VPN)"等这样的高级虚拟网络拓扑。 网络服务提供网络,子网以及路由这些对象的抽象概念。每个抽象概念都有自己的功能,可以模拟对应的物理设备:网络包括子网,路由在不同的子网和网络间进行路由转发。 对于任意一个给定的网络都必须包含至少一个外部网络。不像其他的网络那样,外部网络不仅仅是一个定义的虚拟网络。相反,它代表了一种OpenStack安装之外的能从物理的,外部的网络访问的视图。外部网络上的IP地址可供外部网络上的任意的物理设备所访问 外部网络之外,任何 Networking 设置拥有一个或多个内部网络。这些软件定义的网络直接连接到虚拟机。仅仅在给定网络上的虚拟机,或那些在通过接口连接到相近路由的子网上的虚拟机,能直接访问连接到那个网络上的虚拟机。 如果外部网络想要访问实例或者相反实例想要访问外部网络,那么网络之间的路由就是必要的了。每一个路由都配有一个网关用于连接到外部网络,以及一个或多个连接到内部网络的接口。就像一个物理路由一样

Can't detach child process when main process is started from systemd

情到浓时终转凉″ 提交于 2019-11-27 14:42:10
I want to spawn long-running child processes that survive when the main process restarts/dies. This works fine when running from the terminal: $ cat exectest.go package main import ( "log" "os" "os/exec" "syscall" "time" ) func main() { if len(os.Args) == 2 && os.Args[1] == "child" { for { time.Sleep(time.Second) } } else { cmd := exec.Command(os.Args[0], "child") cmd.SysProcAttr = &syscall.SysProcAttr{Setsid: true} log.Printf("child exited: %v", cmd.Run()) } } $ go build $ ./exectest ^Z [1]+ Stopped ./exectest $ bg [1]+ ./exectest & $ ps -ef | grep exectest | grep -v grep | grep -v vim snowm

kubernetes二进制离线安装(含docker)

倾然丶 夕夏残阳落幕 提交于 2019-11-27 14:04:14
环境:CentOS7.4 服务器环境是外网隔离状态,所需安装包需要本地下载,远程拷贝至服务器。下载好需要的包后,全部安装过程均为离线安装。 一、安装docker 下载二进制安装包https://download.docker.com/linux/static/stable/x86_64/ 1、解压 $ tar xzvf docker-18.06.1-ce.tgz 2、拷贝至/usr/bin $ sudo cp docker/* /usr/bin 3、启动docker daemon $ sudo dockerd & 4、制作 docker.service 和 docker.socket 文件(或下载) https://github.com/moby/moby/tree/master/contrib/init/systemd 其中的docker.service.rpm 文件修改名字为 docker.service;docker.socket 则不需要改动,直接复制粘贴新建一个 docker.socket 文件即可。 5、将上述步骤得到的 docker.service 和 docker.socket 文件一起放到 /etc/systemd/system 目录下 $ sudo cp docker.socket /etc/systemd/system $ sudo cp docker

【Linux】一步一步学Linux——pmap命令(145)

☆樱花仙子☆ 提交于 2019-11-27 14:00:52
00. 目录 文章目录 00. 目录 01. 命令概述 02. 命令格式 03. 常用选项 04. 参考示例 05. 附录 01. 命令概述 pmap命令 用于报告进程的内存映射关系,是Linux调试及运维一个很好的工具。 02. 命令格式 pmap [ 选项 ] 进程号 [ .. . ] 03. 常用选项 -x:显示扩展格式 -d:显示设备格式 -q:不显示头尾行 -V:显示指定版本 04. 参考示例 扩展格式和设备格式域 Address: start address of map 映像起始地址 Kbytes: size of map in kilobytes 映像大小 RSS: resident set size in kilobytes 驻留集大小 Dirty: dirty pages ( both shared and private ) in kilobytes 脏页大小 Mode: permissions on map 映像权限: r = read, w = write, x = execute, s = shared, p = private ( copy on write ) Mapping: file backing the map , or '[ anon ]' for allocated memory, or '[ stack ]' for the

nova计算服务一直处于activating (start)

两盒软妹~` 提交于 2019-11-27 12:40:32
[ root@node7 html ] # systemctl status openstack-nova-compute.service ● openstack-nova-compute.service - OpenStack Nova Compute Server Loaded: loaded ( /usr/lib/systemd/system/openstack-nova-compute.service ; enabled ; vendor preset: disabled ) Active: activating ( start ) since Fri 2019-08-16 11:01:37 CST ; 4s ago Main PID: 10840 ( nova-compute ) Tasks: 1 CGroup: /system.slice/openstack-nova-compute.service └─10840 /usr/bin/python2 /usr/bin/nova-compute Aug 16 11:01:37 node7 systemd [ 1 ] : Starting OpenStack Nova Compute Server .. . [ root@node7 html ] # systemctl status openstack-nova

ubuntu18.04 resolv.conf

穿精又带淫゛_ 提交于 2019-11-27 12:20:45
一开始我企图通过修改/etc/resolv.conf这个文件来配置一下DNS服务器的IP 我在文件中加入了: nameserver 8.8.8.8 然后正常的Ping www.baidu.com 就可以ping通了。 但是重启过后,resolv.conf这个文件中的nameserver 8.8.8.8消失了 因为它只是一个运行时文件 ➜ ~ ll /etc/resolv.conf lrwxrwxrwx 1 root root 39 Feb 14 2019 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf 说明这个文件重启之后会被重置。详细信息参考:man systemd-resolved.service 打开这个文件之后,看到注释中写到 managed by systemed-resolved 这个文件应该是由systemd所管理和生成 通过whereis systemd找到systemd的位置 通过分析,确定/etc/systemd应该是systemd这个工具的配置文件所在的位置 进入这个文件夹 猜测resolved.conf应该是DNS相关的配置 打开该文件 并修改DNS一栏,设置多个DNS服务器的地址,这样就完成了 DNS的修改,保存退出,然后重启机器。 然后再次 ping www.baidu.com

.netcore centos配置systemctl自动启动

血红的双手。 提交于 2019-11-27 10:31:54
systemd分两种服务系统和用户服务 对应存储位路径为系统( /user/lib/systemd/system/)、用户( /etc/lib/systemd/user/) [Unit] Description=api services After=network.target [Service] Type=forking ExecStart=/Service/API/RunDotNetServices.sh ExecReload=/Service/API/RunDotNetServices.sh ExecStop=/Service/API/RunDotNetServices.sh PrivateTmp=true [Install] WantedBy=multi-user.target 启动服务 systemctl start file.service 这里的fileservice为文件名 将会调用配置中的脚本 ExecStart:启动脚本 ExecReload:重启脚本 ExecStop:停止脚本 开机自启配置 systemctl enable file.service 来源: https://www.cnblogs.com/ives/p/11359718.html

Centos7.6部署单节点kubernets环境

落花浮王杯 提交于 2019-11-27 09:45:38
安装服务 [root@172_30_3_8 ~]# yum -y install etcd kubernetes 已加载插件:fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.tuna.tsinghua.edu.cn * epel: ftp.jaist.ac.jp * extras: mirrors.tuna.tsinghua.edu.cn * updates: mirror.bit.edu.cn 正在解决依赖关系 --> 正在检查事务 ---> 软件包 etcd.x86_64.0.3.3.11-2.el7.centos 将被 安装 ---> 软件包 kubernetes.x86_64.0.1.5.2-0.7.git269f928.el7 将被 安装 --> 正在处理依赖关系 kubernetes-node = 1.5.2-0.7.git269f928.el7,它被软件包 kubernetes-1.5.2-0.7.git269f928.el7.x86_64 需要 --> 正在处理依赖关系 kubernetes-master = 1.5.2-0.7.git269f928.el7,它被软件包 kubernetes-1.5.2-0.7.git269f928.el7.x86_64 需要 -->

systemctl 相关命令

落花浮王杯 提交于 2019-11-27 08:15:26
systemctl 相关命令:service,chkconfig systemd 是 Linux 下的一款系统和服务管理器,兼容 SysV 和 LSB 的启动脚本。systemd 的特性有:支持并行化任务;同时采用 socket 式与 D-Bus 总线式激活服务;按需启动守护进程(daemon);利用 Linux 的 cgroups 监视进程;支持快照和系统恢复;维护挂载点和自动挂载点;各服务间基于依赖关系进行精密控制。 任务 旧指令 新指令 使某服务自动启动 chkconfig --level 3 httpd on systemctl enable httpd.service 使某服务不自动启动 chkconfig --level 3 httpd off systemctl disable httpd.service 检查服务状态 service httpd status systemctl status httpd.service (服务详细信息) systemctl is-enabled httpd.service (仅显示是否 Active) 显示所有已启动的服务 chkconfig --list systemctl list-units --type=service 启动某服务 service httpd start systemctl start httpd

Is there a way to stop Erlang servers from automatically starting epmd?

限于喜欢 提交于 2019-11-27 07:06:16
问题 Erlang servers will automatically spawn epmd (the Erlang port mapper daemon) if it isn't already running. I would prefer to manage epmd using systemd as a separate service. This is so that if I have multiple Erlang servers running on one host (e.g. RabbitMQ and ejabberd), epmd won't dissapear if the server that automatically spawned epmd gets shut down. systemd will clean up any stray processes when a service gets shut down so an automatically spawned epmd won't survive. I can mostly handle