LoginSignup
0
0

More than 5 years have passed since last update.

Centos6 にPHP5.6をinstall

Posted at

vagrant と virtual-boxを使い、centos6にPHP6を入れる手順のメモ。

使用するアプリケーションなど

vagrant: 1.8.1
virtualbox:5.0.14
vagrantbox:centos/6

initからPHPのインストールまで

開発用ディレクトリの作成

デスクトップの下に開発用ディレクトリ[php_practice]を作成。
termianl

$ cd ~ 
$ cd /Desktop
$ mkdir php_practice
$ cd php_practice

vagrant initでcentos/6の準備(boxの準備)

OS(centos/6)の準備
terminal

$ pwd
/Users/user_name/Desktop/php_practice
$ vagrant init centos/6

vagrant init [box_name]で指定したboxの準備ができます。

PHPのインストール

centos 6の標準PHPのversionは5.3なのでそのままinstlal せずにレポジトリを追加してインストール
terminal

$ pwd
/Users/user_name/Desktop/php_practice
$ vagrant ssh
$ sudo su -
$ yum -y install epel-release.noarch
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
$ yum install --enable-remi
以下2つはお好みで
$ yum install --enablerepo=remi,remi-php56 
$ yum -y install php56.x86_64

remiのリポジトリを追加して、php56をインストールします。
あとは好きなものを入れておく。

0
0
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
0
0