Help us understand the problem. What is going on with this article?

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のインストール

Esfahan
WEB系出身。現在はビッグデータの基盤構築、ETLなどがメイン。 / YouTubeで料理チャンネルやってます → https://www.youtube.com/channel/UCDnYBh2TtUAfQ0Z-tl0jTyw
https://www.youtube.com/channel/UCDnYBh2TtUAfQ0Z-tl0jTyw
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
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  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
ユーザーは見つかりませんでした