一      Rsync + Sersync  实时同步介绍

1.Rsync 服务搭建介绍

云机上搭建Rsync server,在本地搭建Rsync Clinet.

2. Sersync 服务搭建介绍

在本地服务器上搭建 Sersync  Server  检测本地的ftp目录变化,实时同步到云机上

二、Rsync编译安装

1.检查本机是否存在

[root@云机 ~]# rpm -qa  rsync

rsync-3.0.6-12.el6.x86_64

2.卸载

[root@云机 ~]# yum  remove rsync

说明:需要安装最新的版本就需要卸载老版本。

3.下载rsync软件

[root@云机 ~]# cd  /usr/local/src/

[root@云机 src]# wget https://download.samba.org/pub/rsync/rsync-3.1.2.tar.gz

4.解压包

[root@云机 src]# tar zxvf rsync-3.1.2.tar.gz

5.创建程序安装目录,并编译安装

[root@云机 src]# cd  rsync-3.1.2

[root@云机 rsync-3.1.2]# mkdir /usr/local/rsync

[root@云机 rsync-3.1.2]# ./configure --prefix=/usr/local/rsync

[root@云机 rsync-3.1.2]# make && make install

6.配置环境变量

[root@云机 ~]# vim  /etc/profile.d/rsync.sh

#!/bin/sh
export PATH=$PATH:/usr/local/srync/bin

7.建立软连接

[root@云机 ~]# ln -s  /usr/local/rsync/bin/rsync /usr/bin/rsync

8.查看当前版本

[root@云机 ~]# rsync --version

rsync  version 3.1.2  protocol version 31

三、   Rsync server配置

1.编辑配置文件

[root@云机 ~]# vim /etc/ rsyncd.conf

uid = rsync
gid = rsync
port = 873
use chroot = on
max connections = 200
timeout = 120
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsyncd.lock
log file = /var/log/rsyncd.log

[bakup]
path = /data/bakup
read only = false
list = false
hosts allow = 192.168.0.0/24
hosts deny = 0.0.0.0/32
auth users = rsync_bakup
secrets file = /etc/rsyncd.password

2.创建密码文件

[root@云机 ~]# vim  /etc/rsyncd.password

rsync_bakup:4297f44b13955235245b2497399d7a93

说明:定义格式 用户:密码

3.修改密码文件权限

[root@云机 ~]# chmod 600 /etc/rsyncd.password

4.创建Rsync server服务启动的系统账户

[root@云机 ~]# useradd rsync -M  -s  /bin/nologin

5.创建数据存放目录

[root@云机 ~]# mkdir -p  /data/bakup

6.修改目录权限

[root@云机 ~]# chown rsync.rsync /data/bakup

7.启动服务

[root@云机 ~]# rsync --daemon

说明:如果配置文件路径不是/etc/rsyncd.conf,启动是需要使用“–config” 参数指定配置文件。

8.查看服务是否启动

[root@云机 ~]# ps  axu |grep rsync

root      9198  0.0  0.0 107652   672 ?        Ss   19:41   0:00 rsync --daemon --config /etc/rsync/rsyncd.conf

root      9205  0.0  0.0 103308   848 pts/0    S+   19:44   0:00 grep rsync

[root@云机 ~]# netstat -nlp |grep 873

tcp        0      0 0.0.0.0:873                 0.0.0.0:*                   LISTEN      9198/rsync

tcp        0      0 :::873                      :::*                        LISTEN      9198/rsync

9.配置rsync开机启动:

$ vi /etc/rc.local

# 在 rc.local 文件的底部,新加一行代码,代码如下

/usr/local/rsync/bin/rsync --daemon

# chmod +x /etc/rc.d/rc.local   #否则重启不执行

四、客户端配置

1.创建密码文件

[root@本地 ~]# vim  /etc/rsyncd.password

4297f44b13955235245b2497399d7a93

2.修改文件权限

[root@本地 ~]# chmod 600 /etc/rsyncd.password

3.安装客户端

[root@本地 ~]# yum  -y install rsync

说明:如果客户端存在,跳过该步骤。

五、测试

1.客户端上推送数据

[root@本地 ~]# ll test.txt

-rw-r--r--. 1 kry kry 13 Mar 24 15:55 test.txt

[root@本地 ~]# rsync -avzP test.txt  rsync_bakup@192.168.0.132::bakup --password-file=/etc/rsyncd.password

sending incremental file list

test.txt

11 100%    0.00kB/s    0:00:00 (xfer#1, to-check=0/1)

sent 91 bytes  received 27 bytes  236.00 bytes/sec

total size is 11  speedup is 0.09

2.服务端查看文件是否推送成功

[root@云机 bakup]# ll

total 4

-rw-r--r--. 1 rsync rsync 13 Mar 24 15:55 test.txt

3.从服务端拉取数据

[root@本地 ~]# ll  /tmp/

total 0

[root@本地 ~]#  rsync -avzP rsync_bakup@192.168.0.132::bakup  /tmp --password-file=/etc/rsyncd.password

receiving incremental file list

./

test.txt

13 100%   12.70kB/s    0:00:00 (xfer#1, to-check=7/17)

sent 64 bytes  received 419 bytes  966.00 bytes/sec

total size is 13981  speedup is 28.95

4.查看拉取的文件

[root@本地 ~]# ll  /tmp/

total 4

-rw-r--r--. 1 kry kry 13 Mar 24 15:55 test.txt

说明:文件的属主组跟推送时保持一直。

六、安装配置sersync

1.下载地址

[root@本地 ~]# cd  /usr/local/src/

[root@本地 src]# wget  https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/sersync/sersync2.5.4_64bit_binary_stable_final.tar.gz

2.解压软件包

[root@本地 src]# tar zxvf sersync2.5.4_64bit_binary_stable_final.tar.gz

3.创建目录结构

[root@本地 src]# mkdir /usr/local/sersync

[root@本地 src]# mkdir /usr/local/sersync/conf

[root@本地 src]# mkdir /usr/local/sersync/logs

[root@本地 src]# mkdir /usr/local/sersync/bin

4.移动文件

[root@本地 src]# mv  GNU-Linux-x86/sersync2 /usr/local/sersync/bin/

[root@本地 src]# mv  GNU-Linux-x86/confxml.xml /usr/local/sersync/conf

5.配置环境变量

[root@本地 conf]# vim  /etc/profile.d/sersync.sh

#!/bin/bash

export PATH=$PATH:/usr/local/sersync/bin

[root@本地 conf]# source /etc/profile.d/sersync.sh

6.配置

[root@本地 src]# cd  /usr/local/sersync/conf

[root@本地 conf]# cp confxml.xml confxml.xml.bak

[root@本地 conf]# vim  confxml.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<head version="2.5">
   # 设置本地IP和端口
    <host hostip="localhost" port="8008"></host>
   # 开启DUBUG模式 
    <debug start="false"/>
  # 开启xfs文件系统
    <fileSystem xfs="false"/>
  # 同步时忽略推送的文件(正则表达式),默认关闭 
 <filter start="false">
        <exclude expression="(.*)\.svn"></exclude>
        <exclude expression="(.*)\.gz"></exclude>
        <exclude expression="^info/*"></exclude>
        <exclude expression="^static/*"></exclude>
    </filter>
  # 设置要监控的事件
    <inotify>
        <delete start="false"/>
        <createFolder start="true"/>
        <createFile start="false"/>
        <closeWrite start="true"/>
        <moveFrom start="true"/>
        <moveTo start="true"/>
        <attrib start="false"/>
        <modify start="false"/>
    </inotify>
  <sersync>
# 本地监视目录路径
  <localpath watch=" /data/bakup/"> 
#定义同步Server ip和模块
            <remote ip="47.93.252.110" name="bakup"/>
            <!--<remote ip="192.168.8.39" name="tongbu"/>-->
            <!--<remote ip="192.168.8.40" name="tongbu"/>-->
        </localpath>
     <rsync>
# rsync指令参数
            <commonParams params="-artuz"/>
   # rsync同步认证
            <auth start="true" users="rsync_bakup" passwordfile="/etc/rsyncd.password"/>
  # 设置rsync远程服务端口,非默认端口需要打开自定义(若开启rsync+ssh, 则这里需定义SSH端口)
            <userDefinedPort start="false" port="874"/><!-- port=874 -->
# 设置超时时间
            <timeout start="ture" time="100"/><!-- timeout=100 -->
   # 设置rsync+ssh加密传输模式,默认关闭,开启需设置SSH加密证书
            <ssh start="false"/>
        </rsync>
 # sersync传输失败日志脚本路径,每隔60会重新执行该脚本,执行完毕会自动清空。
        <failLog path="/usr/local/sersync/logs/rsync_fail_log.sh" timeToExecute="60"/><!--default every 60mins execute once-->
   # 设置rsync定时传输,默认关闭
        <crontab start="false" schedule="600"><!--600mins-->
            <crontabfilter start="false">
                <exclude expression="*.php"></exclude>
                <exclude expression="info/*"></exclude>
            </crontabfilter>
        </crontab>
   # 设置sersync传输后调用name指定的插件脚本,默认关闭
        <plugin start="false" name="command"/>
    </sersync>
   # 插件脚本范例
    <plugin name="command">
        <param prefix="/bin/sh" suffix="" ignoreError="true"/> <!--prefix /opt/tongbu/mmm.sh suffix-->
        <filter start="false">
            <include expression="(.*)\.php"/>
            <include expression="(.*)\.sh"/>
        </filter>
    </plugin>
   # 插件脚本范例
    <plugin name="socket">
        <localpath watch="/opt/tongbu">
            <deshost ip="192.168.138.20" port="8009"/>
        </localpath>
    </plugin>
    <plugin name="refreshCDN">
        <localpath watch="/data0/htdocs/cms.xoyo.com/site/">
            <cdninfo domainname="ccms.chinacache.com" port="80" username="xxxx" passwd="xxxx"/>
            <sendurl base="http://pic.xoyo.com/cms"/>
            <regexurl regex="false" match="cms.xoyo.com/site([/a-zA-Z0-9]*).xoyo.com/p_w_picpaths"/>
        </localpath>
    </plugin>
</head>

7.启动Sersync

[root@本地 conf]# sersync2 -d -r -o /usr/local/sersync/conf/confxml.xml

说明:还有些其他参数,使用“-h”选项查看。

8.设置sersync监控开机自动执行

#vi /etc/rc.d/rc.local  #编辑,在最后添加一行

/usr/local/sersync/bin/sersync2 -d -r -o  /usr/local/sersync/conf/confxml.xml #设置开机自动运行脚本

# chmod +x /etc/rc.d/rc.local   #否则重启不执行

七、测试

1.创建测试文件

[root@本地 ~]# cd  /data/bakup/

[root@本地 bakup]#  for f in `seq 10`;do touch $f;done

2.检查数据是否同步Rsync server

[root@云机 ~]# cd  /data/bakup/

[root@云机 ~]# ll

八、Rsync服务常见问题汇总讲解:

1 客户端的错误现象:No route to host

rsync服务端开启的iptables防火墙

[root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup

rsync: failed to connect to 172.16.1.41: No route to host (113)

rsync error: error in socket IO (code 10) at clientserver.c(124) [sender=3.0.6]

异常问题解决:

关闭rsync服务端的防火墙服务(iptables)

[root@backup mnt]# /etc/init.d/iptables stop

iptables: Setting chains to policy ACCEPT: filter          [  OK  ]

iptables: Flushing firewall rules:                         [  OK  ]

iptables: Unloading modules:                               [  OK  ]

[root@backup mnt]# /etc/init.d/iptables status

iptables: Firewall is not running.

==============================================================================================

2 ERROR: The remote path must start with a module name not a /

rsync客户端执行rsync命令错误:

客户端的错误现象:

[root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::/backup

ERROR: The remote path must start with a module name not a /

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

异常问题解决:

rsync命令语法理解错误,::/backup是错误的语法,应该为::backup(rsync模块)

==============================================================================================

3 @ERROR: auth failed on module backup

3. @ERROR: auth failed on module oldboy

客户端的错误现象:

[root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup

Password:

@ERROR: auth failed on module backup

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

异常问题解决:

1. 密码输入错误,用户名错误       #这里的密码是你设置的rsync的密码,千万别输错了!!

2. secrets file = /etc/rsync.password指定的密码文件和实际密码文件名称不一致

3. /etc/rsync.password文件权限不是600

4. rsync_backup:123456密码配置文件后面注意不要有空格

5. rsync客户端密码文件中只输入密码信息即可,不要输入虚拟认证用户名称

==============================================================================================

4 @ERROR: Unknown module 'backup'

4. Unknown module 'backup'

[root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup

@ERROR: Unknown module 'backup'

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

异常问题解决:

1、 /etc/rsyncd.conf配置文件模块名称书写错误

2、配置文件中网段限制不对

==============================================================================================

5  Permission denied

[root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup

Password:

sending incremental file list

hosts

rsync: mkstemp ".hosts.5z3AOA" (in backup) failed: Permission denied (13)

sent 196 bytes  received 27 bytes  63.71 bytes/sec

total size is 349  speedup is 1.57

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

异常问题解决:

1. 共享目录的属主和属组不正确,不是rsync

2. 共享目录的权限不正确,不是755

==============================================================================================

6 chdir failed   

[root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup

Password:

@ERROR: chdir failed

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

异常问题解决:

1. 备份存储目录没有建立

2. 建立的备份存储目录和配置文件定义不一致

[root@backup backup]# /etc/init.d/xinetd restart

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

Stopping xinetd:                                           [  OK  ]

Starting xinetd: shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

[  OK  ]

说明:如果没有备份存储目录,xinetd服务都不能正确启动

==============================================================================================

7  invalid uid rsync

[root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup

Password:

@ERROR: invalid uid rsync

rsync error: error starting client-server protocol (code 5) at main.c(1503) [sender=3.0.6]

异常问题解决:

rsync服务对应rsync虚拟用户不存在了

==============================================================================================

客户端已经配置了密码文件,但免秘钥登录方式,依旧需要输入密码

password file must not be other-accessible

[root@nfs01 tmp]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup --password-file=/etc/rsync.password

password file must not be other-accessible

continuing without password file

Password:

sending incremental file list

sent 26 bytes  received 8 bytes  5.23 bytes/sec

total size is 349  speedup is 10.26

异常问题解决:

rsync客户端的秘钥文件也必须是600权限

==============================================================================================

9  rsync客户端连接慢问题

错误日志输出

2017/03/08 20:14:43 [3422] params.c:Parameter() - Ignoring badly formed line in configuration file: ignore errors

2017/03/08 20:14:43 [3422] name lookup failed for 172.16.1.31: Name or service not known

2017/03/08 20:14:43 [3422] connect from UNKNOWN (172.16.1.31)

2017/03/08 20:14:43 [3422] rsync to backup/ from rsync_backup@unknown (172.16.1.31)

2017/03/08 20:14:43 [3422] receiving file list

2017/03/08 20:14:43 [3422] sent 76 bytes  received 83 bytes  total size 349

正确日志输出

2017/03/08 20:16:45 [3443] params.c:Parameter() - Ignoring badly formed line in configuration file: ignore errors

2017/03/08 20:16:45 [3443] connect from nfs02 (172.16.1.31)

2017/03/08 20:16:45 [3443] rsync to backup/ from rsync_backup@nfs02 (172.16.1.31)

2017/03/08 20:16:45 [3443] receiving file list

2017/03/08 20:16:45 [3443] sent 76 bytes  received 83 bytes  total size 349

异常问题解决:

查看日志进行分析

==============================================================================================

10 rsync服务没有正确启动Connection refused (111)

[root@oldboy-muban ~]#  rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup

rsync: failed to connect to 172.16.1.41: Connection refused (111)

rsync error: error in socket IO (code 10) at clientserver.c(124) [sender=3.0.6]

解决 rsync服务没开启

[root@oldboy-muban ~]# rsync --daemon

[root@oldboy-muban ~]# ss -lntup |grep rsync

tcp    LISTEN     0      5                     :::873                  :::*      users:(("rsync",1434,5))

tcp    LISTEN     0      5                      *:873                   *:*      users:(("rsync",1434,4))

[root@oldboy-muban ~]# rsync -avz /etc/hosts rsync_backup@172.16.1.41::backup

Password:

sending incremental file list

hosts

sent 196 bytes  received 27 bytes  49.56 bytes/sec

total size is 349  speedup is 1.57

==============================================================================================

11 port 22: Connection refused

环境:本地服务器集群内部传输利用远程ssh 报错

利用(telnet 172.16.1.31 22) 排查服务监听状态后采取的解决方法

[root@oldboy-muban ~]# rsync /etc/hosts 172.16.1.31:/tmp

ssh: connect to host 172.16.1.31 port 22: Connection refused

rsync: connection unexpectedly closed (0 bytes received so far) [sender]

rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]

排错思路:

[root@oldboy-muban ~]# ping 172.16.1.31

PING 172.16.1.31 (172.16.1.31) 56(84) bytes of data.

64 bytes from 172.16.1.31: icmp_seq=1 ttl=64 time=0.628 ms

64 bytes from 172.16.1.31: icmp_seq=2 ttl=64 time=0.393 ms

64 bytes from 172.16.1.31: icmp_seq=3 ttl=64 time=1.06 ms

64 bytes from 172.16.1.31: icmp_seq=4 ttl=64 time=0.745 ms

[root@oldboy-muban ~]# traceroute 172.16.1.31

traceroute to 172.16.1.31 (172.16.1.31), 30 hops max, 60 byte packets

1  nfs01 (172.16.1.31)  0.597 ms  0.189 ms  0.965 ms

/etc/init.d/iptables status

iptables: Firewall is not running.

[root@backup ~]#

[root@backup ~]# netstat -lntup|grep 22

p        0      0 10.0.0.31:22                0.0.0.0:*                   LISTEN      1187/sshd

故障原因:无法连接

telnet 172.16.1.31 22

解决方法:

[root@oldboy-backup-41]# vim /etc/ssh/sshd_config

#Port 22

#AddressFamily any

#ListenAddress 10.0.0.31 改为 0.0.0.0

#ListenAddress ::

总结:内网传输通过SSH pro 22 表明22端口链接不上

==============================================================================================

Rsync服务端排错思路

m  查看rsync服务配置文件路径是否正确 /etc/rsyncd.conf

m  查看配置文件例的host allow,host deny,允许的ip网段是否是允许客户端访问的ip网段

m  查看配置文件中path参数里的路径是否存在,权限是否正确(正常应为配置文件中的UUID参数对应的属主和组)

m  查看rsync服务是否启动,端口是否存在 ps -ef  netstat -lntup

m  查看iptables防火墙和SELinux是否开启允许rsync服务通过,也可以关闭

m  查看服务端rsync配置文件里的密码权限是否为600 密码文件格式是否正确,正确格式(用户名:密码)文件路径和配置文件里的secrect files 参数对应

m  如果是推送数据,要查看,配置rsyncd.conf 文件中用户是否对模块下目录有可读的权限

==============================================================================================

客户端排错思路

m  查看客户端rsync配置的密码文件是否为600的权限,密码文件格式是否正确,注意:仅需要有密码,并且和服务端的密码一致

m  用telnet链接rsync服务器ip地址873端口,查看服务是否启动(可测试服务端防火墙是否阻挡telnet10.0.0.100 873)

m  客户端执行命令是 rsync -avzP rsync_backup@10.0.0.100::backup/test/test/ --password-file=/etc/rsync.password

m  此命令要记清楚尤其10.0.0.100::backup/test/处的双引号及随后的backup为模块名称

Rsync + sersync 实时同步备份的更多相关文章

  1. rsync+sersync自动同步备份数据

    一.为什么要用Rsync+sersync架构?1.sersync是基于Inotify开发的,类似于Inotify-tools的工具2.sersync可以记录下被监听目录中发生变化的(包括增加.删除.修 ...

  2. Rsync+Sersync实时同步数据目录

    第1章 Rsync简介 1.1 Rsync基本概述 rsync是一款开源的备份工具,可以在不同主机之间进行同步,可实现全量备份与增量备份 全量:将全部数据,进行传输覆盖 增量:只传输差异部分的数据 1 ...

  3. 如何通过rsync+sersync 实现同步备份

    3.rsync+sersync更快更节约资源实现web数据同步4.unison+inotify实现web数据双向同步 一:为什么要实现同步备份 服务器上有些重要文件或数据时,可以把他们多备份一份到其他 ...

  4. rsync & sersync 实时同步

    1.根据之前一篇关于rsync的随笔部署好rsync服务后,可以开始inotify的部署 2.sersync的部署 ①.部署服务(安装和配置过程) #Master 部署Sersync服务 mkdir ...

  5. rsync+sersync实时同步

    A: 运行rsync daemonB: 运行sersync ,会监控目录,发现改变会更新推送到A上 rsync见上面rsync设置 sersync安装配置1.建立目录mkdir -p /opt/ser ...

  6. 搭建WEB、NFS共享、sersync实时同步以及全网定时备份服务流程

    本次实验的主要目的: 1.搭建web服务,使用nfs服务共享的/data目录挂载到web站点目录上. 2.nfs服务器与backup服务器使用sersync实时同步/data目录中的文件. 3.bac ...

  7. CentOS 6.5 rsync+inotify实现数据实时同步备份

    CentOS 6.5 rsync+inotify实现数据实时同步备份 rsync    remote sync 远程同步,同步是把数据从缓冲区同步到磁盘上去的.数据在内存缓存区完成之后还没有写入到磁盘 ...

  8. 【转】inotify+rsync实现实时同步

    [转]inotify+rsync实现实时同步 1.1 什么是实时同步:如何实现实时同步 要利用监控服务(inotify),监控同步数据服务器目录中信息的变化 发现目录中数据产生变化,就利用rsync服 ...

  9. sersync2 文件的实时同步备份

    |——需求: 监控192.168.9.5[主]  下的 /data/vmeipai 目录  --> 同步到 192.168.12.8 [备] 下的 /data/vmeipai 目录 |——网络拓 ...

随机推荐

  1. 终于等到你:CYQ.Data V5系列 (ORM数据层,支持.NET Core)最新版本开源了

    前言: 不要问我框架为什么从收费授权转到免费开源,人生没有那么多为什么,这些年我开源的东西并不少,虽然这个是最核心的,看淡了就也没什么了. 群里的网友:太平说: 记得一年前你开源另一个项目的时候我就说 ...

  2. 自己整理的所有java知识点(不断迭代中)

    1. 自己整理的所有java知识点(不断迭代中) 画图工具注册 https://www.processon.com/i/599d35fae4b00d97d7f9bb17 1.1. Java整体知识架构 ...

  3. Android开发:Android Studio开发环境配置

    一.android studio下载: 1.Windows版: 下载地址:https://pan.baidu.com/s/1-sg4dN_2B5nn2YJf-C7XLQ 提取码:yedc 2.Mac版 ...

  4. 【深度学习篇】--神经网络中的池化层和CNN架构模型

    一.前述 本文讲述池化层和经典神经网络中的架构模型. 二.池化Pooling 1.目标 降采样subsample,shrink(浓缩),减少计算负荷,减少内存使用,参数数量减少(也可防止过拟合)减少输 ...

  5. 在Coding上搭建Hexo个人博客

    先注册一个Coding账号,然后创建一个项目这个项目的名字应该是{username}.coding.me 安装hexo脚手架 $ npm install -g hexo-cli 建站 安装完 Hexo ...

  6. Docker Swarm搭建多服务器下Docker集群

    对于有多台服务器来讲,如果每一台都去手动操控,那将会是一件非常浪费时间的事情,毕竟时间这东西,于我们而言,十分宝贵,或许在开始搭建环境的时候耗费点时间,感觉是正常的,我也如此,花费大堆时间在采坑和填坑 ...

  7. 学习ASP.NET Core Razor 编程系列十二——在页面中增加校验

    学习ASP.NET Core Razor 编程系列目录 学习ASP.NET Core Razor 编程系列一 学习ASP.NET Core Razor 编程系列二——添加一个实体 学习ASP.NET ...

  8. 自定义GridControl编辑器

    本文版权归博主 惊梦无痕 所有,欢迎转载,但须保留此段声明,并给出原文链接,谢谢合作.SourceLink 鉴于网上的针对GridControl的一些代码比较凌乱,且功能分散,故将整理过的代码分享出来 ...

  9. Java——泛型

    前言 一般的类和方法,使用的都是具体的类型:基本类型或者自定义的类.如果我们要编写出适用于多种类型的通用代码,那么肯定就不能使用具体的类型.前面我们介绍过多态,多态算是一种泛化机制,但是也会拘泥于继承 ...

  10. jQuery(一)、核心

    我认为,学习一门语言,主要是掌握它的思想与用途,就好比谈恋爱一样,你只要猜测到了对方的想法,就能够知情达意.废话不多说,我们开始今天学习的进度,加油ヾ(◍°∇°◍)ノ゙ 1. jQuery([sele ...