编译安装 PHP 5.2.13 

下载5.2.x 分支最新版本5.2.13,解压

我的configure:

$ ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/sbin/apxs --enable-mod-charset --enable-fastcgi --with-config-file-path=/etc --enable-safe-mode --with-openssl --with-kerberos --with-zlib --with-bz2 --enable-calendar --with-curl --enable-exif --enable-ftp --with-gd --with-ttf --enable-mbstring --with-mcrypt --with-mhash --with-mysql=/usr/local/mysql --enable-embedded-mysqli --enable-sockets --enable-zip

检查依赖没有问题.
缺依赖的话就一个个安装xxx-devel.

进行 make,在编译到zend解释器时就报错了,错误很强大...

virtual memory exhausted: Cannot allocate memory
make: *** [Zend/zend_execute.lo] Error 1

虚拟内存不足,囧rz.. 没有办法,把mysqld,sendmail,httpd等其他进程先全部kill掉,腾出点内存来

再次make,还好,通过了.

不过,好景不长。就在编译行将结束时,再次中断报错...

/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1

是缺少libtool依赖,解决方案:
yum install libtool-ltdl-devel.

make clean && make .这次终于通过了,呵呵

复制源码包下php.ini-dist 到 /etc 下。稍加编辑即可.
libphp5.so 已自动生成到apache 的modules 目录下.
只需启动apache就可以了.

不过,生成的这个模块,好像不支持apache 2.3.5 alpha,不能被load进来.

报错如下:
httpd: Syntax error on line 64 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: undefined symbol: unixd_config

不知道是bug还是什么?

同样的源码,在apache 2.2.15 下生成的libphp5.so,加载成功.

待解...
[ ] ( 4237 次浏览 ) 永久链接 ( 3 / 2541 )
成功编译 apache httpd server 2.3.5 alpha 最终通过 

通过在maillist的学习,看了很多人的编译过程,特别是一篇编译 2.3.4 alpha 的例子,很受启发.
发现原来是expat的问题.

我的configure:

$ ./configure --prefix=/usr/local/apache2 --bindir=/usr/local/bin --sbindir=/usr/local/sbin --enable-v4-mapped --enable-maintainer-mode --enable-file-cache --enable-cache --enable-disk-cache --enable-so --enable-echo --enable-charset-lite --enable-mime-magic --enable-expires --enable-headers --enable-usertrack --enable-session --enable-session-cookie -enable-ssl --enable-http --enable-dav --enable-info --enable-dav-fs --enable-vhost-alias --enable-imagemap --enable-rewrite --with-included-apr

运行报错,configure failed in srclib/expat.
解决方案:yum install expat-devel,即可

再次运行,报错,不过这次是缺依赖.

configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

原来apache httpd 从2.3.x 后不再集成pcre.须自行安装.
下载:
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.01.tar.bz2

解压,configure --prefix=/usr/local/pcre --enable-utf8 --enable-pcregrep-libz
make && make install.

然后回到apache httpd 源码包,加上一条 --with-pcre=/usr/local/pcre。即可顺利通过编译.
[ ] ( 1869 次浏览 ) 永久链接 ( 3.1 / 2504 )
编译安装mysql 5.5.2 M2 通过 

下载最新的mysql 发行版5.5.2 ,目前还是测试阶段。

我的具体步骤:

shell> groupadd mysql
shell> useradd -g mysql mysql

shell> $ ./configure --prefix=/usr/local/mysql --bindir=/usr/local/bin --sbindir=/usr/local/sbin --disable-dependency-tracking --enable-profiling --with-charset=utf8 --with-extra-charsets=all --with-server-suffix --with-unix-socket-path=/var/tmp/mysql.sock --with-mysqld-user=mysql --with-zlib-dir=bundled --with-big-tables --with-embedded-server --with-embedded-privilege-control

shell> make
这里报了错,提示缺少g++ ,囧rz
于是 yum install gcc-c++, make clean,再次make 通过.

shell> make install
再次报错,提示变量已声明。
原来是缺少g++ 检查依赖的后果.
于是重复上面两步.通过

shell> cp support-files/my-medium.cnf /etc/my.cnf (内容酌情编辑)
shell> cd /usr/local/mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> mysql_install_db
shell> chown -R root .
shell> chown -R mysql var
shell> mysqld_safe --user=mysql &
服务启动成功.
[ ] ( 1889 次浏览 ) 永久链接 ( 3 / 2430 )
在Centos下编译安装 apache httpd server 2.2.15 

受朋友所托,帮忙在一台新的VPS上搭建个LAMP.

本来想安装最新的apache 2.3.5 alpha 的,不过在交叉编译 APR 和 APR-util 上没通过.

搞了很久也么没弄明白是怎么回事,谷歌搜索了下,有人说是libtool版本太低,也有说在x64 机器上会导致这个问题,感觉不可能。因为是源码编译的.

已经向apache httpd 的maillist 提出了问题,等人回答了。。

也不能闲着,于是下载了2.2.x 分支的最新2.2.15 先安装下,

我的configure:


It was created by configure, which was
generated by GNU Autoconf 2.63. Invocation command line was

$ ./configure --prefix=/usr/local/apache --enable-v4-mapped --enable-maintainer-mode --enable-file-cache --enable-cache --enable-disk-cache --enable-so --enable-echo --enable-charset-lite --enable-mime-magic --enable-expires --enable-headers --enable-usertrack --enable-session --enable-session-cookie --enable-session-crypto -enable-ssl --enable-http --enable-dav --enable-info --enable-dav-fs --enable-vhost-alias --enable-imagemap --enable-rewrite --with-included-apr

这次很顺利。也佐证了libtool应该是没问题的.

之后就是make & make install.

至于 2.3.5 alpha,只有等高人解答了
[ ] ( 3267 次浏览 ) 永久链接 ( 3 / 2330 )
彻底清除终端输入命令的历史记录 

我想大家应该可能和我一样有这么一个烦恼,就是自己在终端(console)中输入的命令会被无情的纪录下来.

虽然我们可以使用 history -c 命令去短暂的清理掉它们,不过下次打开终端的时候,它们又会无情的出现.虽然这并不是什么大的毛病.不过对于我这个有着"洁癖"的人来讲,我真的是不能忍受.

一次偶然的机会,我在用户目录下发现了 .bash_history 文件,打开一看,原来是它记录我在终端键入的每一个命令.于是解决方案来了


sharljimhtsin@sharl-laptop:~$ cd ~
sharljimhtsin@sharl-laptop:~$ ls --all .bash*
.bash_history .bash_logout .bashrc
sharljimhtsin@sharl-laptop:~$ cat .bash_history
exit
ls
filezilla
firefox
clear
sudo -i
ls
clear
ls
ls -all
clear
sudo aptitude autoclean
sudo aptitude clean
clear
sudo aptitude
clear
ls --all
clear
ls --all .bash*
clear
exit
sharljimhtsin@sharl-laptop:~$


接下来清空该文件,或者直接删除,再新建一个.

然后就清静啦,哈哈
[ ] ( 2037 次浏览 ) 永久链接 ( 3 / 2741 )

<< <上一页 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 下一页> >>