FreeBSD 架設 redmine
redmine 安裝:
1.先更新本機的port tree
$ portsnap fetch update
2.安裝
cd /usr/ports/www/redmine; make install clean
Zend Framework 2.0 的一點筆記AutoLoader HelperBroker
此筆記心得:
AutoLoader改變:
require_once 'Zend/Loader/StandardAutoloader.php';
$loader = new Zend\Loader\StandardAutoloader();
$loader->registerNamespace('ZFDebug', __DIR__ . '/../library/ZFDebug')
->registerPrefix('Phly_', __DIR__ . '/../library/Phly');
$loader->register();
Zend Framework 2.0 體驗~
Zend Framework 2.0
使用前請先參觀ZF2 wiki
安裝方式
前往GIT 作clone 動作取得整個程式.
使用方式
依照正常使用方式 zf create project test1….etc
設定檔與ZF1 不同之處
resources.db.adapter = "pdo_mysql"
resources.db.params.host = "localhost"
resources.db.params.username = "test"
resources.db.params.password = "123456"
resources.db.params.dbname = "test"
resources.db.params.charset = "UTF8"
resources.db.params.driver_options.1002 = "SET NAMES utf8"
resources.db.params.profiler.enabled = true
resources.db.adapter = "PdoMysql"
resources.db.params.host = "localhost"
resources.db.params.username = "test"
resources.db.params.password = "123456"
resources.db.params.dbname = "test"
resources.db.params.charset = "UTF8"
resources.db.params.driver_options.1002 = "SET NAMES utf8"
resources.db.params.profiler.enabled = true
resources.db.adapter 名稱因為整個架構名稱不同所以必須變更.
FreeBSD 架設 git Server
安裝:
#cd /usr/ports/devel/git; make install clean
------------------------------------------------------------------------
*************************** GITWEB *************************************
If you installed the GITWEB option please follow these instructions:
In the directory /usr/local/share/examples/git/gitweb you can find all files to
make gitweb work as a public repository on the web.
All you have to do to make gitweb work is:
1) Copy the files /usr/local/share/examples/git/gitweb/* to a directory on
your web server (e.g. Apache2) in which you are able to execute
CGI-scripts.
2) In gitweb.cgi, adjust the variable $projectroot to point to
your git repository (that is where you have your *.git project
directories).
*************************** GITWEB *************************************
*************************** CONTRIB ************************************
If you installed the CONTRIB option please note that the scripts are
installed in /usr/local/share/git-core/contrib. Some of them require
other ports to be installed (perl, python, etc), which you may need to
install manually.
*************************** CONTRIB ************************************
------------------------------------------------------------------------
===> Installing rc.d startup script(s)
===> Compressing manual pages for git-1.7.4.1
===> Registering installation for git-1.7.4.1
===> SECURITY REPORT:
This port has installed the following files which may act as network
servers and may therefore pose a remote security risk to the system.
/usr/local/libexec/git-core/git-daemon
This port has installed the following startup scripts which may cause
these network services to be started at boot time.
/usr/local/etc/rc.d/git_daemon
If there are vulnerabilities in these programs there may be a security
risk to the system. FreeBSD makes no guarantee about the security of
ports included in the Ports Collection. Please type 'make deinstall'
to deinstall the port if this is a concern.
For more information, and contact details about the security
status of this software, see the following webpage:
http://git-scm.org/
===> Cleaning for p5-subversion-1.6.15
===> Cleaning for cvsps-2.1
===> Cleaning for git-1.7.4.1
Zend Framework 以sub domain 為基準 routes
以Zend Framework 建置專案大部分的 routes:
http://www.test.tw/module/controller/action
例如:
http://www.test.tw/index/main/frontpage
則:
module 為 index
controller 為 main
action 為 frontpage
FreeBSD DenyHosts 擋掉暴力破解 ssh 的使用者
# cd /usr/ports/security/denyhosts; make install clean;
-------------------------------------------------------------------------------
To run denyhosts from startup, add denyhosts_enable="YES"
in your /etc/rc.conf.
Configiration options can be found in /usr/local/etc/denyhosts.conf
-------------------------------------------------------------------------------
In order to proper working of denyhosts
1. edit your /etc/hosts.allow file and add:
sshd : /etc/hosts.deniedssh : deny
sshd : ALL : allow
2. issue the following command if /etc/hosts.deniedssh does not exist yet
touch /etc/hosts.deniedssh
-------------------------------------------------------------------------------
Warning:
syslogd should ideally be run with the -c option; this will ensure that
denyhosts notices multiple repeated login attempts.
To do this, add syslogd_flags="-c" to /etc/rc.conf
-------------------------------------------------------------------------------
===> Installing rc.d startup script(s)
===> Registering installation for denyhosts-2.6_3
===> Cleaning for denyhosts-2.6_3
#
FreeBSD 8.2-RELEASE
Release Highlights
The highlights in the 8.2-RELEASE are the following:
- [amd64] FreeBSD/amd64 now always sets the KVA space as equal to or larger than physical memory size. This change would help to prevent a “kmem_map too small” panic which often occurs when using ZFS.[r214620]
- The FreeBSD GENERIC kernel is now compiled with
KDB
andKDB_TRACE
options. From 8.2-RELEASE the kernel supports displaying a stack trace on panic by using stack(9) facility with no debugger backend like ddb(8). Note that this does not change the default behaviors of the GENERIC kernel on panic.[r214326] - The FreeBSD crypto(4) framework (opencrypto) now supports XTS-AES (XEX-TCB-CTS, or XEX-based Tweaked Code Book mode with CipherText Stealing), which is defined in IEEE Std. 1619-2007.[r214254]
- [amd64] Xen HVM support in FreeBSD/amd64 kernel has been improved. For more details, see xen(4) manual page.[r215788]
- FreeBSD now fully supports GPT (GUID Partition Table). Checksums of primary header and primary partition table are verified properly now.[r213994]
- [amd64, i386] The aesni(4) driver has been added. This supports AES accelerator on Intel CPUs and accelerates AES operations for crypto(4).[r215633]
- [amd64, i386] The aibs(4) driver has been added. This supports the hardware sensors in ASUS motherboards and replaces the acpi_aiboost(4) driver.[r210476]
- The tpm(4) driver, which supports Trusted Platform Module has been added.[r215036]
- The xhci(4) driver, which supports Extensible Host Controller Interface (xHCI) and USB 3.0, has been added.[r215944]
- The FreeBSD Linux emulation subsystem now supports the video4linux API. This requires native video4linux hardware drivers such as the ones provided by multimedia/pwcbsd and multimedia/webcamd.
- The miibus(4) has been rewritten for the generic IEEE 802.3 annex 31B full duplex flow control support. The alc(4), bge(4), bce(4), cas(4), fxp(4), gem(4), jme(4), msk(4), nfe(4), re(4), stge(4), and xl(4) drivers along with atphy(4), bmtphy(4), brgphy(4), e1000phy(4), gentbi(4), inphy(4), ip1000phy(4), jmphy(4), nsgphy(4), nsphyter(4), and rgephy(4) have been updated to support flow control via this facility.[r211379, r215881, r215890, r2105894, r216002, r216023, r216029, r216031, r216033]
- A new netgraph(4) node ng_patch(4) has been added. This performs data modification of packets passing through. Modifications are restricted to a subset of C language operations on unsigned integers of 8, 16, 32 or 64-bit size.[r209843]
- The FreeBSD TCP reassembly implementation has been improved. A long-standing accounting bug affecting SMP systems has been fixed and the
net.inet.tcp.reass.maxqlen
sysctl(8) variable has been retired in favor of a per-connection dynamic limit based on the receive socket buffer size. FreeBSD receivers now handle packet loss (particularly losses caused by queue overflows) significantly better than before which improves connection throughput.[r214865, r214866] - The siftr(4), Statistical Information For TCP Research (SIFTR) kernel module has been added. This is a facility that logs a range of statistics on active TCP connections to a log file. It provides the ability to make highly granular measurements of TCP connection state, aimed at system administrators, developers and researchers.[r214859]
- The geli(8) GEOM class now uses XTS-AES mode by default.[r214405]
- The ZFS on-disk format has been updated to version 15 and various performance improvements for the ZFS have been imported from OpenSolaris.
- Userland support for the dtrace(1) subsystem has been added. This allows inspection of userland software itself and its correlation with the kernel, thus allowing a much better picture of what exactly is going on behind the scenes. The dtruss(1) utility has been added and libproc has been updated to support the facility.[r214983]
- The gpart(8) utility now supports a recover subcommand for GPT partition tables.
- The gpart(8) utility now supports GPT_ENT_ATTR_BOOTME, GPT_ENT_ATTR_BOOTONCE, and GPT_ENT_ATTR_BOOTFAILED attributes in GPT. The attribute keywords in the command line are bootme, bootonce, and bootfailed respectively.[r213994]
- The libarchive library and tar(1) utility now support LZMA (Lempel-Ziv-Markov chain-Algorithm) compression format.[r213667]
- The newsyslog(8) utility now supports an
-S <tt><em>pidfile</em></tt>
option to override the default syslogd(8) PID file.[r211699] - The newsyslog(8) utility now supports a special log file name
for processing file inclusion. Globbing in the file name and circular dependency detection are supported. For more details, see the newsyslog.conf(5) manual page.[r215622] - The pmcstat(8) utility now supports a file and a network socket as a top source. This allows top monitoring over TCP on a system with no local symbols, for example.[r211098]
- The tftp(1) and tftpd(8) utilities have been improved for better interoperability and they now support RFC 1350, 2347, 2348, 2349, and 3617.[r213036, r213038]
- A periodic script for zfs scrub has been added. For more details, see the periodic.conf(5) manual page.
- A periodic script which can be used to find installed ports’ files with mismatched checksum has been added. For more details, see the periodic.conf(5) manual page.
- The sysinstall(8) utility now uses the following numbers for default and minimum partition sizes: 1GB for /, 4GB for /var, and 1GB for /tmp.[r211007]
- The ACPI-CA has been updated to 20101013.
- The ee(1) program has been updated to version 1.5.2.[r214287]
- ISC BIND has been updated to version 9.6-ESV-R3.
- netcat has been updated to version 4.8.
- OpenSSL has been updated to version 0.9.8q.
- The timezone database has been updated to the tzdata2010o release.
- The xz has been updated from snapshot as of 12 April 2010 to 5.0.0 release
- The supported version of the GNOME desktop environment (x11/gnome2) has been updated to 2.32.1.
- The supported version of the KDE desktop environment (x11/kde4) has been updated to 4.5.5.
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 來產生 虛擬機器設定