• openstack-on-centos7之环境准备


    centos7配置静态ip

    • ifconfig查看网卡信息并获取到网卡的名称eth0s3
    ifconfig
    

    • 进入到网卡配置目录
     cd /etc/sysconfig/network-scripts/
    
    • 找到步骤1中的eth0s3的配置文件,编辑

    vim ifcfg-eth0s3
    

    • 重启网卡
     systemctl restart network.service
    
    • ifconfig再次查看网卡信息并获取到网卡的名称eth0s3

    • ping其他主机或者pingwww.baidu.com等都能ping通了

    • 编辑etc/hosts,ip地址映射
    vim /etc/hosts
    

    • 修改主机名,修改完需要重启
    vim /etc/hostname
    

    网络时间协议(NTP

    [控制节点安装NTP]

    # yum install chrony (安装软件包)
    # vi /etc/chrony.conf
      server NTP_SERVER iburst  将原本servcer注释掉,增加这行
    # systemctl enable chronyd.service (设置为系统自启动)
    # systemctl enable chronyd.service (启动NTP)
    

    [计算节点安装NTP]

    # yum install chrony (安装软件包)
    # vi /etc/chrony.conf
     server controller iburst 将原本servcer注释掉,增加这行
    # systemctl enable chronyd.service (设置为系统自启动)
    # systemctl enable chronyd.service (启动NTP)
    

    [验证NTP]

    在控制节点和计算节点分别执行chronyc sources,出现截图如下

    更换软件源

    [更改centos源]

    • 配置下centos的DNS(一个国内一个国外)
    # vi  /etc/resolv.conf
    # nameserver 114.114.114.114
    # nameserver 8.8.8.8
    

    -备份系统自带的yum源

    # cd /etc/yum.repos.d/
    # mv CentOS-Base.repo CentOS-Base.repo.bak
    

    -更改成阿里云yum源

    # wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    # yum clean all
    # yum makecache
    # yum -y update  //更新系统
    

    [添加epel仓库]

    • 下载安装epel配置文件
    # wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    # rpm -ivh epel-release-latest-7.noarch.rpm
    # yum repolist      ##检查是否已添加至源列表
    # yum clean all
    # yum makecache
    # yum repolist enabled    查看系统可用的源
    

    [openstack包]

    [openstack packages安装在控制和计算节点]

    # yum install centos-release-openstack-ocata
    # yum install python-openstackclient  安装 OpenStack客户端:
    # yum install openstack-selinux  安装openstack-selinux软件包以便自动管理OpenStack服务的安全策略:
    

    centos7 安装MYSQL5.7详细安装教程

    • 检测系统是否已经安装过mysql或其依赖,若已装过要先将其删除
    # yum list installed | grep mysql
    # yum -y remove (若没有不需要删除)
    
    • .从mysql的官网下载mysql57-community-release-el6-5.noarch.rpm
    # wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
    
    • 安装rpm文件
    # yum install mysql-community-release-el6-5.noarch.rpm
    
    • 安装成功后,我们可以看到/etc/yum.repos.d/目录下增加了以下两个文件
    # ls /etc/yum.repos.d
    mysql-community-source.repo
    mysql-community.repo
    
    • .使用yum安装mysql
    yum install mysql-community-server
    
    • 启动mysql服务
    service mysqld start
    
    • 修改数据库密码
    mysql -uroot    进入mysql bash模式
    SET PASSWORD FOR 'root'@'localhost' = PASSWORD('123456');
    
    • 查看mysqld是否开机自启动,并设置为开机自启动
    # chkconfig --list | grep mysqld
    # chkconfig mysqld on
    
    • 修改字符集为UTF-8:
    vim /etc/my.cnf
    在[mysqld]部分添加:
    
    character-set-server=utf8
    在文件末尾新增[client]段,并在[client]段添加:
    
    default-character-set=utf8
    
    • 修改好之后重启mysqld服务:
    service mysqld restart
    
    • 查看修改结果
    show variables like "%character%";
    

    centos7详细安装rabbitmq教程

    # yum install rabbitmq-server 安装 rabbitmq-server 服务器
    # service rabbitmq-server start  启动 rabbitmq-server
    # chkconfig rabbitmq-server on   设置开机启动服务
    # rabbitmq-plugins enable rabbitmq_management 启用插件
    # service rabbitmq-server restart  重启服务
    
    • 浏览器输入地址主机ip地址:15672(端口号)帐号密码为guest

    centos7安装Memcached

    • 安装Memcached
    # yum  -y install memcached
    
    • 验证安装memcached
    # memcached -h   出现一些帮助命令
    
    • 配置Memcached
    # vi /etc/sysconfig/memcached
    PORT="11211"
    USER="memcached"
    MAXCONN="1024"
    CACHESIZE="64"
    OPTIONS="-l 127.0.0.1,::1"
    
    • 启动Memcached服务
    # chkconfig --level 2345 memcached on //开机启动
    # service memcached start
    
    • 使用memcached-tool检测memcached服务
    # memcached-tool 127.0.0.1:11211 stats
    

  • 相关阅读:
    AtCoder Beginner Contest 197 F Construct a Palindrome
    AtCoder Beginner Contest 192 F Potion
    AtCoder Beginner Contest 199 E Permutation
    Codeforces1493D GCD of an Array
    Codeforces1499D The Number of Pairs
    Codeforces Global Round 14 E. Phoenix and Computers
    浅谈整除分块
    dsu on tree(树上启发式合并)
    图表绘制文字word编辑线上演示Office LTSC 2021中文激活版
    制作3D人物动画DAZ Studio注册码激活版
  • 原文地址:https://www.cnblogs.com/zlxbky/p/9164249.html
Copyright © 2020-2023  润新知