1
1

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.

php7.2をインストールした後、phpコマンドが効かない件

Posted at

php7.2のインストール

以下のコマンドを打ちました。

# sudo wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# sudo rpm -ivh epel-release-latest-7.noarch.rpm
# sudo yum-config-manager --enable remi-php72
# sudo yum install -y php72 php72-php

さてさて、ちゃんとインストールできたか確認するか。

# php -v

phpのバージョンを確認

-bash: php: command not found

ん??

phpのコマンドが見つからないだと。。。

# php72 -v

これならうまくいくのです。

ただ、コマンドがphp72ではなく、phpでないと結構不便が出てきたり。。。

scl enable php72 bash

このコマンドを打つことによって、一時的にだがphpコマンドが使えるようになる。
一度ログアウトすると設定は消える。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?