How to output psql to file

Filed in How-to | postgresql Leave a comment

FacebookTwitterGoogle+LinkedInTumblrShare

Application: PSQL
Operating System: Linux – Fedora Core 19 (Schrödinger’s Cat)
Architecture: x86_64

To write the psql to file.

, ,

How to enable timing and remove result pagination in psql

Filed in How-to | postgresql Leave a comment

Application: PSQL
Operating System: Linux – Fedora Core 19 (Schrödinger’s Cat)
Architecture: x86_64

To monitor execution time, set timing to on.
To remove result pagination (more), set pager to off.

, , , ,

Understand kernel SHMMAX, SHMALL, and SHMMNI

Filed in Fedora Core | How-to | Ubuntu Leave a comment

Topic: Shared Memory Configuration
Operating System: Linux – Fedora Core 19 (Schrödinger’s Cat)
Architecture: x86_64

About
SHMMNI – Maximum number of shared memory segments on a system
SHMMAX – Maximum size of a single shared memory segment on a system (bytes)
SHMALL – Maximum allocation of shared memory pages on a system (pages)

Part 1:

Part 2:

, , , ,

How to free up memory on Fedora Core 19

Filed in Fedora Core | How-to Leave a comment

Operating System: Linux – Fedora Core 19 (Schrödinger’s Cat)
Architecture: x86_64

As the OS up for long time, unused caches might hog the memory.
It is good to run some command to clear up.

# Note:
Free pagecache – echo 1 > /proc/sys/vm/drop_caches
Free dentries and inodes – echo 2 > /proc/sys/vm/drop_caches
Free pagecache, dentries and inodes – echo 3 > /proc/sys/vm/drop_caches

, ,

How to install Oracle JDK 7 on Fedora Core 19

Filed in Fedora Core | How-to | Java Leave a comment

Application: Java SE Development Kit 7u45
Operating System: Linux – Fedora Core 19 (Schrödinger’s Cat)
Architecture: x86_64

To install Oracle JDK 7 and JRE 7 follow below.

Step 1: Download the installer.

Step 2: Installing JDK and JRE

Step 3: Testing

References

, , ,

How to install Oracle JDK 6 on Fedora Core 19

Filed in Fedora Core | How-to | Java Leave a comment

Application: Java SE Development Kit 6u45
Operating System: Linux – Fedora Core 19 (Schrödinger’s Cat)
Architecture: x86_64

By default most linux distributions (include Fedora Core) bundled with OpenJDK.
However, there are some application that only can run with Oracle JDK.
To install Oracle JDK 6 and JRE 6 follow below.

Step 1: Download the installer.

Step 2: Installing JDK and JRE

Step 3: Testing

References

, , ,

How to install JDK 6 on Fedora Core 19

Filed in Fedora Core | How-to | Java Leave a comment

Operating System: Linux – Fedora Core 19 (Schrödinger’s Cat)
Architecture: x86_64

Starting from Fedora Core 17, minimum allowed Java 1.7.0.
There are still many application that can only run with Java 1.6.0.
Fedora Core 16 is the last release with Java 1.6.0 support.

Step 1: Search for the package using yum.

Step 2: Search the rpm
Go to RPM pbone.net

Perform Search
– Click on Search (Left Menu)
– Switch to Advanced
– Check Fedora 16
– Type ‘java-1.6.0-openjdk’
– Click on Search button

search

Click on the link result

search-result

Search for the Download section.

result-download

Notice that the ftp server has other related rpms too.
The one interested is java-1.6.0-openjdk-devel.

Get the FTP directory listing by pasting the URL on web browser

ftp-listing

Download the files
java-1.6.0-openjdk-1.6.0.0-71.1.11.6.fc16.x86_64.rpm

java-1.6.0-openjdk-devel-1.6.0.0-71.1.11.6.fc16.x86_64.rpm

java-1.6.0-openjdk-1.6.0-demo (optional)

java-1.6.0-openjdk-1.6.0-javadoc (optional)

Files will be downloaded to /home/user/Downloads

Step 3: Install the rpm

Note 1:
Set the JAVA_HOME to point to JDK 6.
JAVA_HOME can be set in /home/user/.bash_profile (user environment) or /etc/profile (system environment)
If you need to use both JDK 6 and JDK 7, you can always create 2 users and edit .bash_profile.
One user to use JDK 6 and another JDK 7.

Note 2:
IDE based on Eclipse allow user to specify the VM in the *.ini file.

, ,

TOP