安装MySQL

参考脚本:CentOS6.5一键安装MySQL5.5.32(源码编译)

在备份服务器上配置rsync推送任务

在备份服务器上配置  /etc/rsyncd.conf

#在所有的客户端都配置密码

#客户端的配置为 echo "oldboy" > /etc/rsync.password

#客户端先测试推送是否成功:rsync -avzP a.log rsync_backup@192.168.1.30::www/ --password-file=/etc/rsync.password

具体内容参考脚本:rsync.sh

#rsync
#echo "oldboy123" >/etc/rsync.password
#chmod /etc/rsync.password
cat >>/etc/rsyncd.conf<<EOF
#Rsync server
#created by oldboy : --
##rsyncd.conf start##
uid = root
gid = root
use chroot = no
max connections =
timeout =
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
ignore errors
read only = false
list = false
hosts allow = 192.168.1.0/
hosts deny = 0.0.0.0/
auth users = rsync_backup
secrets file = /etc/rsync.password
#####################################
#服务端备份的目录
[www]
comment = www by old0boy : --
path = /data0/www/www/
#####################################
[bbs]
comment = bbs by old0boy : --
path = /data0/www/bbs/
#####################################
[blog]
comment = blog by old0boy : --
path = /data0/www/blog/
EOF #在所有的客户端都配置密码
#客户端的配置为 echo "oldboy" > /etc/rsync.password
#客户端先测试推送是否成功:rsync -avzP a.log rsync_backup@192.168.1.29::www/ --password-file=/etc/rsync.password
echo "rsync_backup:oldboy" >/etc/rsync.password
chmod /etc/rsync.password #写入开机自启动
rsync --daemon
echo "/usr/bin/rsync --daemon" >>/etc/rc.local mkdir -p /data0/www/bbs/ /data0/www/www/ /data0/www/blog/

NFS(兼职分发)服务器上配置

生成ssh-key,利用expect软件分发到服务器上。

在分发客户端的家目录下 创建密钥:

ssh-keygen -t dsa

全部回车

tree .ssh

ssh-copy-id  只能copy公钥

ssh-copy-id -i .ssh/id_rsa.pub "-p 22 root@192.168.1.27"

需要输入密码后,就能分发公钥了

现在采用expect来批量分发

yum install expect -y

通过在expect的配置文件中fenfa_sshkey.exp配置分发内容,然后通过脚本调用来为不同的服务器分发执行脚本。

验证ssh root@192.168.1.27 /sbin/ifconfig eth0  查看ip

LAMP集群项目三 配置业务服务器的更多相关文章

  1. LAMP集群项目五 nfs分发文件到服务器

    前边已经配置了免密钥登录,现在脚本直接调用scp即可 ./etc/init.d/functions ] then echo “argv is not correct” exit fi for ip i ...

  2. LAMP集群项目

    vi /etc/sysconfig/network 一.安装硬件环境(安装虚拟机) 1.安装VMware步骤 1.修改网卡配置 vi /etc/sysconfig/network-scripts/if ...

  3. LAMP集群项目五 部署NFS存储服务并设置WEB服务挂载

    yum install nfs-utils portmap -y 在centos6.5中portmap已经改为rpcbind 先启动rpcbind /etc/init.d/rpcbind start ...

  4. LAMP集群项目五 nfs存储的数据实时同步到backupserver

    tar fxzsersync2.5.4_64bit_binary_stable_final.tar.gz -C /usr/local/ mv GNU-Linux-x86 sersync cp sers ...

  5. LAMP集群项目四 安装apache、php及其插件

    rpm -qa httpd* 查看是否有apache rpm -e httpd-2.2.22.2  卸载该文件,如果不让卸载,则加参数:--nodeps 不做软件中的依赖检查 ./configure ...

  6. LAMP集群项目二 初始化系统

    1.关闭防火墙 /etc/init.d/iptables stop chkconfig iptables off 2.关闭selinux cat /etc/selinux/config #查看状态 s ...

  7. LAMP集群项目五 项目备份

    1.打包到本地 2.推送到备份服务器 3.删除若干天前的备份 ip=`awk '/IPADDR/' /etc/sysconfig/network-scripts/ifcfg-eth0 |awk -F ...

  8. MySQL数据库企业集群项目实战(阶段三)

                              MySQL数据库企业集群项目实战(阶段三) 作者 刘畅 时间 2020-10-25 目录 1 架构拓扑图 1 1.1 方案一 1 1.2 方案二 2 ...

  9. Linux服务器集群系统(三)--转

    引用地址:http://www.linuxvirtualserver.org/zh/lvs3.html LVS集群中的IP负载均衡技术 章文嵩(wensong@linux-vs.org) 2002 年 ...

随机推荐

  1. 公众号的TOKEN配置PHP代码

    1.在后台添加好URL和TOKEN和生成43位随机码  注意域名URL需要备案 2.上传到服务器 3.公众号后台要点提交即可 error_reporting(0); $signature=$_REQU ...

  2. Linux下编译、使用静态库和动态库 自己测过的

    每个程序实质上都会链接到一个或者多个的库.比如使用C函数的程序会链接到C运行时库,GUI程序会链接到窗口库等等.无论哪种情况,你都会要决定是链接到静态库(static libary)还是动态库(dyn ...

  3. 解决The markup in the document following the root element must be well-formed.

    出现问题的代码: <security-constraint> <web-resource-collection> <web-resource-name>Regist ...

  4. 如何利用wireshark对TCP消息进行分析

    原文:https://www.cnblogs.com/studyofadeerlet/p/7485298.html 如何利用wireshark对TCP消息进行分析   (1) 几个概念介绍 1 seq ...

  5. mybatis、ibatis 和spring集成

    mybatis是ibatis的升级版,spring也有自带mybatis的orm.所以,搭建ibatis的框架也会有多种方式(我这里mybatis是3.0的,ibatis是2.3的,spring是3. ...

  6. python操作word(改课文格式)【最终版】

    python操作word的一些方法,前面写了一些感悟,有点跑题,改了下题目,方便能搜索到.心急的可以直接拉到最后看代码,我都加了比较详细的注释. 从8.3号早上9点,到8.8号下午5点半下班,终于把这 ...

  7. sql 使用整理

    今天使用视图查询东西,为了方便直接select * 查出来的都行全部都错乱了,看来sql 超过20个以上的字段为了效率和安全,禁止用select * -------------查一个表的所有字段的-- ...

  8. 8天学通MongoDB(mark)

    转自:http://www.cnblogs.com/huangxincheng/archive/2012/02/18/2356595.html 关于mongodb的好处,优点之类的这里就不说了,唯一要 ...

  9. Differential Geometry之第十章极小曲面

    第十章.极小曲面 1.极小图 Animation showing the deformation of a helicoid into a catenoid. Animation of Scherk' ...

  10. 第二百六十节,Tornado框架-内置模板方法

    Tornado框架-内置模板方法 直接在html文件使用,不需要传值 Tornado默认提供的这些功能其实本质上就是 UIMethod 和 UIModule,也就是Tornado框架定义好的html文 ...