LoginSignup
30
31

More than 5 years have passed since last update.

【CentOS, PHP】CentOSへのPHP5.6, MySQL5.7環境の構築

Last updated at Posted at 2014-12-18

リポジトリの追加

epelリポジトリの登録

# rpm -ivh http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

remiリポジトリの登録

# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

mysql-communityの登録

# yum install http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm

MySQLのインストール

MySQLのインストール

/etc/yum.repos.d/mysql-community.repoで、5.6をdisable, 5.7をenableする。
下記コマンドでは、5.6系のバージョンがインストールされる。

# yum install -y mysql mysql-server mysql-devel 

PHPMyAdminのインストール

(必要であればPHPMyAdminを下記コマンドでインストールできます)

# yum install -y --enablerepo=remi,remi-php55 phpMyAdmin

PHP5.5のインストール

依存関係のあるパッケージのインストール

# yum install -y --enablerepo=epel libmcrypt

PHP5.6のインストール

# yum install -y --enablerepo=remi,remi-php56 php php-devel php-pear php-mbstring php-xml php-mcrypt php-gd php-pecl-xdebug php-opcache php-pecl-apcu php-fpm php-phpunit-PHPUnit php-mysqlnd

Apacheのインストール

# yum install -y httpd httpd-devel

まとめ

とりあえず現状でPHP×MySQLで開発するのに必要十分な環境の構築が完了です。
できればNginxにしたいという話はありつつですが、とりあえずはApacheでの環境構築とします。

30
31
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
30
31