Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
13
Help us understand the problem. What is going on with this article?
@Esfahan

CentOSにPHP7とcomposerをインストールする方法

More than 3 years have passed since last update.

概要

yumでインストール

CentOS6.7の場合

$ sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
$ sudo yum -y install --enablerepo=remi,remi-php70 php php-devel php-mbstring php-pdo php-gd php-mysql php-xml

CentOS7の場合

$ sudo yum -y install epel-release.noarch
$ sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
$ sudo yum -y install --enablerepo=remi,remi-php70 php php-devel php-mbstring php-pdo php-gd php-mysql php-xml

補足

新しいレポジトリを読みに行ってくれない場合は下記コマンドでキャッシュを削除してみてください。

$ sudo yum clean all

composerのインストール

$ curl -sS https://getcomposer.org/installer | php -- --install-dir=/tmp
$ sudo mv /tmp/composer.phar /usr/local/bin/composer

[参考]
CentOS6/CentOS7にPHP5.6/PHP7をyumでインストール

[関連記事]
CentOSにMySQL5.6のインストール

13
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Esfahan
WEB系出身。現在はビッグデータの基盤構築、ETLなどがメイン。 / YouTubeで料理チャンネルやってます → https://www.youtube.com/channel/UCDnYBh2TtUAfQ0Z-tl0jTyw / ゲームもやってます -> https://www.youtube.com/channel/UCeqPhExV09EF5o8lZLO15Eg

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
13
Help us understand the problem. What is going on with this article?