勇哥的博客

勇哥的博客

Everything changes and ends.

勇哥的博客 RSS Feed
 
 
 
 

买车啦~

团购的奇瑞A3,1.6两厢精英车型,今天去把车提回来啦!

虽说拿到本后大半年就没摸过车,今天办完手续直接就开着上路啦,保险都没有生效,真担心刮蹭啥的。刚出来找加油站就被后面车嘀个不停,而且还发现安全带都没有系上。。。加完油后赶紧把实习标拿出来贴上,再上路,嘀声少了不少,啊哈哈

从西南三环,到北三环,然后走八达岭高速辅路,车真多啊!早上7点出门,车开到家正好3点半,估计开了估计有2个小时吧。

现在还在使劲看说明书,嗯

Make ZendOptimizer work with SELinux

以前必须吧SELinux关了才能用ZendOptimizer,昨天研究了一下,终于让ZendOptimizer和SELinux能一起工作了~~

Zend Optimizer 配置如下:
[Zend]
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.3
zend_optimizer.optimization_level=1023
zend_optimizer.enable_loader = 0
zend_optimizer.disable_licensing=1
zend_optimizer.obfuscation_level_support=0
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so

With default install of ZendOptimizer-3.3, SELinux enabled, ZendOptimizer can’t be load.

php -v:

Failed loading /usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so:  /usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so: cannot restore segment prot after reloc: Permission denied
PHP 5.2.6 (cli) (built: May  5 2008 10:32:59)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies

cat /var/log/httpd/error_log
Failed loading /usr/local/Zend/lib/ZendExtensionManager.so:  /usr/local/Zend/lib/ZendExtensionManager.so: failed to map segment from shared object: Access Denied

How to enable ZendOptimizer work with SELinux:

More »

终于用上4G内存了~

新机器是4G内存,但操作系统是XP,32位的,只能识别3.25G内存。昨晚用超级兔子和ramdisk搞了好久都不能用上高位内存,今晚下了SuperSpeed Ramdisk Plus,按上后有个选项,打开使用高位内存,然后建立ramdisk就可以用上高位内存了。

建了一个1G的ramdisk,高位内存768M,不够的部分在windows能识别里面分配,然后把Temp文件夹和IE临时文件都放到ramdisk里面了。用硬盘工具测试了一下,ramdisk的读取速度平均在2.8G/s左右,最高达到了3.6G/s~

Linux 上配置 Nginx + PHP5 FastCGI

Linux 上配置 Nginx + PHP5 FastCGI

Nginx是俄罗斯人编写的十分轻量级的HTTP服务器,以事件驱动的方式编写,所以有非常好的性能,同时也是一个非常高效的反向代理、负载平衡。其拥有匹配Lighttpd的性能,同时还没有Lighttpd的内存泄漏问题,而且Lighttpd的mod_proxy也有一些问题并且很久没有更新。

因此我打算用其替代Apache应用于Linux服务器上。但是Nginx并不支持cgi方式运行,原因是可以减少因此带来的一些程序上的漏洞。那么我们必须使用FastCGI方式来执行PHP程序。

下面是我成功地配置Nginx + PHP5 FastCGI的过程

More »

mysqld第一次启动

提示设置root密码:

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password ‘new-password’
/usr/bin/mysqladmin -u root -h yzou-lin password ‘new-password’
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com