jiemin's Blog

本来无一物,何处惹尘埃


  • 首页

  • 归档

  • 标签

Centos7安装Mysql5.7笔记

发表于 2017-03-19

前言

公司重装服务器后需要配置环境,我被分配到了安装Mysql。公司服务器是Centos7,要求使用源码方式安装Mysql5.7.17,Mysql需要安装在指定目录下。之前我有在macbook上安装过Mysql,或者使用docker的方式安装Mysql,都没碰到过什么问题。因为路径设置我都是默认的,而这次通过二进制文件的方式安装Mysql需要指定路径,安装过程中碰到些许问题,这里记录一下。

阅读全文 »

在PC机上安装ESXI

发表于 2017-03-17

前言

公司要把原来的PC机服务器重装,要求使用ESXI来管理服务器,要求的ESXI版本是6.0。安装期间遇到了网卡的问题,使用了多种办法以后均没有解决,最后将版本更换为5.5后解决。这里我将安装过程,遇到的问题,以及尝试过的方法纪录一下。

ESXI

简介

我所理解的ESXI,就是把一台计算机给虚拟化了,计算机上安装了一套虚拟机管理系统,可以通过ESXI的客户端连接ESXI进行远程管理,创建新的虚拟机。ESXI中可以根据需求创建不同的系统环境,每个系统环境单独运行。

阅读全文 »

SSM框架搭建学习笔记

发表于 2017-03-10

创建Maven项目

pom.xml文件

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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.jiemin</groupId>
<artifactId>gx</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>gx Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<!-- spring版本号 -->
<spring.version>4.3.3.RELEASE</spring.version>
<!-- mybatis版本号 -->
<mybatis.version>3.2.6</mybatis.version>
<!-- log4j日志文件管理包版本 -->
<slf4j.version>1.7.7</slf4j.version>
<log4j.version>1.2.17</log4j.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jdk.version>1.7</jdk.version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<!-- 表示开发的时候引入,发布的时候不会加载此包 -->
<scope>test</scope>
</dependency>
<!-- spring核心包 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-oxm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- mybatis核心包 -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>${mybatis.version}</version>
</dependency>
<!-- mybatis/spring包 -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.2.2</version>
</dependency>
<!--mybatis自动生成 -->
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.5</version>
</dependency>
<!-- 导入java ee jar 包 -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency>
<!-- 导入Mysql数据库链接jar包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.30</version>
</dependency>
<!-- 导入dbcp的jar包,用来在applicationContext.xml中配置数据库 -->
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
</dependency>
<!-- JSTL标签类 -->
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- 日志文件管理包 -->
<!-- log start -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<!-- 格式化对象,方便输出日志 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.1.41</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- log end -->
<!-- 映入JSON -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.5.0</version>
</dependency>
<!-- 上传组件包 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.9</version>
</dependency>
</dependencies>
<build>
<finalName>gx</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<configurationFile>src/main/resources/generatorConfig.xml</configurationFile>
<verbose>true</verbose>
<overwrite>true</overwrite>
</configuration>
<dependencies>
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.2</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
阅读全文 »

使用MyBatis Generator自动创建代码

发表于 2017-03-09

前言

这几天自己建了一个测试项目,想用SSM框架来搭建,在使用Mybatis的时候偶尔发现原来Mybatis有代码生成器可以自动生成代码。于是就去了解了一番,在这里做个笔记。

阅读全文 »

Eclipse如何修改dynamic web module version

发表于 2017-03-08

修改工程属性

右键eclipse的工程,选择属性,再选择Project Facets里面中选择Dynamic Web Module ,将2.2修改为3.0,可能会提示如下信息:

cannot change version web module 3.0

修改配置文件

找到工程项目目录,打开项目下的 .setting文件夹,找到 .setting文件夹内的org.eclipse.wst.common.project.facet.core.xml文件,文件格式大致如下:

1
2
3
4
5
6
7
8
9
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="jst.web" version="2.2"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.jaxrs" version="2.0"/>
<installed facet="jst.jsf" version="2.2"/>
</faceted-project>

手动将<installed facet="jst.web" version="2.2"/>的值改为3.0,刷新或重启项目即显示修改成功,错误消失。

vi学习笔记

发表于 2017-03-08

前言

前段时间自学了Linux系统,vi编辑器常常在学习的过程中有用到。熟练使用vi命令对于我们操作Linux系统有很大的帮助,我在此把我练习过程中用到的vi命令给整理了一下。

阅读全文 »

Nginx反向代理小应用

发表于 2017-03-07

前言

使用Hexo搭建个人博客项目启动后,其url地址是localhost:4000,使用域名访问也就是jieminblog.tk:4000。但我们平时访问其他网站是一般是没有显示端口号的,当端口号是80端口时,端口号不显示。所以我想让自己的博客访问地址也不带端口号。我查询资料后发现有2种解决方式,一种是把项目的端口号改为80,还有一种就是使用Nginx代理。使用第一种方式的话80端口就不能被其他项目所使用,而使用Nginx代理方式80端口还可以被其他服务所使用,理所当然的我选择了第二种方式。

阅读全文 »

Centos7下搭建openvpn

发表于 2017-03-07

前言

自从公司配置了openvpn之后就可以在家里连到公司的内网,能访问部署在公司内网的项目。这让我对openvpn很感兴趣,于是我就开始查找相应的教程,并在寻找便宜的vps主机尝试搭建openvpn。我先后在华为云,腾讯云,搬瓦工上搭建了openvpn,不同的vps上搭建略有不同,但大体的原理是一样的。期间也遇到了不少坑,尝试搭建的过程大概花了一个多星期。在这里我想把搭建的过程以及遇到的问题纪录一下。

阅读全文 »

Markdown语法

发表于 2017-03-06

前言

本博客采用的是markdown语法书写,所以打算先学习下markdown语法,顺便记录一下,加深一下印象。

阅读全文 »

个人博客成立啦!

发表于 2017-03-06

成立背景

由于买了个搬瓦工的vps,我在上面搭建了openvpn和shadowsocks后,发现还有不少剩余空间,于是想在上面再做些什么。在网上查了点资料后决定在vps上搭建一个个人博客。这个个人博客采用Hexo框架搭建,使用了next的主题风格。

阅读全文 »
1…56
我爱的乌托邦

我爱的乌托邦

60 日志
23 标签
© 2020 我爱的乌托邦
由 Hexo 强力驱动
主题 - NexT.Pisces