Archive for the ‘Uncategorized’ Category

cpanel备份时忽略某文件或用户数据

Saturday, June 15th, 2013

Skipping Files and Accounts

You may wish to skip files or certain accounts. To sip files, create a cpbackup-exclude.conf file in the account root and simply list (you can use regular expressions) the files that you don’t want to back up. If you want to globally skip certain files, you can edit /etc/cpbackup-exclude.conf (which already contains a list of skipped files) to be excluded from all cPanel backups created. To exclude users from backups, create /etc/cpbackup-userskip.conf and list the users you don’t want to back up.

解决SecureCRT显示中文为乱码

Saturday, June 15th, 2013

  解决方法:
  .修改SecureCRT设置:选项(Options)->会话选项(Session Options)->外观(Appearance)->字符(Character),选择UTF-8。
1

另:
SecureCRT中文乱码、复制粘贴乱码解决办法
1. 首先进入 Option 菜单 >> Session Option
2. Terminal >> Emulation,在右边 Terminal下拉菜单中选择”Linux”, “ANSI Color”前面打上勾。
3. Terminal >> Appearance,
3.1 点右边的Font 按钮, 1) 选择新宋体,2) 字符集选”中文 GB2312”
3.2 Charactor 下拉菜单中选择 “Default”, 去掉”Use Unicode line drawing character”前面的勾。

centos 使用smartmontools监控磁盘的健康状态

Thursday, June 13th, 2013

yum install smartmontools -y

http://tech.ddvip.com/2009-09/1252136136130827.html

 在开始测试或监控之前,先检查一下目标硬盘是否支持S.M.A.R.T,以root登陆(Windows下以系统管理员身份登陆),运行下面的命令:

  #smartctl -i -d ata /dev/sda

如果运行这个命令返回了类似“Device does not support SMART”的信息就说明目标硬盘不支持SMART,不能使用这套软件包进行测试和监控。
(more…)

Centos彻底更改hostname

Thursday, June 13th, 2013

例如,你想要将 server1 更改成 server2

[lan@server1 ~]#su root

1. 首先编辑/etc/hosts文件,将出现server1的文字更改为server2

[root@server1 ~]# vi /etc/hosts

2. 编辑/etc/sysconfig/network文件,更改hostname:
(more…)

centos分区

Thursday, May 23rd, 2013

*** /boot – 512MB
*** /tmp – 4GB
*** /swap – 4GB
*** / – Remainder

安装tmpwatch清理下/tmp目录

Monday, May 20th, 2013

安装tmpwatch
yum install tmpwatch
清理下24小时之前的文件
/usr/sbin/tmpwatch --verbose --mtime --all 24 /tmp

MYSQL中表类型为InnoDB怎么转换成MyISAM

Wednesday, May 15th, 2013

ALTER TABLE wp_posts TYPE=MyISAM

csf的ssh命令

Wednesday, May 8th, 2013

csf -d : 屏蔽IP
csf -a : 允许IP
csf -dr : 屏蔽解除
csf -ar : 允许解除
csf -g :查询有无被屏蔽
csf -r :重启csf

For more command line options please try csf –help

在cpanel上同时安装PHP-5.3及PHP5.2

Friday, April 19th, 2013

This is a small script to run both php-5.2.x and 5.3.x on same cpanel server.

Steps:
1) compile php-5.2.x using easyapache.
2)download the script from http://prajith.in/cpanel/installphp.sh

wget http://prajith.in/cpanel/installphp.sh
3)sh installphp.sh
4) select the php version
Enter the PHP version[5.3.10 or 5.3.8] :
5) done!

Now we will get an option on cpanel to switch php versions for each accounts!
Go to cpanel >> software >> PHP Version
Thats it!!!!

来源链接:http://www.prajith.in/install-php-5-2-and-5-3-on-cpanel-server/

用户空间大小显示不正常处理 方法

Wednesday, April 10th, 2013

ln -s /dev/xvda /dev/root
/scripts/fixquotas
搞定