Tag - Centos

Centos keepalived 虚拟IP    2017-07-19 22:45:23    5
下载keepalived

http://www.keepalived.org/software/


首先检查安装openssl-devel

yum install openssl-devel

如果是离线,借鉴文章:http://blog.csdn.net/gsying1474/article/details/48396205

# ./configure --prefix=/usr/local/keepalived --with-kernel-dir=/usr/src/kernels/2.6.32-279.el6.x86_64



当出现如下字样
Keepalived configuration
------------------------
Keepalived version       : 1.2.19
Compiler                 : gcc
Compiler flags           : -g -O2
Extra Lib                : -lssl -lcrypto -lcrypt
Use IPVS Framework       : Yes
IPVS sync daemon support : Yes
IPVS use libnl           : No
fwmark socket support    : Yes
Use VRRP Framework       : Yes
Use VRRP VMAC            : Yes
SNMP support             : No
SHA1 support             : No
Use Debug flags          : No

执行安装命令

# make 
# make install


设置keepalived开机启动脚本

cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/rc.d/init.d/

cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig/

cp /usr/local/keepalived/sbin/keepalived /usr/sbin/

chkconfig keepalived on

新建一个配置文件,默认keepalived启

AWS Centos    2017-07-19 22:35:22    7
1、需要用pem文件连接到centos系统中,
    xshell 使用pem文件登录:http://blog.liuyingguang.cn/blog/post/lightingfire/pem%E6%96%B9%E5%BC%8F%E7%99%BB%E5%BD%95%E7%9A%84CentOS%E7%B3%BB%E7%BB%9F%E4%BF%AE%E6%94%B9%E4%B8%BA%E5%AF%86%E7%A0%81%E7%99%BB%E5%BD%95%E6%96%B9%E5%BC%8F

2、修改root密码
    sudo passwd root

然后输入两次密码


3、修改centos登录方式为密码登录
    打开配置文件 /etc/ssh/sshd_config (ubuntu 为/etc/ssh/sshd-config),设置如下几个参数
PermitRootLogin yes
PubkeyAuthentication no (也可用#号注释)
PasswordAuthentication yes
4、重启sshd服务
    /etc/init.d/sshd restart



 

by 刘迎光@萤火虫工作室 
OpenBI交流群:495266201 
MicroService 微服务交流群:217722918 
mail: liuyg#liuyingguang.cn 
博主首页(==防止爬虫==):http://blog.liuyingguang.cn