MAD

January 21, 2009 Posted in FreeBSD General

I found I couldn’t access my server, at first I thought it was a network or power outage of my ISP. Opened a support ticket and a reboot brought it back, it turned out to be my server’s problem, checked the system logs, there is absolutely nothing between the reboot and my last login. It seems that the server simply stopped to accept any connections for whatever reasons. Read More

MySQL Optimization

January 20, 2009 Posted in MySQL

I only optimized MySQl on a VPS several years ago, it seems that my server never had to. I was just aware of those my.cnf examples coming along with the installation.

There are 5 example files under /usr/local/share/mysql/:

my-huge.cnf
my-large.cnf
my-medium.cnf
my-small.cnf
my-innodb-heavy-4G.cnf

Read More

Easy Bind Configuration

January 20, 2009 Posted in DNS

Bind configuration has never been easier, I installed bind 9.6, only commented the following line in /etc/named/named.conf.

listen-on { 127.0.0.1; };

Then I added my zone files and it’s ready. Although I’m still seeing the message “the working directory is not writable“, moreover, not only # rndc reload causes this message, but also # /etc/rc.d/named start.

Add additional IPs

January 20, 2009 Posted in Networking

I made some mistakes when adding additional IPs for my new server and was locked out twice. Here are some tips to avoid those errors.
Read More

Signal 11 revisited

January 19, 2009 Posted in FreeBSD General

Just after I moved to a new server, I saw the familiar signal 11 messages again: Read More

SSH Copy

January 19, 2009 Posted in Command & Utility

Copy a local file to remote host with ssh port 123

# scp -P 123 /backup/localefile username@remotehost.com:/backup/

Copy file from remote host

# scp -P 123 username@remotehost.com:/backup/remotefile /backup/

Another Hack on Third-party Script

November 22, 2008 Posted in Security

PHPClassifieds 7.5 has a SQL injection vulnerability, the detailed how-to was posted publicly, which caused many classifieds websites hacked. The fix is here. Read More

Unix Shells by Example

November 1, 2008 Posted in Misc

Today I started reading UNIX Shells by Example, I have to say this is a great book, at least for beginners like me. Get your copy if you are really serious about FreeBSD. Sooner or later, you will find it is very helpful to write your own scripts. Shell is very powerful and flexible, a tedious task could be easily done with a simple script.

vi Commands

October 31, 2008 Posted in Command & Utility

Condensed version for my own reference, only those commands I didn’t use but will make life easier. Read More

Install via Port

October 30, 2008 Posted in Ports

A visitor followed a post to install AwStats, this post is three years old, it’s absolutely not recommended. Ports are changing very quickly. Even if the program itself doesn’t change much, the post-installation configuration has very probably changed many times. Read More

Email Blocked by BellSouth

October 29, 2008 Posted in Email

Emails on my Linux VPS were blocked by Bellsouth.net. Since they blocked the email by IP, I can still send email manually as I use Google App to handle the email. Read More

Locked File

October 28, 2008 Posted in FreeBSD General

Putty lost connection when I was viewing a file with vi. Later I tried to edit the same file, vi always told me it was read-only. Really confused until I checked with ps command and killed the vi process.

Start Program at Boot Time

October 27, 2008 Posted in FreeBSD General

Rebooted my server, I found Apache, Postfix and pure-ftpd didn’t start automatically. This is very basic, but I don’t remember that I had to configure this previously. Reading the scripts under /usr/local/etc/rc.d/, the instructions are very clear, added these lines in /etc/rc.conf: Read More

Terminal Control Character

October 27, 2008 Posted in Command & Utility

Some useful terminal control characters:

Ctrl-C Terminate current process.
Ctrl-U Erase current input line.
Ctrl-S Stop output for easy read.
Ctrl-Q Resume output after stop.
Ctrl-Z Suspend process. use fg command to restart.
Read More

Crazy Emacs Installation

October 27, 2008 Posted in Ports

Emacs installation installed total 45 ports. I should have defined WITHOUT_X11 for ‘make install’. Read More

« Older Entries Newer Entries »



Archives