FreeBSD

How To Print Out All Usage and Total Memory in FreeBSD

Here is a simple way to show/display RAM size / memory size in FreeBSD server.
Download a simple script from here

or follow few steps below to install it into your server

Download and Install

Login as Root

#wget http://repository.wowtutorial.org/scripts/freebsd-memory.pl.txt
#mv freebsd-memory.pl.txt /usr/local/bin/free

Change a file permission

#chmod +x /usr/local/bin/free

Execute

#free

Simple PF FreeBSD Firewall

What is Pf Firewall ?

Packet Filter (from here on referred to as PF) is OpenBSD's system for filtering TCP/IP traffic and doing Network Address Translation. PF is also capable of normalizing and conditioning TCP/IP traffic and providing bandwidth control and packet prioritization. PF has been a part of the GENERIC OpenBSD kernel since OpenBSD 3.0. Previous OpenBSD releases used a different firewall/NAT package which is no longer supported.

Install OpenVPN in FreeBSD 7.2

What is OpenVPN ?

OpenVPN is a free and open source software application that implements virtual private network (VPN) solutions for creating secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It uses SSL/TLS security for encryption and is capable of traversing network address translators (NATs) and firewalls. It was written by James Yonan and is published under the GNU General Public License (GPL).

Installing OpenVPN From FreeBSD Port

How To Compile PHP 5.3.x To Support Perl Extensions

What is PECL Perl ?

PECL Perl is extension embeds Perl Interpreter into PHP. It allows execute Perl files, evaluate Perl code, access Perl variables and instantiate Perl objects.

In this tutorial i will describe how to compile PECL perl with PHP 5.3.x
I found that latest pecl perl-1.0.0.tgz can't compile with PHP 5.3.x

How To Making Dedicated Mode Disks Using The Command Line Freebsd

Execute the following commands, replacing ad2 with the disk name.

#dd if=/dev/zero of=/dev/ad2 count=2
#disklabel /dev/ad2 | disklabel -B -R -r ad2 /dev/stdin
We only want one partition, so using slice 'c' should be fine:
#newfs /dev/ad2c

If you need to edit the disklabel to create multiple partitions (such as swap), use the following:

#dd if=/dev/zero of=/dev/ad2 count=2
#disklabel /dev/ad2 > /tmp/label

Edit disklabel to add partitions:
#vi /tmp/label
#disklabel -B -R -r ad2 /tmp/label
newfs partitions appropriately

How To Configure MPD4 Log in FreeBSD

Mpd4 comes with no log configured in the server so we need to configure the logrotate to support mpd4 log.

Below is the steps how to configure mpd4 log :
Login into your server with root access

Edit Syslog.conf

#pico /etc/syslog.conf

### scroll down until the end of files ###
### add few lines below into syslog.conf ###

!mpd
*.*                /var/log/mpd.log

### save this file

Create log files in /var/log

How To Configure PHP To Support Korean Encode

In This Tutorial i want to configure my PHP to support korean encode.
here is a short tutorial how to do that

In order to support other encode we need to reconfigure PHP with mbstring

Login into the server as root

Configure PHP 5.3.0 with mbstring

#cd /root/php-5.3.0
#./configure  --enable-mbstring
#make && make install

Modify php.ini

#vi /etc/php.ini

Configure MySQL to Support Korean euck Charset

I just want to install a MySQL server to support euck korean charset.
Here is a short how to configure it.
Login into your server as root

Compile MySQL

#cd /root/mysql-5.0.88
#./configure --prefix=/usr/local/mysql --with-extra-charsets=complex
#make && make install

Edit my.cnf

#cp /usr/local/mysql/share/mysql/my-small.cnf /usr/local/mysql/my.cnf
#vi /usr/local/mysql/my.cnf

Install and Configure MPD4 VPN Server FreeBSD 7.2

What is MPD ?

Mpd is a netgraph(4) based implementation of the multi-link PPP protocol for FreeBSD.  It is designed to be both fast and flexible.
It handles configuration and negotiation in user land, while routing all data packets strictly in the kernel.  It supports several of
the numerous PPP sub-protocols and extensions, such as: Multi-link PPP capability, PAP, CHAP, MS-CHAP and EAP authentication ,
PPP compression and encryption, IPCP and IPV6CP parameter negotiation

Install and Configure MPD4

Nginx URL Rewrite for Wordpress

Here is a short tutorial and how-to configure nginx and wordpress to support a permalink.

Login into Wordpress dashboard

First, Login into wordpress admin
ex : http://www.domain.com/wp-admin
input your admin user and password

Click Settings
Click Permalink
Enable "Permalink custom"
Add this to permalink custom

%postname%

Save.

Facebook Fans