April, 2014Archive for

Install FFmpeg Mencoder on CentOS 5.10 64-bit

Install FFmpeg & Mencoder on CentOS 6 would be easy job. It cost me 2 days to install them and make script running on a client server which is CentOS 5.10 64-bit. If you have to install FFmpeg & Mencoder on a CentOS 5 like me, i hope this article can save you some time. Install FFmpeg You can follow those two links to prepare system, install codecs and ffmpeg: http://cumulusclips.org/docs/install-ffmpeg-x264-on-centos/ http://trac.ffmpeg.org/wiki/CentosCompilationGuide Err...

Linux命令之make, clean建立和删除文件夹技巧

makefile定义了一系列的规则来指定,哪些文件需要先编译,哪些文件需要后编译,哪些文件需要重新编译,甚至于进行更复杂的功能操作,因为 makefile就像一个Shell脚本一样,其中也可以执行操作系统的命令。 makefile带来的好处就是–“自动化编译”,一旦写好,只需要一个make命令,整个工程完全自动编译,极大的提高了软件开发的效率。make是 一个命令工具,是一个解释makefile中指令的命令工具,一般来说,大多数的IDE都有这个命令,比如:Delphi的make,Visual C++的nmake,Linux下GNU的make.可见,makefile都成为了一种在工程方面的编译方法。 make 根据Makefile文件编译源代码、连接、生成目标文件、可执行文件。 make clean 清除上次的make命令所产生的object文件(后缀为“.o”的文件)及可执行文件。 make install 将编译成功的可执行文件安装到系统目录中,一般为/usr/local/bin目录。 make dist 产生发布软件包文件(即distribut...

Linux下动态库查找路径的问题

学习到了一个阶段之后,就需要不断的总结、沉淀、清零,然后才能继续“上路”。回想起自己当年刚接触Linux时,不管是用源码包编译程序,还是程序运行时出现的和动态库的各种恩恩怨怨,心里那真叫一个难受。那时候脑袋里曾经也犯过嘀咕,为啥Linux不弄成windows那样呢,装个软件那个麻烦不说,连运行软件都这么恼火呢?如果那样的话就不叫Linux了。借用小米公司CEO雷军一句话:小米,为发烧而生。我认为:Linux,为真理而在。特别是为那些喜欢折腾,热衷技术背后原理和实现细节的人们而生。 说到和动态库查找路径相关的问题,总体上可以分为两类: 第一类:通过源代码编译程序时出现的找不到某个依赖包的问题,而如果此时你恰好已经按照它的要求确确实实、千真万确、天地良心地把依赖库给装好了,它还给你耍混、犯二,有一股折腾不死人不偿命的劲儿,那让人真是气儿不打一处来,如果Linux此时有头有脸,你是不是特想抽它丫两大嘴巴; 第二类:就是在运行程序的时候,明明把那个程序需要的依赖包都已经安装的妥妥的了,可运行的时候人家就告诉你说“error while loading shared libra...

How to find spam sending php script on server

This article can help you to track down outgoing spam using PHP. From php version 5.3.0 we can use the directive mail.log to log who’s calling the function mail(). When someone calls the function mail() from a php script we can get some info about the sender in log. PHP mail.log entries include the full path of the script, line number, To address and headers. 1. Check email log 2. Edit php.ini 3. To enable mail.log, add following line in php.ini under 4. Create lo...