systemd

Is it recommended to run systemd inside docker container?

痞子三分冷 提交于 2020-08-01 18:14:27
问题 I am planning to use 'systemd' inside the container. Based on the articles I have read, it is preferable to limit only one process per container. But if I configure 'systemd' inside the container, I will end up running many processes. It would be great to understand the pros and cons of using systemd inside the container before I take any decision. 回答1: I'd advise you to avoid systemd in a container if at all possible. Systemd mounts filesystems, controls several kernel parameters, has its

k8s记录-prometheus部署

痞子三分冷 提交于 2020-07-29 09:15:22
prometheus 安装 官网:https://prometheus.io/download/ wget https://github.com/prometheus/prometheus/releases/download/v2.10.0/prometheus-2.10.0.linux-amd64.tar.gz tar xvf prometheus-2.10.0.linux-amd64.tar.gz mv prometheus-2.10.0.linux-amd64 /usr/local/prometheus cd /usr/local/prometheus vim prometheus.yml scrape_configs: - job_name: 'prometheus' static_configs: # 监控本地及端口 - targets: ['xiangsikai:9090'] 注:Prometheus从目标机上通过http方式拉取采样点数据, 它也可以拉取自身服务数据并监控自身的健康状况。 启动服务 ./prometheus --config.file=prometheus.yml # 指定配置文件 --config.file="prometheus.yml" # 指定监听地址端口 --web.listen-address="0.0.0.0:9090" # 最大连接数

MySQL Resource Groups

大城市里の小女人 提交于 2020-07-29 07:40:32
作者:蒋乐兴 MySQL-DBA 目前在 github 上维护着两套 MySQL 开源工具 mysqltools & dbm(dbm-agent dbm-center),对机器学习和程序化交易也有些心得。 原文链接:https://sqlpy.com/blogs/80216056 背景 有些情况下我们对 SQL 的时效性要求并不高,比如导出每日新增用户报表;还有一些时效性要求非常高的任务,比如注册。由于资源有限,我们要这两件事在同一个 MySQL 实例上完成(是的就是这么穷,一个 Slave 都没有); 之前的解决方案是在业务压力低谷时(通常是凌晨之后)执行导出报表的工作,MySQL 8 提出了新的解决方案资源组(Resource Groups),可以用它来限制特定任务的资源使用上限,只要这种导出报表的任务给的资源足够的少,就太会影响线上业务。 Resource Groups 原理 MySQL 定义了一个资源组的概念,然后让单个连接或单条 SQL 语句隶属于某一个组,这样单个连接或单条 SQL 语句所能占用的资源总量就被这个组的资源总量限定住了。 资源组对资源的定义用白话来讲差不多就是 “把第一个到第四个 cpu 核心分配给资源组A,把第五个到第八个 cpu 核心分配给资源组B”,也就是说资源组是一个单纯的逻辑概念,同一个物理核心可以同时隶属于多个资源组

CentOS 7.4安装配置Oracle 12cR2 12.2.0.1.0

十年热恋 提交于 2020-07-29 05:47:48
CentOS 7.4安装配置Oracle 12cR2 12.2.0.1.0 Marion0728 关注 0人评论 6293人阅读 2018-08-08 16:50:51 一、 环境介绍: IP:192.168.1.231 OS:CentOS 7.4 x86_64 CPU:8 内存 :16G 硬盘 :200G JDK版本 :1.8.0_181 Oracle 版本 :12.2.0.1.0 二、 安装准备: 1、 关闭 SElinux 和 firewalld 2、 安装依赖软件包: # yum -y install unzip ntp binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*.i686 elfutils-libelf-devel gcc gcc-c++ glibc*.i686 glibc glibc-devel glibc-devel*.i686 ksh libgcc*.i686 libgcc libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.i686 libaio libaio*.i686 libaio-devel libaio-devel*.i686 make sysstat unixODBC unixODBC*.i686

seafile

£可爱£侵袭症+ 提交于 2020-07-28 20:36:56
Seafile 是一款安全、高性能的开源网盘(云存储)软件。Seafile 提供了主流网盘(云盘)产品所具有的功能,包括文件同步、文件共享等。在此基础上,Seafile 还提供了高级的安全保护功能以及群组协作功能。由于 Seafile 是开源的,你可以把它部署在私有云的环境中,作为私有的企业网盘。Seafile 支持 Mac、Linux、Windows 三个桌面平台,支持 Android 和 iOS 两个移动平台 实验环境 centos7_x64 seafile_server 192.168.10.17 seafile_client_windows 192.168.10.18 实验软件 seafile-server_6.0.8_x86-64.tar.gz seafile-6.2.11.msi 软件安装 sed -i.bak 's/https/http/g' /etc/yum.repos.d/epel.repo cat /etc/sysconfig/selinux SELINUX=disabled systemctl stop firewalld.service && systemctl disable firewalld.service python --version 如使用centos6先升级Python Python 2.7.5 yum -y install mariadb

Linux 客户端代理配置

会有一股神秘感。 提交于 2020-07-28 17:49:23
socks5 to http sock5 转 http 这里采用 privoxy 进行转换 Mac: brew install privoxy Ubuntu: apt-get -y install privoxy 安装成功后,需要修改配置以指定 socks5 端口以及不代理的白名单,配置文件位置如下: Mac: /usr/local/etc/privoxy/config Ubuntu: /etc/privoxy/config 在修改之前请备份默认配置文件,这是个好习惯,备份后修改内容如下: 转发地址 forward-socks5 / 127.0.0.1:1080 . 监听地址 listen-address localhost:8118 local network do not use proxy forward 192.168. . / . forward 10. . . / . forward 127. . . / . 其中 127.0.0.1:1080 为你的 socks5 ip 及 端口,localhost:8118 为你转换后的 http 监听地址和端口;配置完成后启动 privoxy 即可,启动命令如下: Mac: brew services start privoxy Ubuntu: systemctl start privoxy Docker 加速拉取 gcr.io

Linux基于SysVinit和systemd实现开机自启动服务

我们两清 提交于 2020-07-28 17:22:00
最近着手导师分配的项目任务,对Linux有了一定基础的了解,项目其中有要求在Linux部署一个开机自启动服务。本文将以此为目的来探索如何实现开机自启动服务。 GNU/Linux 实现开机自启动服务有两种方式: SysVinit systemd SysVinit SysVinit 作为 init 进程执行 /etc/init.d/ 中的脚本,这些脚本称为“服务”,每个run level所对应的目录 /etc/rcX.d/ 都存放这指向 /etc/init.d/ 的链接,其中 X =0, 1, 2, 3, 4, 5, 6对应不同的运行级别, S 比较特殊, init 进程作为1号进程启动后,会在开始对应运行级别的服务之前开始 /etc/rcS.d 中的服务。 运行级别 关机 单用户模式 多用户模式(没有NFS) 多用户模式 保留 x window模式(图形界面) 重启 /etc/init.d 中的服务样式如下: #!/bin/bash start() { # 你要执行的程序或脚本 } stop() { ... } # shell脚本中,$0表示自身shell脚本对于当前执行路径的相对名称 # 从$1开始表示接收的参数 # example: # cd ~ # sh start.sh hello # $0: start.sh # $1: hello switch $1 in case

openstack安装配置—— compute node配置

╄→гoц情女王★ 提交于 2020-07-28 10:49:27
计算节点需要配置的主要是nova和neutron的客户端,控制节点在进行资源调度及配置时需要计算节点配合方能实现的,计算节点配置内容相对较少,实际生产环境中,需要配置的计算节点数量相当庞大,那么我们就需要借助ansible或者puppet这样的自动化工具进行了, 废话不多讲,直接进入配置状态。 compute节点基础配置 [root@compute1 ~]# lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 8 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 44 Model name: Westmere E56xx/L56xx/X56xx (Nehalem-C) Stepping: 1 CPU MHz: 2400.084 BogoMIPS: 4800.16 Virtualization: VT-x Hypervisor vendor: KVM Virtualization type: full L1d cache:

小知识:RHEL7上设置Keepalived日志重定向

一笑奈何 提交于 2020-07-28 07:57:05
1.配置 /etc/sysconfig/keepalived 文件 2.添加keepalived日志保存位置的配置 3.修改 /lib/systemd/system/keepalived.service 文件 之前在 MySQL主主+Keepalived架构安装部署 也有描述Keepalived日志重定向的部分,其中提到RHEL7(实际是RHEL6.8以上)要配置rsyslog,回顾下之前的配置,主要就是改两个地方: 1.配置 /etc/sysconfig/keepalived 文件 vi /etc/sysconfig/keepalived 修改KEEPALIVED_OPTIONS的值: # Options for keepalived. See `keepalived --help' output and keepalived(8) and # keepalived.conf(5) man pages for a list of all options. Here are the most # common ones : # # --vrrp -P Only run with VRRP subsystem. # --check -C Only run with Health-checker subsystem. # --dont-release-vrrp -V Dont