美文网首页MySQL(总)LinuxMySQL主从
MySQL双主+Keepalived部署记录

MySQL双主+Keepalived部署记录

作者: 飞翔的Tallgeese | 来源:发表于2018-06-13 09:31 被阅读3次

    keepalive官方下载路径:http://keepalived.org/download.html

    复制链接,下载当前最新版本

    wget http://keepalived.org/software/keepalived-2.0.2.tar.gz

    tar -xf keepalived-2.0.2.tar.gz

    cd keepalived-2.0.2

    #指定路径为/usr/local/keepalived

    mkdir -p /usr/local/keepalived

    #执行configure

    报错1

    configure: error: no acceptable C compiler found in $PATH

    这是因为gcc没有安装:yum install gcc -y

    报错2

    !!! OpenSSL is not properly installed on your system. !!!

    对openssl进行安装:yum install openssl openssl-devel -y

    configure完成后,执行

    make && make install

    修改环境变量

    echo "export PATH=\$PATH:/usr/local/keepalived/sbin" >> /etc/profile

    (如果系统里本来有keepalive了,那么需要把keepalive的路径写到$PATH前面,否则不会默认调用新安装的keepalived)

    #部署py脚本

    rpm -ivh http://mirrors.ustc.edu.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm

    yum install -y MySQL-python (MySQL一定要注意大小写,否则该语句无法执行成功)

    相关文章

      网友评论

        本文标题:MySQL双主+Keepalived部署记录

        本文链接:https://www.haomeiwen.com/subject/dogdeftx.html