Archive for November, 2012

解決 centos -bash: vim: command not found

When using centos host, When found with vim -bash: vim: command not found. Only use vi. So how to install it vim?
輸入 rpm -qa|grep vim 命令, If vim has been installed correctly,Will return the following three lines of code:

1
2
3
4
root@server1 [~]# rpm -qa|grep vim
vim-enhanced-7.0.109-7.el5
vim-minimal-7.0.109-7.el5
vim-common-7.0.109-7.el5

If a less certain of them,For example, the vim-enhanced,On command yum -y install vim-enhanced to install:

1
yum -y install vim-enhanced

If the above three do not return a, Can directly use the command yum -y install vim *

1
yum -y install vim*

Comments

CentOS 5.6(X64)Under compiled and installed php mysql problem

Libmcrypt related to the establishment of soft link library,In preparation for compilation mcrypt。Because mcrypt rely libmcrypt。

#If CENTOS 5.6(64Place)

The following program code The following program code
ln -sf /usr/local/lib/libmcrypt.la /usr/lib64/libmcrypt.la
ln -sf /usr/local/lib/libmcrypt.so /usr/lib64/libmcrypt.so
ln -sf /usr/local/lib/libmcrypt.so.4 /usr/lib64/libmcrypt.so.4
ln -sf /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib64/libmcrypt.so.4.4.8
ln -sf /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
ln -sf /usr/local/lib/libiconv.so.2 /usr/lib64/libiconv.so.2
ldconfig

#If CENTOS 5.6(32Place)

The following program code The following program code
ln -sf /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -sf /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -sf /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -sf /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln -sf /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config
ln -sf /usr/local/lib/libiconv.so.2 /usr/lib/libiconv.so.2
ldconfig

mhash(hash encryption algorithms library)

The following program code The following program code
tar zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9
./configure
make
make install
cd ..

Establish libmhash associated libraries soft connection,In preparation for compilation mcrypt。mcrypt also depends libmhash。

 

#If CENTOS 5.6(64Place)

The following program code The following program code
ln -sf /usr/local/lib/libmhash.a /usr/lib64/libmhash.a
ln -sf /usr/local/lib/libmhash.la /usr/lib64/libmhash.la
ln -sf /usr/local/lib/libmhash.so /usr/lib64/libmhash.so
ln -sf /usr/local/lib/libmhash.so.2 /usr/lib64/libmhash.so.2
ln -sf /usr/local/lib/libmhash.so.2.0.1 /usr/lib64/libmhash.so.2.0.1
ldconfig

#If CENTOS 5.6(32Place)

The following program code The following program code
ln -sf /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -sf /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -sf /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -sf /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -sf /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
ldconfig

Comments