First, create a systemd drop-in directory for the docker service:
mkdir /etc/systemd/system/docker.service.d
Now create a file called /etc/systemd/system/docker.service.d/http-proxy.conf that adds the HTTP_PROXY environment variable:
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80/"
If you have internal Docker registries that you need to conta...
linux修改网卡名称
一.问题说明
测试环境中出现的小问题,因为虚拟机之间经常复制来复制去,导致网卡配置这块的不一致现象。
配置文件的信息:
[root@ora10g network-scripts]# catifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=none
IPADDR=192.168.1.12
PREFIX=24
GATEWAY=192.168.1.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6e...
Linux常用参数优化
#完整的内核参数优化
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
net.ipv4.tcp_max_tw_buckets = 6000
net.ipv4.tcp_sack = 1
net.ipv4.tcp_window_sc...
ceph-deploy指定安装源和版本
通过阿里云安装ceph-hammer
[root@lab8106 ~]# rm -rf /etc/yum.repos.d/ceph*
[root@lab8106 ~]# ceph-deploy install lab8106 --repo-url=http://mirrors.aliyun.com/ceph/rpm-hammer/el7/ --gpg-url=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
通过阿里云安装ceph-jewel
[root@lab8106 ~]# yum clean all
[root@lab8106 ~]# rm -rf /etc/yum.repos.d/ceph*
[root@lab8106 ~]# ceph-deploy ins...
ceph 常用命令
一、集群
1、启动一个ceph 进程
启动mon进程
service ceph start mon.node1
启动msd进程
service ceph start mds.node1
启动osd进程
service ceph start osd.0
2、查看机器的监控状态
[root@client ~]# ceph health
HEALTH_OK
3、查看ceph的实时运行状态
[root@client ~]# ceph -w
cluster be1756f2-54f7-4d8f-8790-820c82721f17
health HEALTH_OK
monmap e2: 3 mons at {node1=10.240.240.211:6789/0,node2=10.240.240.21...
ceph安装部署
mon节点:hp-server-6 、hp-server-7 、hp-server-8
osd节点:hp-server-1 、hp-server-2 、hp-server-3 、hp-server-4 、hp-server-5 、hp-server-
6、hp-server-7 、hp-server-8
Ceph安装
准备
1、每台主机设置主机名,如WH-hp-server-1
2、设置hosts vim etc/hosts
172.16.10.1 WH-hp-server-1
3、部署节点到其他节点使用comall用户ssh无密码登录
4、安装ntp服务器,关闭selinux和防火墙。
1、部署节点更改ceph源
centos7(此ceph源为阿里云提供,只支持centos...
linux多线程执行命令(扫描存活主机)
#!/usr/bin/env python
from threading import Thread
import subprocess
from Queue import Queue
import time
num_threads=10
iprange='192.168.230.'
ips=[]
iplist=range(250)
for i in iplist:
ips.append(iprange+str(i))
#print ips
#time.sleep(5)
#ips=['127.0.0.1','116.56.148.187','192.168.230.1','192.168.230.2','192.168.230.4']
q=Queue()
def pingme(i,qu...
python邮件告警脚本
[root@localhost alertscripts]# pwd
/usr/local/zabbix/share/zabbix/alertscripts
[root@localhost alertscripts]# ls
sendmail.py sendmail.sh.bak
[root@localhost alertscripts]#sendmail.py
[root@localhost alertscripts]# ./sendmail.py ‘收件人’ ‘主题’ ‘内容’
-------------------------------------------------------------------------------------------
#!/usr/bin/env python
#co...