Archive for June, 2013

DA数据转换成CP数据

Tuesday, June 25th, 2013


cp -R /old/home/mingxxxx/domains/mingxxxx.org/public_html/* /home/mingxxxx/public_html
chown -R mingxxxx:mingxxxx /home/mingxxxx/public_html/*
cp -R /old/var/lib/mysql/mingxxxx_blog/* /var/lib/mysql/mingxxxx_blog
chown -R mysql:mysql /var/lib/mysql/mingxxxx_blog/*

Drupal7安装出现Warning: ini_set() [function.ini-set]错误

Wednesday, June 19th, 2013

错误如下 :
Warning: ini_set() [function.ini-set]: A session is active. You cannot change the session module’s ini settings at this time in drupal_environment_initialize() (line 499 of /home/mouserot/public_html/domain.com/d/includes/bootstrap.inc).
需要修改
php.ini文件里面成session.auto_start = 0
(more…)

CentOS Linux 升级内核步骤和方法

Tuesday, June 18th, 2013

1、查看当前系统内核
# uname -r
2.6.32-71.e16.i686

2、下载linux-3.2.14内核包
# tar xvf linux-3.2.14.tar.bz2
# cd linux-3.2.14

3、配置内核并安装
#make mrproper #清除环境变量,即清除配置文件
#cp /boot/config-2.6.32-71.el6.i686 .config
#make menuconfig #在菜单模式下选择需要编译的内核模块#
#make clean #确保所有东西均保持最新状态.
#make bzImage #生成内核文件
#make modules #编译模块
#make modules_install #安装模块
#make install #安装
(more…)

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…)