源码安装 mysql 5.5.4-m3 

mysql刚刚发布了5.5 分支的第四个里程碑版本,于是下载安装.
前几天只有 x86_64 for linux 版本,今天已经放出了了i686版本.

我的configure:

It was created by MySQL Server configure.am 5.5.4-m3, which was
generated by GNU Autoconf 2.63. Invocation command line was

$ ./configure.am --prefix=/usr/local/mysql --bindir=/usr/local/bin --sbindir=/usr/local/sbin --sysconfdir=/etc/sysconfig --enable-profiling --with-charset=utf8 --with-extra-charsets=all --with-system-type=PowerOS --with-machine-type=PowerPC --with-mysqld-user=mysql --with-zlib-dir=bundled --with-low-memory --with-big-tables --with-ssl --with-embedded-server --with-embedded-privilege-control

检查依赖通过,但是在生成安装文件的时候,有了一行错误.
/bin/rm: cannot remove `libtoolT’: No such file or directory

查了一下,不影响安装.不过要再次生成conf 文件.

后来在源码包下INSTALL-SOURCE里面发现了源码编译前的准备步骤,可以避免这个错误.

2. Prepare the source tree for configuration:
shell> autoreconf --force --install
#发现autoconf 工具没装.
As an alternative to the preceding autoreconf command,
you can use BUILD/autorun.sh, which acts as a shortcut
for the following sequence of commands:
shell> aclocal; autoheader
shell> libtoolize --automake --force
#发现libtool 工具没装.
shell> automake --force --add-missing; autoconf
#发现automake 工具没装.

If you get some strange errors during this stage, verify
that you have the correct version of libtool installed.
删除源码文件夹,重新解压了下。
按照提示的步骤,走下去

检查依赖的时候,libtoolT 的错误的确没有了

不过,make 的时候居然报错了……囧rz

报zilb找不到,我日啊,我设置的zlib是mysql集成的,居然问我要zlib 库....

这个问题一时还找不到解决方案.

所幸libtoolT那个错误不影响安装使用,先忽略.以后再议.

接下来:
shell> groupadd mysql
shell> useradd -g mysql mysql
创建mysql 用户 组
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 --user=mysql
安装初始数据.
shell> chown -R root .
shell> chown -R mysql var
shell> mysqld_safe --user=mysql &
成功启动mysql.
[ ] ( 1598 次浏览 ) 永久链接 ( 3.1 / 2183 )
编译安装 lighttpd 1.4.26 通过 

最近买的VPS刚到手,便忙活起来了

由于apache 2.3.5 alpha 与 php module 的不兼容,打算以Cherokee (上次试过,速度很快)作为web server.

于是乎,卸掉自带的apache 2.2,开始安装.

不过我这个人喜欢在一边看configure 参数,一边编译。由于VPS上没有预装ftp server.
所以便临时搭建了个服务器作为数据传输.

本想用nginx,想到从没试过lighttpd,就用它了.

下载源码,wget http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-1.4.26.tar.bz2

解压,进入目录

我的configure:

It was created by lighttpd configure 1.4.26, which was
generated by GNU Autoconf 2.65. Invocation command line was

$ ./configure --prefix=/usr/local/lighttpd --with-ldap --with-attr --with-openssl --with-zlib --with-bzip2 --with-fam --with-memcache

检查依赖,一秒钟报错.GCC no found……

新系统,真的很新

yum install gcc

再次检查依赖,pcre 没有,zlib没有,bzip没有,pkg-config没有

晕,依次安装.

最后检查,又报错~
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables FAM_CFLAGS
and FAM_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

fam 没有

yum install gamin
yum install fam-devel

这次OK了.

make && make install.安装成功

复制 源码包下doc下的lighttpd.conf到etc下.

稍加编辑后
/usr/local/lighttpd/sbin/lighttpd -t -f /etc/lighttpd.conf
测试一下
/usr/local/lighttpd/sbin/lighttpd -f /etc/lighttpd.conf
启动即可.
[ ] ( 1567 次浏览 ) 永久链接 ( 3 / 2209 )
分享之 Discuz! 的 RewriteRule for Cherokee 

把论坛架在Cherokee上,地址伪静态用的还是apache的,一点一个404……囧rz

现把我设好的重写规则,张贴如下(当然,你也可以自己到控制台设置,也不难)

适用于 一个documentRoot 为 /data/www/web/bbs 的discuz! 7.2 论坛:

vserver!30!document_root = /data/www/web/bbs
vserver!30!error_writer!filename = /usr/local/cherokee/var/log/cherokee.error
vserver!30!error_writer!type = file
vserver!30!keepalive = 1
vserver!30!logger = combined
vserver!30!logger!access!filename = /usr/local/cherokee/var/log/cherokee.access
vserver!30!logger!access!type = file
vserver!30!logger!x_real_ip_access_all = 0
vserver!30!logger!x_real_ip_enabled = 0
vserver!30!match = wildcard
vserver!30!match!domain!1 = bbs.xiazhengxin.*
vserver!30!nick = BBS
vserver!30!rule!1000!handler = redir
vserver!30!rule!1000!handler!rewrite!1!regex = ^/tag-(.+)\.html$
vserver!30!rule!1000!handler!rewrite!1!show = 0
vserver!30!rule!1000!handler!rewrite!1!substring = /tag.php?name=$1
vserver!30!rule!1000!match = request
vserver!30!rule!1000!match!request = ^/tag-(.+)\.html$
vserver!30!rule!1000!no_log = 0
vserver!30!rule!1000!only_secure = 0
vserver!30!rule!900!handler = redir
vserver!30!rule!900!handler!rewrite!1!regex = ^/space-(username|uid)-(.+)\.html$
vserver!30!rule!900!handler!rewrite!1!show = 0
vserver!30!rule!900!handler!rewrite!1!substring = /space.php?$1=$2
vserver!30!rule!900!match = request
vserver!30!rule!900!match!request = ^/space-(username|uid)-(.+)\.html$
vserver!30!rule!900!no_log = 0
vserver!30!rule!900!only_secure = 0
vserver!30!rule!800!handler = redir
vserver!30!rule!800!handler!rewrite!1!regex = ^/archiver/((fid|tid)-[\w\-]+\.html)$
vserver!30!rule!800!handler!rewrite!1!show = 0
vserver!30!rule!800!handler!rewrite!1!substring = /archiver/index.php?$1
vserver!30!rule!800!match = request
vserver!30!rule!800!match!request = ^/archiver/((fid|tid)-[\w\-]+\.html)$
vserver!30!rule!800!no_log = 0
vserver!30!rule!800!only_secure = 0
vserver!30!rule!700!handler = redir
vserver!30!rule!700!handler!rewrite!1!regex = ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$
vserver!30!rule!700!handler!rewrite!1!show = 0
vserver!30!rule!700!handler!rewrite!1!substring = /viewthread.php?tid=$1&extra=page\=$3&page=$2
vserver!30!rule!700!match = request
vserver!30!rule!700!match!request = ^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$
vserver!30!rule!700!no_log = 0
vserver!30!rule!700!only_secure = 0
vserver!30!rule!600!handler = redir
vserver!30!rule!600!handler!rewrite!1!regex = ^/forum-([0-9]+)-([0-9]+)\.html$
vserver!30!rule!600!handler!rewrite!1!show = 0
vserver!30!rule!600!handler!rewrite!1!substring = /forumdisplay.php?fid=$1&page=$2
vserver!30!rule!600!match = request
vserver!30!rule!600!match!request = ^/forum-([0-9]+)-([0-9]+)\.html$
vserver!30!rule!600!no_log = 0
vserver!30!rule!600!only_secure = 0
vserver!30!rule!500!disabled = 0
vserver!30!rule!500!encoder!gzip = 1
vserver!30!rule!500!handler = fcgi
vserver!30!rule!500!handler!balancer = round_robin
vserver!30!rule!500!handler!balancer!source!1 = 1
vserver!30!rule!500!handler!error_handler = 1
vserver!30!rule!500!match = extensions
vserver!30!rule!500!match!extensions = php
vserver!30!rule!500!match!final = 1
vserver!30!rule!500!timeout = 30
vserver!30!rule!400!disabled = 0

_____________

把代码粘贴入cherokee.conf 相对位置即可.
[ ] ( 2036 次浏览 ) 永久链接 ( 3 / 2244 )
编译安装 php 5.3.2 和 fastcgi 2.4.1-SNAP-0910052249 通过 

有了空闲的免费VPS,于是就寻思把我那下线已久的“小鑫论坛”重新上线……
顺便把我昨天安装的Cherokee变成支持cgi的服务器,于是就行动了
本来是想下载5.2.13的,因为我的小鑫论坛是架在Discuz!上的,而php 5.3.1 不兼容 Discuz! 7.x.
ps:就这点,本人也曾向Discuz!开发组反应过,地址:http://code.google.com/p/discuzdeveloper/issues/detail?id=1.
可是听说网友用php 5.3.x 测试一切正常了现在。
于是便下载了最新的 php 5.3.2版
http://cn.php.net/distributions/php-5.3.2.tar.bz2

以及fastcgi最新的Snap版:
http://www.fastcgi.com/dist/fcgi-2.4.1-SNAP-0910052249.tar.gz
之所以选择fastcgi,是因为它官方网站上说支持Cherokee,
见:http://www.fastcgi.com/drupal/node/3

我的configure:
fastcgi:
$ ./configure --prefix=/usr/local/fcgi --bindir=/usr/local/bin --sbindir=/usr/local/sbin

make && make install.一切OK

下面是php的;
# ./configure --prefix=/usr/local/php --bindir=/usr/local/bin --sbindir=/usr/local/sbin --enable-safe-mode --with-zlib --with-bz2 --with-curl --enable-exif --enable-ftp --with-gd --with-mhash --enable-mbstring --with-mcrypt --with-mysql --with-mysql-sock --enable-embedded-mysqli --with-pdo-mysql=/usr/local/mysql --enable-sockets --with-xmlrpc --enable-zip

看遍了帮助文档,居然没有找到任何与fastcgi搭边的参数,囧rz...

直接用php-cgi吧

编译报错,提示缺少libmcrypt 库.
本想直接 yum install libmcrypt,可是火山互联居然不让连外网~~
只好下载源码再通过ftp上传到VPS。。。

解压,定位到目录.直接 ./configure && make && make install

再次检查依赖,通过.

然后 make && make install. 等了好久,安装成功.别忘了配置文件 php.ini.

最后,cherokee-admin -b -p 80 -u ,登录服务器控制台。
在虚拟目录的扩展里面添加语言php,启用,保存即可.

启动Cherokee,phpinfo()已经可以正常识别与显示.
[ ] ( 1972 次浏览 ) 永久链接 ( 2.9 / 2316 )
编译安装 Cherokee web server 0.99.44b 通过 

最近拿火山互联的免费VPS搞着玩,卸掉了自带的apache,想尝试下号称速度最快的Cherokee web server,反正也闲来无事.
对它是耳闻已久了,就是一直没有时间,关键是没有空闲的机器去尝试尝试。呵呵

下载最新版本;http://ftp.saix.net/Cherokee/LATEST_is_0.99.43/cherokee-0.99.43.tar.gz

解压,简单了看了下README 和 INSTALL.给我感觉,不像apache 那样冗长,动不动就几百上千行。
看得眼花。这个很快就到达bottom了。。

cherokee 给的参数很少,所以编译安装起来很方便.

我的configure:
It was created by cherokee configure '0.99.44', which was
generated by GNU Autoconf 2.65. Invocation command line was

$ ./configure --prefix=/usr/local/cherokee --bindir=/usr/local/bin --sbindir=/usr/local/sbin --enable-beta --enable-os-string=PowerPC --enable-trace --enable-internal-pcre --enable-static-module=ALL --with-wwwroot=/home/www/web --with-wwwuser=vhost --with-wwwgroup=vhost

一切顺利.
完了后给出结果列表:
============================
Install prefix /usr/local/cherokee
CFLAGS -g -O2
trace yes
backtracing no
sendfile() yes
IPv6 support yes
Polling method 1 epoll
Polling method 2 poll
Polling method 3 select
Threading support yes
OpenSSL support yes
PCRE library built-in
Compatible PAM yes
LDAP yes
MySQL yes
GeoIP no
FFMpeg no
crypt support multithread
Beta release

Installation dir /usr/local/bin

最后, make && make install.

安装完成.

cherokee 最大的好处就是不用编辑配置文件,而是通过一个可视化的控制台去操作。很是方便.

由于火山互联不支持80、21外其他端口,且登录验证总是出错.

故运行 cherokee-admin -b -p 80 -u ,直接 "http://域名" 无密码访问.(不太安全)
设置好虚拟主机,保存即可.

退出cherokee-admin程序,这样就算配置好了,方便呀

由于,火山互联VPS默认的php没有编译支持cgi,所以…… 杯具呀
改天再弄吧

输入 cherokee -d 运行服务器。
[ ] ( 1935 次浏览 ) 永久链接 ( 3 / 2578 )

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