本站用于记录日常工作内容,虚拟化云计算,系统运维,数据库DBA,网络与安全。
 
0
How to backup and restore Docker containersThe post outlines the steps to take the backup (snapshot) of docker Container and restore it. Please note that this post mainly discusses committing a container as an image. This works on the container that does not use data volume. For containers with data volume, backup of the data volume must be taken separately.Taking backup of Docker Container1. Commit the required container as an image# docker commit -p [container-id] backup01 sha256:89682d4xxxxxxNow a new image backup01 will be created. Kindly note that this will not cover the data volume. You need to take the backup of data-volume (if any) separately.To know this data-directory (data volume location) of a container, use the command ‘docker inspect container-name‘. You will get a section called “Mounts”. Location mentioned in “Source” is the data volume. You may directly backup this folder(here /site) to get backup of data volume."Mounts": [ { "Source": &qu...
企业docker仓库harbor搭建与配置(2018.05.28更新)   从去年年末,我这边已经把目标转向了docker,而docker hub有自己共有的docker仓库。但是由于众所周知的原因,从docker hub上拉取docker镜像很慢。所以就需要搭建公司内部私有的docker仓库。docker仓库的搭建我们可以使用docker官方提供的docker镜像,我们也可以使用vmware公司提供的harbor来搭建docker私有仓库。因为harbor的搭建和配置,以及UI、认证等都做的比较好,所以docker的搭建,我们就使用harbor。PS:本次OS使用的是centos7。2018.05.28更新,升级harbor版本到V1.5.0。2018.04.18更新,去除网易源。2017.11.10更新,添加国内harbor下载国内源:国内镜像站点:http://harbor.orientsoft.cn/wget http://harbor.orientsoft.cn/harbor-v1.5.0/harbor-offline-installer-v1.5.0.tgz 一、环境初始化在正式安装与配置harbor之前,我们需要对OS进行环境初始化。1.1 升级OS内核升级OS内核,我们可以参考<<烂泥:centos7 yum方式升级内核>...
RAW/QCOW2 与 vmdk 互转方法如果需要将KVM镜像下载回本地并通过VMware Workstation 查看,则需要在下载后进行转换,附一个Windows下Qemu-img 2.3版本,来自:https://cloudbase.it/qemu-img-windows/,其它用法实例也可以参考。下载地址:qemu-img-win-x64-2_3_0一、备份镜像方式:RAW:https://kwx.cc/post/3001QCOW2:直接在对应路径找文件二、转换命令1、RAW:qemu-img convert -f raw kwxcc.raw -O vmdk kwxcc.vmdk2、QCOW2:qemu-img convert -f qcow2 kwxcc.qcow2 -O vmdk kwxcc.vmdkkwxcc需要的文件名。在母鸡上执行,转换完vmdk后再下载回来。若提示没有qemu-img请直接yum install qemu-img –y安装后再操作。3、若是Windows下使用,qemu-img需带上绝对路径,如:qemu-img convert -f raw D:\kwxcc.raw -O vmdk E:\kwxcc.vmdk三、备注若为WINDOWS镜像,可能开机后会蓝屏,若遇到此问题可把vmware加载硬盘时格式选择IDE,不要选默认的SCSI。四、反转换若要将本地的VMware VMDK镜像转换为QCOW2或RAW1)如有安装VMTOOLS,先卸载之。/vmware-tools-distrib/bin/vmware-uninstall-tools.pl2)如果分割了很多子文件,合并之。vmware-vdiskmanager...
 
0

CentOS7搭建配置CephFS

发表者:admin分类:云计算容器2020-07-17 14:52:46 阅读[331]
CentOS7搭建配置CephFS所有节点关闭firewall和selinuxsystemctl stop firewalld systemctl disable firewalld setenforce 0 vim /etc/selimux/config selinux=disabled添加国内ceph源cat >/etc/yum.repos.d/ceph.repo<<EOF [ceph] name=ceph baseurl=http://mirrors.aliyun.com/ceph/rpm-luminous/el7/x86_64/ gpgcheck=0 priority=1 [ceph-noarch] name=cephnoarch baseurl=http://mirrors.aliyun.com/ceph/rpm-luminous/el7/noarch/ gpgcheck=0 priority=1 [ceph-source] name=Ceph source packages baseurl=http://mirrors.aliyun.com/ceph/rpm-luminous/el7/SRPMS enabled=0 gpgcheck=1type=rpm-md gpgkey=http://mirrors.aliyun.com/ceph/keys/release.asc priority=1 EOFyum makecache在每一个node节点执行useradd ceph-adminecho 'ceph-admin' | passwd --stdin ceph-adminecho "ceph-admin ALL = (root) NOPASSWD:ALL" > /etc/sudoers.d/ceph-adminchmod 0440 /etc/sudoers.d/ceph...
 
0

CentOS7搭建配置CephFS

发表者:admin分类:云计算容器2020-06-18 09:15:46 阅读[448]
搭建ceph集群所有节点关闭firewall和selinuxsystemctl stop firewalld systemctl disable firewalld setenforce 0 vim /etc/selimux/config selinux=disabled添加国内ceph源cat >/etc/yum.repos.d/ceph.repo<<EOF [ceph] name=ceph baseurl=http://mirrors.aliyun.com/ceph/rpm-luminous/el7/x86_64/ gpgcheck=0 priority=1 [ceph-noarch] name=cephnoarch baseurl=http://mirrors.aliyun.com/ceph/rpm-luminous/el7/noarch/ gpgcheck=0 priority=1 [ceph-source] name=Ceph source packages baseurl=http://mirrors.aliyun.com/ceph/rpm-luminous/el7/SRPMS enabled=0 gpgcheck=1 type=rpm-md gpgkey=http://mirrors.aliyun.com/ceph/keys/release.asc priority=1 EOF yum makecache在每一个node节点执行useradd ceph-admin echo 'ceph-admin' | passwd --stdin ceph-admin echo "ceph-admin ALL = (root) NOPASSWD:ALL" > /etc/sudoers.d/ceph-admin chmod 0440 /etc/sudoers.d/ceph-admin #配置sshd可以使用password登录 sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config...
Docker 部署ELK1、安装docker前安装pipsudo yum -y install epel-releasesudo yum install python-pip2、安装docker#安装依赖包yum install -y yum-utils device-mapper-persistent-data lvm2#添加docker yum源yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo#可选操作:允许拓展最新的不稳定的repositoryyum-config-manager --enable docker-ce-edge#安装Dockeryum -y install docker-ce#安装docker-composesudo pip install -U docker-compose#启动Dockersystemctl start docker安装ELK:1、下载镜像这里我们使用elk集成镜像,地址:https://hub.docker.com/r/sebp/elk/tags[root@centos-mq ~]# docker pull sebp/elk:660注:660为elk版本2、启动[root@centos-mq ~]# echo "vm.max_map_count=262144" > /etc/sysctl.conf[root@centos-mq ~]# sysctl -p[root@centos-mq ~]# docker run -dit --name elk \ -p 5601:5601 \ -p 9200:9200 \ -p 5044:5044 \ -v /opt/elk-data:/var/lib/elasticsearch \ -v /etc/localtime:/etc/localtime \ sebp/elk:660说明:-p 指定映射端口,5601kibana访...
 
0
Docker 安装 ELK安装#首先安装 Docker 与 Docker-Compose 相关的组件,我们这里直接使用准备好的 ELK 镜像,执行以下命令从 Dockerhub 上拉取指定版本的镜像,在本例当中我使用的是 7.40 版本。Copydocker pull sebp/elk:740 配置#为其编写 docker-compose.yaml 文件,内容如下:Copyversion: '3.7' services: nginx: image: nginx container_name: nginx ports: - 80:80 - 443:443 networks: - internal-network volumes: - /root/Volumes/Nginx/nginx.conf:/etc/nginx/nginx.conf - /root/Volumes/Nginx/Configs:/etc/nginx/conf.d restart: always elk: image: sebp/elk:740 container_name: elk ports: - 9200:9200 - 5044:5044 expose: - 5601 networks: - internal-network volumes: - /opt/elk-data:/var/lib/elasticsearch - /etc/localtime:/etc/localtime depends_on: - nginx ulimits: nproc: 262144 nofile: soft: 262144...
 
0
CentOS 7 安装 Docker-Compose一、安装步骤#添加企业版附加包。Copyyum -y install epel-release 安装 PIP。Copyyum -y install python-pip 更新 PIP。Copypip install --upgrade pip 安装 Docker ComposeCopypip install docker-compose 二、可能遇到的问题#在执行 pip install docker-compose 命令的时候可能会提示以下内容:CopyCannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. 这个时候,你需要执行以下命令强制重新安装 request。Copypip install -I requests==2.9 安装完成之后,Docker-Compose 安装成功。三、二进制安装#下载最新版的 docker-compose 二进制执行文件。Copysudo curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose 配置可执行权限。Copysudo chmod +x /usr/local/bin/docker-compose 测试是否安装成功。Copydocker-compose --version
    总共60页,当前第6页 | 页数:
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16