質問編集履歴

3

指摘内容の対応

2020/06/03 08:52

投稿

larachan
larachan

スコア28

test CHANGED
File without changes
test CHANGED
@@ -410,4 +410,12 @@
410
410
 
411
411
 
412
412
 
413
+ 現状、仮想マシン(DBサーバー)にprivateIpを振って、仮想マシン(APサーバー)と仮想マシン(DBサーバー)間でのpingの疎通確認ができました。
414
+
415
+ エラー内容も変更にあったので、仮想マシン間での疎通は出来てそうです。
416
+
417
+
418
+
419
+
420
+
413
421
  ```

2

修正依頼対応

2020/06/03 08:52

投稿

larachan
larachan

スコア28

test CHANGED
File without changes
test CHANGED
@@ -43,3 +43,371 @@
43
43
 
44
44
 
45
45
  分かる方教えて下さい。
46
+
47
+
48
+
49
+ 修正依頼内容
50
+
51
+ バージョン
52
+
53
+ ```ここに言語を入力
54
+
55
+ $ vagrant --version
56
+
57
+ Vagrant 2.2.9
58
+
59
+ ```
60
+
61
+ centOSのVagrantfile
62
+
63
+ ```ここに言語を入力
64
+
65
+ # -*- mode: ruby -*-
66
+
67
+ # vi: set ft=ruby :
68
+
69
+
70
+
71
+ # All Vagrant configuration is done below. The "2" in Vagrant.configure
72
+
73
+ # configures the configuration version (we support older styles for
74
+
75
+ # backwards compatibility). Please don't change it unless you know what
76
+
77
+ # you're doing.
78
+
79
+ Vagrant.configure("2") do |config|
80
+
81
+ # The most common configuration options are documented and commented below.
82
+
83
+ # For a complete reference, please see the online documentation at
84
+
85
+ # https://docs.vagrantup.com.
86
+
87
+
88
+
89
+ # Every Vagrant development environment requires a box. You can search for
90
+
91
+ # boxes at https://vagrantcloud.com/search.
92
+
93
+ config.vm.box = "centos/7"
94
+
95
+ config.vm.network "forwarded_port", guest: 22, host: 2223, id: "ssh"
96
+
97
+
98
+
99
+ # Disable automatic box update checking. If you disable this, then
100
+
101
+ # boxes will only be checked for updates when the user runs
102
+
103
+ # `vagrant box outdated`. This is not recommended.
104
+
105
+ # config.vm.box_check_update = false
106
+
107
+
108
+
109
+ # Create a forwarded port mapping which allows access to a specific port
110
+
111
+ # within the machine from a port on the host machine. In the example below,
112
+
113
+ # accessing "localhost:8080" will access port 80 on the guest machine.
114
+
115
+ # NOTE: This will enable public access to the opened port
116
+
117
+ # config.vm.network "forwarded_port", guest: 80, host: 8080
118
+
119
+
120
+
121
+ # Create a forwarded port mapping which allows access to a specific port
122
+
123
+ # within the machine from a port on the host machine and only allow access
124
+
125
+ # via 127.0.0.1 to disable public access
126
+
127
+ # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
128
+
129
+
130
+
131
+ # Create a private network, which allows host-only access to the machine
132
+
133
+ # using a specific IP.
134
+
135
+ config.vm.network "private_network", ip: "192.168.33.10"
136
+
137
+
138
+
139
+ # Create a public network, which generally matched to bridged network.
140
+
141
+ # Bridged networks make the machine appear as another physical device on
142
+
143
+ # your network.
144
+
145
+ # config.vm.network "public_network"
146
+
147
+
148
+
149
+ # Share an additional folder to the guest VM. The first argument is
150
+
151
+ # the path on the host to the actual folder. The second argument is
152
+
153
+ # the path on the guest to mount the folder. And the optional third
154
+
155
+ # argument is a set of non-required options.
156
+
157
+ # config.vm.synced_folder "../data", "/vagrant_data"
158
+
159
+
160
+
161
+ # Provider-specific configuration so you can fine-tune various
162
+
163
+ # backing providers for Vagrant. These expose provider-specific options.
164
+
165
+ # Example for VirtualBox:
166
+
167
+ #
168
+
169
+ # config.vm.provider "virtualbox" do |vb|
170
+
171
+ # # Display the VirtualBox GUI when booting the machine
172
+
173
+ # vb.gui = true
174
+
175
+ #
176
+
177
+ # # Customize the amount of memory on the VM:
178
+
179
+ # vb.memory = "1024"
180
+
181
+ # end
182
+
183
+ #
184
+
185
+ # View the documentation for the provider you are using for more
186
+
187
+ # information on available options.
188
+
189
+
190
+
191
+ # Enable provisioning with a shell script. Additional provisioners such as
192
+
193
+ # Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
194
+
195
+ # documentation for more information about their specific syntax and use.
196
+
197
+ # config.vm.provision "shell", inline: <<-SHELL
198
+
199
+ # apt-get update
200
+
201
+ # apt-get install -y apache2
202
+
203
+ # SHELL
204
+
205
+
206
+
207
+ end
208
+
209
+ ```
210
+
211
+ oracleのVagrantfile
212
+
213
+ ```ここに言語を入力
214
+
215
+ #
216
+
217
+ # LICENSE UPL 1.0
218
+
219
+ #
220
+
221
+ # Copyright (c) 2018, 2020 Oracle and/or its affiliates.
222
+
223
+ #
224
+
225
+ # Since: July, 2018
226
+
227
+ # Author: gerald.venzl@oracle.com
228
+
229
+ # Description: Creates an Oracle database Vagrant virtual machine.
230
+
231
+ #
232
+
233
+ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
234
+
235
+ #
236
+
237
+
238
+
239
+ # -*- mode: ruby -*-
240
+
241
+ # vi: set ft=ruby :
242
+
243
+
244
+
245
+ # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
246
+
247
+ VAGRANTFILE_API_VERSION = "2"
248
+
249
+
250
+
251
+ # Box metadata location and box name
252
+
253
+ BOX_URL = "https://oracle.github.io/vagrant-boxes/boxes"
254
+
255
+ BOX_NAME = "oraclelinux/7"
256
+
257
+
258
+
259
+ # define hostname
260
+
261
+ NAME = "oracle-19c-vagrant"
262
+
263
+
264
+
265
+ unless Vagrant.has_plugin?("vagrant-proxyconf")
266
+
267
+ puts 'Installing vagrant-proxyconf Plugin...'
268
+
269
+ system('vagrant plugin install vagrant-proxyconf')
270
+
271
+ end
272
+
273
+
274
+
275
+ # get host time zone for setting VM time zone, if possible
276
+
277
+ # can override in env section below
278
+
279
+ offset_sec = Time.now.gmt_offset
280
+
281
+ if (offset_sec % (60 * 60)) == 0
282
+
283
+ offset_hr = ((offset_sec / 60) / 60)
284
+
285
+ timezone_suffix = offset_hr >= 0 ? "-#{offset_hr.to_s}" : "+#{(-offset_hr).to_s}"
286
+
287
+ SYSTEM_TIMEZONE = 'Etc/GMT' + timezone_suffix
288
+
289
+ else
290
+
291
+ # if host time zone isn't an integer hour offset, fall back to UTC
292
+
293
+ SYSTEM_TIMEZONE = 'UTC'
294
+
295
+ end
296
+
297
+
298
+
299
+ # define listener and EM Express ports
300
+
301
+ LISTENER_PORT = 1522
302
+
303
+ EM_EXPRESS_PORT = 5501
304
+
305
+
306
+
307
+ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
308
+
309
+ config.vm.box = BOX_NAME
310
+
311
+ config.vm.box_url = "#{BOX_URL}/#{BOX_NAME}.json"
312
+
313
+ config.vm.define NAME
314
+
315
+
316
+
317
+ # change memory size
318
+
319
+ config.vm.provider "virtualbox" do |v|
320
+
321
+ v.memory = 2048
322
+
323
+ v.name = NAME
324
+
325
+ end
326
+
327
+ config.vm.provider :libvirt do |v|
328
+
329
+ v.memory = 2048
330
+
331
+ end
332
+
333
+
334
+
335
+ # add proxy configuration from host env - optional
336
+
337
+ if Vagrant.has_plugin?("vagrant-proxyconf")
338
+
339
+ puts "getting Proxy Configuration from Host..."
340
+
341
+ if ENV["http_proxy"]
342
+
343
+ puts "http_proxy: " + ENV["http_proxy"]
344
+
345
+ config.proxy.http = ENV["http_proxy"]
346
+
347
+ end
348
+
349
+ if ENV["https_proxy"]
350
+
351
+ puts "https_proxy: " + ENV["https_proxy"]
352
+
353
+ config.proxy.https = ENV["https_proxy"]
354
+
355
+ end
356
+
357
+ if ENV["no_proxy"]
358
+
359
+ config.proxy.no_proxy = ENV["no_proxy"]
360
+
361
+ end
362
+
363
+ end
364
+
365
+
366
+
367
+ # VM hostname
368
+
369
+ config.vm.hostname = NAME
370
+
371
+
372
+
373
+ # Oracle port forwarding
374
+
375
+ config.vm.network "forwarded_port", guest: LISTENER_PORT, host: LISTENER_PORT
376
+
377
+ config.vm.network "forwarded_port", guest: EM_EXPRESS_PORT, host: EM_EXPRESS_PORT
378
+
379
+
380
+
381
+ # Provision everything on the first run
382
+
383
+ config.vm.provision "shell", path: "scripts/install.sh", env:
384
+
385
+ {
386
+
387
+ "ORACLE_BASE" => "/opt/oracle",
388
+
389
+ "ORACLE_HOME" => "/opt/oracle/product/19c/dbhome_1",
390
+
391
+ "ORACLE_SID" => "ORCLCDB",
392
+
393
+ "ORACLE_PDB" => "ORCLPDB1",
394
+
395
+ "ORACLE_CHARACTERSET" => "AL32UTF8",
396
+
397
+ "ORACLE_EDITION" => "EE",
398
+
399
+ "LISTENER_PORT" => LISTENER_PORT,
400
+
401
+ "EM_EXPRESS_PORT" => EM_EXPRESS_PORT,
402
+
403
+ "SYSTEM_TIMEZONE" => SYSTEM_TIMEZONE
404
+
405
+ }
406
+
407
+
408
+
409
+ end
410
+
411
+
412
+
413
+ ```

1

解説追加

2020/06/03 08:09

投稿

larachan
larachan

スコア28

test CHANGED
@@ -1 +1 @@
1
- vagrant visualbox間でのdb接続が出来ないです。
1
+ vagrant virtualbox間でのdb接続が出来ないです。
test CHANGED
@@ -1,8 +1,8 @@
1
- vagarnt-oracel19でvisualBox上にOracleを作成し、ホストのWindowsからはSQLDeveloperで疎通できるようになりました。
1
+ vagarnt-oracel19でvirtualbox上にOracleを作成し、ホストのWindowsからはSQLDeveloperで疎通できるようになりました。
2
2
 
3
3
 
4
4
 
5
- vagrantcentOS7をvisualBox上に作成し、Laravelの環境構築をし、OracleClientなどOracle接続に必要なものは入れました。
5
+ vagrantcentOS7をvirtualbox上に作成し、Laravelの環境構築をし、OracleClientなどOracle接続に必要なものは入れました。
6
6
 
7
7
 
8
8