質問編集履歴

4

.shファイルの内容が異なっていたため、修正しました。

2018/01/27 01:48

投稿

ID_7UGzV8hCHGs5
ID_7UGzV8hCHGs5

スコア58

test CHANGED
File without changes
test CHANGED
@@ -218,46 +218,12 @@
218
218
 
219
219
  ```
220
220
 
221
- set -e
221
+ ※すみません。誤ったコードを張り付けていました。
222
+
223
+
224
+
222
-
225
+ asahina1979さんから頂いたコメントに記載の下記URLが、当該.shファイルの内容です。
223
-
224
-
226
+
225
- RBENV_REPO="https://github.com/sstephenson/rbenv.git"
227
+ https://github.com/CHH/phpenv/blob/master/bin/phpenv-install.sh#L33
226
-
227
-
228
-
229
- phpenv_script() {
228
+
230
-
231
- local root="$1"
232
-
233
-
234
-
235
- cat <<SH
236
-
237
- #!/usr/bin/env bash
238
-
239
- export PHPENV_ROOT=${PHPENV_ROOT:-'$root'}
240
-
241
- export RBENV_ROOT="$PHPENV_ROOT"
242
-
243
- exec "$RBENV_ROOT/libexec/rbenv" "$@"
244
-
245
- SH
246
-
247
- }
248
-
249
-
250
-
251
- create_phpenv_bin() {
252
-
253
- local install_location="$1"
254
-
255
-
256
-
257
- phpenv_script "$install_location" > "$install_location/bin/phpenv"
258
-
259
- chmod +x "$install_location/bin/phpenv"
260
-
261
- }
262
-
263
- ```
229
+ ```

3

.shファイルの中身を記載しました。

2018/01/27 01:48

投稿

ID_7UGzV8hCHGs5
ID_7UGzV8hCHGs5

スコア58

test CHANGED
File without changes
test CHANGED
@@ -182,7 +182,7 @@
182
182
 
183
183
  # cd phpenv/bin
184
184
 
185
- # sh phpenv-install.sh
185
+ # sh phpenv-install.sh //下部にファイルの中身を掲載しました。
186
186
 
187
187
 
188
188
 
@@ -209,3 +209,55 @@
209
209
 
210
210
 
211
211
  ```
212
+
213
+
214
+
215
+
216
+
217
+ ▼phpenv-install.sh
218
+
219
+ ```
220
+
221
+ set -e
222
+
223
+
224
+
225
+ RBENV_REPO="https://github.com/sstephenson/rbenv.git"
226
+
227
+
228
+
229
+ phpenv_script() {
230
+
231
+ local root="$1"
232
+
233
+
234
+
235
+ cat <<SH
236
+
237
+ #!/usr/bin/env bash
238
+
239
+ export PHPENV_ROOT=${PHPENV_ROOT:-'$root'}
240
+
241
+ export RBENV_ROOT="$PHPENV_ROOT"
242
+
243
+ exec "$RBENV_ROOT/libexec/rbenv" "$@"
244
+
245
+ SH
246
+
247
+ }
248
+
249
+
250
+
251
+ create_phpenv_bin() {
252
+
253
+ local install_location="$1"
254
+
255
+
256
+
257
+ phpenv_script "$install_location" > "$install_location/bin/phpenv"
258
+
259
+ chmod +x "$install_location/bin/phpenv"
260
+
261
+ }
262
+
263
+ ```

2

phpenvインストール手順を追記しました

2018/01/27 01:24

投稿

ID_7UGzV8hCHGs5
ID_7UGzV8hCHGs5

スコア58

test CHANGED
File without changes
test CHANGED
@@ -157,3 +157,55 @@
157
157
 
158
158
 
159
159
  ```
160
+
161
+
162
+
163
+
164
+
165
+ # phpenvインストール手順
166
+
167
+ 追記: 20180127 10:16
168
+
169
+ ```
170
+
171
+ //phpenvインストール
172
+
173
+ 参考: https://www.kabanoki.net/492
174
+
175
+
176
+
177
+ //インストール
178
+
179
+ # cd /usr/local/src/
180
+
181
+ # git clone https://github.com/CHH/phpenv.git
182
+
183
+ # cd phpenv/bin
184
+
185
+ # sh phpenv-install.sh
186
+
187
+
188
+
189
+ //設定ファイルに次の2行を追記する
190
+
191
+ # vi ~/.bashrc
192
+
193
+ //export PATH="$HOME/.phpenv/bin:$PATH"
194
+
195
+ //eval "$(phpenv init -)"
196
+
197
+
198
+
199
+ //適用
200
+
201
+ # source ~/.bashrc
202
+
203
+
204
+
205
+ //バージョン確認
206
+
207
+ # phpenv -v //出力: rbenv 1.1.1-28-gb943955
208
+
209
+
210
+
211
+ ```

1

表記が誤っていたため修正しました。(誤:7.2.1 正:7.2.0)

2018/01/27 01:17

投稿

ID_7UGzV8hCHGs5
ID_7UGzV8hCHGs5

スコア58

test CHANGED
File without changes
test CHANGED
@@ -16,9 +16,9 @@
16
16
 
17
17
  centOS6.9にphpenvをインストールし、
18
18
 
19
- phpenvにてphp7.2.1をインストールしました。
19
+ phpenvにてphp7.2.0をインストールしました。
20
20
 
21
- また、下記コマンドでphp7.2.1が使用出来るように設定した想定でした。
21
+ また、下記コマンドでphp7.2.0が使用出来るように設定した想定でした。
22
22
 
23
23
 
24
24