Showing posts with label gentoo. Show all posts
Showing posts with label gentoo. Show all posts

8/09/2012

view confs without comments

Just to note to myself. how to generate clean configs w/out any comments


sed -e '/^$/d;/^#/d;/^;/d' /etc/php.ini > php.ini.clean

result

root@ ~ # cat /etc/php.ini |wc -l
1249
root@ ~ # cat php.ini.clean |wc -l
182


12/17/2010

where is my free disk space :)

To list files larger than 10M:
find / -type f -size +10000k -exec ls -lh {} \; | awk '{ print $8 ": " $5 }'

To list files larger than 100M:
find / -type f -size +100000k -exec ls -lh {} \; | awk '{ print $8 ": " $5 }'

9/14/2010

installin JDK and JRE gentoo way

had a task to install JDK and JRE on customer server. And when I found that on server Gentoo has been installed it was too late for me :) ( it is my first experience with Gentoo)

so there are the steps

1. update portage

#emerge --sync

2. install JDK/JRE

# emerge virtual/jdk
or
# emerge virtual/jre

3. Configuring JVM

 
list of java virtual machines
# java-config --list-available-vms
 
out put should be like:
# java-config --list-available-vms
The following VMs are available for generation-2:
1)      IcedTea6-bin 1.4.1 [icedtea6-bin]
2)      Sun JDK 1.5.0.20 [sun-jdk-1.5] (Build Only)
3)      Sun JDK 1.6.0.16 [sun-jdk-1.6]
set VM


(By handle (preferred))
# java-config --set-system-vm sun-jdk-1.6
Now using sun-jdk-1.6 as your generation-2 system JVM
(By number)
# java-config --set-system-vm 3
Now using sun-jdk-1.6 as your generation-2 system JVM


ref http://www.gentoo.org/doc/en/java.xml