检查windows与linux系统的安装日期

  1. #xp,windows2003,windows7
  2. 开始,运行,cmd
  3. systeminfo|find "初始安装日期"
  4.  
  5. #Linux
  6. tune2fs -l /dev/hdd1|grep 'Filesystem created'

firefox已经在运行,但是没有响应。如果要打开新窗口,您必须先关闭该firefox进程,或者重新启动您的系统

  1. 创建快捷方式,右键属性,添加-new-window的参数
  2. “目标” E:\Tools\mozilla_firefox\firefox.exe -new-window

Directadmin安装XCache

  1. mkdir -p /usr/local/src/xcache
  2. cd /usr/local/src/xcache
  3. wget http://xcache.lighttpd.net/pub/Releases/2.0.0/xcache-2.0.0.tar.gz
  4. tar zxf xcache-2.0.0.tar.gz 
  5. cd xcache-2.0.0
  6. ./configure --enable-xcache
  7. make && make install
  8.  
  9. /usr/local/lib/php/extensions/no-debug-non-zts-20060613/
  10.  
  11. vim /usr/local/etc/php5/cgi/php.ini
  12.  
  13. ########################################################################
  14. [xcache-common]
  15. ;; install as zend extension (recommended), normally "$extension_dir/xcache.so"
  16. zend_extension = /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so
  17. ; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so
  18. ;; For windows users, replace xcache.so with php_xcache.dll
  19. zend_extension_ts = c:/php/extensions/php_xcache.dll
  20. ;; or install as extension, make sure your extension_dir setting is correct
  21. ; extension = xcache.so
  22. ;; or win32:
  23. ; extension = php_xcache.dll
  24.  
  25. [xcache.admin]
  26. xcache.admin.enable_auth = On
  27. xcache.admin.user = "mOo"
  28. ; xcache.admin.pass = md5($your_password)
  29. xcache.admin.pass = ""
  30.  
  31. [xcache]
  32. ; ini only settings, all the values here is default unless explained
  33.  
  34. ; select low level shm/allocator scheme implemenation
  35. xcache.shm_scheme =        "mmap"
  36. ; to disable: xcache.size=0
  37. ; to enable : xcache.size=64M etc (any size > 0) and your system mmap allows
  38. xcache.size  =               60M
  39. ; set to cpu count (cat /proc/cpuinfo |grep -c processor)
  40. xcache.count =                 1
  41. ; just a hash hints, you can always store count(items) > slots
  42. xcache.slots =                8K
  43. ; ttl of the cache item, 0=forever
  44. xcache.ttl   =                 0
  45. ; interval of gc scanning expired items, 0=no scan, other values is in seconds
  46. xcache.gc_interval =           0
  47.  
  48. ; same as aboves but for variable cache
  49. xcache.var_size  =            4M
  50. xcache.var_count =             1
  51. xcache.var_slots =            8K
  52. ; default ttl
  53. xcache.var_ttl   =             0
  54. xcache.var_maxttl   =          0
  55. xcache.var_gc_interval =     300
  56.  
  57. ; N/A for /dev/zero
  58. xcache.readonly_protection = Off
  59. ; for *nix, xcache.mmap_path is a file path, not directory.
  60. ; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection
  61. ; 2 group of php won't share the same /tmp/xcache
  62. ; for win32, xcache.mmap_path=anonymous map name, not file path
  63. xcache.mmap_path =    "/dev/zero"
  64.  
  65.  
  66. ; leave it blank(disabled) or "/tmp/phpcore/"
  67. ; make sure it's writable by php (open_basedir is not checked)
  68. xcache.coredump_directory =   ""
  69.  
  70. ; per request settings
  71. xcache.cacher =               On
  72. xcache.stat   =               On
  73. xcache.optimizer =           Off
  74.  
  75. xcache.test =                Off
  76. xcache.experimental =        Off
  77.  
  78. [xcache.coverager]
  79. ; per request settings
  80. ; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean() functions (will hurt
  81.  executing performance)
  82. xcache.coverager =          Off
  83.  
  84. ; ini only settings
  85. ; make sure it's readable (open_basedir is checked) by coverage viewer script
  86. ; requires xcache.coverager=On
  87. xcache.coveragedump_directory = ""
  88.  
  89. ########################################################################
  90.  
  91. 如果php -v提示找不到xcache.so 要进php.ini改成正确的xcache.so的路径
  92. [root@baiqiuyi ~]# php -v
  93. Failed loading /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so: /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so: cannot open shared object file: No such file or directory
  94. PHP 5.2.17 (cli) (built: Jun 28 2012 00:15:29) 
  95. Copyright (c) 1997-2010 The PHP Group
  96. Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
  97.     with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube Ltd., and
  98.     with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies
  99.  
  100. [root@baiqiuyi ~]# php -v
  101. PHP 5.2.17 (cli) (built: Jun 28 2012 00:15:29) 
  102. Copyright (c) 1997-2010 The PHP Group
  103. Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
  104.     with XCache v2.0.0, Copyright (c) 2005-2012, by mOo
  105.     with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube Ltd., and
  106.     with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

Directadmin安装eAccelerator

  1. mkdir -p /usr/local/src/eAccelerator
  2. cd /usr/local/src/eAccelerator
  3. wget http://dpvps.googlecode.com/files/eaccelerator-0.9.6.tar.bz2
  4. tar jxvf eaccelerator-0.9.6.tar.bz2
  5. cd eaccelerator-0.9.6/
  6. php -i|grep php.ini #查看php.ini路径
  7.  
  8. [root@baiqiuyi eaccelerator-0.9.6]# php -v
  9. PHP 5.2.17 (cli) (built: Jun 28 2012 00:15:29) 
  10. Copyright (c) 1997-2010 The PHP Group
  11. Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
  12.     with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube Ltd., and
  13.     with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies
  14. [root@p1 eaccelerator-0.9.6]# php -i|grep '/usr/local/etc/php5/cgi/php.ini'
  15. Loaded Configuration File => /usr/local/etc/php5/cgi/php.ini
  16. [root@p1 eaccelerator-0.9.6]# export PHP_PREFIX="/usr/local"
  17. [root@p1 eaccelerator-0.9.6]# $PHP_PREFIX/php5/bin/phpize
  18. Configuring for:
  19. PHP Api Version:         20041225
  20. Zend Module Api No:      20060613
  21. Zend Extension Api No:   220060519
  22.  
  23. yum install autoconf automake -y && ./configure --enable-eaccelerator=shared  --with-php-config=$PHP_PREFIX/php5/bin/php-config
  24.  
  25. [root@baiqiuyi eaccelerator-0.9.6]# echo $?
  26. 0
  27. [root@baiqiuyi eaccelerator-0.9.6]# 如果输出为0
  28. [root@baiqiuyi eaccelerator-0.9.6]# make && make install
  29. [root@baiqiuyi eaccelerator-0.9.6]# vim /usr/local/etc/php5/cgi/php.ini
  30. G,再按O (大写字母O
  31.  
  32. [eaccelerator]
  33. zend_extension="/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so"
  34. eaccelerator.shm_size="32"
  35. eaccelerator.cache_dir="/tmp/eaccelerator"
  36. eaccelerator.enable="1"
  37. eaccelerator.optimizer="1"
  38. eaccelerator.check_mtime="1"
  39. eaccelerator.debug="0"
  40. eaccelerator.filter=""
  41. eaccelerator.shm_max="0"
  42. eaccelerator.shm_ttl="0"
  43. eaccelerator.shm_prune_period="0"
  44. eaccelerator.shm_only="0"
  45. eaccelerator.compress="1"
  46. eaccelerator.compress_level="9"
  47.  
  48. Esc,然后 shift + zz (按住shift键,按两次小写字母z
  49.  
  50. [root@baiqiuyi eaccelerator-0.9.6]# service httpd configtest #测试配置文件
  51. # 输出Syntax OK的话直接
  52. [root@baiqiuyi eaccelerator-0.9.6]# service httpd restart
  53. ###注意:eAccelerator的配置文件一定要放到ZendOptimizer ioncube之类的前面,否则会报错。
1 1