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:
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!
Master Vi
http://www.eng.hawaii.edu/Tutor/vi.html
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
Lazy Linux: 10 essential tricks for admins
http://www.ibm.com/developerworks/linux/library/l-10sysadtips/index.html?ca=drs-tp3008
Q: http can visit the web site well but https is forbidden.
A: check the http-ssl.conf and the Document Root
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
Q: squid can't start
A: many reasons
check dnsserver
squid -d 9
if Dns Test failed. just run squid -D -d9
Q: how to delete ^M (dos style)
A:
:%s/[ctrl+v][enter]//g
/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
Post a Comment
Subscribe to Post Comments [Atom]
<< Home