DirectAdmin CentOS IMAP支持

IMAP
yum install krb5-devel libc-client libc-client-devel -y
wget //dave.t0xic.nl/tars/imapback-2004c1-x86.tar.gz
tar xzf imapback-2004c1-x86.tar.gz
cd imap-2004c1
./buildit
cd c-client
mkdir /usr/local/imap-2004c1/
mkdir /usr/local/imap-2004c1/lib
mkdir /usr/local/imap-2004c1/include
cp *.h /usr/local/imap-2004c1/include
cp *.c /usr/local/imap-2004c1/lib
cp c-client.a /usr/local/imap-2004c1/lib
ln -s /usr/local/imap-2004c1/c-client.a /usr/local/imap-2004c1/libc-client.a

64bit
yum install krb5-devel libc-client libc-client-devel -y
cd /usr/local/directadmin/custombuild
wget //dave.t0xic.nl/tars/imapback-2004c1-x86_64.tar.gz
tar xzf imapback-2004c1-x86_64.tar.gz
cd imap-2004c1
./buildit
cd c-client
mkdir /usr/local/imap/
mkdir /usr/local/imap/lib
mkdir /usr/local/imap/include
cp *.h /usr/local/imap/include
cp *.c /usr/local/imap/lib
cp c-client.a /usr/local/imap/lib
ln -s /usr/local/imap/c-client.a /usr/local/imap/libc-client.a

添加
–with-pic \
–with-imap=/usr/local/imap \
–with-imap-ssl=/usr/local/imap
重新编译php

完成后测试
php -m | grep imap

安装Ioncube

32bit
cd /usr/local/
wget //downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
tar xvfz ioncube_loaders_lin_x86.tar.gz

64bit
cd /usr/local/
wget //downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xvfz ioncube_loaders_lin_x86-64.tar.gz

zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.2.so
如果于zend共存 这行一定要加载在zend前面

版本是自定义的
使用 php -v 可以查看到你的php版本

Centos 安装 memcached

=========================memcached=================================
wget //www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz
tar -xvf libevent-1.4.13-stable.tar.gz
cd libevent-1.4.13-stable
./configure;make;make install;

wget //memcached.googlecode.com/files/memcached-1.4.5.tar.gz
gunzip memcached-1.4.5.tar.gz
tar -xvf memcached-1.4.5.tar
cd memcached-1.4.5
./configure;make;make install;

echo “memcached -d -u nobody -m 1024 127.0.0.1 -p 11211” >> /etc/rc.local

Centos 虚拟主机服务 服务器 定时优化MYSQL数据库

MYSQL 5 虚拟主机服务的服务器 需要定时优化

这个建议做虚拟主机服务的 都定时的优化
有的时候一些菜鸟 能把人折腾死 1G的数据库 有100M以上的碎片
尤其高负载的服务器

mysqlcheck和myisamchk的用法!
在指令中下
mysqlcheck -a -c -o -r –all-databases -uroot -p
即可优化所有数据库
參數的意義如下:
-a = Analyse given tables. 分析表
-c = Check table for errors 检查表错误
-o = Optimise table 优化表
-r = Can fix almost anything except unique keys that aren’t unique 修复表

mysqlcheck -a -c -o -r –all-databases -uroot -p密码 80

myisamchk可用crontab定時最佳化table
crontab -e
添加下面的
0 * * 0 /usr/bin/myisamchk -s /var/lib/mysql/*/*.MYI

路径需要自己找下
如果不对的话 可以使用 find / -name “myisamchk” 进行搜索
 

移除CentOS服务器不需要的服务

service pcscd stop
chkconfig pcscd off
service hidd stop
chkconfig hidd off
service avahi-daemon stop
chkconfig avahi-daemon off
service gpm stop
chkconfig gpm off
service anacron stop
chkconfig anacron off
service bluetooth stop
chkconfig bluetooth off
service rpcidmapd stop
chkconfig rpcidmapd off
service nfslock stop
chkconfig nfslock off
service atd stop
chkconfig atd off
service xfs stop
chkconfig xfs off
service cups stop
chkconfig cups off
service rpcidmapd stop
chkconfig rpcidmapd off

Posts navigation

1232930313233