Archive for the ‘Uncategorized’ Category

修复崩溃的RPM数据库

Sunday, November 12th, 2017

mkdir /root/cptech
cd /var/lib/rpm
mv __db* /root/cptech/
rpm –rebuilddb
rpm -qa | grep release

centos-release-6-9.el6.12.3.x86_64

/scripts/gensysinfo
cat /var/cpanel/sysinfo.config

# This values in this file are calculated and updated if necessary nightly. If you wish to override
# these values, populate lock= with a comma delimited list of keys you don’t want updated.
# This will allow you to change those values to suit your needs.
#
# Example: if you set lock like this, then rpm_dist and rpm_arch will not be updated nightly:
# lock=rpm_dist,rpm_arch
#
ises=2
lock=
release=6.9
rpm_arch=x86_64
rpm_dist=centos
rpm_dist_ver=6

You should now be able to run the cPanel update:

/scripts/upcp –force

快速删除队列中的邮件

Sunday, November 12th, 2017

cd /var/spool

mv exim exim.old

mkdir -p exim/input

mkdir -p exim/msglog

mkdir -p exim/db

chown -R mail:mail exim

/scripts/buildeximconf

/sbin/service exim restart

CentOS如何永久改变DNS配置

Saturday, July 22nd, 2017

永久修改DNS地址的方法:
1、配置ip地址文件 /etc/sysconfig/network-scripts/ifcfg-eth0 添加一行
DNS1=8.8.8.8 #手动添加一个dns地址;
DNS配置文件/etc/resolv.conf 的地址会自动匹配手动添加的地址;重启网卡后不会清除;
2、手动添加dns地址 DNS配置文件 /etc/resolv.conf
nameserver 192.168.1.17
配置ip地址文件 /etc/sysconfig/network-scripts/ifcfg-eth0 添加
PEERDNS=no #添加后不会去打扰 /etc/resolv.conf 文件
DHCP环境下,在/etc/resolv.conf 手动添加dns地址后,重启网卡,会自动清除;添加到/etc/sysconfig/network-scripts/ifcfg-eth0的dns地址不会清除。
静态配置IP的环境下,/etc/resolv.conf 手动添加dns地址,重启后不会清除。

查询cpanel用户空间other usage占用异常方法

Thursday, August 1st, 2013

find / -user cPanel用户名 > /home/cPanel用户名/public_html/test

cpanel删除一个IP地址

Friday, July 12th, 2013

root@server# nano /etc/ips
root@server# service ipaliases restart

/etc/resolv.conf

Wednesday, July 10th, 2013

search ve.[ve-hash].vesrv.com
nameserver 4.2.2.1
nameserver 4.2.2.2

悲催的discuz升级参考资料

Monday, July 8th, 2013

UCenter应用通信失败的解决方案
http://www.cuobie.com/archives/215/
UCenter 与 DIscuz 通信失败的解决办法
http://www.slyar.com/blog/ucenter-discuz-failed.html
哥的ucenter通信不成功的原因是.htaccess搞了个301跳转,删掉一切就正常了

UCenter 1.5.2 到 UCenter 1.6.0 升级图文教程
http://www.discuz.net/thread-2141455-1-1.html
(more…)

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