Ntop FreeBSD
#cd /usr/ports/net/ntop/
#make install clean
...
************************************************************
************************************************************
WARNING: This install created a directory for the ntop
files and databases:
//usr/local/share/ntop
This directory MUST be owned by the user
which you are going to use to run ntop.
The command you must issue is something like:
chown -R ntop.ntop //usr/local/share/ntop
or chown -R ntop:users //usr/local/share/ntop
man chown to check the syntax for YOUR system
************************************************************
************************************************************
# ntop -A
Wed Feb 9 16:55:29 2011 NOTE: Interface merge enabled by default
Wed Feb 9 16:55:29 2011 Initializing gdbm databases
ntop startup - waiting for user response!
Please enter the password for the admin user:
Please enter the password again:
Wed Feb 9 16:55:43 2011 Admin user password has been set
#
Doctrine 2 Stable Release!!
2010-12-21 這天 Doctrin2 釋出正式穩定版.
Doctrine 2 First Stable Release
這個版本工程之浩大於2008就開始開發,歷經2年半的時間努力.核心開發團隊五人於最後一年最後整合應用保有 Doctrine 1功能並重構並且導入新的DataMapper.
What is new in Doctrine 2?
- DQL is now a real language inside Doctrine, based on an EBNF that is parsed and transformed to SQL. Benefits of this refactoring are readable error messages, the generation of an AST that allows us to support many different vendors and powerful hooks for developers to modify and extend the DQL language to their needs. DQL can either be written as a string or be generated using a powerful QueryBuilder object.
- Your persistent objects (called entities in Doctrine 2) are not required to extend an abstract base class anymore. Doctrine 2 allows you to use Plain old PHP Objects.
- The UnitOfWork is not an alibi-pattern as implemented in Doctrine 1. It is the most central pattern in Doctrine 2. Instead of calling save() or delete() methods on your Doctrine_Record instances you now pass objects to the data mapper object called EntityManager and it keeps track of all changes until you request a synchronisation between database and the current objects in memory. This process is very efficient and has consistent semantics. This is a significant improvement over Doctrine 1 in terms of performance and developer ease-of-use.
- There are no code-generation steps from YAML to PHP involved in the library anymore. YAML, XML, PHP and Doc-Block Annotations are four first-class citizens for defining the metadata mapping between objects and database. A powerful caching layer allows Doctrine 2 to use runtime metadata without relying on code-generation.
- A clean architecture and powerful algorithms make Doctrine 2 magnitudes faster than Doctrine 1.
- Doctrine 2 supports an API that allows you to transform an arbitrary SQL statements into an object-structure. This feature is used by the Doctrine Query Language itself and is a first-class citizen of the library. It essentially allows you to make use of powerful vendor-specific features and complex SQL statements without having to cirumvent the ORM completely.
- Inheritance is not akward anymore. There are now three different types of inheritance to choose from: Mapped Superclasses, Single-Table- and Joined-Table-Inheritance.
- Many more features, just see the reference guide on what is possible with Doctrine 2.
VirtualBox-OSE on FrreeBSD 免x11
參考 http://d.hatena.ne.jp/wittro/20100617/1276782079
cd /usr/src
make build32 install32;
ldconfig -v -m -R /usr/lib32
cd /usr/ports/emulators/virtualbox-ose
make install clean
=============================================================================
VirtualBox was installed.
You need to load the vboxdrv kernel module via /boot/loader.conf:
vboxdrv_load="YES"
For bridged networking please add the following line to your /etc/rc.conf:
vboxnet_enable="YES"
Reboot the machine to load the needed kernel modules.
You also have to add all users to your vboxusers group in order to use vbox.
% pw groupmod vboxusers -m jerry
Running VirtualBox as non-root user may fail with a fatal error
NS_ERROR_FACTORY_NOT_REGISTERED. In this case delete /tmp/.vbox-*-ipc file.
Check wiki page for known issues and troubleshooting:
http://wiki.freebsd.org/VirtualBox
Please report any problems to emulation@. Thanks!
=============================================================================
弄個shell-script 來產生 虛擬機器設定
Doctrine 入門(一)
準備
依照之前整合的 Zend Framework 1.11.0 and Doctrine 1.2.3 and Smarty 3.0.4 環境,來做學習與測試.
更改index.php
application.ini 環境
;Doctrine
autoloaderNamespaces[] = "Doctrine_"
pluginPaths.ZendX_Doctrine_Application_Resource = "ZendX/Application/Resource"
resources.doctrine.debug = 1
resources.doctrine.paths.models_path = APPLICATION_PATH "/../models"
resources.doctrine.connections.orm1.dsn.adapter = mysql
resources.doctrine.connections.orm1.dsn.user = "user"
resources.doctrine.connections.orm1.dsn.pass = "password"
resources.doctrine.connections.orm1.dsn.hostspec = "localhost"
resources.doctrine.connections.orm1.dsn.database = "orm1_sd_idv_tw"
Zend Framework 1.11.0 and Doctrine 1.2.3 and Smarty 3.0.4
懶惰許久~~ 趕快來補一下功課.
這篇主要介紹 Zend Framework 1.11.0 and Doctrine 1.2.3 and Smarty 3.0.4 的結合方式.
Doctrine 1.2.3 跟 Zend Framework 1.11.0 結合主要參考 http://pastie.org/481633 http://pastie.org/481635 使用.
目錄結構:[
PHP: Doctrine
Zend Framework、Symfony 及 CodeIgniter。
Doctrine 的主要開發者 Jonathan H Wage,今年 24歲,非常年輕。Wage 在 Symfony 創始者的資助下成為 Doctrine 成立公司後的第一位員工。
PHP 5.3.3 FreeBSD 安裝調整.
php 5.3.3之後整合了php-fpm進去對於使用輕量化web server的使用者不再麻煩了.
以下是安裝畫面,安裝選項.
# cd /usr/ports/lang/php5; make install clean;
[
FreeBSD 上使用 wkhtmltopdf 做網頁擷取
以往要用程式控制將網頁輸出pdf或擷取網頁,都是件浩大工程.
這次介紹如何在FreeBSD 命令列模式下即可輕易辦到,並且不需龐大的X Windows 圖形系統適合在server上跑.
以下是軟體原文介紹.
wkhtmltopdf
Convert html to pdf using webkit (qtwebkit)
Description
Simple shell utility to convert html to pdf using the webkit rendering engine, and qt.
Introduction
Searching the web, I have found several command line tools that allow you to convert a HTML-document to a PDF-document, however they all seem to use their own, and rather incomplete rendering engine, resulting in poor quality. Recently QT 4.4 was released with a WebKit widget (WebKit is the engine of Apples Safari, which is a fork of the KDE KHtml), and making a good tool became very easy.
此軟體使用WebKit開發完成,除了flash以外其他接可正常顯示!!(包含js)
在安裝前請先確定你的FreeBSD已安裝 linux-base 套件並正常使用,並且將port tree更新.
micro 2440 遠端rs232 控制
想法:
一般使用rs232 over ip 的硬體都不便宜,此次想法將micro 2440版子上的com 1 可以以網路連接方式使用.
而且依照arm 2440這棵cpu來說此次任務實在太簡單,元比單買硬體的rs232 over ip硬體來的方便快速 市面上的rs232 over ip硬體的mcu效能無從的知.