Git Product home page Git Product logo

linux-notes's Introduction

运维手记

测试环境

  • 虚拟机:Oracle VM VirtualBox

  • 系统镜像:CentOS-7-x86_64-Minimal-1810.iso

  • 软件版本

    序号 软件 版本 描述
    1 JDK 1.8.0_72 JAVA运行环境
    2 Nginx 1.8.1 开源Web服务器和反向代理服务器
    3 MongoDB 3.4.10 跨平台的面向文档的数据库
    4 ElasticSearch 6.6.2 具有RESTful API的分布式,可伸缩且高度可用的实时搜索平台。
    5 Neo4j 3.5.20 用Java实现的图形数据库
    6 Redis 5.0.5 NoSQL数据库管理软件
    7 FastDFS 5.05 轻量级分布式文件系统
    8 RabbitMQ 3.7.3 开源消息代理
    9 Nacos 1.3.2 动态服务发现、配置和服务管理平台
    10 Docker 1.13.1 部署容器化应用程序的开源软件

准备工作

  1. 查看系统版本 cat /etc/centos-release

  2. 更换yum源

    yum -y install wget
    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
    wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
    mv CentOS7-Base-163.repo /etc/yum.repos.d/CentOS-Base.repo
    yum clean all && yum makecache && yum -y update
  3. 关闭防火墙

    • 查看防火墙状态 firewall-cmd --state
    • 关闭防火墙 systemctl stop firewalld.service
    • 禁止开机启动 systemctl disable firewalld.service
  4. 关闭selinux

    setenforce 0
    sed -i 's/enforcing/disabled/g' /etc/selinux/config
    sed -i 's/enforcing/disabled/g' /etc/sysconfig/selinux
  5. 创建文件夹

    • 软件安装包 /usr/setups
    • 软件目录 /usr/program
    mkdir /usr/setups
    mkdir /usr/program
  6. 安装Docker

    yum install docker -y
    systemctl start docker
    systemctl enable docker
    systemctl status docker
    docker version
    
    echo {\"registry-mirrors\":[\"https://nr630v1c.mirror.aliyuncs.com\"]} > /etc/docker/daemon.json 
    systemctl restart docker
  7. 安装Docker-Compose

    sudo curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
    sudo chmod +x /usr/local/bin/docker-compose

离线安装

Docker安装

数据迁移

Tips

  1. 鼠标脱离Virtual Box虚拟机窗口

    按右ctrl即可

  2. Xshell工具中文乱码

    • File -> Properties -> Terminal
    • 将Encoding的值设置为Unicode(UTF-8)
  3. 通过Xshell工具连接Virtual Box虚拟机

    • vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 将ONBOOT的值改为yes。
    • 关闭虚拟机,将网卡1设为网络地址转换(NAT),实现悉尼及通过主机网络访问互联网,网卡2设置微host-only,实现主机与虚拟机互联,重启虚拟机。
    • yum update
    • yum search ifconfig
    • yum install net-tools.x86_64
    • ifconfig

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.