[原创]Centos7 从零整合LNMP一体包

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[原创]Centos7 从零整合LNMP一体包相关的知识,希望对你有一定的参考价值。

按照前几章配置好后,我们就可以把这些工具打包啦。生成LNMP一体包。

# export LD_LIBRARY_PATH=/package/libmemcached/lib:$LD_LIBRARY_PATH

 

安装memcache时,需要建立文件索引或者说文件连接(link),类似windows下的快捷方式

启动服务时出现 error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory

>whereis libevent-2.0.so.5

libevent-2.0.so.5: /usr/local/lib/libevent-2.0.so.5

> ldd /usr/local/bin/memcached   (ldd指令不熟悉的去查看下)
libevent-2.0.so.5 => not found    (没有找到该文件)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b83fce0e000)
libc.so.6 => /lib64/libc.so.6 (0x00002b83fd029000)
librt.so.1 => /lib64/librt.so.1 (0x00002b83fd381000)
/lib64/ld-linux-x86-64.so.2 (0x00002b83fc9b0000)

> LD_DEBUG=libs ./memcached -v
找到默认路径 /usr/lib/

>sudo ln -s /usr/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5

>sudo ldd /usr/local/bin/memcached
libevent-2.0.so.5 => /usr/lib64/libevent-2.0.so.5 (0x00002b83fcbcd000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b83fce0e000)
libc.so.6 => /lib64/libc.so.6 (0x00002b83fd029000)
librt.so.1 => /lib64/librt.so.1 (0x00002b83fd381000)
/lib64/ld-linux-x86-64.so.2 (0x00002b83fc9b0000)

现在好啦,:)

以上是关于[原创]Centos7 从零整合LNMP一体包的主要内容,如果未能解决你的问题,请参考以下文章

SecureCRT Ver 8.1.4 整合汉化绿色版一体包

[原创]Centos7 从零编译配置Redis

[原创]Centos7 从零编译配置PHP

[原创]Centos7 从零编译配置MySQL

[原创]Centos7 从零编译配置Nginx

[原创]Centos7 从零编译Nginx+PHP+MySql