工作,学习,生活,这里将会有一些记录. 备用域名:http://meisw.wdlinux.cn 注册 | 登陆
浏览模式: 标准 | 列表全部文章

eaccelerator

wget http://x.x.x.47/eaccelerator-0.9.5.3.tar.bz2

export PHP_PREFIX="/opt/php"
$PHP_PREFIX/bin/phpize
./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config
make
make install


[eAccelerator]

extension_dir = "/usr/local/lib/php/extensions"
extension="/no-debug-zts-20060613/eaccelerator.so"
eaccelerator.shm_size="128"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
;eaccelerator.log_file = "/tmp/eaccelerator/eaccelerator_log
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"


mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator

 

---------------------------------------------------


Libraries have been installed in:
   /home/eaccelerator-0.9.5.3/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

qmail

rpm -ivh igenus-daemontools-0.76-5.0.i386.rpm

rpm -ivh igenus-ucspi-tcp-0.88-5.0.i386.rpm

rpm -ivh igenus-vpopmail-5.4.17-5.1.i386.rpm

[root@ctnt-mm i386]# rpm -ivh igenus-vpopmail-5.4.17-5.1.i386.rpm
error: Failed dependencies:
        libmysqlclient.so.14 is needed by igenus-vpopmail-5.4.17-5.1.i386
        mysql >= 3.23.54 is needed by igenus-vpopmail-5.4.17-5.1.i386
    Suggested resolutions:
        mysql-4.1.7-4.RHEL4.1.i386.rpm

其它机上查找
[root@centos ~]# find / -name "libmysqlclient.so.14"
/usr/lib/mysql/libmysqlclient.so.14
确定目录
本机查找,因本机为tar安装,且为5
http://mirror.centos.org/centos-4/4.7/os/i386/CentOS/RPMS/
下载 mysql-4.1.22-2.el4.i386.rpm
需要 安装 perl-DBI-1.40-9.i386.rpm
OK

rpm -ivh igenus-qmail-1.03-5.0.i386.rpm

rpm -ivh igenus-courier-authlib-4.1.3-5.0.i386.rpm
[root@ctnt-mm i386]# rpm -ivh igenus-courier-authlib-0.59.3-5.0.i386.rpm
error: Failed dependencies:
        /usr/bin/expect is needed by igenus-courier-authlib-0.59.3-5.0.i386
    Suggested resolutions:
        expect-5.42.1-1.i386.rpm

rpm -ivh expect-5.42.1-1.i386.rpm


rpm -ivh igenus-maildrop-2.0.4-5.0.i386.rpm

rpm -ivh igenus-courier-imap-4.1.3-5.0.i386.rpm

rpm -ivh igenus-clamav-0.94-5.0.i386.rpm

rpm -ivh igenus-spamassassin-3.1.8-5.0.i386.rpm
error: Failed dependencies:
        perl(Digest::SHA1) is needed by igenus-spamassassin-3.1.8-5.0.i386
    Suggested resolutions:
        perl-Digest-SHA1-2.07-5.i386.rpm
rpm -ivh perl-Digest-SHA1-2.07-5.i386.rpm


rpm -ivh igenus-ripmime-1.4.0.6-5.0.i386.rpm

rpm -ivh igenus-simscan-1.4.0-5.1.i386.rpm

rpm -ivh igenus-autorespond-2.0.5-5.0.i386.rpm

rpm -ivh igenus-ezmlm-idx-0.40-5.0.i386.rpm


rpm安装完毕


perl(HTTP::Date)
perl(LWP::UserAgent)
http://mirror.centos.org/centos-5/5.2/os/x86_64/CentOS/perl-libwww-perl-5.805-1.1.1.noarch.rpm

1、依赖关系的解决,安装Spamassassin需要很多perl模块的支持,以下是所需模块列表及安装方法,各软件包都可从CPAN取得;

必须的软件包:
Digest::SHA1
HTML::Parser >=3.43
Net::DNS >= 0.34
LWP (aka libwww-perl)
HTTP::Date
IO::Zlib >= 1.04
Archive::Tar  >=1.23

export LC_ALL=C


config
vpopmail
vchkpw

grant select,insert,update,delete,create,alter,drop on vpopmail.* to vpopmail@localhost identified by '';
create database vpopmail

/home/vpopmail/bin/vadddomain domain

 

Privilege separation user sshd does not exist

启动sshd提示:

Privilege separation user sshd does not exist

google了一下,找到了解决方法。

方法一(推荐):
修改/etc/passwd文件,在其中加入
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
或者
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
我加入的是:
sshd:x:109:65534::/var/run/sshd:/usr/sbin/nologin
参考
http://www.unixguide.net/comments/sun/ssh_installation.shtml/37.shtml
http://www.gipsky.com/modules/newbb/viewtopic.php?topic_id=966

方法二(不推荐):
修改/etc/ssh/sshd_config文件
将其中
UsePrivilegeSeparation yes
修改为
UsePrivilegeSeparation no
虽然能解决问题,但是降低了ssh的安全级别。

解开RPM包

rpm2cpio a.rpm | cpio --extract --make-directories

 

2009.07.03

rpm -ivh kchmviewer-3.1-1.el5.5.x86_64.rpm --prefix=/home/chc/rpms/tmp

因为rpm实际上使用cpio格式打包的,因此可以先转成cpio然后解压,如下所示:
rpm2cpio kchmviewer-3.1-1.el5.5.x86_64.rpm | cpio -div

dede code

preg_replace("/(<a(.*)[ \t\r\n]{1,}href=[\"']{0,}http:\/\/[^\/]([^>]*)>)|(<\/a>)/isU","",$)

mysql processlist

mysqladmin -uroot -p proc

mysql -e "show processlist"

rhel5

Installing PEAR environment:      /www/servers/php/lib/php/
/home/r00t/php-5.2.6/sapi/cli/php: error while loading shared libraries: /usr/local/gd/lib/libgd.so.2: cannot rest
ore segment prot after reloc: Permission denied
make[1]: *** [install-pear-installer] Error 127
make: *** [install-pear] Error 2


Nov 14 16:54:45 localhost setroubleshoot:      SELinux is preventing /home/r00t/php-5.2.6/conftest from loading /u
sr/local/gd/lib/libgd.so.2.0.0 which requires text relocation.      For complete SELinux messages. run sealert -l7f26cea9-91e8-4b3a-93e0-6298e6c4e265


failed to connect to server


chcon -t textrel_shlib_t /usr/local/gd/lib/libgd.so.2

 

###
checking for MySQL UNIX socket location... /tmp/mysql.sock
checking for mysql_close in -lmysqlclient_r... no
checking for mysql_error in -lmysqlclient_r... no
configure: error: mysql configure failed. Please check config.log for more information.

没找到解决办法,把PHP换为4的就可以了

 

linux下硬盘检测工具

linux下硬盘检测工具: smartmontools

工具主页: http://smartmontools.sourceforge.net/

Smartmontools for SCSI硬盘: http://smartmontools.sourceforge.net/smartmontools_scsi.html

smartctl命令参数列表:

The following options are currently available for SCSI disks and tape drives unless otherwise noted:

  • -a | --all : equivalent to the combination -i -H -A -l error -l selftest options invoked in that order.

  • -A | --attributes : outputs the current device temperature, trip temperature, the number of elements in the grown defect list (GLIST) and data from the start-stop log page. Outputs some vendor specific information if available.

  • -C | --captive : used in conjunction with -t short or -t long options to do short or long self tests in the foreground. [Has no effect on tape drives.]

  • -d TYPE | --device=TYPE where TYPE is "ata", "scsi", "sat", "marvell", "3ware,N", "hpt,L/N[,M]" or "cciss,N". Overrides utility's guess about the class of the device which is based on the form of the nominated device's name.

  • -h | --help : outputs lengthy usage message and exits without any other action.

  • -H | --health : outputs single device health metric determined by the device manufacturer. This will be "OK" or a failure message.

  • -i | --info : outputs device identification information (derived from a SCSI INQUIRY command) and whether the device supports SMART (and temperature warnings) and if those facilities are currently enabled. The type of transport (e.g. FC or SAS) is also reported, if available. Some users have reported disks that report the wrong transport.

  • -l TYPE | --log=TYPE where TYPE is either "background", "selftest" or "error". Decodes are outputs the requested log. Note that --all does not include --log=background .

  • -q TYPE | --quietmode=TYPE where TYPE is either "silent" or "errorsonly". When the type is silent then nothing is output to the console but the exit status is set (so it is suitable for scripts). For "errorsonly" only errors are output to the console. The exit status is always set. [See the smartctl man page.]

  • -r TYPE | --report=TYPE where TYPE is either "ioctl[,<n>]" or "scsiioctl[,<n>]". Turns on low level debugging of issued commands and responses. These commands are issued through a system command called an "ioctl" in Unix. The debug can be for all issued commands (i.e. "ioctl") or only SCSI commands ("scsiioctl"). Optionally the TYPE can have a comma and a number post pended to increase the volume of debug. See this section for more details.

  • -s VALUE | --smart=VALUE where VALUE is either "on" or "off". Enables or disables SMART monitoring (and temperature warnings).

  • -S VALUE | --saveauto=VALUE where VALUE is either "on" or "off". Controls whether the error log values are preserved across device power cycles.

  • -t TEST | --test=TEST where TEST is either "offline", "short" or "long". Despite its name "offline" is a short foreground test that all SCSI devices should support. A "short" self test is typically 2 minutes or less. A "long" self test will be considerably longer than 2 minutes, depending on the size of the media. The estimated time that a "long" self test will take is printed after the "selftest" log (i.e. with '-l selftest' or '-a')

  • -V | --version : outputs the smartctl version number (including the cvs version of all its source files) and build information then exits without any other action.

  • -X | --abort : will terminate a background short or long self test. Usually the self test log notes that a self test has been aborted. [Has no effect on tape drives.]

简单用法:
1、smartctl -a  <device>         检查该设备是否已经打开SMART技术。
2、smartctl -s on <device>    如果没有打开SMART技术,使用该命令打开SMART技术。
3、smartctl -t short <device>    后台检测硬盘,消耗时间短;
      smartctl -t long <device>      后台检测硬盘,消耗时间长;
      smartctl -C -t short <device> 前台检测硬盘,消耗时间短;
      smartctl -C -t long <device>  前台检测硬盘,消耗时间长。
其实就是利用硬盘SMART的自检程序。
4、smartctl -X <device>  中断后台检测硬盘。
5、smartctl -l selftest <device>  显示硬盘检测日志。
6、smartctl -l error <device> 显示硬盘错误汇总。

或用 badblocks 工具