最近的几个小问题

1、编译Subversion遇到的问题

configureerrorAPR-UTIL was installed independentlyit wont be
                        possible to 
use the specified Berkeley DB: /usr/local/BerkeleyDB.4.4

网上的说法很多,费劲一番周折还是没有解决,最终解决办法,使用SVN自带的依赖包,即同时下载这两个文件:

-rw-r--r--  1 leerais leerais  6604640 2008-07-05 18:20 subversion-1.5.0.tar.gz
-rw-r--r--  1 leerais leerais  3257964 2008-07-05 19:11 subversion-deps-1.5.0.tar.gz

然后解压到一块就行了,至于编译选项,就不要舍近而求远了,不用指定 arp、arp-util等选项,直接编译就行。屡试不爽啊!

SVN源文件链接:http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260&expandFolder=74

2、MySQL远程连接遇到的问题

leerais@debian:~$ mysql -h 192.168.2.2 -u leerais -p
Enter password

ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet'system error0

具体原因我没找着,知其然而不知其所以然,解决办法是在你的MySQL配置文件,一般是 /etc/my.cnf 里面加入下面这一行:

skip-name-resolve

以下是我的部分配置文件:

# The MySQL server
[mysqld]
port        3306
socket      
= /tmp/mysql.sock
skip
-locking
skip
-name-resolve
key_buffer 
16M
max_allowed_packet 
1M
table_cache 
64
sort_buffer_size 
512K
net_buffer_length 
8K
read_buffer_size 
256K
read_rnd_buffer_size 
512K
myisam_sort_buffer_size 
8M

Debian - Ubuntu - Vim

Q. I am using vim under Ubuntu Linux and whenever I type following command:

syntax on

I’m getting an error which read as follows:

E319Sorrythe command is not available in this versionsyntax on

How do I fix this problem?

A. Vim is a text editor that is upwards compatible to Vi. It can be used to edit all kinds of plain text. It is especially useful for editing programs.

There are a lot of enhancements above Vi: multi level undo, multi windows and buffers, syntax highlighting, command line editing, filename completion, on-line help, visual selection, etc

Ubuntu Linux comes with tiny version of vim.

All you need to do is installed full vim version by typing following command:

sudo apt-get install vim

You can add syntax on command to ~/.vimrc file

原文参考:http://www.cyberciti.biz/faq/howto-install-full-vim-under-ubuntu-linux/