LoginSignup
21
18

More than 5 years have passed since last update.

UbuntuにPHPをインストールする

Last updated at Posted at 2015-04-08

Ubuntu 14.04にPHP 5.6をインストールする方法のメモ

リポジトリを追加

最初から設定されているリポジトリでは古いバージョンがインストールされてしまうため、リポジトリを追加する。

$ sudo apt-add-repository ppa:ondrej/php5-5.6

パッケージのリストを最新化

$ sudo apt-get update

インストールされるPHPのバージョンを確認

$ sudo apt-cache policy php5
php5:
  インストールされているバージョン: (なし)
  候補:               5.6.7+dfsg-1+deb.sury.org~trusty+1

PHPのインストール

$ sudo apt-get install php5

インストールされたPHPのバージョンを確認

$ php -v
PHP 5.6.7-1+deb.sury.org~trusty+1 (cli) (built: Mar 24 2015 11:21:10) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies
21
18
0

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
21
18