存档

文章标签 ‘vps12.com’

Win 2008安装IIS7时提示安装失败,错误代码0×80070643解决方案

2015年5月7日 没有评论

经过各种百度发现,这可能是微软产品的一个安装策略问题,原因就不深究了,简单说下解决方案:
1、禁用WAS,即Windows进程激活服务功能(Windows Process Activation Service)。在开始,运行,输入:
dism.exe /online /disable-Feature /featurename:WAS-WindowsActivationService
2、卸载II7,并重启计算机。
3、再次重新安装IIS7。注意重启完后。进入后需要卸载II7,有个过程,一定要点时间等跳出对话完成卸载II7。
4、启用WAS,在开始,运行,输入:
dism.exe /online /enable-Feature /featurename:WAS-WindowsActivationService
dism.exe /online /enable-Feature /featurename:NetFxEnvironment

Apache错误:(20014)Internal error: Error retrieving pid file logs/httpd.pid

2015年5月2日 没有评论

今天在虚拟机上打开apache出现如下错误:

[root@www.vps12.com ~]# service httpd start

(20014)Internal error: Error retrieving pid file logs/httpd.pid

Remove it before continuing if it is corrupted.

其实这个错误就是因为Apache目录下的 logs 子目录下的 httpd.pid 文件内容是空的。这个文件是记录进程ID的文件。因为这个文件是空的,就无法启动,实在是超雷人。你随便写点数字进去,再启动Apache,就可以成功了。

[root@www.vps12.com ~]# echo 1234 > /usr/local/apache2/logs/httpd.pid

[root@www.vps12.com ~]# service httpd start

Xen Linux VPS硬盘挂载教程(重装系统不丢数据)也适用于其他多硬盘系统

2015年4月21日 没有评论

之前发的那篇《Xen Linux VPS硬盘挂载教程》,利用LVM(卷组)直接填充整个Linux根分区的磁盘容量,这种做法可以最大限度的利用VPS所分配的容量,但重装后会丢失所有数据。适合一些比较小硬盘或对硬盘需求量比较大的客户。

由于现在的VPS磁盘容量越来越大,很多VPSer们也未必能用得到默认的容量,XenSystem初始化的根分区(第一磁盘“Xvda”)默认为10G,另外一个磁盘(第二磁盘“Xvdb”)为VPS总容量的剩余容量。如果单独挂载给/home,使用LNMP一键包等程序,在重装时在/home内的数据就不会丢失了。非常适合热爱折腾的客户。

注意:如果MYSQL数据并没保存在/home,重装前请注意备份。

一、查看当前硬盘情况

1
fdisk -l

二、新建立分区

1
fdisk /dev/xvdb

SSH执行以上命令,会提示下方填写区域

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Command (m for help): n 新建分区
Command action
e extended
p primary partition (1-4)
p 分区类型
Partition number (1-4): 1 分区编号
First cylinder (1-1305, default 1):1
Using default value 1 分区起始位置,默认即可
Last cylinder, +cylinders or +size{K,M,G} (1-1305, default 1305): 1305
结束位置,默认即可
Command (m for help): t 指定分区格式
Selected partition 1
Hex code (type L to list codes): 83 设置为Linux分区
Changed system type of partition 1 to 8e (Linux LVM)
Command (m for help): w 保存
The partition table has been altered!
Calling ioctl() to re-read partition table. Syncing disks.

三、再次执行fdisk命令查看当前分区状态

1
fdisk -l

若没有问题则写入系统内核。

1
2
yum -y install parted #如果没有以下命令,请先运行此安装命令
partprobe #若没有问题则执行此命令写入内核

四、将分区格式化为ext3

1
mkfs.ext3 /dev/xvdb1

五、挂载到/home

1
mount /dev/xvdb1 /home

SSH执行以上命令,将第二硬盘挂载到/home分区。

1
df -l

六、写入挂载文件

1
echo "/dev/xvdb1 /home ext3 defaults 1 3" >> /etc/fstab

SSH执行以上命令,写入/etc/fstab,开机时自动挂载。

七、重装系统后恢复方法
在XenSystem中,选择“只格式化系统盘:(推荐)”。安装完毕后,尝试第五步开始。

分类: Linux, 解决方案 标签: ,

解决方法:An error occurred on the server when processing the URL. Please contact the system administrator

2015年4月16日 没有评论

在WINDOWS7或SERVER2008上安装了IIS7.5,调试ASP程序时出现以下错误:

An error occurred on the server when processing the URL. Please contact the system administrator

解决方法如下:

设置方法一:

以管理员身份运行CMD,将目录定位到%windir%\system32\inetsrv\,然后执行appcmd set config -section:asp -scriptErrorSentToBrowser:true。
%windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true

设置方法二:

打开IIS7的asp设置,展开“调试属性”选项,“将错误发送到浏览器”这项默认的是False,改为True,然后点右侧的应用!如图所示:

最安全简单的sql2000数据库日志文件清除或者减小办法

2015年4月9日 没有评论

相信很多使用sql2000,mssql的朋友都对日志文件过大严重影响数据库运行想过办法吧.

数据文件只有1G,但长期的数据库日志文件却有10G了,因为数据比较重要,有些手段又不好使用.

现在我找到一个快速而且不用第三方软件,最佳最安全的针对减小数据库日志文件的办法.

因为使用收缩数据库并不好使用.收缩日志文件也没有多大效果.笔者这里介绍一个最安全的减小mssql数据库日志文件的方法:

1.首先,请大家备份一次数据库,这非常简单,也是一种好习惯;

2.在需要收缩日志文件大小的数据库上点”属性”,再点”选项”,将故障还原里的”完全”改为”简单”

3.再右右数据库,”所有任务”中的”收缩数据库”

4.点右下角的”文件”,进入后,在右上角选数据库文件为”xxxx_log”,表示,准备收缩日志文件

5.就用默认的”收缩操作”—”压缩页,然后截断文件中的可用空间”

确定,这时你可以直接查看物理路径中的你需要收缩减小的相应log文件,是不是只有不到1M大小了.

这表示,你的日志文件已经安全清除了.

然后,重新回到第二步,将”简单”改为”完全”,这样,除了日志文件已缩小外,就与你以前的数据库没有任何区别了.包括你的所有设置!

建议:

为了防止日志文件无限扩大,需要将日志文件作一些限制.

方法是:数据库上右键点”属性”,点,”事务日志”,里面设置,将文件增长限制为xxxxMB,这要看你日常对数据库的操作情况了,一般设为1G是比较合适的,每隔一段时间进行一次本文所说的收缩数据库的方法,就能很好的维护了数据库,特别针对懒人,同时也备份了一次数据库!

解决linux系统CentOS 6.x下调整home和根分区大小(默认安装完成时)

2015年4月1日 没有评论

解决linux系统CentOS下调整home和根分区大小:目标:将VolGroup-lv_home缩小到20G,并将剩余的空间添加给VolGroup-lv_root,1.首先查看磁盘使用情况…
目标:将VolGroup-lv_home缩小到20G,并将剩余的空间添加给VolGroup-lv_root

1.首先查看磁盘使用情况

1
[root@localhost ~]# df -h
1
2
3
4
5
6
文件系统 容量 已用 可用 已用% 挂载点
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root 154G 7.9G 139G 6% /
tmpfs 1.9G 100K 1.9G 1% /dev/shm
/dev/sda1 485M 69M 391M 15% /boot
/dev/mapper/VolGroup-lv_home 299G 984M 283G 1% /home

2、卸载/home

1
[root@localhost ~]# umount /home
1
2
umount /home 如果提示无法卸载,则是有进程占用/home,使用如下命令来终止占用进程:
[root@localhost ~]# fuser -m /home

3、调整分区大小

1
[root@localhost ~]# resize2fs -p /dev/mapper/VolGroup-lv_home 20G

如果提示运行“e2fsck -f /dev/mapper/VolGroup-lv_home”,则执行相关命令:

1
[root@localhost ~]# e2fsck -f /dev/mapper/VolGroup-lv_home

然后重新执行命令:

1
[root@localhost ~]# resize2fs -p /dev/mapper/VolGroup-lv_home 20G

注:resize2fs 为重新设定磁盘大小,只是重新指定一下大小,并不对结果有影响,需要下面lvreduce的配合

4、挂载上/home,查看磁盘使用情况

1
2
[root@localhost ~]# mount /home
[root@localhost ~]# df -h

5、设置空闲空间
使用lvreduce指令用于减少LVM逻辑卷占用的空间大小。可能会删除逻辑卷上已有的数据,所以在操作前必须进行确认。记得输入 “y”

1
[root@localhost ~]# lvreduce -L 20G /dev/mapper/VolGroup-lv_home

注:lvreduce -L 20G的意思为设置当前文件系统为20G,如果lvreduce -l 20G是指从当前文件系统上减少20G
使用lvreduce减小逻辑卷的大小。注意:减小后的大小不能小于文件的大小,否则会丢失数据。

可以使用vgdisplay命令等查看一下可以操作的大小。也可以是用fdisk -l命令查看详细信息。

1
[root@localhost ~]# vgdisplay

注:vgdisplay为显示LVM卷组的元数据信息

6.把闲置空间挂在到根目录下

1
[root@localhost ~]# lvextend -L +283G /dev/mapper/VolGroup-lv_root

注:lvextend -L +283G为在文件系统上增加283G

1
[root@localhost ~]# resize2fs -p /dev/mapper/VolGroup-lv_root

ps:这里-p命令运行完后,如果上1t左右的或是几百gb的硬盘要很长时间。一定要等他跑完。

7、检查调整结果

1
2
[root@localhost ~]# df -h
[root@localhost ~]# init 6

以上就可以完美的解决空间分配的问题。唯一需要注意的是。运行时间比较长,如果中断的话就有非常大的风险。不过按以上操作完成不需要担心。试过n次。没问题。

Linux top命令输出中PR值和NI值有什么不同

2015年2月12日 没有评论

NI 是优先值,是用户层面的概念, PR是进程的实际优先级, 是给内核(kernel)看(用)的。
一般情况下,PR=NI+20, 如果一个进程的优先级PR是20, 那么它的NI(nice)值就是20-20=0。

NI is the nice value, which is a user-space concept. PR is the process’s actual priority, as viewed by the Linux kernel.

For normal processes, the kernel priority is simply +20 from the nice value. Thus a process with the neutral nice value of zero has a kernel priority of 20. This offset-by-20 is done so that a process with a nice value of -20, the highest priority nice value, receives a kernel priority of zero. Lower numeric values equal higher scheduling priority.

For realtime processes, the kernel priority is the process’s real-time priority, but thePR column will simply print RT.

In some versions of the Linux kernel, the kernel priority could differ from the nice value, as the process scheduler applied a small bonus or punishment to interactive or processor-hogging tasks, respectively. In these older kernels, the value given by the PR column could differ from the nice value. This isn’t true with the kernel’s current scheduler, the Completely Fair Scheduler (CFS).

This article come from:

http://www.quora.com/Linux/What-is-the-difference-between-the-NI-and-PR-values-in-the-top-1-commands-output

分类: Linux 标签: ,

XAMPP php版本历史

2015年1月18日 没有评论

XAMPP版本历史如图

http://code.stephenmorley.org/articles/xampp-version-history-apache-mysql-php/

XAMPP Apache MySQL PHP 5 PHP 4
1.8.1 2.4.3 5.5.27 5.4.7
1.8.0 2.4.2 5.5.25a 5.4.4
1.7.7 2.2.21 5.5.16 5.3.8
1.7.5 2.2.21 5.5.15 5.3.8
1.7.4 2.2.17 5.5.8 5.3.5
1.7.3 2.2.14 5.1.41 5.3.1
1.7.2 2.2.12 5.1.37 5.3.0
1.7.1 2.2.11 5.1.33 5.2.9
1.7.0 2.2.11 5.1.30 5.2.8
1.6.8 2.2.9 5.0.67 5.2.6 4.4.9
1.6.7 2.2.9 5.0.51b 5.2.6 4.4.8
1.6.6a 2.2.8 5.0.51a 5.2.5 4.4.8
1.6.6 2.2.8 5.0.51 5.2.5 4.4.8 (RC2)
1.6.5 2.2.6 5.0.51 5.2.5 4.4.7
1.6.4 2.2.6 5.0.45 5.2.4 4.4.7
1.6.3a 2.2.4 5.0.45 5.2.3 4.4.7
1.6.3 2.2.4 5.0.54 5.2.3 4.4.7
1.6.2 2.2.4 5.0.41 5.2.2 4.4.7
1.6.1 2.2.4 5.0.37 5.2.1 4.4.6
1.6.0a 2.2.4 5.0.33 5.2.1 4.4.5
1.6.0 2.2.3 5.0.33 5.2.1 4.4.5

分类: Linux 标签: , , ,

centos 6.2 更新报错解决 yum you could try using skip broken to work around the problem

2015年1月14日 没有评论

centos 6.2 更新报错解决 yum you could try using skip broken to work around the problem

yum update
Loaded plugins: aliases, changelog, downloadonly, kabi, presto, refresh-
: packagekit, security, tmprepo, verify, versionlock
Loading support for Red Hat kernel ABI
adobe-linux-x86_64 | 951 B 00:00
google-chrome | 951 B 00:00 …
sl | 3.2 kB 00:00
sl-security | 1.9 kB 00:00
Setting up Update Process
Resolving Dependencies
–> Running transaction check
—> Package python-qpid.noarch 0:0.12-1.el6 will be updated
—> Package python-qpid.noarch 0:0.14-11.el6_3 will be an update
—> Package python-qpid-qmf.x86_64 0:0.12-6.el6 will be updated
—> Package python-qpid-qmf.x86_64 0:0.14-14.el6_3 will be an update
—> Package qpid-cpp-client.x86_64 0:0.12-6.el6 will be updated
–> Processing Dependency: libqpidclient.so.5()(64bit) for package: matahari-agent-lib-0.4.4-11.el6.x86_64
–> Processing Dependency: libqpidclient.so.5()(64bit) for package: matahari-network-0.4.4-11.el6.x86_64
–> Processing Dependency: libqpidclient.so.5()(64bit) for package: matahari-sysconfig-0.4.4-11.el6.x86_64
–> Processing Dependency: libqpidclient.so.5()(64bit) for package: matahari-service-0.4.4-11.el6.x86_64
–> Processing Dependency: libqpidclient.so.5()(64bit) for package: matahari-host-0.4.4-11.el6.x86_64
–> Processing Dependency: libqpidcommon.so.5()(64bit) for package: matahari-network-0.4.4-11.el6.x86_64
–> Processing Dependency: libqpidcommon.so.5()(64bit) for package: matahari-host-0.4.4-11.el6.x86_64
–> Processing Dependency: libqpidcommon.so.5()(64bit) for package: matahari-sysconfig-0.4.4-11.el6.x86_64
–> Processing Dependency: libqpidcommon.so.5()(64bit) for package: libvirt-qmf-0.3.0-4.el6.x86_64
–> Processing Dependency: libqpidcommon.so.5()(64bit) for package: matahari-agent-lib-0.4.4-11.el6.x86_64
–> Processing Dependency: libqpidcommon.so.5()(64bit) for package: matahari-service-0.4.4-11.el6.x86_64
—> Package qpid-cpp-client.x86_64 0:0.14-22.el6_3 will be an update
—> Package qpid-cpp-client-ssl.x86_64 0:0.12-6.el6 will be updated
—> Package qpid-cpp-client-ssl.x86_64 0:0.14-22.el6_3 will be an update
—> Package qpid-cpp-server.x86_64 0:0.12-6.el6 will be updated
—> Package qpid-cpp-server.x86_64 0:0.14-22.el6_3 will be an update
—> Package qpid-cpp-server-ssl.x86_64 0:0.12-6.el6 will be updated
—> Package qpid-cpp-server-ssl.x86_64 0:0.14-22.el6_3 will be an update
—> Package qpid-qmf.x86_64 0:0.12-6.el6 will be updated
—> Package qpid-qmf.x86_64 0:0.14-14.el6_3 will be an update
—> Package qpid-tools.noarch 0:0.12-2.el6 will be updated
—> Package qpid-tools.noarch 0:0.14-6.el6_3 will be an update
—> Package ruby-qpid-qmf.x86_64 0:0.12-6.el6 will be updated
—> Package ruby-qpid-qmf.x86_64 0:0.14-14.el6_3 will be an update
–> Finished Dependency Resolution
Error: Package: matahari-host-0.4.4-11.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
Requires: libqpidclient.so.5()(64bit)
Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
libqpidclient.so.5()(64bit)
Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security)
Not found
Error: Package: matahari-sysconfig-0.4.4-11.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
Requires: libqpidclient.so.5()(64bit)
Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
libqpidclient.so.5()(64bit)
Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security)
Not found
Error: Package: matahari-service-0.4.4-11.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
Requires: libqpidcommon.so.5()(64bit)
Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
libqpidcommon.so.5()(64bit)
Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security)
Not found
Error: Package: matahari-network-0.4.4-11.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
Requires: libqpidclient.so.5()(64bit)
Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
libqpidclient.so.5()(64bit)
Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security)
Not found
Error: Package: matahari-sysconfig-0.4.4-11.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
Requires: libqpidcommon.so.5()(64bit)
Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
libqpidcommon.so.5()(64bit)
Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security)
Not found
Error: Package: matahari-host-0.4.4-11.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
Requires: libqpidcommon.so.5()(64bit)
Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
libqpidcommon.so.5()(64bit)
Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security)
Not found
Error: Package: libvirt-qmf-0.3.0-4.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
Requires: libqpidcommon.so.5()(64bit)
Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
libqpidcommon.so.5()(64bit)
Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security)
Not found
Error: Package: matahari-agent-lib-0.4.4-11.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
Requires: libqpidcommon.so.5()(64bit)
Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
libqpidcommon.so.5()(64bit)
Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security)
Not found
Error: Package: matahari-network-0.4.4-11.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
Requires: libqpidcommon.so.5()(64bit)
Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
libqpidcommon.so.5()(64bit)
Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security)
Not found
Error: Package: matahari-agent-lib-0.4.4-11.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
Requires: libqpidclient.so.5()(64bit)
Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
libqpidclient.so.5()(64bit)
Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security)
Not found
Error: Package: matahari-service-0.4.4-11.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
Requires: libqpidclient.so.5()(64bit)
Removing: qpid-cpp-client-0.12-6.el6.x86_64 (@anaconda-ScientificLinux-201202061444.x86_64)
libqpidclient.so.5()(64bit)
Updated By: qpid-cpp-client-0.14-22.el6_3.x86_64 (sl-security)
Not found
You could try using –skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), ‘yum check’ output follows:
libvpx-1.0.0-1.el6.x86_64 is a duplicate with libvpx-0.9.0-8.el6_0.x86_64

上述更新错误,解决方法:

yum remove matahari*

分类: Linux, 解决方案 标签: ,

安装CentOS 出现Disk sda contains BIOS RAID metadata解决方法

2015年1月14日 没有评论

在安装CentOS 6系统的时候,当进到检测硬盘的时候,总是过不去,报错如下: Disk sda contains BIOS RAID metadata, but is not part of any recognized BIOS RAID sets. Ignoring disk sda 。

如下图显示:

 

解决办法1:
硬盘显示偶尔/dev/sda,偶尔/dev/sdb。。
从提示看貌似以前该硬盘做过RAID。。但问题是,这是个新的硬盘这样提示。该提示导致系统无法认到硬盘,没法继续安装系统。
后来经过一番Google,安装系统时,输入linux nodmraid就可以继续安装了。。
linux nodmraid命令的意思是关掉阵列。

进入安装选择菜单时

按TAB键,会进入到Linux的命令行模式,然后在启动命令行的后面添加nodmraid(注意前面先加个空格)并按ENTER。

接下进入安装的过程就会发现硬盘找到了。

>vmlinuz initrd=initrd.img nodmraid

要想在后续安装系统时不会出现以上提示,以下是彻底解决方法:
把硬盘放到另外一台机器上
# dmraid -rE /dev/sdb
no raid disks and with names: “/dev/sdb”
不行啊。网上搜索一下,有朋友给出一个更加简单的办法,用parted
网上搜索一下,有朋友给出一个更加简单的办法,用parted
# parted /dev/sdb –script mklabel gpt
# parted /dev/sdb –script — mkpart primary 0 -1
Warning: The resulting partition is not properly aligned for best performance.
# parted /dev/sdb –script print
Model: ATA TOSHIBA MK1002TS (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start  End  Size  File system Name  Flags
1  17.4kB 1000GB 1000GB        primary处理完,放回原来的机器,居然就没问题,顺利装完系统。
如果是这样,在急救模式下,运行parted,也是应该没问题。

如果还不行,最后一招就是DD
dd if=/dev/null of=/dev/sda bs=512 count=1
解决办法2(推荐):

其实多数情况下这种提示我们进入bios下面的 Advanced Options 里按图片选择 这个AHCI 就可以了。