linux下编译安装php
下载安装包:[root@goolen goolen]# ls php-5.6.3.tar.gz php-5.6.3.tar.gz[root@goolen]# tar zxfv php-5.6.3.tar.gz [root@goolen php-5.6.3]# cd php-5.6.3 [root@goolen php-5.6.3]# make ; make install[root@goolen php-5.6.3]#./configure --prefix=/usr/local/p...
httpd: Could not reliably determine the server's fully qualified domain name
启动http服务的时候出现警告信息:[root@goolen ~]# service httpd startStarting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.100.50 for ServerName解决方法:编辑http配置文件:[root@goolen ~]# vim /etc/httpd/conf/httpd.conf找到如下内容:#Serv...
E212: Can't open file for writing
刚刚用root编辑一个文件[root@php-11 ~]# vim /tol/task/dump_weixinnew_everyday.sh完事后想要保存退出,但是一直报错,不让保存,很纳闷了,root都没权限保存检查一下磁盘空间,还剩余很多再检查才发现编辑的这个文件所在的路径task目录不存在导致,创建task目录后就可以保存了很有意思,记录一下[root@php-11 ~...
用sed和echo处理文本
最近有个朋友要处理一些文本数据原始数据大概如下:[root@goolen goolen]# cat haiqing.log a,b,c,d,20141123,121010a,b,c,d,20141124,121011a,h,d,d,20141125,121012a,g,g,w,20141126,121013a,d,h,e,20141127,121014a,x,u,r,20141128,121015他需要把把后面的日期改为yyyy-mm-dd的格式,时间改为HH:MI:SS的...
PHP编译报错configure: error: Cannot find libmysqlclient under /usr.
今天编译PHP的时候遇到了几个错误,记录一下第一次编译的时候报错如下:configure: error: mcrypt.h not found. Please reinstall libmcrypt.报这个错是因为没有安装libmcrypt这个包,下载地址如下:wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz安装:[root@localhost a...
linux系统上怎么从tar包里解压单个文件
前天有个朋友QQ问我怎么从一个tar压缩包里解压一个文件,而不是全部解压这几天实在是太忙了,今早抽个时间给他做了个示范,也顺便记录一下,希望能帮到一些朋友。首先我创建了一个tar包:[oracle@goolen test]$ ls -ltotal 80084-rw-r--r-- 1 oracle oinstall 81998360 Jul 30 09:52 test.tar.gz我们要想解压tar包...
彻底搞明白find命令的-mtime参数的含义
以前一直没有弄明白find的 -mtime参数的真正含义刚好今天跟一个同学聊起这个事我在写shell脚本的时候,定时删除一些文件的时候,也经常用得到-mtime这个参数,所以打算好好看看,把它弄明白一下man find里的解释:-mtime nFile’s data was last modified n*24 hours ago. See the comments for &n...
RHEL 5.4中/etc/cron.hourly引起的负载问题
之前遇到过一个问题,在RHEL系统运行一段时间后,负载不停升高,具体情况看下面截图:这是一个测试机器,平时我基本不登录,那天登录上去,看到这负载,吓了一跳,这么高的load,还好机器操作不卡,查了一下,很多如下图的进程:当时没有太关心这个,把机器重启了接着用过了几天发现这些进程又多...