52AV手機A片王|52AV.ONE
標題:
在linux下以yum安裝mcrypt(php-mcrypt)
[打印本頁]
作者:
IT_man
時間:
2014-12-11 22:13
標題:
在linux下以yum安裝mcrypt(php-mcrypt)
首先check linux是否安裝php-mcrypt module
! u3 a6 I, J, c5 m4 Y$ t+ s; y
#rpm -qa | grep php-mcrypt
複製代碼
若無則以yum安裝
P7 G, N. C; j4 v
#yum install php-mcrypt
複製代碼
但它會提示說無php-mcrypt可供安裝
,於是執行下列動作:
4 j' [3 W8 V/ r- d& d6 `
for CentOS 6.x x86:
& C/ Z% v4 ^- \1 H- X
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
8 a5 w% \/ h2 n7 b
# rpm -ivh rpmforge-release-0.5.2-2.el6.rf.i686.rpm
/ C4 ]9 ^) b/ V2 \& L6 w2 H
# wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
/ |( S# C0 q9 l& u& q1 y2 R8 ]
# rpm -ivh epel-release-6-8.noarch.rpm
複製代碼
- u6 h( X6 D+ x$ Y
for CentOS 6.x x64
- b3 ?2 I6 v0 F1 s. C' ^. r% f; a
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
F: `# R) [1 O- l
# rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
7 }+ G3 U3 w4 l O6 l$ B; `/ x* b. a
# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ L* j; L U! t d
# rpm -ivh epel-release-6-8.noarch.rpm
複製代碼
再執行一遍
#yum install php-mcrypt
,但這次出現的問題是
2 m0 b$ i6 X7 ~- R
# yum install php-mcrypt
4 |: ], E( j0 b( r2 ]
Loaded plugins: fastestmirror, refresh-packagekit
$ {# n' a! _* u) x( D% b
Loading mirror speeds from cached hostfile
; m2 V- ?2 g& C' S
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
複製代碼
; F3 \ o/ T2 Q* Z
6 e- E, Z6 L. j* ?
於是
. ]/ P1 |- ~. U7 N
#vi etc/yum.repos.d/epel.repo
複製代碼
! D: {$ y, L: k" I ?9 I
將[epel]段下的
baseurl註解掉
,並將
mirrorlist恢復
,如下:
0 H4 J' i: t. P) }4 W- {2 |3 S
baseurl
; O) \% I9 F' |; d
#mirrorlist
8 f, u6 g9 p( U2 c# r8 Q
最後再執行一遍
#yum install php-mcrypt
,這次終於順利安裝完成
,會看到安裝如下的模組
( g; R/ l) n: n4 J
: m1 ]2 L2 e4 T/ q
1.png
(5.69 KB, 下載次數: 162)
下載附件
保存到相冊
2014-12-12 00:06 上傳
& j r3 B' W( c# k- W
5 m0 D6 d" ~3 y" F- J
且apache需restart
,php-mcrypt module才會發生作用
#service httpd restart
複製代碼
歡迎光臨 52AV手機A片王|52AV.ONE (https://www.52av.one/)
Powered by Discuz! X3.2