`
haoningabc
  • 浏览: 1476916 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

备份dspam和nginx

阅读更多
dspam似乎没有nginx那样--cc-opt的选项
把configure文件替换-O2变成-O0
vim configure

:%s/-O2/-O0

这样gdb就不会
<value-optimized-out>
http://stackoverflow.com/questions/1345338/gdb-behavior-value-optimized-out

#!/bin/sh

prefix="/opt/kakakak"
username="kaka"

baseDir=$(cd "$(dirname "$0")"; pwd)

/usr/sbin/useradd $username

mkdir $prefix

cd $baseDir/dspam-3.9.1-RC1
./configure --enable-daemon \
--enable-split-configuration \
--enable-syslog \
--enable-virtual-users \
--enable-preferences-extension \
--with-dspam-home=$prefix/dspam \
--with-dspam-home-owner=$username \
--with-dspam-home-group=$username \
--with-dspam-owner=$username \
--with-dspam-group=$username \
--with-storage-driver=hash_drv \
--with-logfile=$prefix/dspam/log/debug.log \
--prefix=$prefix/dspam \
--sysconfdir=/etc/dspam \
--mandir=/usr/share/man \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libdir=/usr/lib \
--includedir=/usr/include \
--enable-verbose-debug
make install

cd $baseDir/nginx-1.0.4
./configure \
--user=$username \
--group=$username \
--with-cc-opt="-g -O0 -DDSPAM_HOME=\\\"$prefix/dspam\\\"" \
--add-module=../nginx_modules/form-input \
--add-module=../nginx_modules/ndk \
--add-module=../nginx_modules/set-misc \
--add-module=../nginx_modules/csf \
--with-debug \
--prefix=$prefix/nginx_10081
make install

cp $baseDir/conf/dspam.conf /etc/dspam/
cp $baseDir/conf/nginx.conf $prefix/nginx_10081/conf/nginx.conf
cp $baseDir/html/* $prefix/nginx_10081/html/
mkdir $prefix/sh
cp $baseDir/sh/* $prefix/sh/
chmod +x $prefix/sh/*.sh

chown $username: $prefix /etc/dspam -R

/sbin/ldconfig

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics