Entries Tagged as 'Solaris'

configure parameter for apache

# for 1.3.x 

./configure \

 –enable-module=so \

 –disable-module=negotiation \

 –disable-module=status \

 –disable-module=autoindex \

 –disable-module=actions \

 –disable-module=userdir \

 –disable-module=cgi \

 –enable-module=expires \

 –enable-module=headers \

 –disable-module=asis \

 –disable-module=imap

 make

 make install

 strip /usr/local/apache/bin/httpd

 

 # for apache2.0.x on linux or sun box

./configure \

–disable-negotiation \

–disable-status \

–disable-autoindex \

–disable-actions \

–disable-userdir \

–disable-cgid \

–enable-expires \

–enable-headers \

–disable-asis \

–disable-imap \

–with-mpm=worker

make

make install

strip /usr/local/apache2/bin/httpd

注意:在linux2.4上,推荐用apache1.3

在linux2.6的机器上,推荐用apache2

unix下怎样删除文件名以”-”开头的文件呢

原文是英文的,在这里

最简单的办法就是

rm ./-filename

(这里"-filename"在当前目录下)

很多命令,尤其是那些使用"getopt(3)"做常规参数解析的

会接受"–"作为参数,而且这意味着“这是最后一个选项”

所以,你的rm的版本也许能够操作"rm — -filename"这种方式

还有一些没有用getopt()的版本的rm认为单个"-"跟上面提到的"–"一样的作用

所以在这种版本的rm,可以用命令"rm - -filename"

Mailing Attachments from UNIX(从UNIX下发带附件的邮件)

Sending email with attachments on UNIX systems(UNIX系统下发带附件的邮件)

以下的例子都使用了下面的这几个变量

TXTFILE=/tmp/textfile

ATTFILE=/tmp/binary_file

SUBJECT="Your attachment"

MAILTO=user@where.ever

一共可以有n种办法

下面列出几种

  1. uuencode
    uuencode $ATTFILE $ATTFILE | \
        mail -s "$SUBJECT" $MAILTO
        (uuencode $FILE1 $FILE1; uuencode $FILE2\
        $FILE2)| mail -s "$SUBJECT" $MAILTO
  2. simple shell commands
    echo "From: $LOGNAME\n\
        To: $MAILTO\nSubject: $SUBJECT\n\
        Mime-Version: 1.0\n\
        Content-Type: text/plain\n\
        " > /tmp/file
        cat $TXTFILE >> /tmp/file
        /usr/lib/sendmail -t -oi < /tmp/file
        
  3. metamail
       metasend -b -s "$SUBJECT"\
        -f $TXTFILE -m text/plain -e none -n \
        -f $ATTFILE -m application/octet-stream \
        -e base64 -t $MAILTO
        
  4. mpack
       mpack -s "$SUBJECT" -c \
        application/octet-stream $ATTFILE $MAILTO
        
  5. mutt
       mutt -a $ATTFILE -s "$SUBJECT" $MAILTO <\
        $TXTFILE
        
  6. Elm
       elm -s"$SUBJECT" -A $ATTFILE $MAILTO < $TXTFIL 
  7. Pine - (to be investigated but it doesn’t look good; maybe the c-client?)
  8. uuenview
        uuenview -m $MAILTO -b -a $ATTFILE < $TXTFILE
  9. nail
    nail -s "$SUBJECT" -a $ATTFILE $MAILTO < $TXTFILE
        
  10. Z-Mail
    For a single file:
        cat $TXTFILE | zmail.small -subject "$SUBJECT"\
        -attach application/octet-stream:${ATTFILE}\
        $MAILTO Bart Schaefer offers the following\
        for multiple attachments.\
        (untested by myself)
        zmail.small -rf /dev/null -e \
        'mail -z -s "$SUBJECT" $MAILTO' \
        -e 'compcmd attach-file $ATTACHFILE \
        application/msword base64 \
        "$DESCRIPTION"' \
        -e! 'compcmd send'

如何避免Sun主机被拔掉键盘后进入OBP

转自fullbird的blog

Sun Sparc主机拔掉键盘系统会进入OBP(open boot prom),

这是由于在插拔这种键盘的时候会发出break信号,

这样系统检测到就会进入这个状态。

一般在我们公司是象Sun Enterprise系列如220R,420R,450,4500等都会这样,

尤其是我们使用kvm就会碰到这个问题,

对于Sun Fire系列没有这个问题,

是由于这种是新机型,

默认装系统时KEYBOARD_ABORT=alternate。

如果碰到这种情形,最快恢复系统的办法就是:

ok>go

为了避免这种情形发生,

修改下列参数(这个办法只是在solaris 8以后才支持):

vi /etc/default/kbd

KEYBOARD_ABORT=alternate

保存

kbd -i就可以了

注释:enable代表不允许拔掉键盘,

不禁止STOP+A这是默认设置

disable代表允许拔掉键盘,但会禁止STOP+A

alternate代表允许拔掉键盘,同时也不禁止STOP +A

转自fullbird的blog