LoginSignup
1
2

More than 5 years have passed since last update.

Alpine LinuxでPHP5のxdebugを使う方法

Posted at

前提

現状のAlpine Linuxのパッケージのリポジトリには、php5-xdebugが存在していません。

本日は、Alpine Linux上で php5-xdebugをインストールする方法を紹介いたします。

ただし、今回紹介する方法は2016/9/11現在、apkのリポジトリのバージョンが3.4の頃の話しで、3.4以降は不要になる可能性があります。

方法

$ echo "http://dl-3.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
$ apk update
$ apk add php5 php5-xdebug

以上でxdebugを利用できるようになるはずです。

確認

$ php -v
PHP 5.6.25 (cli) (built: Aug 23 2016 14:36:49)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans

TIPS

今回の方法はxdebug以外にも利用できるはずです

上記のページで自分が利用したいパッケージを探し、BranchとRepositoryを見ます。

今回のphp5-xdebugは、 edgeブランチのcommunityリポジトリに入っていると書かれています。

なので、http://dl-3.alpinelinux.org/alpine/ このページから必要なパッケージがある、ブランチとリポジトリのURLを/etc/apk/repositoriesに記載して、apk updateをかけると、インストールが可能になるはずです。

1
2
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
1
2