systemd

How do I run a Docker container that uses SystemD from the latest version of Ubuntu (18.10)?

社会主义新天地 提交于 2020-01-15 10:28:05
问题 I'm trying to execute a Docker image built using 'ubuntu:latest' and I keep getting SystemD error messages when I run the container: System has not been booted with systemd as init system (PID 1). Can't operate. If I try this solution and spawn the container using docker run -it -e container=docker your-image-name /sbin/init , I get the following error: Failed to mount tmpfs at /run: Operation not permitted Failed to mount tmpfs at /run/lock: Operation not permitted [!!!!!!] Failed to mount

CentOS7 service限制用户使用资源的配置

落花浮王杯 提交于 2020-01-15 10:08:18
CentOS6 限制用户使用资源的配置是在 /etc/security/limits.conf , 修改这个文件就可以解决问题 CentOS7中 /etc/security/limits.conf 文件的配置作用域缩小了一些。limits.conf这里的配置,只适用于通过PAM认证登录用户的资源限制,它对systemd的service的资源限制不生效. systemd service相关文件在 /etc/systemd/system.conf 和 /etc/systemd/user.conf。 同时,也会加载两个对应的目录中的所有.conf文件 以下是: /etc/systemd/system.conf 的内容 [ Manager ] #LogLevel=info #LogTarget=journal-or-kmsg #LogColor=yes #LogLocation=no #DumpCore=yes #CrashShell=no #ShowStatus=yes #CrashChVT=1 #CtrlAltDelBurstAction=reboot-force #CPUAffinity=1 2 #JoinControllers=cpu,cpuacct net_cls,net_prio #RuntimeWatchdogSec=0 #ShutdownWatchdogSec=10min

Linux入门-第六周

家住魔仙堡 提交于 2020-01-15 07:45:14
1、总结IP地址规划   IP地址的合理规划是网络设计中最重要的一环,在大型网络中必须对IP地址进行统一规划并得到实施。IP地址规划的好坏影响到网络路由协议算法的效率,影响到网络的性能,影响到网络的拓展,影响到网络的管理,也必将直接影响到网络应用的进一步发展。毫不夸张的说,看一个网络的规划质量和网络工程师的技术水准,直接看他的IP地址规划就好了。   IP地址规划的基本原则     1)唯一性:一个IP网络中不能有两个主机采用相同的IP地址。即使使用了支持地址重叠的MPLS/VPN技术,也尽量不要规划为相同的地址。     2)连续性:连续地址在层次结构网络中易于进行路径叠合,大大缩减路由表,提高路由算法的效率。     3)可扩展性:地址分配在每一层次上都要留有余量,在网络规模扩展时能保证地址所需的连续性。     4)实意性:顾名思义就是在分配IP地址时尽量使所分配的IP地址具有一定的实际意义,使人一看到该IP地址就可以知道此IP地址分配给了哪个部门或哪个地区。   在分配IP地址时需要注意一下几点     配置Loopback地址时,使用的子网掩码为32     配置互联地址时,使用的子网掩码为30     对各业务网关进行统一设定,比如将所有的网关统一设置为X.X.X.254 2、总结常见网络管理命令     ifconfig:      

systemctl start docker.service无法启动docker 服务的解决方法

别来无恙 提交于 2020-01-15 03:42:34
运行systemctl status docker.service报错如下: ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled) Active: failed (Result: start-limit) since Fri 2020-01-10 03:51:35 PST; 12s ago Docs: https://docs.docker.com Process: 28228 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE) Main PID: 28228 (code=exited, status=1/FAILURE) Jan 10 03:51:33 localhost.localdomain systemd[1]: docker.service failed. Jan 10 03:51:35 localhost.localdomain systemd[1]: Stopped

使用kubeadmin 配置 k8s 集群的填坑记录

血红的双手。 提交于 2020-01-14 18:39:47
使用kubeadmin 配置 k8s 集群 标签(空格分隔): kubernetes系列 一:系统初始化 二:kubernetes 安装 一:系统初始化 1.1 系统主机名 172.17.100.1 node01.flyfish 172.17.100.2 node02.flyfish 172.17.100.3 node03.flyfish 172.17.100.4 node04.flyfish 172.17.100.5 node05.flyfish 172.17.100.6 node06.flyfish 1.2 关闭firewalld 清空iptables 与 selinux 规则 系统节点全部执行: systemctl stop firewalld && systemctl disable firewalld && yum -y install iptables-services && systemctl start iptables && systemctl enable iptables && iptables -F && service iptables save 关闭 SELINUX swapoff -a && sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab setenforce 0 && sed -i 's/^SELINUX=

kubernetes的的私有仓库vmware harbor的配置

冷暖自知 提交于 2020-01-14 18:38:14
kubernetes的的私有仓库vmware harbor的配置 标签(空格分隔): kubernetes系列 一. 系统环境的配置 二. vmware harbor 的安装测试 三. 发布一个测试nginx 一:系统初始化 1.1 系统主机名 192.168.100.11 node01.flyfish 192.168.100.12 node02.flyfish 192.168.100.13 node03.flyfish 192.168.100.14 node04.flyfish 192.168.100.15 node05.flyfish 192.168.100.16 node06.flyfish 1.2 关闭firewalld 清空iptables 与 selinux 规则 系统节点全部执行: systemctl stop firewalld && systemctl disable firewalld && yum -y install iptables-services && systemctl start iptables && systemctl enable iptables && iptables -F && service iptables save 关闭 SELINUX swapoff -a && sed -i '/ swap / s/^\(.*\)$/#\1/g

Linux目录和文件高级操作精讲

坚强是说给别人听的谎言 提交于 2020-01-14 12:19:05
博文目录 一、Linux目录结构 二、Linux查看文件内容基础命令 三、压缩和解压缩文件 四、vi文本编辑器 一、Linux目录结构 Linux目录结构采用树形目录结构,包含根目录和子目录。 1、根目录 所有分区、目录、文件等的位置起点,整个树形目录结构中,使用独立的一个“/”表示。 2、子目录 常见的子目录如/root、/bin、/boot、/dev、/etc、/home、/var、/usr、/sbin。 3、子目录的作用 二、Linux查看文件内容基础命令 1、cat——查看文件内容 cat用于一次性显示文件全部内容。基本语法格式如下: 应用举例: [root@centos01 ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 [root@centos01 ~]# cat /etc/sysconfig/network # Created by anaconda [root@centos01 ~]# cat /etc/sysconfig/network /etc/hosts # Created by

centos7设置tomcat自启动

感情迁移 提交于 2020-01-13 23:11:13
在tomcat 的bin目录下加上下面两行代码: export JAVA_HOME=/usr/local/java/jdk1.8.0_11 export JRE_HOME=${JAVA_HOME}/jre 在/usr/lib/systemd/system目录下增加tomcat9.service文件,内容如下 [Unit] Description=Tomcat After=syslog.target network.target remote-fs.target nss-lookup.target [Service] Type=oneshot ExecStart=/usr/local/tomcat/tomcat9/bin/startup.sh ExecStop=/usr/local/tomcat/tomcat9/bin/shutdown.sh ExecReload=/bin/kill -s HUP $MAINPID RemainAfterExit=yes [Install] WantedBy=multi-user.target ExecStart 和ExecStop 分为tomcat的startup.sh和shutdown.sh的绝对路径。 执行 systemctl enable tomcat9.service 使tomcat9随开机启动 常用执行命令如下 systemctl

专题:initramfs & dracut

随声附和 提交于 2020-01-13 20:33:51
Initramfs   An initramfs (initial ram file system) is used by Linux systems to prepare the system during boot before the operating systems'init process starts.   The initramfs usually takes care of mounting important file systems (by loading the proper kernel modules and drivers) such as/usr or /var, preparing the /dev file structure, etc. Users who use an encrypted file system will also have the initramfs ask them for the passphrase before it can mount the file systems.   When the file systems are mounted, control is passed on to init which then takes care of further starting all necessary

Why doesn't PHP 7.2 fopen(/tmp, a) write to the file?

本小妞迷上赌 提交于 2020-01-13 13:13:07
问题 I have an old "PHPDBG" function that lets me "printf" to a text file. I've had PHPDBG.inc "since forever" (at least since PHP 4.x days), but it doesn't seem to be working in my current configuration (ubuntu18, Apache 2.4.29 and PHP 7.2). Specifically: I can't open the file ($fp is null) ... /tmp/PHPDBG.txt never gets created (because of the fopen failure) /tmp should be world-writable ... and ... I don't seem to be able to get a PHP error in the Apache error.log, or get anything meaningful