Installing Nodejs on Fedora Core 19

Filed in Fedora Core | How-to Leave a comment

FacebookTwitterGoogle+LinkedInTumblrShare

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

References:
http://fedoraproject.org/wiki/Features/NodeJS

,

How to output psql to file

Filed in How-to | postgresql Leave a comment

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.

, ,

How to create dump in MySQL

Filed in Fedora Core | mysql Leave a comment

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

Dump basically is a copy of the database in SQL file. It is useful as backup or to reconstruct similar database on different server. Replication normally will get a dump from master database and restore in slave database.

To create a dump.

Approach 1: SSH client, use mysqldump and download through FTP client.

Approach 2: Direct mysqldump from your machine.

By default, mysqldump have –opt options which include –add-drop-table, –add-locks, –create-options, –disable-keys, –extended-insert, –lock-tables, –quick, and –set-charset.

But by default, mysqldump does not include –events and –routines.
–triggers is included by default with each table.
–no-create-db is useful if you plan to load the dump under different database name.
–verbose will output to terminal.

For more information please refer to

, , , ,

How to restore dump in MySQL (nohup version)

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

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

Normally, you will maintain remote database server through SSH client.
Large database dump require long time to restore (few hours).
Disconnect SSH client from remote database server will kill the running process.
Leaving the terminal open until restore the dump completed meaning leaving laptop overnight at office.
Nohup approach allow the process to continue running even if SSH client disconnect from remote server.

, , , ,

TOP