0%

Spring Boot 笔记

最近有几个小项目需要进行相关技术预研,使用了Spring Boot这套框架。
整个过程有一些零散,从头入门的教程网上很多了,就不再重复写了。只是把自己认为有重要的或者有坑的地方记录下来。

阅读全文 »

2018年来了!

2018来得有些不知所措。过去的一年有很多的感慨,有很的遗憾,也有很多的收获。希望2018年在新的公司工作顺利,能够快乐地工作,快乐地生活。

rsync 简介

Rsync是linux/Unix文件同步和传送工具。用于替代rcp的一个工具,可通过 LAN/WAN 快速同步多台主机之间的文
件。也可以使用 rsync 同步本地硬盘中的不同目录。rsync 使用所谓的rsync算法进行数据同步,这种算法只传送两个文件的不同部分,而不是每次都整份传送,因此速度相当快。

本次使用rsync定时同步两台机器间的文件夹,Linux是redhat6.5,默认已经安装了rsync.

阅读全文 »

因为RedHat使用yum 命令需要注册,所以可以使用CentOS的yum来替换掉Redhat的yum

1、删除RedHat自带的yum

1
rpm -aq|grep yum|xargs rpm -e --nodeps

2、下载yum的安装文件,使用的163的镜像 http://mirrors.163.com/centos/6/os/x86_64/

在RedHat6.5上,2016年10安装 下面最新的包,版本可能会有变化

1
2
3
4
5
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-73.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm

3、安装yum命令

1
rpm -Uvh --replacepkgs *.rpm

需要将上面下载的rpm包放到一个单独的目录下,执行安装。如果有其他rpm包也一块安装的。

4、更新repo文件

1
2
3
cd /etc/yum.repos.d/
mv rhel-source.repo rhel-source.repo.bak
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

修改 CentOS6-Base-163.repo 文件,将$releasever全部分替换成RedHat的版本号就可以了

修改后的内容如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
[root@vmtemplate yum.repos.d]# cat CentOS6-Base-163.repo 
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-6 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#released updates
[updates]
name=CentOS-6 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-6 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-6 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/6/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

然后执行

1
2
yum clean all
yum makecache

然后就可以正常使用yum命令了

使用Docker默认的仓库在国内是相当的慢,还好阿里云提供了镜像服务(当然还有别家)
在CentOS7 + Docker1.10的环境下按照阿里提供的帮助文档怎么也不好用,体验不到加速度的感觉.

阅读全文 »

gitlabe 可以称得上版本帝了,更新速度真是太快了!
本文档是在CentOS7 上安装8.6.6 CE版,并进行汉化。

阅读全文 »