安装php:
2 安装ubuntu,注意在安装过程中不能按 ctrl+alt+. ,这样会导致安装过程中止
+--------------------------------------------------------------------+
6.Linux Nginx编译安装PHP(FastCGI模式)
说明 curses/termcap 库没有安装
如果出现了以下错误:
……
checking for tgetent in -ltermcap… no
checking for termcap functions library… configure: error: No curses/termcap library found
see the file debug.log for error messages.
gzip -cd php-5.2.10-fpm-0.5.11.diff.gz patch -d php-5.2.10 -p1
tar zxvf libiconv-1.13.tar.gz
cd libiconv-1.13/
./configure --prefix=/usr/local
make
make install
cdmysql-5.1.38.tar.gz
checking for cURL in default path... not found
cd mhash-0.9.9.9/
./configure
make
make install
2.安装openssl及其库:apt-get install openssl libssl-dev
php-install@lists.php.net mailing list and include appropiate
If you do not agree with the terms of this license, you must abort
apt-get install libcurl4-gnutls-dev
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
information about your setup.
#tar zxvf pcre-7.9.tar.gz
#cd pcre-7.9/
#./configure
#make && make install
1.安装gcc: sudo apt-get install build-essential
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8/
/sbin/ldconfig
./configure
make
make install
apt-get install curl
安装 libncurses5-dev
#make install
This is often caused by incorrect configuration parameters. Please
首先添加mysql用户组和用户
License:
然后
./configure --prefix=/usr/local/mysql/ --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-big-tables --with-readline --with-ssl --with-embedded-server --enable-local-infile --with-plugins=innobase
方法为编辑/etc/profile文件,添加:export LD_LIBRARY_PATH=/usr/local/mysql/lib/mysql
apt-get install libpcre3-dev
3.安装mhash
script was not able to detect a simple feature on your platform.
Something is likely to be messed up here, because the configure
4 默认情况下未户用root账号,为了启用root 帐号(也就是设置一个口令)使用:
sudo passwd root
当你使用完毕后屏蔽root帐号使用:
sudo passwd -l root
这个将锁住root帐号
#./configure --with-http_stub_status_module --prefix=/usr/local/webserver/nginx
ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la
ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so
ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4
ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8
ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a
ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la
ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so
ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2
ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
到php安装程序破天一剑sf去查看debug.log
然后安装扩展库
#make
其它:
Thank you for using PHP.
增加LD_LIBRARY_PATH=/usr/local/mysql/lib/mysql到环境变量
如果启动nginx时,提示:error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
解决方法,在/lib中创建一个symbol link到/usr/local/lib/libpcre.so.0
sudo ln -s /usr/local/lib/libpcre.so.0 /lib
5.启动nginx
# cd nginx
重新登录用户生效
2.安装libmcrypt
distribution in the file LICENSE. By continuing this installation
如果出现下面的错误提示
如果只有ssh-agent那ssh-server还没有启动,需要/etc/init.d/ssh start,如果看到sshd那说明ssh-server已经启动了。
This software is subject to the PHP License, available in this
然后确认sshserver是否启动了:
process, you are bound by the terms of this license agreement.
5.安装使PHP支持MySQL的扩展库
#tar zxvf nginx.tar.gz
这四个步骤完成之后,可以进行下面的软件安装
运行/usr/local/webserver/nginx/sbin/nginx
3 安装完ubuntu之后,为了远程管理,运行 sudo apt-get install openssh-server 来启用ssh服务器端
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/
./configure
make
make install
/sbin/ldconfig
cd libltdl/
./configure --enable-ltdl-install
make
make install
4.安装nginx:
tarzxvfphp-5.2.10.tar.gz
If you are unable to fix this, send the file debug.log to the
tar zxvf mysql-5.1.38.tar.gz
ps -e grep ssh
方法2)
1.安装libiconv
tar zxvf mhash-0.9.9.9.tar.gz
apt-get install libncurses5-dev
make
make install
chmod +w /usr/local/mysql
chown -R mysql:mysql /usr/local/mysql
configure: error: Please reinstall the libcurl distribution -easy.h should be in <curl-dir>/include/curl/
cdphp-5.2.10
然后重新运行配置
the installation process at this point.
3.安装PCRE
B ./conftest: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --without-pear
A conftest.c:3: warning: incompatible implicit declaration of built-in function 'exit'
软件构建学问中总有一些理论上很美好,但是一使用就面目全非的东西,比如传统的瀑布模型。敏捷里很多被称之为思想的东西,恰恰没有太高深的理论,但都是一些实践的艺术,强调动手做而不是用理论论证。TDD就是这样一种东西,单纯去研究它的理论,
haosf,分析它的优点和缺点没有任何意义,因为它本身就是一个很单纯的东西,再对其抽象也得不出象“相对论”那样深厚的理论。问题是你做了没有?支持TDD的人有没有从实践中真正体会到了它的优点,对TDD不屑一顾的人是否通过实践验证了自己的看法,而不是简单的人云亦云?
我第一次实践TDD是在做“TMS 配置数据转换工具”时进行的,在那之前其实已经注意TDD的很长时间了,但是一直无从下手,感觉有很多“实际”问题没有头绪,比如“测试用例的粒度怎么确定?”,“是否是一个测试用例对应一个测试函数?”,“函数还不存在怎么调用,怎么传递参数?”等等。在做的时候才发现,其实所谓的“实际”问题只有在做的过程中才变得真实(也就是真正的实际问题),
传奇私服发布网,真实的问题通过努力就可以解决,如果不去实践,只能是越想越困惑。
通过几次“摸着石头过河”般的尝试(有成功的,也有失败的),我对TDD的认识开始从感性向理性转变,开始有了实质性的感觉,对于原来想象中的一些问题也积累了一些解决方案。我开始飘飘然,觉得TDD不过如此,so easy!直到后来有机会和邓辉一起用TDD对系统中一个模块重构时,我才发现我对某些方面的错误认识导致了一些错误的方法。通过两天的结对编程,以前实践中的一些错误做法,这一次都被邓辉纠正了。比如我以前喜欢先写一个空函数,定义好参数类型等信息,然后回过头来再写测试用例,我之所以这样做的原因是希望代码在TDD的过程中随时可以得到一个可编译通过的结果,但是邓辉认为在写那个空函数的时候就会不由自主地产生一些关于实现这个函数的想法,这些想法就会对编写测试用例产生影响,会约束编写测试用例时的思维空间,所以应该抑制住写代码的冲动,坚持先写测试用例。再比如,我以前针对某个函数写测试用例的方法是一次写完这个函数的全部测试用例,
传奇1.76精品,然后再去完成代码,直到代码满足所有针对这个函数的测试用例。邓辉认为要写一个测试用例,写一点代码满足这个测试用例,然后再写一个测试用例,再写一点代码满足这个测试用例,循序渐进。为什么要这样繁琐呢?因为这样做实际上缩短了反馈时间,实现代码时发现有问题就可以及时重构,对已经完成的测试用例影响比较小,等所有的测试用例都完成后再实现代码,这个反馈周期就太长了,一旦需要重构就会影响到所有的测试用例。
总结在软件构建过程中使用TDD的经验,我的体会就是只有通过实践才能真正了解TDD。对着很多理论空想只能使自己迷惘,迷惘的原因是知道自己不知道,却不知道自己不知道什么。只有在实践中遇到问题,才知道自己不知道什么,这是好事,因为对解决问题有了努力的方向。第一次实践TDD可以从简单开始,不一定要用xUnit之类的测试框架,使用简单的assert(断言)函数就行了,也不需要太大的规模,对一个函数TDD就够了。所以,
热血传奇英雄合击,实践TDD,就从你要完成的下一个函数开始吧。
Nginx 安装后只有一个程序文件,本身并不提供各种管理程序,它是使用参数和系统信号机制对 Nginx 进程本身进行控制的。 Nginx 的参数包括有如下几个:
-c <path_to_config>:使用指定的配置文件而不是 conf 传奇世界sf下的 nginx.conf 。
-t:测试配置文件是否正确,在运行时需要重新加载配置的时候,此命令非常重要,土城花屏补丁,用来检测所修改的配置文件是否有语法错误。
-v:显示 nginx 版本号。
-V:显示 nginx 的版本号以及编译环境信息以及编译时的参数。
例如我们要测试某个配置文件是否书写正确,我们可以使用以下命令
sbin/nginx – t – c conf/nginx2.conf
1 安装vmware-workstation
方法1)
如果出现: