-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
307 lines (234 loc) · 35.8 KB
/
index.html
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
<!DOCTYPE html><html lang="en" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Welcome</title><meta name="author" content="Dinny-xu"><meta name="copyright" content="Dinny-xu"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="You are better than this world">
<meta property="og:type" content="website">
<meta property="og:title" content="Welcome">
<meta property="og:url" content="https://github.com/Dinny-xu/index.html">
<meta property="og:site_name" content="Welcome">
<meta property="og:description" content="You are better than this world">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://cdn.xycloud.site/avatar6.png">
<meta property="article:author" content="Dinny-xu">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://cdn.xycloud.site/avatar6.png"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://github.com/Dinny-xu/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
root: '/',
algolia: undefined,
localSearch: {"path":"search.xml","languages":{"hits_empty":"We didn't find any results for the search: ${query}"}},
translate: undefined,
noticeOutdate: undefined,
highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
copy: {
success: 'Copy successfully',
error: 'Copy error',
noSupport: 'The browser does not support'
},
relativeDate: {
homepage: false,
post: false
},
runtime: '',
date_suffix: {
just: 'Just',
min: 'minutes ago',
hour: 'hours ago',
day: 'days ago',
month: 'months ago'
},
copyright: undefined,
lightbox: 'fancybox',
Snackbar: undefined,
source: {
jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
justifiedGallery: {
js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
},
fancybox: {
js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
}
},
isPhotoFigcaption: false,
islazyload: false,
isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
title: 'Welcome',
isPost: false,
isHome: true,
isHighlightShrink: false,
isToc: false,
postUpdate: '2021-12-11 13:26:14'
}</script><noscript><style type="text/css">
#nav {
opacity: 1
}
.justified-gallery img {
opacity: 1
}
#recent-posts time,
#post-meta time {
display: inline !important
}
</style></noscript><script>(win=>{
win.saveToLocal = {
set: function setWithExpiry(key, value, ttl) {
if (ttl === 0) return
const now = new Date()
const expiryDay = ttl * 86400000
const item = {
value: value,
expiry: now.getTime() + expiryDay,
}
localStorage.setItem(key, JSON.stringify(item))
},
get: function getWithExpiry(key) {
const itemStr = localStorage.getItem(key)
if (!itemStr) {
return undefined
}
const item = JSON.parse(itemStr)
const now = new Date()
if (now.getTime() > item.expiry) {
localStorage.removeItem(key)
return undefined
}
return item.value
}
}
win.getScript = url => new Promise((resolve, reject) => {
const script = document.createElement('script')
script.src = url
script.async = true
script.onerror = reject
script.onload = script.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
script.onload = script.onreadystatechange = null
resolve()
}
document.head.appendChild(script)
})
win.activateDarkMode = function () {
document.documentElement.setAttribute('data-theme', 'dark')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
}
}
win.activateLightMode = function () {
document.documentElement.setAttribute('data-theme', 'light')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
}
}
const t = saveToLocal.get('theme')
if (t === 'dark') activateDarkMode()
else if (t === 'light') activateLightMode()
const asideStatus = saveToLocal.get('aside-status')
if (asideStatus !== undefined) {
if (asideStatus === 'hide') {
document.documentElement.classList.add('hide-aside')
} else {
document.documentElement.classList.remove('hide-aside')
}
}
})(window)</script><meta name="generator" content="Hexo 5.4.0"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="author-avatar"><img class="avatar-img" src="https://cdn.xycloud.site/avatar6.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">Articles</div><div class="length-num">15</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">Tags</div><div class="length-num">11</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/categories/"><div class="headline">Categories</div><div class="length-num">11</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archives</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('https://cdn.xycloud.site/v2-1da2ed720ce0a7aad802d2f89512643e_r.jpeg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">Welcome</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> Search</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archives</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">Welcome</h1><div id="site_social_icons"><a class="social-icon" href="https://github.com/Dinny-xu" target="_blank" title="Github"><i class="fab fa-github"></i></a></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2021/08/26/nginx%20build%20install/" title="Nginx Build Install"> <img class="post_bg" src="https://cdn.xycloud.site/nginx-install-cover.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Nginx Build Install"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/08/26/nginx%20build%20install/" title="Nginx Build Install">Nginx Build Install</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-08-26T03:12:05.437Z" title="Created 2021-08-26 11:12:05">2021-08-26</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Nginx/">Nginx</a></span></div><div class="content">Nginx build installUbuntu 安装123456789sudo apt-get update#安装依赖:gcc、g++依赖库sudo apt-get install build-essential libtool#安装 pcre依赖库(http://www.pcre.org/)sudo apt-get install libpcre3 libpcre3-dev#安装 zlib依赖库(http://www.zlib.net)sudo apt-get install zlib1g-dev#安装ssl依赖库sudo apt-get install openssl
下载Nginx源码
下载-解压-重命名1234wget https://nginx.org/download/nginx-1.20.1.tar.gztar -xvf nginx-1.20.1.tar.gzmv nginx-1.20.1.tar.gz /usr/local/nginxcd nginx
进入nginx 目录 执行编译命令1sudo ./configure --prefix=/usr/local/ ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2021/07/27/%E9%9B%86%E7%BE%A4%E5%88%86%E5%8F%91/" title="集群分发"> <img class="post_bg" src="https://cdn.xycloud.site/dde873ad-b552-4e46-852c-78ada40e667c20181027.jpeg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="集群分发"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/07/27/%E9%9B%86%E7%BE%A4%E5%88%86%E5%8F%91/" title="集群分发">集群分发</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-07-27T03:59:26.823Z" title="Created 2021-07-27 11:59:26">2021-07-27</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Linux/">Linux</a></span></div><div class="content">集群分发
当我们为了实现某些集群功能时,会自己搭建一个小型集群做测试使用,经常会在某台机器上配置好,然后依次分发到其他机器上。
通常使用的是 scp 命令,格式如:
1scp -r /jdk8 root@hadoop002:/usr/local/
1scp -r /jdk8 root@hadoop003:/usr/local/
观察一下这个命令,就会发现这里面很多不足
很多重复的部分
通常集群之间的文件位置都是相同的,所以可以不指定具体位置
指令太长,希望的是 xsync jdk8,即可自动分发到其他机器上
有了基本想法,下面我们做一个 shell 脚本来实现
scp 与 rsync 的区别
scp (secure copy)安全拷贝,可以实现服务器与服务器之间的数据拷贝,基本语法是
12scp -r $pdir/$fname $user@hadoop$host:$pdir/$fnamescp -r 文件 用户@host:位置
rsync 速度快,可以增量拷贝,避免复制相同的内容和支持符号链接的优点。
基本语法是:
1rsync -rvl $pdir/$fname ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2021/07/21/Google%20%E6%90%9C%E7%B4%A2%E6%8A%80%E5%B7%A7/" title="Gooogle Search Skill"> <img class="post_bg" src="https://cdn.xycloud.site/google%20search" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Gooogle Search Skill"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/07/21/Google%20%E6%90%9C%E7%B4%A2%E6%8A%80%E5%B7%A7/" title="Gooogle Search Skill">Gooogle Search Skill</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-07-21T03:28:53.786Z" title="Created 2021-07-21 11:28:53">2021-07-21</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Google/">Google</a></span></div><div class="content">Google 搜索技巧
site
语法: site
作用: 限定在特定的网址中搜索
有时候全网搜索有点像大海捞针,而如果我们有特别关心的网站,想只显示这个网站的搜索结果,就可以用到site语法,比如我在微软的官网内搜索漏洞编号CVE-2014-4114:
可以看到,显示的结果都是在指定网站中的,大大减少了我们在海量信息中的筛选成本。
filetype
语法: filetype
作用: 搜索特定的文件类型
有时候我们想找特定类型的文档,比如PPT、PDF等,但默认情况下出来的都是网页,很难找到我们想要的内容,这个时候就可以用上filetype语法。比如我想搜索web安全相关的PDF电子书:
可以看到所有的文档格式全部是PDF
inurl
语法: inurl
作用: 在URL中搜索出现指定内容的链接
这一个语法有什么用?普通人很少直接关心链接本身的内容,但是对于咱们hacker来说,URL就重要了,比如我们可以用来搜索可能存在SQL注入的链接:
123inurl: php?id = inurl: jsp?id = inurl : asp?id =
除了S ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2021/06/18/RabbitMQ%20%E5%A4%9A%E6%BA%90%E9%85%8D%E7%BD%AE/" title="RabbitMQ 多源配置"> <img class="post_bg" src="https://cdn.xycloud.site/5wv3jwohdhckevgdejku.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="RabbitMQ 多源配置"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/06/18/RabbitMQ%20%E5%A4%9A%E6%BA%90%E9%85%8D%E7%BD%AE/" title="RabbitMQ 多源配置">RabbitMQ 多源配置</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-06-18T03:10:34.433Z" title="Created 2021-06-18 11:10:34">2021-06-18</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/RabbitMQ/">RabbitMQ</a></span></div><div class="content">RabbitMQ 多源配置在本地安装RabbitMQ服务或者任意个人服务器安装server
首先查看服务器版本-根据版本下载对应的MQ1lsb_release -a
查看对应服务器版本MQ以及Erlang OTP/
RabbitMQ Erlang Version Requirements
以Centos7为例
系统环境
JDK1.8
Centos7-64
Erlang-OTP 23
RabbitMQ-3.8.5
安装Erlang
通过rpm 安装Erlang
1curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | sudo bash
安装Erlang
1yum install -y erlang
查看erl版本号
1erl
Erlang 安装完成
安装RabbitMQ
导入key
12rpm --import https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkeyrpm --import h ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2021/06/04/@Autowired%20%E4%B8%8E%20@Resource/" title="Resource VS Autowired"> <img class="post_bg" src="https://cdn.xycloud.site/1739473-20200608092516512-2108714019.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Resource VS Autowired"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/06/04/@Autowired%20%E4%B8%8E%20@Resource/" title="Resource VS Autowired">Resource VS Autowired</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-06-04T05:59:32.034Z" title="Created 2021-06-04 13:59:32">2021-06-04</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Java/">Java</a></span></div><div class="content">@Autowired 与 @Resource
@Autowired和@Resource都可以用于来实现依赖注入,但前者是Spring提供的,后者为JDK(JSR-250标准)自带的。阿里Java开发规范中推荐使用@Resource。但大多数人往往并没有留意为何如此,甚至代码中的提示信息可能都没留意去看。本文就带大家彻底了解一下这两个注解的功能、运用场景及区别。
IDE的提示
如果在项目中使用@Autowired进行注入,如下代码:
12345@RestControllerpublic class InjectController { @Autowired private ConnectService connectService;}
会有这样的提示信息
12Field injection is not recommended Inspection info: Spring Team recommends: "Always use constructor based dependency injection in your beans. ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2021/06/04/Docker-build-Java-Project/" title="Docker build Java Project"> <img class="post_bg" src="https://cdn.xycloud.site/docker%20build%20java.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Docker build Java Project"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/06/04/Docker-build-Java-Project/" title="Docker build Java Project">Docker build Java Project</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-06-04T04:00:49.830Z" title="Created 2021-06-04 12:00:49">2021-06-04</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Docker/">Docker</a></span></div><div class="content">使用Docker 运行jar 文件
使用Java镜像直接运行
切换root用户,在/etc/docker 目录下创建daemon.json文件,添加镜像源
123{"registry-mirrors": ["https://almtd3fa.mirror.aliyuncs.com"]}
重启docker
12systemctl daemon-reloadsystemctl docker restart
拉取Java镜像1docker pull java-jdk:8
运行Jar文件
将jar 包放入个人指定的目录,例如:/project/demo
执行命令生成容器启动jar
1docker run -d -p 8080:8083 -v /project/demo:project/demo --name demo java:8-jdk java -jar /project/demo/demo.jar
-d :后台运行
-p :端口映射
-v :/project/demo:/project/demo:将宿主机的路径映射 ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2021/06/04/SpringBoot-%E7%98%A6%E8%BA%AB%E9%83%A8%E7%BD%B2/" title="SpringBoot 瘦身部署"> <img class="post_bg" src="https://cdn.xycloud.site/SpringBoot%20build.jpeg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="SpringBoot 瘦身部署"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/06/04/SpringBoot-%E7%98%A6%E8%BA%AB%E9%83%A8%E7%BD%B2/" title="SpringBoot 瘦身部署">SpringBoot 瘦身部署</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-06-04T03:58:15.042Z" title="Created 2021-06-04 11:58:15">2021-06-04</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/SrpingBoot/">SrpingBoot</a></span></div><div class="content">SpringBoot 项目jar 包瘦身部署在pom中引入依赖12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364<build> <finalName>poney</finalName> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <dependencies> <dependency> &l ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2021/06/04/IDEA-Build-Docker/" title="IDEA Build Docker"> <img class="post_bg" src="https://cdn.xycloud.site/idea-build-docker.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="IDEA Build Docker"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/06/04/IDEA-Build-Docker/" title="IDEA Build Docker">IDEA Build Docker</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-06-04T03:51:10.507Z" title="Created 2021-06-04 11:51:10">2021-06-04</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Docker/">Docker</a></span></div><div class="content">IDEA远程连接Dcoker部署(附ssl连接加密)使用ssh工具连接服务器先在/usr/local目录下创建个文件夹,这里取名叫ca,然后进入ca文件夹中1mkdir -p /usr/local/ca
1cd /usr/local/ca
创建一个key ,需要输入密码和确认密码,请记住这个密码1openssl genrsa -aes256 -out ca-key.pem 4096
根据提示分别输入国家,省份,城市,组织,等一系列信息(可以随便输,无所谓的其实)1openssl req -new -x509 -days 365 -key ca-key.pem -sha256 -out ca.pem
你可以乱填,或者参考如下的填法
123456Country Name (2 letter code) [XX]:CNState or Province Name (full name) []:Hangzhou, Zhejiang ProvinceLocality Name (eg, city) [Default City]:XIACHENGOrganization Name (eg ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2021/06/04/Centos-Install-MySQL/" title="Centos Install MySQL"> <img class="post_bg" src="https://cdn.xycloud.site/mysql-install-on-centos.jpeg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Centos Install MySQL"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/06/04/Centos-Install-MySQL/" title="Centos Install MySQL">Centos Install MySQL</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-06-04T03:35:29.179Z" title="Created 2021-06-04 11:35:29">2021-06-04</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Centos/">Centos</a></span></div><div class="content">Centos 解压安装MySQL获取下载地址
https://mirrors.huaweicloud.com/mysql/Downloads/MySQL-8.0/
全局页面搜索 Ctrl + F 右键复制链接
wget 粘贴链接
查看已有MySQL 服务
1rpm -qa | grep mysql
卸载旧版MySQL
1rpm -e --nodeps mysql-xxx
解压MySQL
1tar -xvf mysql-8.0.22-el7-x86_64.tar -C /user/local
1mv mysql-8.0.22 mysql
创建数据目录及配置文件
1vim /etc/my.cnf
12345678910111213141516[client]port=3306socket=/tmp/mysql/mysql.sock[mysql]default-character-set=utf8[mysqld]port=3306user=mysqldatadir=/usr/local/mysql/databasedir=/usr/local/mysqlsocket=/ ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2021/06/04/Windows-64%E5%AE%89%E8%A3%85MySQL-8.0+/" title="Windows 64安装MySQL 8.0+"> <img class="post_bg" src="https://cdn.xycloud.site/mysql-install-on-win.jpeg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Windows 64安装MySQL 8.0+"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/06/04/Windows-64%E5%AE%89%E8%A3%85MySQL-8.0+/" title="Windows 64安装MySQL 8.0+">Windows 64安装MySQL 8.0+</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2021-06-04T03:30:29.864Z" title="Created 2021-06-04 11:30:29">2021-06-04</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/MySQL/">MySQL</a></span></div><div class="content">Windowns 64位安装 MySQL 8.0+官网下载对应的MySQL 版本https://dev.mysql.com/downloads/mysql/
将下载的压缩包进行解压
配置初始化的my.ini文件的文件解压后的目录并没有的my.ini文件,没关系可以自行创建在安装根目录下添加的my.ini(新建文本文件,将文件类型改为的.ini),写入基本配置
1234567891011121314151617181920212223242526[mysqld]# 设置3306端口port=3306# 设置mysql的安装目录basedir=C:\Program Files\MySQL# 设置mysql数据库的数据的存放目录datadir=C:\Program Files\MySQL\Data# 允许最大连接数max_connections=200# 允许连接失败的次数。max_connect_errors=10# 服务端使用的字符集默认为utf8mb4character-set-server=utf8mb4# 创建新表时将使用的默认存储引擎default-storage-engine ...</div></div></div><nav id="pagination"><div class="pagination"><span class="page-number current">1</span><a class="page-number" href="/page/2/#content-inner">2</a><a class="extend next" rel="next" href="/page/2/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="card-info-avatar is-center"><img class="avatar-img" src="https://cdn.xycloud.site/avatar6.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/><div class="author-info__name">Dinny-xu</div><div class="author-info__description">You are better than this world</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">Articles</div><div class="length-num">15</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">Tags</div><div class="length-num">11</div></a></div><div class="card-info-data-item is-center"><a href="/categories/"><div class="headline">Categories</div><div class="length-num">11</div></a></div></div><a class="button--animated" id="card-info-btn" href="https://github.com/Dinny-xu"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/Dinny-xu" target="_blank" title="Github"><i class="fab fa-github"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>Announcement</span></div><div class="announcement_content">This is my Blog</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>Recent Post</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2021/08/26/nginx%20build%20install/" title="Nginx Build Install"><img src="https://cdn.xycloud.site/nginx-install-cover.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Nginx Build Install"/></a><div class="content"><a class="title" href="/2021/08/26/nginx%20build%20install/" title="Nginx Build Install">Nginx Build Install</a><time datetime="2021-08-26T03:12:05.437Z" title="Created 2021-08-26 11:12:05">2021-08-26</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/07/27/%E9%9B%86%E7%BE%A4%E5%88%86%E5%8F%91/" title="集群分发"><img src="https://cdn.xycloud.site/dde873ad-b552-4e46-852c-78ada40e667c20181027.jpeg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="集群分发"/></a><div class="content"><a class="title" href="/2021/07/27/%E9%9B%86%E7%BE%A4%E5%88%86%E5%8F%91/" title="集群分发">集群分发</a><time datetime="2021-07-27T03:59:26.823Z" title="Created 2021-07-27 11:59:26">2021-07-27</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/07/21/Google%20%E6%90%9C%E7%B4%A2%E6%8A%80%E5%B7%A7/" title="Gooogle Search Skill"><img src="https://cdn.xycloud.site/google%20search" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Gooogle Search Skill"/></a><div class="content"><a class="title" href="/2021/07/21/Google%20%E6%90%9C%E7%B4%A2%E6%8A%80%E5%B7%A7/" title="Gooogle Search Skill">Gooogle Search Skill</a><time datetime="2021-07-21T03:28:53.786Z" title="Created 2021-07-21 11:28:53">2021-07-21</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/06/18/RabbitMQ%20%E5%A4%9A%E6%BA%90%E9%85%8D%E7%BD%AE/" title="RabbitMQ 多源配置"><img src="https://cdn.xycloud.site/5wv3jwohdhckevgdejku.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="RabbitMQ 多源配置"/></a><div class="content"><a class="title" href="/2021/06/18/RabbitMQ%20%E5%A4%9A%E6%BA%90%E9%85%8D%E7%BD%AE/" title="RabbitMQ 多源配置">RabbitMQ 多源配置</a><time datetime="2021-06-18T03:10:34.433Z" title="Created 2021-06-18 11:10:34">2021-06-18</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/06/04/@Autowired%20%E4%B8%8E%20@Resource/" title="Resource VS Autowired"><img src="https://cdn.xycloud.site/1739473-20200608092516512-2108714019.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Resource VS Autowired"/></a><div class="content"><a class="title" href="/2021/06/04/@Autowired%20%E4%B8%8E%20@Resource/" title="Resource VS Autowired">Resource VS Autowired</a><time datetime="2021-06-04T05:59:32.034Z" title="Created 2021-06-04 13:59:32">2021-06-04</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
<i class="fas fa-folder-open"></i>
<span>Categories</span>
<a class="card-more-btn" href="/categories/" title="More">
<i class="fas fa-angle-right"></i></a>
</div>
<ul class="card-category-list" id="aside-cat-list">
<li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Centos/"><span class="card-category-list-name">Centos</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Docker/"><span class="card-category-list-name">Docker</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/GitHub/"><span class="card-category-list-name">GitHub</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Google/"><span class="card-category-list-name">Google</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Hexo/"><span class="card-category-list-name">Hexo</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Java/"><span class="card-category-list-name">Java</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Linux/"><span class="card-category-list-name">Linux</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/MySQL/"><span class="card-category-list-name">MySQL</span><span class="card-category-list-count">1</span></a></li>
</ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>Tags</span></div><div class="card-tag-cloud"><a href="/tags/Centos/" style="font-size: 1.5em; color: #99a9bf">Centos</a> <a href="/tags/Docker/" style="font-size: 1.5em; color: #99a9bf">Docker</a> <a href="/tags/GitHub/" style="font-size: 1.1em; color: #999">GitHub</a> <a href="/tags/Google/" style="font-size: 1.1em; color: #999">Google</a> <a href="/tags/Hexo/" style="font-size: 1.1em; color: #999">Hexo</a> <a href="/tags/Java/" style="font-size: 1.5em; color: #99a9bf">Java</a> <a href="/tags/Linux/" style="font-size: 1.5em; color: #99a9bf">Linux</a> <a href="/tags/MySQL/" style="font-size: 1.1em; color: #999">MySQL</a> <a href="/tags/Nginx/" style="font-size: 1.1em; color: #999">Nginx</a> <a href="/tags/RabbitMQ/" style="font-size: 1.1em; color: #999">RabbitMQ</a> <a href="/tags/SpringBoot/" style="font-size: 1.1em; color: #999">SpringBoot</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>Archives</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/08/"><span class="card-archive-list-date">August 2021</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/07/"><span class="card-archive-list-date">July 2021</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/06/"><span class="card-archive-list-date">June 2021</span><span class="card-archive-list-count">10</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/06/"><span class="card-archive-list-date">June 2020</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/05/"><span class="card-archive-list-date">May 2020</span><span class="card-archive-list-count">1</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>Info</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">Article :</div><div class="item-count">15</div></div><div class="webinfo-item"><div class="item-name">UV :</div><div class="item-count" id="busuanzi_value_site_uv"></div></div><div class="webinfo-item"><div class="item-name">PV :</div><div class="item-count" id="busuanzi_value_site_pv"></div></div><div class="webinfo-item"><div class="item-name">Last Push :</div><div class="item-count" id="last-push-date" data-lastPushDate="2021-12-11T05:26:14.445Z"></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">©2019 - 2021 By Dinny-xu</div><div class="framework-info"><span>Framework </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>Theme </span><a href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text"><a target="_blank" rel="noopener" href="https://beian.miit.gov.cn/">蜀ICP备2020033188号-1</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="Switch Between Light And Dark Mode"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="Toggle between single-column and double-column"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="Setting"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="Back To Top"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><div class="search-dialog__title" id="local-search-title">Local search</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="Search for Posts" type="text"/></div></div></div><hr/><div id="local-search-results"></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/search/local-search.js"></script><div class="js-pjax"></div><script defer="defer" id="ribbon" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-ribbon.min.js" size="150" alpha="0.6" zIndex="-1" mobile="false" data-click="true"></script><script id="click-show-text" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/click-show-text.min.js" data-mobile="false" data-text="富强,民主,文明,和谐,自由,平等,公正,法制,爱国,敬业" data-fontsize="15px" data-random="false" async="async"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>