Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng

Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng (http://quantrinet.com/forum/index.php)
-   Quản trị Webserver Apache, Php, SSL (http://quantrinet.com/forum/forumdisplay.php?f=104)
-   -   Hướng dẫn cài đặt và cấu hình mcrpyt on Linux (CentOS) (http://quantrinet.com/forum/showthread.php?t=5089)

hoctinhoc 05-10-2010 09:55 AM

Hướng dẫn cài đặt và cấu hình mcrpyt on Linux (CentOS)
 
Hướng dẫn cài đặt và cấu hình mcrpyt on Linux (CentOS)


Site Source: http://mcrypt.sourceforge.net/


Mcrypt is a powerful encryption library containing 22 block algorithms. Specifically, the following algorithms are supported:


Trích dẫn:



Blowfish
Cast-256
DES
Enigma
Gost
LOKI97
Panama
RC2
RC4
RC4-iv
Rijndael-128
Rijndael-192
Rijndael-256
Safer-sk128
Safer-sk64 xtea
Saferplus
Serpent
Threeway
TripleDES
Twofish
Wake


Cài Đặt:

SSH As root:


1) Install libmcrypt (2.5.x or better) http://mcrypt.hellug.gr/lib/index.html

-download and uncompress: tar z -xvf xxx.tar.gz

-cd into libmcrypt dir and type: ./configure

-when configure is done type: make

-when make is done type: make install


2) Add the library dir to /etc/ld.so.conf

-edit /etc/ld.so.conf and add: /usr/local/lib

-save file and then type the command: ldconfig




3) Update/Install Mhash (0.8.15 or newer)


http://mhash.sourceforge.net/

-download and uncompress: tar z -xvf xxx.tar.gz

-cd into libmcrypt dir and type: ./configure

-when configure is done type: make

-when make is done type: make install

-when make install is done type: ldconfig


4) Install latest version of mcrypt (2.6.x or better)



http://mcrypt.hellug.gr/mcrypt/index.html

-download and uncompress: tar z -xvf xxx.tar.gz

-cd into mcrypt dir and type: ./configure

-when configure is done type: make

-when make is done type: make install

-when make install is done type: ldconfig


5. Install php-mcrypt


enable support for php. requires php-mcrypt and php-mhash packages:


Mã:



 yum install php-mcrypt*
yum install php-mhash*


Error

Mã:


--> Missing Dependency: libmcrypt.so.4 is needed by package php-mcrypt-5.2.11-2.el5.art.i386 (atomic)
Error: Missing Dependency: libmcrypt.so.4 is needed by package php-mcrypt-5.2.11-2.el5.art.i386 (atomic)

[root@nechi etc]# yum list installed | grep mcrypt

libmcrypt.x86_64 2.5.8-4.el5.centos installed


[root@nechi etc]# ldconfig -p | grep libmcrypt.so.4

libmcrypt.so.4 (libc6,x86-64) => /usr/lib64/libmcrypt.so.4


[root@nechi etc]# find / -name libmcrypt.so.4

/usr/lib64/libmcrypt.so.4


[root@nechi etc]# ls -la /usr/lib64/libmcrypt.so.4

lrwxrwxrwx 1 root root 18 Dec 6 00:25 /usr/lib64


/libmcrypt.so.4 -> libmcrypt.so.4.4.8


[root@nechi etc]# yum install libmcrypt-devel


Mã:



[root@nechi etc]# yum install php-mcrypt


or



 [root@nechi etc]# yum install php-mcrypt.x86_64


6. Check mcrypt Enabled


[root@nechi etc]# php -r "echo phpinfo();" | grep "^mcrypt"
mcrypt
mcrypt support => enabled
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value
[root@nechi etc]#




7) Restart Apache


Have a fun!




:battay:


Tham khảo



http://www.kelvinwong.ca/2009/12/06/...too-much-hair/




http://www.notesbit.com/index.php/we...recompile-php/


Bây giờ là 01:48 PM. Giờ GMT +7

Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.