英特尔RST服务未在运行 2008 r2

.net 3.51 did the trick.

.net 4  is NOT enough.

 

你必须用角色管理工具安装Microsoft .NET Framework 3.5

当你试着在Windows 2008 R2上安装Visual Studio 2008,你可以会遇到下面的情况:

这是因为Windows 2008 R2已装集成了 .NET 3.5.1 framework,你只需通过Server Manager加起这个feature就可以了。

 

打开Server Manager 找到结点Add Features Wizard 勾选.NET Framework 3.5.1 Features ,这个问题同样发生在单独安装

.NET 3.5.1 framework 安装包。

Read more...

CentOS Linux: Fix bash: ntpdate: command not found centos

First you have to install ntp:

Run as root:

yum install ntp

Then if you run ntpdate again you might get the error again. You can run ntpdate with:

/usr/sbin/ntpdate 2.pool.ntp.org

Replace 2.pool.ntp.org with another server if that doesn’t work.

If you get a ntpdate[585863]: the NTP socket is in use, exiting Error, then run:

/etc/init.d/ntpd stop

Took me 10 precious minutes to update the time in a server … That’s a lot!

Read more...

proftp 权限

.ftpaccess

 

DeleteAbortedStores off

Umask 000

GroupOwner root

<Limit RMD DELE RNFR RETR READ>

Denyall

</Limit>

Order allow,deny

Allow from xxx.xxx.xxx.xxx

Deny from all

 

Read more...

mysqldump: Couldn’t execute ‘SHOW FUNCTION STATUS WHERE Db = ‘your-db-here”: Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50077, now running 50152. Please use mysql_upgrade to fix this error. (1558)

mysqldump: Couldn’t execute ‘SHOW FUNCTION STATUS WHERE Db = ‘your-db-here”: Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50077, now running 50152. Please use mysql_upgrade to fix this error. (1558)

 

/usr/bin/mysql_upgrade -uxxxx -pxxxxxx

 

如果你的webmin/virtualmin自动备份出现下面的错误,那么,就是mysql升级后没有做mysql_upgrade 表修复。 在新版下执行mysql_upgrade命令,其实这个命令包含一下三个命令:


# mysqlcheck –check-upgrade –all-databases –auto-repai

# mysql_fix_privilege_tables

# mysqlcheck –all-databases –check-upgrade –fix-db-names –fix-table-names

Note: 在每一次的升级过程中,mysql_upgrade这个命令我们都应该去执行,它通过mysqlcheck命令帮我们去检查表是否兼容新版本的数据库同时作出修复,还有个很重要的作用就是使用mysql_fix_privilege_tables命令去升级权限表。

 

Read more...

proftpd 配置可以上传,但无法删除的特殊权限

常见的特殊的需求:
对于FTP服务器上的某个部门的目录,要求:
部门所有人员可以上传下载但无法删除(包括文件和目录)
部门领导全部权限(包括删除)
用redhat自带的vsftp实现起来比较困难,google了以后发现proftpd实现起来比较简单
 
例如:
客服部
部门成员member,可以上传下载,但是无法删
部门主管manager,有全部权限

下载安装:
因为是CENTOS,直接下载rpm安装
wget http://packages.sw.be/proftpd/proftpd-1.3.2-1.el5.rf.i386.rpm
 
安装之后
主目录在/var/ftp
配置文件为 /etc/proftpd.conf
服务名为 proftpd
 
直接启动服务的情况是:
系统用户直接登录,且被chroot在"家目录"下
匿名用户无法登陆
 
设计实施:
部门的目录放在/var/ftp/kefu(客服部),部门人员登录后被chroot在此目录下
目录的所有者是主管manager
目录的所有组是kefu
目录权限为770(只有此部门的人员才可以进此目录)
 
设置如下:
/var/ftp下的kefu目录
drwxrwx--- 2 manager kefu 4096 Mar  3 13:11 kefu
/etc/passwd文件的设置(将他们的主目录设为/var/ftp/kefu,shell改为/sbin/nologin不允许ssh)
manager:x:501:502::/var/ftp/kefu:/sbin/nologin
member:x:502:503::/var/ftp/kefu:/sbin/nologin
新建kefu组,member是组员
 
配置文件proftpd.conf

 

  1. <Directory /var/ftp/kefu> 对这个目录进行限制  
  2.  umask 000  
  3.   <Limit DELE RMD>  
  4.        DenyGroup kefu  
  5.   </Limit>  
  6. </Directory>   

 

解释:

  1.  umask 000 
  2.  此目录下所有用户上传的掩码都是000,这样新文件权限是666,新文件夹是777,这样做是为了保证member传的文件,其他人也可以删,默认掩码是022 
  3.   
  4. <Limit DELE RMD> 
  5.     DenyGroup kefu 
  6. 此目录下对于DELE(删除文件)RMD(删除目录)操作加以限制,对kefu组是拒绝,也就保证了kefu组成员无法执行删除操作.如果需要对单个用户(例如member)限制就用 DenyUser member 
  7.  其实就是无法执行(DELE ,RMD)这两个ftp指令  



 
整个思路:
通过系统权限来允许所有的文件都可以对任何人读写(就是非创建者也可以删)
通过限制FTP指令的执行来限制特定的用户(组)无法执行删除
总的来说就是利用两个层面的限制实现对权限”先放,后收”

Read more...

在任意位置插入小工具 wordpress主题修改 让主题支持小工具

输入以下代码到 /wp-content/theme/themename/functions.php 如果没有可以自己手动创建一个。

 

<?php 
if (function_exists('register_sidebar')) { 
register_sidebar(array( 
'name' => '边栏1', // 侧边栏 1 的名称 
'before_widget' => '<li>', // widget 的开始标签 
'after_widget' => '</li>', // widget 的结束标签 
'before_title' => '<h3>', // 标题的开始标签 
'after_title' => '</h3>'// 标题的结束标签
 
));
 
register_sidebar(array( 
'name' => '边栏2', // 侧边栏 2 的名称 
'before_widget' => '<li>', // widget 的开始标签 
'after_widget' => '</li>', // widget 的结束标签 
'before_title' => '<h3>', // 标题的开始标签 
'after_title' => '</h3>'// 标题的结束标签
 
));
 
register_sidebar(array( 
'name' => '边栏3', // 侧边栏 3 的名称 
'before_widget' => '<li>', // widget 的开始标签 
'after_widget' => '</li>', // widget 的结束标签 
'before_title' => '<h3>', // 标题的开始标签 
'after_title' => '</h3>'// 标题的结束标签
 
));
 
register_sidebar(array( 
'name' => '边栏4', // 侧边栏 4 的名称 
'before_widget' => '<li>', // widget 的开始标签 
'after_widget' => '</li>', // widget 的结束标签 
'before_title' => '<h3>', // 标题的开始标签 
'after_title' => '</h3>'// 标题的结束标签
 
)); 
} 
?>

 

1之后我们只需要在想要添加小工具的地方数据以下代码。2

<?php 
if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('边栏名称3')): 
?> 
<?php 
endif; 

?>3

 

 

Read more...

word实现多行合一

 

先看看这段文字中间有没有段落符或者换行符,如果有的话选中这段文字,Ctrl+H,查找^p,替换为空
再查找^l,替换为空。
确保这些文字是一个段落里后按Ctrl+D,在弹出的字体对话框的字符间距里设置成紧缩,调零点几到一两磅,也可以将缩放变成100%一下(使字变瘦),直到这些文字都缩到一行

 

Read more...
Subscribe to this RSS feed
Notice: Undefined offset: 1 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 18

Notice: Undefined offset: 1 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

Notice: Undefined offset: 2 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

Notice: Undefined offset: 3 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/category.php on line 191

Notice: Undefined offset: 1 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 18

Notice: Undefined offset: 1 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

Notice: Undefined offset: 2 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34

Notice: Undefined offset: 3 in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/pagination.php on line 34