编译安装 ProFTPD 1.3.3 通过 

想到为VPS安装一个ftp是必须的,于是便动手了.
因为proftpd没有用过,便想试试.
据说它提供像apache 那样的配置文件格式,很是友好

我的configure:
$ ./configure --prefix=/usr/local/proftpd --bindir=/usr/local/bin --sbindir=/usr/local/sbin --sysconfdir=/etc/sysconfig --enable-autoshadow --enable-nls --enable-openssl --enable-shadow --enable-buffer-size --enable-pool-size --enable-timeout-idle=180 --enable-transfer-buffer-size

检查依赖,缺openssl.故而 yum install openssl-devel

再次检查,通过

make && make install. 一切OK

然后复制源码包下的contrib下的几个几个第三方工具(如 ftpasswd) 到/usr/local/bin 下

再在 sample-configurations 下复制最适合自己的配置文件到 /etc/sysconfig 下,并改名为proftpd.config

因为我是私人的ftp,而且用的人很少,故选择 basic.conf.

接下来配置ftp虚拟用户,发现proftpd支持像vsftpd那样的通过mod_pam 连接mysql 验证用户.

不过,我比较喜欢通过本地文件存储用户信息.

编辑 proftpd.config 文件,加入

AuthUserFile /etc/proftpd.passwd
#定位用户信息存储文件路径
AuthOrder mod_auth_file.c mod_auth_unix.c
#指明验证方式.一定要有,不要像我一样,总是登不进去

use 和 group 可以自己指定.
我用的是系统自带的 ftp:ftp.
uid 14 ,giu 50

这个好了后,可以用第三方工具ftpasswd 添加虚拟用户.

ftpasswd -passwd --name=admin --uid=14 --gid=50 --home=/home --shell=/sbin/nologin --file=/etc/proftpd.passwd

输入两次密码即可,设置成功.

proftpd -t 测试一下配置文件
proftpd 启动ftp

ftp 127.0.0.1,输入用户名密码,登录成功
[ ] ( 2874 次浏览 ) 永久链接 ( 3 / 2409 )
源码安装 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.
[ ] ( 1600 次浏览 ) 永久链接 ( 3.1 / 2185 )
编译安装 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 / 2211 )
分享之 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 / 2246 )
编译安装 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 / 2317 )

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