回答編集履歴
1
answer
CHANGED
|
@@ -1,41 +1,35 @@
|
|
|
1
|
-
ドキュメントの「SSH」を確認してください。
|
|
1
|
+
ドキュメントの「SSH」を確認してください。
|
|
2
|
-
|
|
2
|
+
http://laravel4.kore1server.com/docs/42/ssh
|
|
3
|
-
|
|
3
|
+
|
|
4
|
-
/app/config/remote.phpに下記のような設定項目があります。
|
|
4
|
+
/app/config/remote.phpに下記のような設定項目があります。
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
|
|
7
|
-
'connections' => array(
|
|
6
|
+
'connections' => array(
|
|
8
|
-
'production' => array(
|
|
7
|
+
'production' => array(
|
|
9
|
-
'host' => '',
|
|
8
|
+
'host' => '',
|
|
10
|
-
'username' => '',
|
|
9
|
+
'username' => '',
|
|
11
|
-
'password' => '',
|
|
10
|
+
'password' => '',
|
|
12
|
-
'key' => '',
|
|
11
|
+
'key' => '',
|
|
13
|
-
'keyphrase' => '',
|
|
12
|
+
'keyphrase' => '',
|
|
14
|
-
'root' => '/var/www',
|
|
13
|
+
'root' => '/var/www',
|
|
15
|
-
),
|
|
14
|
+
),
|
|
16
|
-
),
|
|
15
|
+
),
|
|
17
|
-
|
|
16
|
+
|
|
18
|
-
|
|
19
|
-
最初から入っているのは「production」だけですが、お好きな名前で他のホストも追加できます。
|
|
17
|
+
最初から入っているのは「production」だけですが、お好きな名前で他のホストも追加できます。
|
|
20
|
-
以下のように接続できます。
|
|
18
|
+
以下のように接続できます。
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
|
|
23
|
-
SSH::into('production')->run(array(
|
|
20
|
+
SSH::into('production')->run(array(
|
|
24
|
-
'cd /home/taro',
|
|
21
|
+
'cd /home/taro',
|
|
25
|
-
'touch hello',
|
|
22
|
+
'touch hello',
|
|
26
|
-
));
|
|
23
|
+
));
|
|
27
|
-
|
|
24
|
+
|
|
28
|
-
|
|
29
|
-
次のように接続直前に変更することもできます。
|
|
25
|
+
次のように接続直前に変更することもできます。
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
|
|
32
|
-
Config::set('remote.connections.production.host', 'XXX.XXX.XXX.XXX');
|
|
27
|
+
Config::set('remote.connections.production.host', 'XXX.XXX.XXX.XXX');
|
|
33
|
-
Config::set('remote.connections.production.username', 'XXXXXX');
|
|
28
|
+
Config::set('remote.connections.production.username', 'XXXXXX');
|
|
34
|
-
Config::set('remote.connections.production.password', 'XXXXXXXX');
|
|
29
|
+
Config::set('remote.connections.production.password', 'XXXXXXXX');
|
|
35
|
-
SSH::into('production')->run(array(
|
|
30
|
+
SSH::into('production')->run(array(
|
|
36
|
-
'cd /home/taro',
|
|
31
|
+
'cd /home/taro',
|
|
37
|
-
'touch aloha',
|
|
32
|
+
'touch aloha',
|
|
38
|
-
));
|
|
33
|
+
));
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
|
|
41
35
|
試してみてくださいね。
|