7.15.2008

One Words To One Question

Q: Set Java Env

A: edit ~/.bash_profile

add the following lines

PATH=$PATH:$HOME/bin:/opt/jdk1.6.0_07/bin
CLASSPATH=.:/opt/jdk1.6.0_07/lib
JAVA_HOME=/opt/jdk1.6.0_07
JRE_HOME=/opt/jdk1.6.0_07/jre

run source .bash_profile

9 Comments:

Blogger 晓风 said...

Q: how to test whether java works well

A: vi Test.java

public class Test{

 public static void main(String args[]){

System.out.println(”Hello world!”);

}
}

javac Test.java
java Test
Hello world!

10:31 AM  
Blogger 晓风 said...

Master Vi

http://www.eng.hawaii.edu/Tutor/vi.html

1:14 PM  
Blogger 晓风 said...

Q: How to highlight the PHP in vim

A: wget http://www.vim.org/scripts/download_script.php?src_id=8651

mkdir -p ~/.vim/syntax
cp php.vim ~/.vim/syntax

1:15 PM  
Blogger 晓风 said...

Lazy Linux: 10 essential tricks for admins

http://www.ibm.com/developerworks/linux/library/l-10sysadtips/index.html?ca=drs-tp3008

5:33 PM  
Blogger 晓风 said...

Q: http can visit the web site well but https is forbidden.

A: check the http-ssl.conf and the Document Root

10:14 AM  
Anonymous Anonymous said...

Q: Ubuntu Apt source list

A: for chinese users
# cn
deb http://ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse

# cn2
deb http://cn.archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse

4:14 PM  
Anonymous Anonymous said...

Q: squid can't start

A: many reasons

check dnsserver

squid -d 9

if Dns Test failed. just run squid -D -d9

3:06 PM  
Blogger 晓风 said...

Q: how to delete ^M (dos style)

A:

:%s/[ctrl+v][enter]//g

11:06 AM  
Blogger 晓风 said...

/etc/modules,在文件的末尾添加:apm power_off=1

/boot/grub/menu.lst,在文件中找到“title Ubuntu 8.04, kernel 2.6.24-17-generic“这句,在其后的”kernel /boot/vmlinuz-2.6.24-17-generic….“后面加上apm=power_off acpi=force

4:09 PM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home