Category Archives: Linux

Network setup for KVM-QEMU

Qemu is a virtualization tool to virtualize IO including disk, network adapters. Typically, it supports 4 network models: Isolated, NAT, bridge and routing. Some materials can be found as follows:

Posted in Linux, Virtualization | Tagged , | Leave a comment

Build your service using Pritunl and Lets Encrypt

Pritunl is an open source enterprise VPN platform which is used to easily build free VPN service.It is built on the top of TLS/SSL protocol and is not easily banned by some countries. 🙂However, by the default settings of its … Continue reading

Posted in Linux, VPN | Leave a comment

Install JDK in Debian

1. Donload jdk package from Oracle: wget –header “Cookie: oraclelicense=accept-securebackup-cookie” http://download.oracle.com/otn-pub/java/jdk/8u40-b26/jdk-8u40-linux-x64.tar.gz 2. Setop JDK Environmentsudo sumkdir /opt/jdktar -zxf jdk-8u40-linux-x64.tar.gz -C /opt/jdkupdate-alternatives –install /usr/bin/java java /opt/jdk/jdk1.8.0_40/bin/java 100update-alternatives –install /usr/bin/javac javac /opt/jdk/jdk1.8.0_40/bin/javac 100 3. Check Java Environment. To check the java environment, … Continue reading

Posted in Java, Linux | Leave a comment

Apache 2.4升級筆記

根據http://jasonpowell42.wordpress.com/2013/04/05/install-apache-2-4-4-on-centos-6-4/ ,但是安裝時要注意configure cd /usr/src/   wget http://ftp.tc.edu.tw/pub/Apache//httpd/httpd-2.4.9.tar.gz   tar xzvf httpd-2.4.9.tar.gz   cd httpd-2.4.9   ./configure –enable-so –enable-ssl –with-mpm=prefork –with-included-apr –mandir=/usr/share/man –sysconfdir=/etc/httpd   make; make install   cd /etc/httpd   rm httpd.conf   ln -s conf/httpd.conf httpd.conf   yum -y … Continue reading

Posted in apache, Linux | Leave a comment

[PHP] Be discreet to use crypt function

Recently, the PHP’s crypt function crashed in my designed new system. In fact, in my database design, the length of password field is 64. It ran fine at CentOS 5.5 with PHP 5.2.x. However, when I moved this system to … Continue reading

Posted in Linux, PHP, Programming, Security, 程式設計, 資訊安全 | Leave a comment

Install Intel I210 Driver in Debian Linux

While I am installing the Intel Ethernet I210 adaptor, I find it can not be run and it shows the following message: Makefile:71: *** Kernel header files not in any of the expected locations. Makefile:72: *** Install the appropriate kernel … Continue reading

Posted in Linux | 1 Comment

I-List: Create Your Own Lists of Links

I-List is a very helpful links share platform to share your collected links. It provides an user friendly interface to you for sharing some kind of links. I’ve found that there are two collections which is very helpful for some … Continue reading

Posted in C, C/C++, cloud computing, Java, Linux, Linuxamp;FreeBSD, Windows, 科技, 程式設計, 資工, 軟體(Software), 雲端運算 | Leave a comment

[Linux] Autoconf, Automake

[筆記一下自己學Autoconf, Automake這一類的GNU Build Tool。][2013/07/14 更新:把linker 引用libraries的順序寫得更清楚一些。] 身為常常用Linux的程式設計師兼MIS人員來說,在Linux系統上面要編譯程式是很家常便飯的事情。最常用的指令是./configure; make; make install ,筆者稱之為「大三元」。只是如果今天角色互換,變成我們來開發程式,並且把程式以開放原始碼的方式發送出去,該怎麼做呢?其實上述說的大三元指令,是由GNU Build System提供的aclocal, autoconf, automake幫你產生configure script file以及對應的Makefile。由於筆者做專案需要引用curl這個library。石頭閒言閒語部落格提供教學雖然基本,但是又不太夠用。以下便筆記一下自己在做該專案的方式,稱不上專業,若有謬誤,敬請多多包涵。 以下分為四個步驟來解說。 一、 先前準備工作1. 今假設你的專案名稱為project。程式碼資料夾為src。    而且我們寫了一份程式碼,放在src/add.cpp底下。2. 先準備四個文件:AUTHORS、ChangeLog、NEWS、README    (1) AUTHORS:寫明作者資訊。    (2) ChangeLog:程式碼異動記錄。    (3) NEWS:最新消息    (4) README:軟體說明與介紹其它像是INSTALL(軟體安裝文件)以及COPYING(版權聲明),automake時,便會幫我們自動產生。注意!如果你用的是舊版的Linux系統(例如筆者的CentOS 5),COPYING是用GPL v2,如果是新的Linux系統,COPYING是用GPL v3。3. 建立doc資料夾。 … Continue reading

Posted in C/C++, Linux, Programming, 程式設計 | 1 Comment

[Linux] The useage of ioctl function: some materials

This post is to note some materials for Linux ioctl function: ioctl: hdio Linux kernel map: Chapter 6.1 ioctl Linux Device Driver 專欄 Linux 驅動程式的 I/O, #1: 基本概念 Linux 驅動程式的 I/O, #3: kernel-space 與 user-space 的「I/O」 Linux 驅動程式的 I/O, #4: … Continue reading

Posted in C/C++, Linux, Programming, 程式設計 | 1 Comment

[Linux] Backup MySQL with BASH

I’ve translated my old post into English version with Italic font type. 這是一個簡單的範例程式,用來備份mysql用的。 This is a simple example program for MySQL backup. 以下假設我的MySQL使用者帳號為user,密碼為123,database名稱為db1 Assume that my MySQL account is user, password is 123 and the database name is db1. backupmysql.sh: =Edit the … Continue reading

Posted in Linux, 程式設計 | Leave a comment