分类 Captain 下的文章

多半是pathinfo的问题,按下面配置可以禁用。
修改/usr/local/nginx/conf/vhost对应域名配置文件,注释掉try_files $uri =404; 并将include pathinfo.conf;注释去掉

include typecho.conf;
\#error_page 404 /404.html; location ~ 1.php(/|$) {

\# comment try_files $uri =404; to enable pathinfo
\# try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
include pathinfo.conf; }

  1. /

XenServer 安装后默认只占用 4G 空间,无法保存ISO。XenServer推荐将ISO与本机分离,使用NFS挂载。

  1. 如何在 ubuntu 安装nfs
    Ubuntu 14.04上默认是没有安装NFS服务器的,首先要安装NFS服务程序,

    sudo apt-get install nfs-kernel-server

NFS的配置:

vi  /etc/exports

加入:

/opt/nfsroot * (rw,sync,no_root_squash)

/opt/nfsroot/ -- 与客户机共享的目录;

  • -- 表示允许任意用户使用,也可以使用具体IP;
    (rw,sync,no_root_squash) -- rw,挂载此目录的客户机对此目录有读写权利;no_root_squash,挂载此目录的客户机享有主机root的权利;保存并退出。
    使配置文件生效输入:\# exportfs -rv

重启NFS服务:/etc/init.d/nfs-kernel-server restart

  1. 在XenServer挂载

root登录后执行

xe-mount-iso-sr <IP addr>:<iso Path>

即可在客户端看见挂载后的iso。

安装好 XenServer 6.5 后,如果执行yum update,会出现下面的错误:

Loaded plugins: fastestmirror Loading mirror speeds from cached
hostfile Could not retrieve mirrorlist
http://updates.vmd.citrix.com/XenServer/6.4.94/domain0/mirrorlist
error was [Errno 14] HTTP Error 404: Not Found Error: Cannot find a
valid baseurl for repo: citrix

原因有人说是beta版的url错误,还没有发布。暂时修正方法如下:

sed -i 's/^enabled=1$/enabled=0/g' /etc/yum.repos.d/Citrix.repo

如果想安装软件可使用如下命令:

yum --disablerepo=citrix --enablerepo=base --enablerepo=extras install <lib name>

使用 firefox 浏览器打开console时,如果是Java plugin的话,经常回报error click for details 。如果查看details会有

Your security settings have blocked an untrusted application from
running.

这不是firefox的问题,而是Java 设置问题。解决方法如下:

You need to change the settings in your Java Control Panel. To do
this: 1) click the apple logo in the top left hand corner of the
computer screen, then click system preferences 2) Find and double
click on the Java logo. The Java Control Panel should open. If it
doesn't, click "Reopen the Java Control Panel" 3) In the Java Control
Panel, click the "Security" tab. 4) Click "Edit site list" and add the
address of the site that is blocked. Click Okay. 5) Click Okay again
and try to access your streaming quote applet.

If this doesn't work, go back into the "Security" tab in the Java
Control Panel and drag the "Security Level" bar to Medium. This will
allow you to access your streaming quotes until you figure out how to
add the site exception.

  1. 先执行/sbin/fdisk -l 查看系统是否存在第二块硬盘;
  2. 执行 ls -l /dev/disk/by-id 找到其UUID;
  3. 挂载硬盘

    xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/scsi-SATA_ST3500418AS_5VMNKX9W name-label="Local storage 2"

  4. 接着就能看到新添加的硬盘。

如何删除:

xe pbd-list //列出模块,找到对应存储的UUID,其中PBD(physical block device)
xe pbd-unplug uuid="<uuid of PBD>" //卸载对应的UUID的存储
xe sr-list //列出存储的UUID,找到对应存储的UUID
xe sr-destroy uuid="<uuid of SR>" //删除本地存储连接

新增iso

xe sr-create type=iso name-label="boot-iso" device-config:location=/iso device-config:legacy_mode=true content-type=iso
xe sr-create type=lvm content-type=user device-config:device=/dev/sdb3 name-label="Local storage 2"