Categories
- FFMpeg (5)
- Libav (1)
- Google (3)
- iBeacon (1)
- LDAP (3)
- Me (2)
- Network (11)
- OS (149)
- RTMP (4)
- SIP (1)
- Kamailio (1)
- SNMP (1)
- VMware (20)
- VCP考試 (1)
- 伺服器 網站服務 (105)
- 名詞解釋 (4)
- 專案管理 (1)
- 工具軟體 (51)
- Adobe (1)
- FMS (1)
- Cloudera (1)
- Docker (1)
- Eclipse (4)
- Intellij (2)
- OBS (2)
- Office (10)
- Excel (4)
- PowerPoint (5)
- Postman (2)
- Splunk (13)
- Virtualbox (2)
- Visual Studio (2)
- 文字編輯器 (10)
- Sublime Text 2 (6)
- Sublime Text 3 (3)
- Vim (3)
- 連線工具 (1)
- Xshell (1)
- Adobe (1)
- 程式語言 (81)
- CSS (2)
- HTML (2)
- iOS (1)
- Java (31)
- JavaScript (5)
- jQuery (4)
- jsTree (2)
- JSP (3)
- PHP (16)
- Python (8)
- Ruby (1)
- sed (1)
- Shell Script (8)
- Windows Bash Script (1)
- XML (1)
- 資料庫 (38)
- FFMpeg (5)
Author Archives: cowman.chiang
[Ubuntu] Enable power saving in Lenovo X61
Ref: http://www.webupd8.org/2014/04/prevent-your-laptop-from-overheating.html Because I installed Ubuntu 14.04 in my Lenovo X61. Although it could switch into the sleep mode after closing the lid. It’s not really using the power saving mode. So we must edit the GRUB file. sudo vim … Continue reading
Posted in Ubuntu
Leave a comment
ACID & CAP
ACID: 資料庫管理系統(DBMS)在寫入/異動資料的過程中,為保證交易(transaction)是正確可靠的,所必須具備的四個特性:原子性(atomicity,或稱不可分割性)、一致性(consistency)、隔離性(isolation,又稱獨立性)、持久性(durability)。 ….. source: Wiki – ACID Atomicity(原子性) 一個交易(transaction)中的所有操作,要麼全部完成,要麼全部不完成,不會結束在中間某個環節。事務在執行過程中發生錯誤,會被回滾(Rollback)到事務開始前的狀態,就像這個事務從來沒有執行過一樣。 Consistency(一致性) 在事務開始之前和事務結束以後,資料庫的完整性沒有被破壞。這表示寫入的資料必須完全符合所有的預設規則,這包含資料的精確度、串聯性以及後續資料庫可以自 發性地完成預定的工作。 Isolation(隔離性) 當兩個或者多個事務並發訪問(此處訪問指查詢和修改的操作)資料庫的同一數據時所表現出的相互關係。事務隔離分為不同級別,包括讀未提交(Read uncommitted)、讀提交(read committed)、可重複讀(repeatable read)和串列化(Serializable)。 Durability(持久性) 在事務完成以後,該事務對資料庫所作的更改便持久地保存在資料庫之中,並且是完全的。 CAP: 又被稱作布魯爾定理(Brewer’s theorem),它指出對於一個分布式計算系統來說,不可能同時滿足以下三點:一致性(Consistency)、可用性(Availability)、容忍網路分區(Partition tolerance);根據定理,分佈式系統只能滿足三項中的兩項而不可能滿足全部三項。 ….. source: Wiki – CAP定裡 Consistency(一致性): 等同於所有節點訪問同一份最新的數據副本 Availability(可用性): 對數據更新具備高可用性 Partition tolerance(容忍網路分區): 以實際效果而言,分區相當於對通信的時限要求。系統如果不能在時限內達成數據一致性,就意味著發生了分區的情況,必須就當前操作在C和A之間做出選擇。
Posted in 名詞解釋
Leave a comment
[Elasticsearch] Delete index by search syntax
check the search syntax curl -XGET ‘http://{ElasticSearch_Server_IP}:{ElasticSearch_Server_Port}/{Index}/{Type}/_search?q={Search Syntax} ex: curl -XGET ‘http://localhost:9200/logstash-2015.01.26/syslog/_search?q=”Rhttpproxy”‘ Delete index by search syntax curl -XDELETE ‘http://{ElasticSearch_Server_IP}:{ElasticSearch_Server_Port}/{Index}/{Type}/_query?q={Search Syntax} ex: curl -XDELETE ‘http://localhost:9200/logstash-2015.01.26/syslog/_query?q=”Rhttpproxy”‘
Posted in Elasticsearch
Leave a comment
[Logstash] LoadError: no such file to load — i18n
In CentOS 5.5, I want to install the logstash agent to forward logs. Because it was older system and no one would upgrade it, the original java version is 1.6. I always got the error about “LoadError: no such file … Continue reading
Posted in Logstash
Leave a comment
[Apache] Proxypass
Because the default web port of Elasticsearch is 9200. And I want to change it with 80. Maybe I could use the proxypass function. enable the proxy, and restart apache a2enmod proxy a2enmod proxy_http service apache2 restart add following into … Continue reading
Posted in Apache, Elasticsearch, Kibana
Leave a comment
[FreeRADIUS] Build RPM files in CentOS 6.X
WTF, I wasted all my morning doing it….. Environment: CentOS 6.6 x64 minimal server install wget yum install wget create rpmbuild/SOURCES and rpmbuild/SPECS folder under your home directory mkdir -p /root/rpmbuild/SOURCES get into this folder and download the source file … Continue reading
Posted in Radius
Leave a comment
[OpenVPN] Build RPM in CentOS 6.5
CentOS 6.5 x64 yum update -y install openssl openssl-devel lzo lzo-devel pam_devel -y wget http://swupdate.openvpn.org/community/releases/openvpn-2.3.6.tar.gz rpm-build -tb openvpn-2.3.6.tar.gz
Posted in OpenVPN
Leave a comment
[FreeRADIUS] 修改 SQL 連線數上限
因為 FreeRADIUS 在 Source 就指定了對 SQL 的連線數上限為 256 因此可能會發生因為連線數以達上限造成連線失敗的事件 沒有其他方法~唯一解~就是修改 code 重新 build 下載 FreeRADIUS 的 tar.gz 修改 src/modules/rlm_sql/conf.h 檔案,將 #define MAX_SQL_SOCKS 256 改為你想要的數字 #define MAX_SQL_SOCKS 2048 然後重新 build 安裝即可 之後在到 raddb/sql.conf 設定需要的連線數即可 由於這數字是 FreeRADIUS 一啟動就會建立連線數 所以也不要設定太高~
Posted in Radius
Leave a comment
[FreeRadius] Refusing to start with libssl version OpenSSL
當使用 tar.gz 安裝完 FreeRADIUS 後要啟動時,可能會發生錯誤 這時後再使用 radiusd -X 以 debug 模式進行 可能得到下面這個錯誤 Refusing to start with libssl version OpenSSL 1.0.1e-fips 11 Feb 2013 (in range 1.0.1 – 1.0.1f). Sec urity advisory CVE-2014-0160 (Heartbleed) 這時候就需要去編輯 radiusd.conf 檔案 將 security section 的 … Continue reading
Posted in Radius
Leave a comment
[FreeRADIUS] failed locating OpenSSL headers
在使用 tar.gz 安裝 FreeRadius 的時候可能會發生下列這個錯誤 configure: error: in `/usr/source/freeradius-server-2.2.6′: configure: error: failed locating OpenSSL headers 這時候就必須要安裝 openssl-devel、libtalloc-devel yum install openssl-devel yum install libtalloc-devel
Posted in Radius
Leave a comment