Lua for Windows 開發 筆記
下載:Lua 5.2.0-work2 – Release 1
先參考此篇教學Using Lua with C#並去 LuaInterface 下載回來,看了一下注意事項好像必須 Microsoft Visual C++ 2008 可轉散發套件 (x86) 一併下載回來比較保險.
後來找到 luaforwindows Windows底下Lua整合套件.
MongoDB 新手入門筆記~
Linux 安裝:
$ apt-get install mongodb-server mongodb-dev
$ sudo pecl install mongo
編輯php設定檔 加入 extension=mongo.so
php -m 即可以看到安裝好的擴充套件.
FreeBSD 安裝:
$ cd /usr/ports/databases/mongodb ; make install clean ;
$ cd /usr/ports/databases/pecl-mongo ; make install clean ;
php -m 即可以看到安裝好的擴充套件.
編輯/etc/rc.conf:
Lua for PHP 安裝
主要安裝擴充套件資訊 LUA for PHP
使用 Plua 為安裝源.
Linux 安裝方式:
先安裝好 lua:
$apt-get install lua5.1 liblua5.1-0-dev
先下載並解開:
$ cd /tmp
$ wget http://plua.googlecode.com/files/plua-1.0.0.zip
$ tar zxvf plua-1.0.0.zip
$ cd plua
$ phpize
$ whereis php-config
php-config: /usr/bin/php-config /usr/share/man/man1/php-config.1.gz
$ rm -f include
$ ln -s /usr/include/lua5.1 include
$ ln -s /usr/lib lib
$ cd lib
$ ln -s /usr/lib/liblua5.1.a liblua.a
$ ln -s /usr/lib/liblua5.1.so liblua.so
$ cd ..
$ make
$ make install
Installing shared extensions: /usr/lib/php5/20090626/
$
自行編輯php 設定 增加extension=plua.so
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.