18
19

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.

意外とPHPのバージョンを指定してUbuntuにインストールする方法が載ってないのでまとめる

Posted at

#環境
OS:Ubuntu16.04LTS
PHP:PHP5.6をインストールしたい

#手順

sudo apt-get install software-properties-common python-software-properties
sudo apt-get update
sudo apt-get upgrade

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php5.6  

sudo apt-get -y install php5.6 php5.6-cgi libapache2-mod-php5.6 php5.6-common php-pear
sudo a2enconf php5.6-cgi.conf

当然、5.6の部分を7.0や7.1等にしてもOK。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?