Cent OS 5.4 32Bit

Apache/2.2.15 (Unix) PHP/5.3.2

[root@localhost src]# /usr/local/apache/bin/apachectl start
httpd: Syntax error on line 53 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/libphp5.so into server: /usr/local/apache/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied

# chcon -t texrel_shlib_t /usr/local/apache/modules/libp

可以解决以上权限问题提示,主要原因在于系统启用了selinux

可以禁用尝试禁用selinux,另外PHP/5.3.2目前版本的ZendOptimizer皆无法使用

本日志由 flyinweb 于 2010-07-15 08:47:24 发表到 Linux 中,目前已经被浏览 109 次,评论 0 次;

作者添加了以下标签: LAMP

1. tar解压tar包中指定文件
例如:在/home/xxl下面有个xxl.tar.gz包(是通过tar -zcvf xxl.tar.gz xxl/来创建的),我们可以用tar -ztvf xxl.tar.gz来查看xxl.tar.gz这个包中包含了什么文件,如果包中有个文件test.sql在xxl/date/目录下面,我现在需要解压出这个文件,其他文件不需要,我可以用下面的命令来解压出来:
tar -zxvf xxl.tar.gz ./ xxl/date/test.sql
和通常我们使用的解压缩命令主要区别是在解压缩文件名的后面加了./ 后面跟上压缩包里面的文件
经测试,上述命令行会出错:
tar: unload.dat.gz.20100617: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: .: Not found in archive
tar: usr/backup/txt/xuser.unl: Not found in archive
tar: Error exit delayed from previous errors
tar -zxvf xxl.tar.gz xxl/date/test.sql  <--常执行
2. tar解压tar包中指定文件夹
如果是要解压缩xxl/date文件夹,我们则可以使用如下命令:
tar -zxvf xxl.tar.gz ./ xxl/date (有误)
//后面直接跟压缩包里面的文件夹路径就可以了。
这时候在当前目录下面产生一个文件夹/xxl/date,里面就会有我想要的文件test.sql了,这样我就不需要对整个tar包来解包了
另外,还可以解压指定的文件到指定的文件夹
tar -zxvf xxl.tar.gz -C /home/xxl1/ xxl/date/test.sql (正确)
这是我们要的文件test.sql就会在/home/xxl1文件夹下面

本日志由 flyinweb 于 2010-07-09 10:29:20 发表到 Linux 中,目前已经被浏览 286 次,评论 0 次;

作者添加了以下标签: extract archive

最近发现vsftpd的日志记录/var/log/vsftpd.log里显示的文件修改时间与实际的系统时间不一致,一般都差了8个小时。搜索了一下,发现因为默认情况下, vsftpd使用的是GMT标准时间,而不是Local Time。修改也很简单:

# 修改vsftpd 的配置文件 vsftpd.conf
# 不一定是这个路径
vi /etc/vsftpd/vsftpd.conf

在配置文件里加入一行:

  1. use_localtime=YES 

保存之后重启 vsftpd 即可。

如果是用 xinetd 的方式来启动,要注意把配置文件中的listen参数值改为NO,否则 vsftpd 重启之后问题依旧。

本日志由 flyinweb 于 2010-07-09 10:18:35 发表到 Linux 中,目前已经被浏览 126 次,评论 0 次;

作者添加了以下标签: vsftpd log

  在Linux下有时候需要给一个网卡绑定多个IP,本文介绍在Redhat系列(redhat,Fedora Core,Centos)中的实现方法和一种在Gentoo等其他Linux中普遍适用的方法。

本日志由 flyinweb 于 2010-07-08 14:43:39 发表到 Linux 中,目前已经被浏览 139 次,评论 0 次;

作者添加了以下标签: networkinterfaces

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

Securing your Linux server is important to protect your data, intellectual property, and time, from the hands of crackers (hackers). The system administrator is responsible for security Linux box. In this first part of a Linux server security series, I will provide 20 hardening tips for default installation of Linux system.

本日志由 flyinweb 于 2010-06-22 08:48:43 发表到 Linux 中,目前已经被浏览 197 次,评论 0 次;

作者添加了以下标签: linux security

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

Need to monitor Linux server performance? Try these built-in command and a few add-on tools. Most Linux distributions are equipped with tons of monitoring. These tools provide metrics which can be used to get information about system activities. You can use these tools to find the possible causes of a performance problem. The commands discussed below are some of the most basic commands when it comes to system analysis and debugging server issues such as:

本日志由 flyinweb 于 2010-06-22 08:47:12 发表到 Linux 中,目前已经被浏览 183 次,评论 0 次;

作者添加了以下标签: linux monitoring tools

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

Whenever a Linux system CPU is occupied by a process, it is unavailable for processing other requests. Rest of pending requests must wait till CPU is free. This becomes a bottleneck in the system. Following command will help you to identify CPU utilization, so that you can troubleshoot CPU related performance problems.

本日志由 flyinweb 于 2010-06-22 08:43:31 发表到 Linux 中,目前已经被浏览 193 次,评论 0 次;

作者添加了以下标签: Linux CPU Utilization

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

如下代码为用ESMTP来发送邮件。

本日志由 flyinweb 于 2010-06-10 14:33:46 发表到 Linux 中,目前已经被浏览 351 次,评论 0 次;

作者添加了以下标签: Net::SMTPAuthen::SASL

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文

1924/24