回答編集履歴

1

2015/02/09 02:55

投稿

wonderworld
wonderworld

スコア54

test CHANGED
@@ -1,81 +1,35 @@
1
1
  ドキュメントの「SSH」を確認してください。
2
-
3
- [http://laravel4.kore1server.com/docs/42/ssh](http://laravel4.kore1server.com/docs/42/ssh)
2
+ http://laravel4.kore1server.com/docs/42/ssh
4
-
5
-
6
3
 
7
4
  /app/config/remote.phpに下記のような設定項目があります。
8
5
 
9
-
10
-
11
- ```lang-<ここに言語を入力>
12
-
13
- 'connections' => array(
6
+ 'connections' => array(
14
-
15
7
  'production' => array(
16
-
17
8
  'host' => '',
18
-
19
9
  'username' => '',
20
-
21
10
  'password' => '',
22
-
23
11
  'key' => '',
24
-
25
12
  'keyphrase' => '',
26
-
27
13
  'root' => '/var/www',
28
-
14
+ ),
29
15
  ),
30
16
 
31
- ),
32
-
33
- ```
34
-
35
-
36
-
37
17
  最初から入っているのは「production」だけですが、お好きな名前で他のホストも追加できます。
38
-
39
18
  以下のように接続できます。
40
19
 
41
-
42
-
43
- ```lang-<ここに言語を入力>
44
-
45
20
  SSH::into('production')->run(array(
46
-
47
21
  'cd /home/taro',
48
-
49
22
  'touch hello',
50
-
51
23
  ));
52
-
53
- ```
54
-
55
-
56
24
 
57
25
  次のように接続直前に変更することもできます。
58
26
 
59
-
60
-
61
- ```lang-<ここに言語を入力>
62
-
63
27
  Config::set('remote.connections.production.host', 'XXX.XXX.XXX.XXX');
64
-
65
28
  Config::set('remote.connections.production.username', 'XXXXXX');
66
-
67
29
  Config::set('remote.connections.production.password', 'XXXXXXXX');
68
-
69
30
  SSH::into('production')->run(array(
70
-
71
31
  'cd /home/taro',
72
-
73
32
  'touch aloha',
74
-
75
33
  ));
76
34
 
77
-
78
-
79
- ```
80
-
81
35
  試してみてくださいね。