致江湖上的朋友:
欢迎您访问╃苍狼山庄╃,请使用侧边栏的搜索功能查找日志,希望能在这里找到您所需要的东西,使您在平淡之中充满喜悦。
05-12
19
Citrix XenDesktop 组件安装简记
今天安装XenDesktop,4台虚机分别安装DDC1(Desktop Delivery Controller)、DDC2(Desktop Delivery Controller)、WI1(Web Interface)、WI2(Web Interface),为了快速安装完毕,4台虚机同时安装,结果WI1安装初始化过程出错,折腾了好久还是有错误,后来狠心把两台WI都删除了,重新部署,安装的时候先安装了WI1,WI1安装成功后再安装WI2,都成功的完成了,后来考虑可能是同时安装WI冲突,以后安装看来不能图快了,返工时间倒是长了。
故障状态
当尝试删除掉一个datastore时,系统提示如下错误提示:
在 vCenter Server“VCENTER”上调用对象 “datastoreSystem-28”的“HostDatastoreSystem.RemoveDatastore” 失败。
如下图:

故障分析
这个问题,是由于这个datstore本身可能被后台应用占用;
05-12
13
Linux下安装NET-SNMP使用监控宝监控系统状态
1、准备环境
yum -y install make gcc gcc-c++ gcc-g77 openssl openssl-devel file libtool libtool-libs perl-devel
2、编译和安装
首先我们需要下载Net-SNMP的源代码,官方地址:
http://sourceforge.net/projects/net-snmp/files/net-snmp/
选择一个版本,比如5.7.1,下载的源代码包net-snmp-5.7.1.tar.gz,也可以直接下载我提供的连接:
wget -c http://clang.googlecode.com/files/net-snmp-5.7.1.tar.gz
接下来对下载的源代码包进行解压缩,
tar xzvf net-snmp-5.7.1.tar.gz
然后通过configure来生成编译规则,
cd net-snmp-5.7.1
./configure --prefix=/usr/local/snmp --with-mib-modules=ucd-snmp/diskio
注意,以上的
--with-mib-modules=ucd-snmp/diskio
选项,可以让服务器支持磁盘I/O监控。
回车出现下面问题,可以直接回车而不用回答,系统会采用默认信息,其中日志文件默认安装在/var/log/snmpd.log.数据存贮目录默认存放在/var/net-snmp下。
default version of-snmp-version(3): 3(在这里版本通常有三种形式:1,2c,3)
System Contact Information (@@no.where)(配置该设备的联系信息): heaven(也可以是邮箱地址)
System Location (Unknown)(该系统设备的地理位置):BEIJING P.R China
Location to write logfile (日志文件位置): /var/log/snmpd.log
Location to Write persistent(数据存储目录): /var/net-snmp
接下来,开始编译和安装:
make && make install
05-12
10
域成员与域控之间通讯需要开放的端口
| 客户端端口 | 服务器端口 | 服务 |
| 1024-65535/TCP | 135/TCP | RPC* |
| 1024-65535/TCP/UDP | 389/TCP/UDP | LDAP |
| 1024-65535/TCP | 636/TCP | LDAPSSL |
| 1024-65535/TCP | 3268/TCP | LDAPGC |
| 1024-65535/TCP | 3269/TCP | LDAPGCSSL |
| 53,1024-65535/TCP/UDP | 53/TCP/UDP | DNS |
| 1024-65535/TCP/UDP | 88/TCP/UDP | Kerberos |
| 1024-65535/TCP | 445/TCP | SMB |
域用户登陆与域控通信需要开通的哪些端口:
| 服务端口 | 服务 |
| 123/UDP | W32Time |
| 138/UDP | Netbios |
| 389/TCP/UDP | LDAP |
| 3268/TCP | LDAP GC |
| 53/TCP/UDP | DNS |
| 88/TCP/UDP | Kerberos |
详细的配置以及为了保障您的企业环境正常运行,我们建议您参照以下的文章进行测试后再部署到您的企业环境:
其他参考文章:
Active Directory 和 Active Directory 域服务端口要求
Windows 服务器系统的服务概述和网络端口要求
05-12
09
JavaScript打字机效果
JavaScript打字机效果
打字速度请修改代码中的
setTimeout('writeContent(false)',100);
数值,值越小,打字速度越快。
完整代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>打字机效果</title> <style type="text/css"> body{ font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif; margin-top:0px; background-image:url('../../images/heading3.gif'); background-repeat:no-repeat; padding-top:100px; } #myContent, #myContent blink{ width:500px; height:200px; background:black; color: #00FF00; font-family:courier; } blink{ display:inline; } </style> <script type="text/javascript"> /************************************************************************************************************ (C) www.dhtmlgoodies.com, September 2005 This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website. Terms of use: You are free to use this script as long as the copyright message is kept intact. However, you may not redistribute, sell or repost it without our permission. Thank you! www.dhtmlgoodies.com Alf Magne Kalleland ************************************************************************************************************/ var charIndex = -1; var stringLength = 0; var inputText; function writeContent(init){ if(init){ inputText = document.getElementById('contentToWrite').innerHTML; } if(charIndex==-1){ charIndex = 0; stringLength = inputText.length; } var initString = document.getElementById('myContent').innerHTML; initString = initString.replace(/<SPAN.*$/gi,""); var theChar = inputText.charAt(charIndex); var nextFourChars = inputText.substr(charIndex,4); if(nextFourChars=='<BR>' || nextFourChars=='<br>'){ theChar = '<BR>'; charIndex+=3; } initString = initString + theChar + "<SPAN id='blink'>_</SPAN>"; document.getElementById('myContent').innerHTML = initString; charIndex = charIndex/1 +1; if(charIndex%2==1){ document.getElementById('blink').style.display='none'; }else{ document.getElementById('blink').style.display='inline'; } if(charIndex<=stringLength){ setTimeout('writeContent(false)',100); }else{ blinkSpan(); } } var currentStyle = 'inline'; function blinkSpan(){ if(currentStyle=='inline'){ currentStyle='none'; }else{ currentStyle='inline'; } document.getElementById('blink').style.display = currentStyle; setTimeout('blinkSpan()',500); } </script> </head> <body> <div id="myContent"> </div> <div id="contentToWrite" style="display:none"> <!-- Put the clang.com content here--><br> telnet clang.com<br> Login : username<br> password : ******<br> Access is granted<br> <!-- End clang.com content --> </div> <script type="text/javascript"> writeContent(true); </script> </body> </html> |
05-12
09
CentOS中vsftp安装与配置
1. 安装
查看是否安装vsftpd服务;
rpm -qa | grep vsftpd
安装vsftpd服务:
yum -y install vsftpd
然后为它创建日志文件:
touch /var/log/vsftpd.log
让系统服务随着系统启动而启动:
chkconfig vsftpd on
很多服务器上运行的脚本都是通过mail来发送通知的,但是当没有邮件服务器的时候通过mail发送的邮件经常被 对方的邮件服务器拒绝掉。之前我发过用msmtp+mutt来解决这个问题,但后来发现有些情况不得不用mail,比如说已经有n多脚本在跑,或者其他什么原因不能用mutt的时候。
其实很简单,看了msmtp官方文档后才发现原来用msmtp+mail来发邮件竟然比msmtp+mutt还要简单.
1、安装msmtp
官方地址:http://sourceforge.net/projects/msmtp/files/msmtp/
也可以直接使用下面命令下载:
wget -c http://clang.googlecode.com/files/msmtp-1.4.28.tar.bz2
下载到服务器上,使用命令解压,以1.4.28版本为例:
tar xf msmtp-1.4.28.tar.bz2
cd msmtp-1.4.28
./configure --prefix=/usr/local/msmtp
make && make install
05-12
02
使用vSphere平台部署XenDesktop时注意事项
使用vSphere底层搭建XenDesktop时需要对vcenter server配置文件进行修改,具体修改内容如下:
配置XenDesktop 5通过HTTP方式连接vCenter方法:
1、使用管理员登录到Center服务器;
2、修改vCenter的proxy.xml文件,文件路径如下:
Server 2003:
C:/Documents and Settings/All Users/Application Data/VMware/VMware VirtualCenter/proxy.xml
Server 2008:
C:/Users/All Users/VMware/VMware VirtualCenter/proxy.xml
Server 2008 R2:
C:/ProgramData/VMware/VMware VirtualCenter/proxy.xml
3、修改proxy.xml文件中的"/"和"/sdk"两节的内容
注意:这里就是注意的内容,XenDesktop 5相对于XenDesktop 4会需要多修改“/”节点的内容
4、修改accessMode的内容为httpAndHttps(默认值为httpsWithRedirect)
1)、修改"/":
查找
1 | <serverNamespace>/</serverNamespace> |
在上方会有accessMode字段,修改内容为:
1 | <accessMode>httpAndHttps</accessMode> |
修改后如下图:

2)、修改"/sdk":
查找
1 | <serverNamespace>/sdk</serverNamespace> |
在上方会有accessMode字段,修改内容为:
1 | <accessMode>httpAndHttps</accessMode> |
修改后如下图:

5、修改完成后保存,并重启VMware VirtualCenter Server服务即可。
一、在登录phpmyadmin管理数据库,会出现“配置文件现在需要一个短语密码”的警告
解决方法:
打开目录phpmyadmin/libraries中的config.default.php文件
查找下面这行:$cfg['blowfish_secret'],按下面方法修改:
1 | $cfg['blowfish_secret'] = '这里就是需要的短语密码'; /* 短语密码请随意填写 */ |
原因:会出现这个问题,就是因为这段:$cfg['Servers'][$i]['auth_type'] = ‘cookie'
这里有四个值可供填写:cookie http HTTP config
config方式即输入phpmyadmin的访问网址即可直接进入,无需输入用户名和密码,是不安全的,不推荐使用。
cookie,http或HTTP时,登录phpmyadmin需要数据用户名和密码进行验证,
具体如下:PHP安装模式为Apache,可以使用http和cookie;PHP安装模式为CGI,可以使用cookie
通常这个值设置为cookie即可。
二、phpMyAdmin 高级功能未全部设置,部分功能不可用。要查出原因请点这里
解决方法:
1、在mysql中创建名为phpmyadmin的数据库。
2、将phpmyadmin安装目录下的examples/create_tables.sql导入这个数据库。
3、修改libraries中的config.default.php文件,内容如下(查找关键词并修改):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | $cfg['Servers'][$i]['controluser'] = 'username'; /* 数据库用户名 */ $cfg['Servers'][$i]['controlpass'] = 'password'; /* 数据库密码 */ $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark'; $cfg['Servers'][$i]['relation'] = 'pma_relation'; $cfg['Servers'][$i]['table_info'] = 'pma_table_info'; $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords'; $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages'; $cfg['Servers'][$i]['column_info'] = 'pma_column_info'; $cfg['Servers'][$i]['history'] = 'pma_history'; $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords'; $cfg['Servers'][$i]['recent'] = 'pma_recent'; $cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs'; $cfg['Servers'][$i]['tracking'] = 'pma_tracking'; $cfg['Servers'][$i]['userconfig'] = 'pma_userconfig'; |
保存上传到服务器,重新登录phpMyAdmin,搞定收工。
