CentOS에서 phpMyAdmin을 쓰시는 분 중 mcrypt 확장 모듈 호출이 안되시는 분들이 계실겁니다.

아마 에러메세지는 다음과 같이 나올 것입니다.

이런 경우 다음과 같이 간편하게 mcrypt를 사용하게 만들 수 있습니다.

 

PHP에서 사용하는 것을 전제로 설명드리면, 아래의 명령어를 커맨드 라인에서 실행해주시면 됩니다.

# yum install php-mcrypt

 

위의 명령어를 실행하니 제 CentOS에서는 다음과 같은 메시지가 나오네요. 중간에 y버튼과 엔터키를 눌러주는 수고를 해주셔야 합니다.

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.steadfast.net
* extras: mirrors.lga7.us.voxel.net
* updates: mirrors.lga7.us.voxel.net
base                                                     | 1.1 kB     00:00
extras                                                   | 2.1 kB     00:00
updates                                                  | 1.9 kB     00:00
Setting up Install Process
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.
--> Running transaction check
---> Package php-mcrypt.x86_64 0:5.1.6-15.el5.centos.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package          Arch         Version                       Repository    Size
================================================================================
Installing:
php-mcrypt       x86_64       5.1.6-15.el5.centos.1         extras        16 k

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 16 k
Is this ok [y/N]: y
Downloading Packages:
php-mcrypt-5.1.6-15.el5.centos.1.x86_64.rpm              |  16 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : php-mcrypt                                               1/1

Installed:
  php-mcrypt.x86_64 0:5.1.6-15.el5.centos.1

Complete!


혹시 라이브러리만 설치하고 싶은 분은 다음의 모듈만 설치하셔도 됩니다.

# yum install libmcrypt 


 

설치 후 다음의 명령어를 실행해주셔야 반영됩니다. 물론 root 권한이 있으셔야 된다는 점 잊지 마시고요.

# /etc/init.d/httpd restart

+ Recent posts