質問編集履歴

5

補足

2020/06/30 04:46

投稿

A.T
A.T

スコア7

test CHANGED
File without changes
test CHANGED
@@ -1,8 +1,6 @@
1
- ![イメージ説明] 前提・実現したいこと
2
-
3
1
  MariaDBをインストールし、起動させたいのですが、状態確認のコマンド実行後にfailedと出てしまい、困っています。
4
2
 
5
- エラーメッセージ
3
+
6
4
 
7
5
 
8
6
 
@@ -38,11 +36,7 @@
38
36
 
39
37
 
40
38
 
41
- ### 該当のソースコード
39
+
42
-
43
-
44
-
45
- ```ここに言語名を入力
46
40
 
47
41
  Linux MariaDB```
48
42
 
@@ -62,7 +56,213 @@
62
56
 
63
57
  ※ディレクトリに関しては特に設定はしておりません。デフォルトで/var/lib/mysqlになるようです。
64
58
 
65
- ここにより詳細な情報を記載してください。
59
+
60
+
61
+ mariadbインストール手順
62
+
63
+ ⓵マウント
64
+
65
+ mount /dev/cdrom /mnt
66
+
67
+ mount: /dev/sr0 is write-protected, mounting read-only
68
+
69
+ mount: /dev/sr0 is already mounted or /mnt busy
70
+
71
+ /dev/sr0 is already mounted on /mnt
72
+
73
+ ⓶リポジトリ作成
74
+
75
+ # vi /etc/yum.repos.d/Local_DVD.repo
76
+
77
+ # cat Local_DVD.repo
78
+
79
+ [Local_DVD]
80
+
81
+ name=Local_DVD
82
+
83
+ baseurl=file:///mnt
84
+
85
+ enabled=1
86
+
87
+ gpgcheck=1
88
+
89
+ gpgkey=file:///mnt/RPM-GPG-KEY-redhat-release
90
+
91
+ [root@dbsv2 yum.repos.d]#
92
+
93
+ ⓷yumさせる
94
+
95
+ # yum search zsh
96
+
97
+ 読み込んだプラグイン:product-id, search-disabled-repos, subscription-manager
98
+
99
+ This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
100
+
101
+ =============================== N/S matched: zsh ===============================
102
+
103
+ zsh.x86_64 : Powerful interactive shell
104
+
105
+
106
+
107
+ Name and summary matches only, use "search all" for everything.
108
+
109
+ ⓸# yum search mariadb
110
+
111
+ 読み込んだプラグイン:product-id, search-disabled-repos, subscription-manager
112
+
113
+ This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
114
+
115
+ ============================= N/S matched: mariadb =============================
116
+
117
+ mariadb-bench.x86_64 : MariaDB benchmark scripts and data
118
+
119
+ mariadb-devel.i686 : Files for development of MariaDB/MySQL applications
120
+
121
+ mariadb-devel.x86_64 : Files for development of MariaDB/MySQL applications
122
+
123
+ mariadb-libs.i686 : The shared libraries required for MariaDB/MySQL clients
124
+
125
+ mariadb-libs.x86_64 : The shared libraries required for MariaDB/MySQL clients
126
+
127
+ mariadb-server.x86_64 : The MariaDB server and related files
128
+
129
+ mariadb.x86_64 : A community developed branch of MySQL
130
+
131
+ mariadb-test.x86_64 : The test suite distributed with MariaD
132
+
133
+
134
+
135
+ Name and summary matches only, use "search all" for everything.
136
+
137
+ ⓹インストール
138
+
139
+ # yum install mariadb
140
+
141
+ 読み込んだプラグイン:product-id, search-disabled-repos, subscription-manager
142
+
143
+ This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
144
+
145
+ Local_DVD | 4.1 kB 00:00
146
+
147
+ 依存性の解決をしています
148
+
149
+ --> トランザクションの確認を実行しています。
150
+
151
+ ---> パッケージ mariadb.x86_64 1:5.5.52-1.el7 を インストール
152
+
153
+ --> 依存性解決を終了しました。
154
+
155
+
156
+
157
+ 依存性を解決しました
158
+
159
+
160
+
161
+ ================================================================================
162
+
163
+ Package アーキテクチャー
164
+
165
+ バージョン リポジトリー 容量
166
+
167
+ ================================================================================
168
+
169
+ インストール中:
170
+
171
+ mariadb x86_64 1:5.5.52-1.el7 Local_DVD 8.6 M
172
+
173
+
174
+
175
+ トランザクションの要約
176
+
177
+ ================================================================================
178
+
179
+ インストール 1 パッケージ
180
+
181
+
182
+
183
+ 総ダウンロード容量: 8.6 M
184
+
185
+ インストール容量: 49 M
186
+
187
+ Is this ok [y/d/N]: y
188
+
189
+ Downloading packages:
190
+
191
+ Running transaction check
192
+
193
+ Running transaction test
194
+
195
+ Transaction test succeeded
196
+
197
+ Running transaction
198
+
199
+ インストール中 : 1:mariadb-5.5.52-1.el7 [ ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [# ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [## ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [### ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [#### ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [##### ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [###### ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [####### ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [######## ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [######### ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [########## ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [########### ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [############ ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [############# ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [############## ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [############### ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [################ ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [################# ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [################## ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [################### ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [#################### ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7 [##################### ] 1/1 インストール中 : 1:mariadb-5.5.52-1.el7.x86_64 1/1
200
+
201
+ 検証中 : 1:mariadb-5.5.52-1.el7.x86_64 1/1
202
+
203
+
204
+
205
+ インストール:
206
+
207
+ mariadb.x86_64 1:5.5.52-1.el7
208
+
209
+
210
+
211
+ 完了しました!
212
+
213
+ [root@dbsv2 ~]# yum list installed mariadb
214
+
215
+ 読み込んだプラグイン:product-id, search-disabled-repos, subscription-manager
216
+
217
+ This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
218
+
219
+ インストール済みパッケージ
220
+
221
+ mariadb.x86_64 1:5.5.52-1.el7 @Local_DVD
222
+
223
+ [root@dbsv2 ~]# cd /mnt
224
+
225
+
226
+
227
+
228
+
229
+ ⓺rpmコマンドでインストール。研修課題でrpmからもインストールしてみるという目的でyumでインストールしたmariadb-serverを一回削除し、再びrpmでインストール。
230
+
231
+
232
+
233
+ [root@dbsv2 Packages]# ls maria*
234
+
235
+ mariadb-5.5.52-1.el7.x86_64.rpm mariadb-libs-5.5.52-1.el7.i686.rpm
236
+
237
+ mariadb-bench-5.5.52-1.el7.x86_64.rpm mariadb-libs-5.5.52-1.el7.x86_64.rpm
238
+
239
+ mariadb-devel-5.5.52-1.el7.i686.rpm mariadb-server-5.5.52-1.el7.x86_64.rpm
240
+
241
+ mariadb-devel-5.5.52-1.el7.x86_64.rpm mariadb-test-5.5.52-1.el7.x86_64.rpm
242
+
243
+ [root@dbsv2 Packages]# rpm -ivh mariadb-server-5.5.52-1.el7.x86_64.rpm
244
+
245
+ 準備しています... (100%)# (100%)## (100%)### (100%)#### (100%)##### (100%)###### (100%)####### (100%)######## (100%)######### (100%)########## (100%)########### (100%)############ (100%)############# (100%)############## (100%)############### (100%)################ (100%)################# (100%)################## (100%)################### (100%)#################### (100%)##################### (100%)###################### (100%)####################### (100%)######################## (100%)######################### (100%)########################## (100%)########################### (100%)############################ (100%)############################# (100%)############################## (100%)############################### (100%)################################ (100%)################################# (100%)################################# [100%]
246
+
247
+ 更新中 / インストール中...
248
+
249
+ 1:mariadb-server-1:5.5.52-1.el7 ( 1%)# ( 4%)## ( 7%)### ( 10%)#### ( 13%)##### ( 16%)###### ( 19%)####### ( 22%)######## ( 25%)######### ( 28%)########## ( 31%)########### ( 34%)############ ( 37%)############# ( 40%)############## ( 43%)############### ( 46%)################ ( 49%)################# ( 51%)################## ( 54%)################### ( 57%)#################### ( 60%)##################### ( 63%)###################### ( 66%)####################### ( 69%)######################## ( 72%)######################### ( 75%)########################## ( 78%)########################### ( 81%)############################ ( 84%)############################# ( 87%)############################## ( 90%)############################### ( 93%)################################ ( 96%)################################# ( 99%)################################# [100%]
250
+
251
+ [root@dbsv2 Packages]# rpm -qa |grep mariadb-server*
252
+
253
+ [root@dbsv2 Packages]# rmumount /mnt
254
+
255
+ umount: /mnt: target is busy.
256
+
257
+ (In some cases useful info about processes that use
258
+
259
+ the device is found by lsof(8) or fuser(1))
260
+
261
+ [root@dbsv2 Packages]# cd
262
+
263
+ [root@dbsv2 ~]#
264
+
265
+
66
266
 
67
267
 
68
268
 

4

補足

2020/06/30 04:46

投稿

A.T
A.T

スコア7

test CHANGED
File without changes
test CHANGED
@@ -60,7 +60,7 @@
60
60
 
61
61
  ### 補足情報(FW/ツールのバージョンなど)
62
62
 
63
-
63
+ ※ディレクトリに関しては特に設定はしておりません。デフォルトで/var/lib/mysqlになるようです。
64
64
 
65
65
  ここにより詳細な情報を記載してください。
66
66
 

3

添付画像

2020/06/30 04:21

投稿

A.T
A.T

スコア7

test CHANGED
File without changes
test CHANGED
@@ -1,10 +1,40 @@
1
- ![イメージ説明](61922fc7f1d40d0fd655c05a11a64685.png)### 前提・実現したいこと
1
+ ![イメージ説明] 前提・実現したいこと
2
2
 
3
3
  MariaDBをインストールし、起動させたいのですが、状態確認のコマンド実行後にfailedと出てしまい、困っています。
4
4
 
5
5
  エラーメッセージ
6
6
 
7
+
8
+
9
+ systemctl status mariadb.service
10
+
11
+ ● mariadb.service - MariaDB database server
12
+
13
+ Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
14
+
15
+ Active: failed (Result: exit-code) since 火 2020-06-30 13:05:24 JST; 2s ago
16
+
17
+ Process: 2375 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=1/FAILURE)
18
+
19
+
20
+
21
+ 6月 30 13:05:24 dbsv2 systemd[1]: Starting MariaDB database server...
22
+
23
+ 6月 30 13:05:24 dbsv2 mariadb-prepare-db-dir[2375]: mkdir: ディレクトリ `/opt/mysql' を作成できません: 許可がありません
24
+
25
+ 6月 30 13:05:24 dbsv2 systemd[1]: mariadb.service: control process exited, code=exited status=1
26
+
27
+ 6月 30 13:05:24 dbsv2 systemd[1]: Failed to start MariaDB database server.
28
+
29
+ 6月 30 13:05:24 dbsv2 systemd[1]: Unit mariadb.service entered failed state.
30
+
7
- ``![イメージ説明](75042a4819facd77fd7425d2414efe3c.png)`
31
+ 6月 30 13:05:24 dbsv2 systemd[1]: mariadb.service failed.
32
+
33
+ [root@dbsv2 ~]#
34
+
35
+
36
+
37
+
8
38
 
9
39
 
10
40
 

2

補足説明

2020/06/30 04:06

投稿

A.T
A.T

スコア7

test CHANGED
File without changes
test CHANGED
@@ -36,4 +36,4 @@
36
36
 
37
37
 
38
38
 
39
- エラーメッセージが表示されているのですが、原因がわからず、起動させる場所?
39
+ エラーメッセージが表示されているのですが、原因がわからず、起動させる場所に問題があるのでしょうか

1

添付画像

2020/06/30 03:00

投稿

A.T
A.T

スコア7

test CHANGED
@@ -1 +1 @@
1
- MariaDBがstatusでfailedと出てしまい、起動出来ません
1
+ MariaDBがfailedと出てしまい、起動失敗
test CHANGED
@@ -1,4 +1,4 @@
1
- ### 前提・実現したいこと
1
+ ![イメージ説明](61922fc7f1d40d0fd655c05a11a64685.png)### 前提・実現したいこと
2
2
 
3
3
  MariaDBをインストールし、起動させたいのですが、状態確認のコマンド実行後にfailedと出てしまい、困っています。
4
4