2013년 9월 1일 일요일

Ajaxplorer Full installation

# setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.2-release/All/
# pkg_add -v -r sqlite3-3.7.17_1.tbz

# cd etc/rc.d

# pwd
/etc/rc.d
# touch webfm
# chmod 775 webfm
# chown magicband webfm
# cat > webfm

#!/bin/sh
# Part of NAS4Free (http://www.nas4free.org).
# Copyright (C) 2012 NAS4Free Team <info@nas4free.org>.
# All rights reserved.
#
# Portions of freenas (http://www.freenas.org).
# Copyright (C) 2005-2011 Olivier Cochard-Labbe <olivier@freenas.org>.
# Copyright (c) 2007-2009 Volker Theile <votdev@gmx.de>.
# All rights reserved.
#

# PROVIDE: webfm
# REQUIRE: DAEMON

. /etc/rc.subr
. /etc/configxml.subr

name="webfm"

load_rc_config "$name"

# Defaults
webfm_configdir=${webfm_configdir:-"/usr/local/www/ajaxplorer/server/users/"}
webfm_htusers=${webfm_htusers:-"${webfm_configdir}/.htusers.php"}
webfm_user_permissions=${webfm_user_permissions:-"0"}
webfm_user_active=${webfm_user_active:-"1"}

echo "Preparing web-based file-management."

# Generate the .htusers.php file containing the user configuration
echo '<?php $GLOBALS["users"]=array(' > ${webfm_htusers}

# Disable File Manager
if [ `configxml_get_count "//system/disablefm"` -gt 0 ]; then
    echo ');?>' >> ${webfm_htusers}
    exit 0;
fi

# Iterate over all configured users
_index=`configxml_get_count "//access/user"`
while [ ${_index} -gt 0 ]
do
        _password=`configxml_get "//access/user[${_index}]/password"`
        _password_md5=`/sbin/md5 -q -s "${_password}"`
        _homedir=`configxml_get "//access/user[${_index}]/homedir"`
        [ -z "${_homedir}" ] && _homedir=/mnt

        /usr/local/bin/xml sel -t -m "//access/user[${_index}]" \
                -v "concat('array(\"',login,'\",\"${_password_md5}\",\"${_homedir}\",\"http://localhost\",0,\"^.ht\",${webfm_user_permissions},${webfm_user_active}),')" \
                ${configxml_file} | /usr/local/bin/xml unesc >> ${webfm_htusers}

        _index=$(( ${_index} - 1 ))
done

# Add administrator and root account
_password=`configxml_get "//system/password"`
_password_md5=`/sbin/md5 -q -s "${_password}"`
/usr/local/bin/xml sel -t -m "//system" \
        -v "concat('array(\"',username,'\",\"${_password_md5}\",\"/\",\"http://localhost\",1,\"\",7,1),')" -n \
        -o "array(\"root\",\"${_password_md5}\",\"/\",\"http://localhost\",1,\"\",7,1)," \
        ${configxml_file} | /usr/local/bin/xml unesc >> ${webfm_htusers}

echo ');?>' >> ${webfm_htusers}

# cd /usr/local/www
# pkg_add -v -r ajaxplorer-5.0.2.tbz
# setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.2-release/All/
# pkg_add -r php5-extensions
# pkg_add -r php5-xmlrpc
# pkg_add -r php5-gettext
# pkg_add -r php5-mcrypt
# pkg_add -r php5-mbstring
# pkg_add -r php5-zip
# pkg_add -r php5-gd
# pkg_add -r php5-zlib
# pkg_add -r php5-openssl
# pkg_add -r php5-pdo_mysql
# pkg_add -r php5-mysql
# pkg_add -r php5-mysqli
# pkg_add -r php5-pgsql
# pkg_add -r php5-pdo_pgsql
# pkg_add -r php5-ftp

# cd etc/rc.d
# /etc/rc.d/webfm
**/ some of your error messages have been reported on your screen but you don't need to worry about such a thing.
you can assess your webserver. /**

2013년 8월 31일 토요일

mc(Midnight Commander) 박스 깨지지 않게 보기


1. Putty로 접속한 mc의 모습이다 처참하게 박스가 깨져 있다.

2. putty 아이콘을 눌러 Change Settings 로 들어 간다.

3. Window - Translation 메뉴에 들어 가면
   중간에 UTF-8 이라는 곳에 원래는 User font encoding 이라고 되어 있는데 이것을 UTF-8로 변경해준다.

4. mc를 종료후 다시 실행 시키면 아래와 같이 깨끗하게 나온다

2013년 8월 27일 화요일

Install - MC (midnight commander) for NAS4FREE

1. Nas4free를 위한 mcommander.sh 만들고 실행하기.

$ cd mnt/hdd1
$ mkdir system/mcommander
$ cd system/mcommander
$ touch mcommander.sh
$ chmod U+X mcommander.sh
$ cat > mcommander.sh

#!/bin/sh
# filename:     mcommander.sh
# author:       Dan Merschi
# date:         2009-07-28 ; Add multiplatform support
# author:       Graham Inggs <graham@nerve.org.za>
# date:         2012-04-11 ; Updated for NAS4Free 9.0.0.1
# date:         2013-02-09 ; Updated for ftp.freebsd.org restructuring and latest mc-light version
# date:         2013-05-05 ; Switch from mc-light to mc ; drop compat7x ; add libslang
# date:         2013-08-10 ; Update mc package name to mc-4.8.8.tbz
# date:         2013-08-23 ; Fetch files from packages-9.2-release ; add libssh2
# purpose:      Install Midnight Commander on NAS4Free (embedded version).
# Note:         Check the end of the page.
#
#----------------------- Set variables ------------------------------------------------------------------

DIR=`dirname $0`;

PLATFORM=`uname -m`

RELEASE=`uname -r | cut -d- -f1`

URL="ftp://ftp.freebsd.org/pub/FreeBSD/ports/${PLATFORM}/packages-9.2-release/All"

MCLIGHTFILE="mc-4.8.8.tbz"

LIBSLANGFILE="libslang2-2.2.4_4.tbz"

LIBSSH2FILE="libssh2-1.4.3_1,2.tbz"

#----------------------- Set Errors ---------------------------------------------------------------------

_msg() { case $@ in

  0) echo "The script will exit now."; exit 0 ;;

  1) echo "No route to server, or file do not exist on server"; _msg 0 ;;

  2) echo "Can't find ${FILE} on ${DIR}"; _msg 0 ;;

  3) echo "Midnight Commander installed and ready! (ONLY USE DURING A SSH SESSION)"; exit 0 ;;

  4) echo "Always run this script using the full path: /mnt/.../directory/mcommander.sh"; _msg 0 ;;esac ; exit 0; }

#----------------------- Check for full path ------------------------------------------------------------
if [ ! `echo $0 |cut -c1-5` = "/mnt/" ]; then _msg 4 ; ficd $DIR;
#----------------------- Download and decompress mc files if don't exist --------------------------------
FILE=${MCLIGHTFILE}
if [ ! -d ${DIR}/bin ]; then
  if [ ! -e ${DIR}/${FILE} ]; then fetch ${URL}/${FILE} || _msg 1; fi
  if [ -f ${DIR}/${FILE} ]; then tar xzf ${DIR}/${FILE} || _msg 2; rm ${DIR}/+*; rm -R ${DIR}/man; fi
  if [ ! -d ${DIR}/bin ]; then _msg 4; fi
fi
#----------------------- Download and decompress libslang files if don't exist --------------------------
FILE=${LIBSLANGFILE}
if [ ! -d ${DIR}/lib ]; then
  if [ ! -e ${DIR}/${FILE} ]; then fetch ${URL}/${FILE} || _msg 1; fi
  if [ -f ${DIR}/${FILE} ]; then tar xzf ${DIR}/${FILE} || _msg 2}; rm ${DIR}/+*;    rm -R ${DIR}/libdata; rm -R ${DIR}/man; rm -R ${DIR}/include; rm ${DIR}/lib/*.a;    rm ${DIR}/bin/slsh; rm ${DIR}/etc/slsh.rc; fi
  if [ ! -d ${DIR}/lib ]; then _msg 4; fi
fi
#----------------------- Download and decompress libssh2 files if don't exist ---------------------------
FILE=${LIBSSH2FILE}
if [ ! -f ${DIR}/lib/libssh2.so ]; then  if [ ! -e ${DIR}/${FILE} ]; then fetch ${URL}/${FILE} || _msg 1; fi
  if [ -f ${DIR}/${FILE} ]; then tar xzf ${DIR}/${FILE} || _msg 2}; rm ${DIR}/+*;    rm -R ${DIR}/libdata; rm -R ${DIR}/man; rm -R ${DIR}/include; rm ${DIR}/lib/*.a; rm ${DIR}/lib/*.la; fi
  if [ ! -d ${DIR}/lib ]; then _msg 4; fi
fi
#----------------------- Create symlinks ----------------------------------------------------------------
if [ ! -e /usr/local/share/mc ]; then ln -s ${DIR}/share/mc /usr/local/share; fi
if [ ! -e /usr/local/libexec/mc ]; then ln -s ${DIR}/libexec/mc /usr/local/libexec; fi
if [ ! -e /usr/local/etc/mc ]; then ln -s ${DIR}/etc/mc /usr/local/etc; fifor i in `ls $DIR/bin/`   do if [ ! -e /usr/local/bin/${i} ]; then ln -s ${DIR}/bin/$i /usr/local/bin; fi; 
donefor i in `ls $DIR/share/locale`   do if [ ! -e /usr/local/share/locale/${i} ]; then ln -s ${DIR}/share/locale/${i} /usr/local/share/locale;      else if [ ! -e /usr/local/share/locale/${i}/LC_MESSAGES/mc.mo ]; then        ln -s ${DIR}/share/locale/${i}/LC_MESSAGES/mc.mo /usr/local/share/locale/${i}/LC_MESSAGES; fi;
      fi; done;for i in `ls $DIR/lib`   do if [ ! -e /usr/local/lib/${i} ]; then ln -s $DIR/lib/$i /usr/local/lib; fi; done_msg 3 ; exit 0;
#----------------------- End of Script ------------------------------------------------------------------
# 1. Keep this script in his own directory.
# 2. chmod the script u+x,
# 3. Always run this script using the full path: /mnt/share/directory/mcommander
# 4. You can add this script to WebGUI: Advanced: Commands as Post command (see 3).
# 5. To run Midnight Commander from shell type 'mc'.

$ pwd
/mnt/hdd1/system/mcommander
/mnt/hdd1/system/mcommander/mcommander.sh

2.mc 실행

$ rehash
mc


2011년 9월 26일 월요일

F-14A, VF-84 Jolly Rogers 1/48

Britmodeller.com _ Work in Progress - Aircraft _ F-14A, VF-84 Jolly Rogers 1/48

Posted by: Honza K. Mar 4 2009, 08:20 PM

kit: hasegawa 1/48
aires: wheel bay set, jet exhaust, cockpit
Eduard: PE parts 49 229
decals: Qeen of spades, Fightertow FTD48013