10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Bash on Ubuntu on Windowsにphpをインストール

Posted at

とりあえず日本語に変更

sudo apt install language-pack-ja
sudo /usr/sbin/update-locale LANG=ja_JP.UTF-8

phpのレポジトリを追加

sudo add-apt-repository ppa:ondrej/php

好きなバージョンをインストール

sudo apt install php[5.5|5.6|7.0|7.1]

ビルトインサーバを立ち上げてブラウザで確認

echo '<?php phpinfo();' > info.php
php -S localhost:8000

http://localhost:8000/info.php にアクセスするとphpinfoが見えます
ビルトインサーバはCtrl-Cで終了します

10
10
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?