li.nux.ro/nux: 值得使用的一个redhat el7/centos7的rpm/yum源

之前在centos 6下一直用epel+rpmfusion源,但至今(2014-09-07),rpmfusion仍没有推出centos7/rhel7下的源,所以安装软件是痛苦的事情。

对于缺少yum的软件,我习惯是在 http://rpm.pbone.net/ 上手工查找,然后找最近似改造版的下载。例如在centos下,首选找同版本centos或redhat el包,没有的话找最近似的fedora版本下载,再没有,使用前一版本的centos/rhel包,或者fedora包。

也就是在昨天或者说今天凌晨,在通过 http://rpm.pbone.net/ 手工解决依赖安装smplayer/mplayer 的过程中,发现了这个源,因为有好几个包都是之这个域名下下载的,所以直接访问了一下,竟然是一个yum源,维护者是很积极的。在此表示由衷感谢!

li.nux.ro 上目前有rhel/centos6及7两个版本的rpm/yum源,它需要依赖epel源,所以要首先配置epel源。不过正常情况下大家都会装上epel源的吧,epel是连centos官方都推荐的优质源。

使用说明,很简洁,丝毫不啰嗦,http://li.nux.ro/repos.html

另外,atrpms这个源也是值得推荐的,没有比较这两个源之间的重复度或冲突情况。对于求稳定的朋友,建议安装过需要的软件后,卸载这些第三源,以免造成系统包被替换(或许有这个可能,据说atrpms会替换系统包,毕竟rhel/epel的版本经常太老)

Android无法连上VPN的原因及解决办法(android系统root后连vpn显示已断开)

为了能正常使用google等的网络服务,偶尔要在android上使用pptp vpn,在linode上搭建的。最近使用了cm固件,nightly版,还是比较稳定的。

不过最近经常无法连接vpn,连接N次都是非常慢、然后提示“连接已断开”;起先以为是固件的问题,重刷了几次机,但问题依旧。

今天在外面使用联通3G,突然就不能连vpn了,以为是北京联通的国际出口上被过滤pptp数据了;不能正常上网,很崩溃,很崩溃。回来后在电脑上pptp拨号很顺利,证明电信网络是可以成功拨号。手机已经自动切换为wifi,连了两次vpn,全部失败。于是全面怀疑可能是其它原因。

google查 “android vpn 连接失败”相关文章,其中有root之后vpn无法连接vpn的文章,因为cm固件是天生root的,而刷机后并不是马上就连不了vpn,而是要过一两天之后,因为不太在意,只是草草看了,看过后,回顾最近在无法vpn前的事情,似乎都与使用smartHosts之类的软件修改hosts文件,这个操作是需要root权限的。虽然以前也root,但没有改过hosts;感觉可能有道理。于是到cm自带的文件浏览器,改设置为root模式,到/etc里,修改 mount 为r/w,然后查了里面的文件 /etc/ppp/ip-up-vpn 的权限,还真的没有写权限,修改权限为775,然后再登录vpn,虽然不快,但还是连上了。

其实解决这个问题非常简单:修改文件 /etc/ppp/ip-up-vpn 的权限,至少让root用户可写。使用你自己熟悉的工具,如re浏览器,固件工具箱等太多了。如果对linux文件权限不太了解,请参看文后链接。

很多朋友为了获取更多的自由,将自己的Android 手机破解获取root权限了,不过获取root后有一个问题,无法再正常连上VPN(即使设置完全正确),经过网上查找相关资料,确认是因为/etc/ppp/ip-up-vpn 的权限问题所致。

参考文章:http://www.ruan8.com/tutorial_1128.html

 

极简单/简陋的wordpress插件:网站访客追踪记录 v0.0.2

这是对旧文中提到的wordpress访客记录的一次升级版,照样很简陋,算作给自己玩的吧;谁需要的话,也可以拿去玩。

源码

<?php
/*
Plugin Name: fs trace
Plugin URI: http://blog.path8.net/
Description: This plugin will trace all visitor's visit action.
Version: 0.0.2
Author: fengyqf
Author URI: http://blog.path8.net/
*/

/*  
    Copyright 2008  fengyqf  (email : fengyqf@gmail.com)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

function fstrace_by_fengyqf(){
  global $wpdb;

  $url=mysql_escape_string(substr($_SERVER["REQUEST_URI"],0,200));
  $referer=mysql_escape_string(substr($_SERVER["HTTP_REFERER"],0,200));
  $cookie=mysql_escape_string(substr($_SERVER["HTTP_COOKIE"],0,250));
  $client=mysql_escape_string(substr($_SERVER["HTTP_USER_AGENT"],0,200));
  if(getenv('HTTP_CLIENT_IP')) {
    $ip = getenv('HTTP_CLIENT_IP');
  } elseif(getenv('HTTP_X_FORWARDED_FOR')) {
    $ip = getenv('HTTP_X_FORWARDED_FOR');
  } elseif(getenv('REMOTE_ADDR')) {
    $ip = getenv('REMOTE_ADDR');
  } else {
    $ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
  } 
  $ip=mysql_escape_string(substr($ip,0,16));
  $sql="insert into `log`.`wp_trace_{$wpdb->prefix}`(`referer`,`url`,`unixtime`,`ip`,`client`,`cookie`) 
          values('{$referer}','{$url}',".time().",'{$ip}','{$client}','{$cookie}')";
  $wpdb->query($sql);
  if($wpdb->last_error){
    echo "<script type=\"text/javascript\">alert('Something Wrong! get messages at page bottom. | 出错了,到页底查看详细');</script><h1>fs trace message</h1><p>You Need to Create a table for <strong>fs trace</strong>, to log your visitor active. this table was in database <i>log</i>, you can change the wp-plugin <strong>fs trace</strong> file, in wp pannel - plugins - edit - fs trace, find the line \"  \$sql=\"insert into `log`.`wp_trace_{$wpdb->prefix}`... \", and change it to <pre>\$sql=\"insert into `wp_trace_{$wpdb->prefix}`...</pre> (yes, delete <i>`log`.</i>),and sava it </p>
<p>您需要创建一个表,用于 <strong>fs trace</strong>存储wordpress的将追踪记录. 该表默认位于数据库 log 中。如果您不方便创建一个名为log的数据库,可以将该表放在当前数据库中,只是要修改一下<strong>fs trace</strong>源码了,到wordpress仪表盘 - 插件 - 编辑 - fs trace, 找到这样一行  \"  \$sql=\"insert into `log`.`wp_trace_{$wpdb->prefix}`... \", 改成 <pre>\"insert into `wp_trace_{$wpdb->prefix}`...</pre> (就是删除 <i>`log`.</i>),保存。 </p>
<p>create the table as below/建表语句如下</p>
<pre>use `log`; 
CREATE TABLE `wp_trace_{$wpdb->prefix}` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `referer` varchar(200) NOT NULL DEFAULT '',
  `url` varchar(200) NOT NULL DEFAULT '',
  `unixtime` int(10) unsigned NOT NULL DEFAULT '0',
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ip` varchar(16) NOT NULL DEFAULT '',
  `client` varchar(200) NOT NULL DEFAULT '',
  `cookie` varchar(250) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;</pre> <p>grant the mysql user INSERT privileges at least;In fact, INSERT is enough. </p> <p>为 mysql 用户赋权限,至少需要对该表的INSERT权限;事实上只需要insert权限即可. </p> <p> Alert by the plugin <strong>fs trace</strong> </p>";
//    var_dump($wpdb);
  }
}
add_action('wp_footer','fstrace_by_fengyqf');
?>

下载源码

使用说明

wordpress后台,通过上传zip文件方式上传该插件,(或解压后,连目录上传到wordpress下 wp-content/plugins/ 目录),启用插件,然后到打开前台任意页面,照错误提示操作。消息提示有中英两种语言。提示文字可能因为您的模板关系而排版错乱,看起来有些费力。

本插件不会自己创建数据表,需要您按消息提示手工创建。

本表默认在一个名为log的数据库里,因为追踪表通常会比较大,可以减少wordpress主数据库体积,主要是方便备份。单独。如果不方便创建这个数据库(如在虚拟主机上,主机商通常只给一个数据库),可以修改本插件源码,上述错误消息里也有提示。

国内开启google位置记录功能/android版google maps 7+上,恢复位置记录功能在国内使用(需root)

android版google 地图在 7以后的版本上,位置记录功能在国内不能用了,提示本功能不能在中国使用。

至少对本人,“位置记录”功能是非常有用的功能,尤其是骑车出行时记录自己的路线。目前还没找到替代产品。之前一段时间内恢复回旧版本,以使用该功能。后来使用shlug用户组的高手kernel老兄提供的方案,成功启用了本功能。

方法如下:

让andorid系统启动后加载下面这段脚本:

脚本fixsim

欺骗android系统,让它以为运行在美国运营商的服务下。

加载该脚本需要手机有root权限。个人使用 “固件工具箱” (rom toolbox) 实现启动加载,功能位于:

rom toolbox - 工具 - 脚本编写器 , 导入如上启用脚本(推荐将脚本改下名字,如init.fixsim.sh),并设置成开机自动启动,完成后重启手机。

Screenshot_2013-10-22-23-01-06 Screenshot_2013-10-22-23-01-20

可能得过一阵子才能在google地图里启用“位置记录”,估计是系统缓存的问题。

个人测试环境:galaxy nexus 手机, android 4.3(已root), 固件工具箱5.9.0 付费版,上述脚本。

----------------------------

当然用其它办法让该脚本执行也可以,个人没有尝试。kernel老兄的方案是:将上述脚本“自己扔 /etc/init.d/下面,记得改权限,当然内核得支持执行/etc/init.d下面的脚本才行”

-----------------------------

另外:7以后版本的google地图上,有个很好用的缩放地图的方法,只要单指即可完美操作,比传统的缩放按钮更好用,比多指拉伸/缩小更方便:

从某主机商的虚拟主机上拷出来的apache 主配置文件

从美橙互联虚拟主机上拷出来的apache 主配置文件/etc/httpd/conf/httpd.conf

#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See for detailed information.
# In particular, see
#
# for a discussion of each configuration directive.
#
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
# 2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/etc/httpd" will be interpreted by the
# server as "/etc/httpd/logs/foo.log".
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# Don't give away too much information about all the subcomponents
# we are running. Comment out this line if you don't mind remote sites
# finding out what major optional modules you are running
ServerTokens OS

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE! If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation
# (available at );
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/etc/httpd"

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
PidFile run/httpd.pid

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 120

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive Off

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so

#
# The following modules are not loaded by default:
#
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule asis_module modules/mod_asis.so

#
# Load config files from the config directory "/etc/httpd/conf.d".
#
Include conf.d/*.conf

#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
#ExtendedStatus On

#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
# . On HPUX you may not be able to use shared memory as nobody, and the
# suggested workaround is to create a user www and use that user.
# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
# when the value of (unsigned)Group is above 60000;
# don't use Group #-1 on these systems!
#
User apache
Group apache

### Section 2: 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# definition. These values also provide defaults for
# any containers you may define later in the file.
#
# All of these directives may appear inside containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com
#
ServerAdmin root@localhost

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
#ServerName www.example.com:80

#
# UseCanonicalName: Determines how Apache constructs self-referencing
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client. When set "On", Apache will use the value of the
# ServerName directive.
#
UseCanonicalName Off

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#

Options FollowSymLinks
AllowOverride None

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid. This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
#

#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
UserDir disable

#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disable" line above, and uncomment
# the following line instead:
#
#UserDir public_html

#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
#
# AllowOverride FileInfo AuthConfig Limit
# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
# # Order allow,deny
# Allow from all
# # # Order deny,allow
# Deny from all
# #

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.html index.html.var

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#

Order allow,deny
Deny from all

#
# TypesConfig describes where the mime.types file (or equivalent) is
# to be found.
#
TypesConfig /etc/mime.types

#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#

# MIMEMagicFile /usr/share/magic.mime
MIMEMagicFile conf/magic

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

#
# EnableMMAP: Control whether memory-mapping is used to deliver
# files (assuming that the underlying OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems. On some systems, turning it off (regardless of
# filesystem) can improve performance; for details, please see
# http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap
#
#EnableMMAP off

#
# EnableSendfile: Control whether the sendfile kernel support is
# used to deliver files (assuming that the OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile
#
#EnableSendfile off

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a
# container, that host's errors will be logged there and not here.
#
ErrorLog logs/error_log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this
# requires the mod_logio module to be loaded.
#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio

#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a
# container, they will be logged here. Contrariwise, if you *do*
# define per- access logfiles, transactions will be
# logged therein and *not* in this file.
#
#CustomLog logs/access_log common

#
# If you would like to have separate agent and referer logfiles, uncomment
# the following directives.
#
#CustomLog logs/referer_log referer
#CustomLog logs/agent_log agent

#
# For a single logfile with access, agent, and referer information
# (Combined Logfile Format), use the following directive:
#
CustomLog logs/access_log combined

#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory
# listings, mod_status and mod_info output etc., but not CGI generated
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of: On | Off | EMail
#
ServerSignature On

#
# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL. So "/icons" isn't aliased in this
# example, only "/icons/". If the fakename is slash-terminated, then the
# realname must also be slash terminated, and if the fakename omits the
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory listings. If you
# do not use FancyIndexing, you may comment this out.
#
Alias /icons/ "/var/www/icons/"
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all

#
# WebDAV module configuration section.
#

# Location of the WebDAV lock database.
DAVLockDB /var/lib/dav/lockdb

#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#

AllowOverride None
Options None
Order allow,deny
Allow from all

#
# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Example:
# Redirect permanent /foo http://www.example.com/bar

#
# Directives controlling the display of server-generated directory listings.
#

#
# IndexOptions: Controls the appearance of server-generated directory
# listings.
#
IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable

#
# AddIcon* directives tell the server which icon to show for different
# files or filename extensions. These are only displayed for
# FancyIndexed directories.
#
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

#
# DefaultIcon is which icon to show for files which do not have an icon
# explicitly set.
#
DefaultIcon /icons/unknown.gif

#
# AddDescription allows you to place a short description after a file in
# server-generated indexes. These are only displayed for FancyIndexed
# directories.
# Format: AddDescription "description" filename
#
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz

#
# ReadmeName is the name of the README file the server will look for by
# default, and append to directory listings.
#
# HeaderName is the name of a file which should be prepended to
# directory indexes.
ReadmeName README.html
HeaderName HEADER.html

#
# IndexIgnore is a set of filenames which directory indexing should ignore
# and not include in the listing. Shell-style wildcarding is permitted.
#
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

#
# DefaultLanguage and AddLanguage allows you to specify the language of
# a document. You can then use content negotiation to give a browser a
# file in a language the user can understand.
#
# Specify a default language. This means that all data
# going out without a specific language tag (see below) will
# be marked with this one. You probably do NOT want to set
# this unless you are sure it is correct for all cases.
#
# * It is generally better to not mark a page as
# * being a certain language than marking it with the wrong
# * language!
#
# DefaultLanguage nl
#
# Note 1: The suffix does not have to be the same as the language
# keyword --- those with documents in Polish (whose net-standard
# language code is pl) may wish to use "AddLanguage pl .po" to
# avoid the ambiguity with the common suffix for perl scripts.
#
# Note 2: The example entries below illustrate that in some cases
# the two character 'Language' abbreviation is not identical to
# the two character 'Country' code for its country,
# E.g. 'Danmark/dk' versus 'Danish/da'.
#
# Note 3: In the case of 'ltz' we violate the RFC by using a three char
# specifier. There is 'work in progress' to fix this and get
# the reference data for rfc1766 cleaned up.
#
# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
# Norwegian (no) - Polish (pl) - Portugese (pt)
# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
#
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw

#
# LanguagePriority allows you to give precedence to some languages
# in case of a tie during content negotiation.
#
# Just list the languages in decreasing order of preference. We have
# more or less alphabetized them here. You probably want to change this.
#
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW

#
# ForceLanguagePriority allows you to serve a result page rather than
# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
# [in case no accepted languages matched the available variants]
#
ForceLanguagePriority Prefer Fallback

#
# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default. To use the
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
#
AddDefaultCharset Off

#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#
#AddType application/x-tar .tgz

#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
# Despite the name similarity, the following Add* directives have nothing
# to do with the FancyIndexing customization directives above.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz

# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi

#
# For files that include their own HTTP headers:
#
#AddHandler send-as-is asis

#
# For type maps (negotiated resources):
# (This is enabled by default to allow the Apache "It Worked" page
# to be distributed in multiple languages.)
#
AddHandler type-map var

#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

#
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# Putting this all together, we can internationalize error responses.
#
# We use Alias to redirect any /error/HTTP_.html.var response to
# our collection of by-error message multi-language collections. We use
# includes to substitute the appropriate text.
#
# You can modify the messages' appearance without changing any of the
# default HTTP_.html.var files by adding the line:
#
# Alias /error/include/ "/your/include/path/"
#
# which allows you to create your own set of files by starting with the
# /var/www/error/include/ files and
# copying them to /your/include/path/, even on a per-VirtualHost basis.
#

Alias /error/ "/var/www/error/"

AllowOverride None
Options IncludesNoExec
AddOutputFilter Includes html
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en es de fr
ForceLanguagePriority Prefer Fallback

# ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
# ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
# ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
# ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
# ErrorDocument 410 /error/HTTP_GONE.html.var
# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
# ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
# ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var

#
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.
#
#
# SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from .example.com
#

#
# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".example.com" to match your domain to enable.
#
#
# SetHandler server-info
# Order deny,allow
# Deny from all
# Allow from .example.com
#

#
# Proxy Server directives. Uncomment the following lines to
# enable the proxy server:
#
#
#ProxyRequests On
#
# # Order deny,allow
# Deny from all
# Allow from .example.com
#

#
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
#
#ProxyVia On

#
# To enable a cache of proxied content, uncomment the following lines.
# See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
#
#
# CacheEnable disk /
# CacheRoot "/var/cache/mod_proxy"
#
#

#
# End of proxy directives.

### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
#
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#

DocumentRoot /var/www/html
ServerName localhost

Include vhost.d/*.conf

apache 虚拟主机配置文件/etc/httpd/vhost.d/web_user_foobar.ini

<VirtualHost *:80>
SuexecUserGroup web_user_foobar web_user_foobar
DocumentRoot /var/www/virtual/web_user_foobar/home/wwwroot
ServerName web_user_foobar.w69-e0.ezwebtest.com
ServerAlias www.web_user_foobar.com web_user_foobar.com
DirectoryIndex index.html default.htm default.html index.htm default.asp index.asp index.php
ScriptAlias /php5-cgi /var/www/virtual/web_user_foobar/bin/php-cgi
<Directory /var/www/virtual/web_user_foobar/home/wwwroot>
AddHandler php5-cgi .php
Action php5-cgi /php5-cgi
AllowOverride All
Options -Indexes -ExecCGI Includes IncludesNOEXEC FollowSymLinks
Allow from all
</Directory>

ScriptAlias /cgi-bin/ /var/www/virtual/web_user_foobar/home/cgi-bin/
<Directory /var/www/virtual/web_user_foobar/home/cgi-bin/>
Options -Indexes ExecCGI
AllowOverride AuthConfig FileInfo
Allow from all
</Directory>

Alias /error /var/www/virtual/web_user_foobar/home/error
<Directory /var/www/virtual/web_user_foobar/home/error>
AllowOverride None
Options None
Allow from all
</Directory>
ErrorDocument 404 /error/404.html
ErrorDocument 403 /error/403.html
ErrorDocument 500 /error/500.html

CustomLog "|/usr/sbin/rotatelogs -l /var/www/virtual/web_user_foobar/home/logs/web_user_foobar-access_log.%Y.%m.%d 86400" common
ErrorLog "|/usr/sbin/rotatelogs -l /var/www/virtual/web_user_foobar/home/logs/web_user_foobar-error_log.%Y.%m.%d 86400"

CBandScoreboard /var/www/virtual/web_user_foobar/home/logs/bandscore
CBandExceededURL http://info.idccenter.net/err/exceeded.html
CBandLimit 10240Mi
CBandPeriod 30D
CBandSpeed 0 0 0
<Location /cband-stat>
SetHandler cband-status-me
</Location>
</VirtualHost>

悲剧,狗爹虚拟主机的ssh禁用转发了

悲剧了

悲剧,狗爹虚拟主机的ssh -d禁用转发了,快十一了,网络质量非常不好,博客后台半天都没有打开完成,就在标题里写内容了。

文章发布出去,页面终于可以打开完成了,补几句。

突然发现ssh不能翻墙了,查看进程是正常的,杀死自动重新运行,修改配置重启手动运行,照样没用,网查看错误消息

channel 1: open failed: administratively prohibited: open failed
channel 2: open failed: administratively prohibited: open failed

有中文资料,有几个原因,其中一个是最不愿意看到的原因,服务器端禁止转发了,然而经过加-v参数,看详细消息,越来越像这个原因,ssh登录到服务器上查看sshd相关的几个参数,

-bash-3.2$ less /etc/sysctl.conf |grep ip_for
net.ipv4.ip_forward = 0

果然操作系统级禁用转发

-bash-3.2$ cat /etc/ssh/sshd_config

文件最后一行

AllowTcpForwarding no
看来似乎是管理员刚加的这个参数。不过uptime显示系统启动17天了,难道这个设置还是修改后不重启就生效的?sshd的可以修改后重启服务立刻生效,但sysctl.conf级的呢?或许是管理员只是修改了这个设置,并没有重启机器。

最不愿意看到原因。

看来要买个vps,或者买个专门用于ssh转发的账号

firefox6.x上使用google工具栏

firefox6正式版已经发布,插件一般总是要滞后几天;不过这次,google工具栏比较悲剧,官方不支持firefox6了,很可恶。

以前修改插件里的文件而在插件升级版发布前、在新版本firefox里使用,对google工具栏如法炮制,果然还是有效的。

方法如下:

修改文件

/home/[user-main-folder]/.mozilla/firefox/lxyp34or.default/extensions/{3112ca9c-de6d-4884-a869-9855de68056c}/install.rdf

windows下,应该在X:\Documents and Settings\[user-main-folder]\Application Data\Mozilla\Firefox\Profiles\esx4b5b6.default\extensions\xxxx\install.rdf

第17行,把        <em:maxVersion>4.0.*</em:maxVersion>

改成

<em:maxVersion>7.0.*</em:maxVersion>

即可。才发现使用firefox 5时就修改过这个值了,不过当时改成了5,这次改成7,下次fx升级就不用改了。

linux下ssh -D 转发脚本/ssh断线后自动重连

ssh转发ssh -D的作用就不说了,相信看到这篇文章的童鞋们应该都......[此处略去N个字]。

有不少ssh服务器会定期踢除不活动的连接,尤其像我这样使用 "ssh -D " + autoproxy,通常访问的网站都是没有被有被墙的,于是ssh长时间不活动,于是被服务器踢了。写一个简单脚本,解决这一问题。

前提:

有ssh服务器账号密码,并设置好免密码登录ssh.

思路:

写脚定期查看ssh进程是否已经退出,如果退出则重新连接ssh。

设置一个命令别名alias,以一个简单的别名运行这一脚本。

实施:

在~/.bashrc 追加一行

alias fkgxx='sh ~/script/fkgxx &'

以下代码保存为 ~/script/fkgxx

#!/bin/bash

while [ '' == '' ]
do
	ssh_d_process_num=`ps aux|grep -E 'ssh \-' |grep -v grep |wc -l`
	#echo 'ssh_d_process_num:'$ssh_d_process_num
	if [ "$ssh_d_process_num" == "0" ]; then
	#	echo 'ssh -d terminaled'
		/usr/bin/ssh -D :7070 -N fengyqf@path8.net &
	#else
	#	echo 'ssh -d running'
	fi

	sleep 5
done

用法:

开启命令行终端,执行fkgxx,即可;当然设置成登录后自动运行也可以。

不足:

简单的根据进程判断ssh转发进程状态,这并不完善,因为有时该进程可能成为僵死进程,最好再加个检查7070端口是否在正常监听。

PS:

还可以使用autossh实现自动连接功能,可能这是个更好的方案;这里只是个另一个选择,另一个折腾的方法,追求自由精神的选择。

4G内存启用PAE后 windows 2003 没有休眠功能

电脑加了条2G内存,现在4G了,使用的是windows2003操作系统(32位),所有4G内存甚至更大都可以完美支持,但发现没有休眠功能了,电源选项里休眠选项卡都没有了。原以为是某个服务,或什么出了故障,无法休眠,重启过就可以了;之前见过这个问题。但重启后还是不行。上网查原因,发现可以通过powercfg /a查休眠支持,运行后得到如下面内容

Microsoft Windows [版本 5.2.3790]
(C) 版权所有 1985-2003 Microsoft Corp.

C:\Documents and Settings\Administrator>powercfg /a
此系统上有以下休眠状态: Standby ( S3 )
此系统上没有以下休眠状态:
Standby (S1)
 系统固件不支持此待机状态。
Standby (S2)
 系统固件不支持此待机状态。
Hibernate
 系统正在以 PAE 模式运行,在 PAE 模式不允许休眠。

C:\Documents and Settings\Administrator>

系统正在以 PAE 模式运行,在 PAE 模式不允许休眠。

杯具了,看来只能每次关机了!

上面所说是查到这是这篇文章,google俄罗斯版的,问答系统,居然还是与天涯问答有关。

http://otvety.google.ru/otvety/thread?tid=2713a36a45a8eea9

dxsvcd@天涯社区 26.12.2009 17:19:50 Сообщить о нарушении

解决方案

使用命令行方式,通过以下的步骤来查看计算机支是否支持休眠功能。

1、单击“开始”,在“附件”中找到“命令提示符”,右键单击“命令提示符”

2、在命令提示符处,输入cmd,然后键入powercfg /a

如果计算机可以支持休眠功能,那怎样才能启用呢?

可以使用 PowerCfg 命令行工具来启用休眠功能。为此,可以按照下列步骤操作:

1、 单击“开始”,在“附件”中找到“命令提示符”,单击“命令提示符”;

2、在命令提示符处,键入 powercfg /hibernate on。 即可重新启用休眠功能了。

windows6.x(win7,vista)下系统引导程序Bootmgr可视化修改工具BcdTool.exe/启动菜单

windows6.x (windows vista/windows7)下系统引导菜单程序Bootmgr可视化修改工具BcdTool.exe .win7启动时引导菜单编辑器,也称bcd编辑器

点此下载 BcdTool.exe

因为程序用到VirtualAllocEx API 函数,有些杀毒软件会误报为病毒或恶意程序等,但请放心使用

【BcdTool 1.0912 测试版】部署PE1.x 到Vista启动项的工具,10-03-06更新

感谢http://bbs.wuyou.com/viewthread.php?tid=146397提供

 

Pages: 1 2 3 4 5 Next