Wednesday Mar 26, 2014

More Tips for Remote Access with Oracle Linux

In a previous blog, Oracle Linux Tips and Tricks, I covered alternative ways to use SSH. In this article, I will cover some additional tips and tricks for using SSH for remote access, as well as some other ways to connect remotely to a server.

SSH's primary use is for remote access to hosts. SSH is not only able to provide us a terminal interface to a server, it's also able to provide us a transport for a graphical interface. In order to utilize this functionality, we must have an X server running on our local workstation. On a Linux workstation with a graphical environment, this functionality is built in. On other systems, such as a Windows machine or a Mac, this functionality is not built in. Both XQuartz on the Mac and MobaXTerm are X servers for these platforms. There are also a number of other open source and paid products available for both platforms.

Once you have an acceptable X server installed on your local workstation, you can connect with SSH using the following ssh command. The -X enables X11 forwarding for the connection. Keep in mind that the X11 forwarding is based on the user who originally connected. Logging in with one user and then using sudo often will not work, depending on the permissions and ownership needed to complete a task.

[user@laptop ~]$ ssh -X 10.0.0.12

Once you authenticate, you drop directly to a standard prompt. If you look closely, though, and examine the environment variables in your terminal, you will find an additional environment variable that has the IP address of your workstation. You can examine your environment variables using the env command.

DISPLAY=localhost:10.0

Now you can launch an application that has a graphical interface, and the interface will be displayed on your local workstation. The following example will launch gedit. The ampersand symbol is useful for forking the process in the background so we can retain the use of our terminal.

[user@remotehost ~]$ gedit &

Using X11 connections over SSH can be quite useful for using application installers that are graphical, such as the Oracle Universal Installer for Oracle Database.

The screen application is a great compliment to SSH and is quite useful for sharing an SSH session with another user. Because of the way screen preserves sessions for the user, it is also great for high-latency network connections that have frequent disconnects and for maintaining sessions that time out due to security policies. With a regular SSH connection, if you are disconnected, any processes that were running are not preserved. Unlike SSH, the screen application keeps the session alive so it can be connected to again later.

One of the simplest things you can do with screen is share a session. You can launch screen on the terminal you wish to share by issuing the screen command. Once you do this, a new shell is running inside of screen. Another user can log in to the same machine and use the command screen -x to be immediately connected to your shell. They see everything you type. Even if you disconnect from the machine on either terminal, the shell will continue to run. This can be quite useful for sharing a terminal for a demonstration in a remote office or for running a terminal-based console that is shared between many users.

To see all of the active screen sessions, you can use screen -list, which will show active and detached sessions. To connect to a detached session, you can use screen -r and the pid.session name listed in the screen -list output. In the following example, there are five screen sessions running. One of them is detached.

[user@server ~]$ screen -list
There are screens on:
        24565.pts-1.server     (Attached)
        24581.pts-2.server     (Attached)
        24597.pts-3.server     (Attached)
        24549.pts-0.server     (Attached)
        24613.pts-4.server     (Detached)
5 Sockets in /var/run/screen/S-user.

The command screen -x can be used to connect to a currently attached session. In the following example, a connection to session 24565 is made:

[user@server ~]$ screen -x 24565

If you need access to a full graphical desktop environment remotely, there are a number of packages that can accomplish this. The package tigervnc-server is useful for connections to a remote machine providing a full Linux desktop experience. To set up and install the package, perform the following steps.

First, run the following command to install the package:

[root@server ~]# yum install tigervnc-server

Once the package is installed, you need to edit the file /etc/sysconfig/vncservers. The VNCSERVERS line establishes the user accounts that you want to enable the VNC server for and their display number. In the example below, the user bob is configured for display 2 and the user sue is configured for display 3. The VNCSERVERARGS[#] section allows you to specify options for each display. In this example, we are specifying a 1280 x 1024 resolution for display 2 and a 1024 x 768 resolution for display 3:

VNCSERVERS="2:bob 3:sue"
VNCSERVERARGS[2]="-geometry 1280x1024 "
VNCSERVERARGS[3]="-geometry 1024x768"

Once the /etc/sysconfig/vncservers file has been edited, you need to set passwords for each user account. This is accomplished with the vncpasswd command. In the following example, the user bob sets a password using the vncpasswd command.

[bob@server ~]$ vncpasswd
Password:
Verify:

Once the package is installed, the configuration file is edited, and passwords are set, you are ready to turn on the vncserver service. The following two commands start the service and set the service to start automatically at the next boot:

chkconfig vncserver on
service vncserver start

Once configured and running, you can connect to your Linux system using a standard VNC client. When connecting, be sure to specify the display and password credentials that are needed in order to connect.

Another incredibly useful tool for remote access to a server is freerdp application, which allows you to connect to a Linux-based server using the ubiquitous Microsoft RDP protocol. This application will need to be installed on the server that you wish to connect to. To install the application, you can use the following command.

[root@server ~]# yum install freerdp

Once the application is installed, you can start the service and, if desired, configure the service to start at boot time.

[root@server ~]# service freerdp start
[root@server ~]# chkconfig freerdp on

At this point, the server is able to accept standard Microsoft RDP connections. On your local Windows machine, you can use the command mstsc or, if you are using a Mac, you can use the Microsoft Remote Desktop application or a third-party tool that supports the Microsoft RDP protocol. Just as with VNC, access to an entire remote Linux desktop environment is provided.

Comments?

I hope these tips and tricks have been useful and that you will take advantage of some of them in the course of your day. We will be publishing more of these tips-and-tricks articles in the future. Feel free to leave a comment for further topics that you would like to see in this series.

See Also

Oracle Linux blog

About the Author

Robert Chase is a member of the Oracle Linux product management team. He has been involved with Linux and open source software since 1996. He has worked with systems as small as embedded devices and with large supercomputer-class hardware.

About the Photograph

Photograph taken by Rick Ramsey in Durango in the Fall of 2012

Follow OTN Garage on:
Blog | Facebook | Twitter | YouTube

Friday Jan 31, 2014

Simplifying the Installation of Oracle Database on Oracle Linux - Reprint








Most of my workdays start by shapechanging me into a seven-headed Hydra, and each Hydra promptly makes a beeline for multi-tasking hell. So, when I get a chance to simplify something, anything, I jump on it.

Ginny has done that for OTN at last twice. Below are two of her exercises in simplifying our lives. We published these articles before, but we recently had to rebuild one of them because somebody (I'm not going to say who) deleted it. To avoid annoying one of your Hydras, and instead send you off to a peaceful weekend, here they are again.









How I Simplified Oracle Database Installation on Oracle Linux 5

by Ginny Henningsen

Before installing Oracle Database 10g or 11g on a system, you need to preconfigure the operating environment since the database requires certain software packages, package versions, and tweaks to kernel parameters. Ginny discovered that Oracle Linux provides a remarkably easy way to address these installation prerequisites. Find out how.

How I Simplified Oracle Database 11g and 12c Installation on Oracle Linux 6

by Ginny Henningsen

Similar to the article above, but updated for Database 12c and Oracle Linux 6. Ginny simplifies the installation of Oracle Database 11g by automatically pre-configuring Oracle Linux with the required software packages and correct kernel parameters.

Photograph of Fat Boy on Sakajawea Road in Idaho taken by Rick Ramsey

- Rick

Follow me on:
Blog | Facebook | Twitter | YouTube | The Great Peruvian Novel

Thursday Jan 02, 2014

About our Latest Lab: How to Migrate to Oracle Linux and Oracle VM





Step by Step Instructions for Migrating to Oracle Linux and Oracle VM

Red Hat Linux and VMWare are fine technologies. A great pairing. However, if you have business reasons for migrating to Oracle Linux and Oracle VM, such as having earlier access to the latest Linux innovations or taking advantage of more integrated virtualization, take a look at our latest lab. It provides the best step by step instructions we could come up with for carrying out that migration. You can also try it just to hone your migration skills. You never know when the boss is going to ask you whether you can handle a migration.





Here's a peek at the major tasks:

  1. Start the two servers (Oracle VM Server and Oracle VM Manager).
  2. Connect to Oracle VM Manager and become familiar with the product.
  3. Verify that the Oracle VM environment started correctly.
  4. Import an assembly that has Oracle Database on top and was exported from VMware.
  5. Create an Oracle VM Template based on the VMware assembly.
  6. Edit the Oracle VM Template that was created.
  7. Create a guest based on the Oracle VM Template that was created.
  8. Verify and then start the Oracle VM guest that was created.
  9. Manually modify the guest configuration and remove VMware tools.
  10. Switch from the Red Hat kernel to Oracle's Unbreakable Enterprise Kernel for free.
  11. Transform the guest into a usable Oracle VM Template ("gold image").

You can run the lab anytime you like on your laptop, or you can attend OTN's next Virtual SA Day, and run it with the help of a proctor. There will be several hundred sysadmins running the same lab at the same time, so you can discuss it with others via chat, and get help from our proctors. Details here.

photograph of a brewery in Ouray, Colorado, by Rick Ramsey

- Rick

Follow me on:
Blog | Facebook | Twitter | YouTube | The Great Peruvian Novel

Tuesday Nov 19, 2013

Extending Your Use of DTrace on Oracle Linux





We just published a new article about using DTrace on Oracle Linux (see below). If you're not already familiar with DTrace on Oracle Linux, you might want to start with these two blogs.



Blog: Trying Out DTrace

by Wim Coekaerts

In October of 2011 Wim Coekaerts described the steps required to use the preview of DTrace on Oracle Linux, and provided a simple example of how to use it.



Blog: How to Get Started Using DTrace on Oracle Linux

by Rick Ramsey

In January of 2013 I described some of the resources that had recently become available to help you start using DTrace on Oracle Linux. They included a video interview with Brendan Gregg, a way to find out which DTrace probes are available on Oracle Linux, a technical article, a book, and more.

New Article: How to Set Up DTrace to Detect PHP Scripting Problems on Oracle Linux

by Christopher Jones

Christopher Jones has just published an OTN tech article that explains how to set up DTrace to detect PHP scripting problems on Oracle Linux. He shows you how to download and install the right version of Oracle Linux, how to install PHP and the OIC18 extensions for Oracle Database, how to verify which PHP probes you have, and how to begin using them.

photograph of Colorado sunset by Beth Ramsey

-Rick

Follow me on:
Blog | Facebook | Twitter | Personal Twitter | YouTube | The Great Peruvian Novel

Monday Sep 09, 2013

Latest Linux-Related Content on OTN

photograph copyright 2013 by Rick Ramsey

How to Launch Linux Utilities from Inside Oracle Database

by Yuli Vasiliev

By wrapping a Linux utility in a script and using an external database table's preprocessor directive, you can launch the utility from within Oracle Database and have the utility's output be inserted into the external table. This allows you to do things such as query operating system data and then join it with data in Oracle Database.

How to Use Hardware Fault Management in Oracle Linux

by Robert Chase

Robert Chase is a really good writer. If he was writing about teaching iguanas how to quilt I'd still read it. Fortunately, in this article he's writing about hardware fault management tools in Oracle Linux. What they are, how they work, what you can do with them, and examples with instructions. Give it a read.

How to Get Started Using DTrace on Oracle Linux

by Richard Friedman

DTrace is a powerful tool, and it can do some amazing things. But it's not that difficult to get started doing simple things. You can build up from there. In this article, Richard Friedman gives you a high-level overview of DTrace and its major components:providers, modules, functions, and probes. He explains how you can use either one-liner commands on the command line, or write more complex instructions in scripts, using the D language. He provides simple examples for each. It's a great way to get your feet wet.

Blog: Overview of Linux Containers

by Lenz Grimmer

Linux Containers isolate individual services, applications, or even a complete Linux operating system from other services running on the same host. They use a completely different approach than "classicial" virtualization technologies like KVM or Xen. Lenz Grimmer explains.

Blog: Practical Examples of Working With Oracle Linux Containers

by Lenz Grimmer

In his previous post about Linux Containers, Lenz Grimmer explained what they are and how they work. In this post, he provides a few practical examples to get you started working with them.

Video Interview: On Wim's Mind in August

by Lenz Grimmer

We ran a little long, but once Wim started talking about the history of SNMP and how he's been using it of late to do cool things with KSplice and Oracle VM, we geeked out. Couldn't stop. Wim is not your average Senior VP of Engineering. Definitely a hands-on guy who enjoys figuring out new ways to use technology

Video Interview: On Wim's Mind in June

by Lenz Grimmer

On Wim's Mind in June 2013 - Wim's team is currently working on DTrace userspace probes. They let developers add probes to an application before releasing it. Sysadmins can enable these probes to diagnose problems with the application, not just the kernel. Trying this out on MySQL, first. If you know how to do this on Solaris, already, you'll be able to apply that knowledge to Oracle Linux. Also on Wim's mind is the Playground channel on the Public Yum repository, which lets you play with the latest Linux builds, ahead of official Linux releases, without worrying about having your system configured properly.

- Rick

Follow me on:
Blog | Facebook | Twitter | YouTube | The Great Peruvian Novel

Wednesday Jul 31, 2013

Using Ksplice for diagnostic purposes

laptop and stethoscope by jfcherry, on Flickr
laptop and stethoscope by jfcherry (CC BY-SA 2.0)

We've been emphasizing the benefits of using Oracle Linux with Ksplice rebootless updates several times already. The ability to minimize downtime when applying rebootless patches to the Linux Kernel is a feature unique to Oracle Linux, and a growing number of customers realize the benefits of this technology.

Since we acquired Ksplice two years ago, we've continued to improve and further integrate this functionality in Oracle Linux. For example, we implemented the the Ksplice offline client (which I mentioned in this YouTube whiteboard session some time ago), the Ksplice Inspector, or the RedPatch utility.

But did you know that we use Ksplice for diagnostic purposes, too? As part of our Oracle Linux Premier Support offering, we can make use Ksplice to enable additional debugging functionality on your production system, if we need to track down an issue in your environment. Instead of asking you to reboot into a custom Linux kernel that contains additional debugging code, we now simply create a custom Ksplice patch that helps us to gather the required information, while your system keeps running. Once we've obtained the necessary details, you can simply remove the debug patch with Ksplice at runtime again, without any interruption. The additional debugging information helps our support team to determine the root cause of your issue. In case it turns out to be a genuine bug in the Linux kernel, we will then develop and provide a bug fix for this particular problem in the form of a new Ksplice patch, which you can apply while the system keeps humming along. Bug analyzed and fixed, no reboot was required!

To learn more about his feature and the other advantages of Ksplice, take a look at Wim's recent blog post "The Ksplice differentiator".

Monday Jul 15, 2013

Migrating from SUSE Linux to Oracle Linux - System Initialization

The iptables service defines rules for handling packets on a Linux system. It's usually a good idea to disable this service during installation of a Linux update to prevent malicious code from being installed by angry cats (image removed from blog). Once the update is installed securely, you can define the iptables rules and once again enable the service.

To find out, before you install an update to Oracle Linux, whether the iptables service is enabled, use the list option to the chkconfig command. It displays the status of Linux services at boot time. For example:

# chkconfig -- list
abrtd 0:off 1:off 2:off 3:on 4:off 5:on 6:off
acpid 0:off 1:off 2:off 3:off 4:off 5:off 6:off
atd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
...
...
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
...
...
SUSE Linux to Oracle Linux: Guide for System Administrators
17
...
...

To check the status of only the iptables service, pipe in a little grep:

chkconfig -- list | grep iptables

This is just one of the tips provided by Manik Ahuja and Kamal Dodeja in their OTN technical article, ....

Tech Article: How to Initialize an Oracle Linux System

This is the first in a series of articles that outline the major steps in migrating from SUSE Linux to Oracle Linux. It focuses on registering your system, downloading the latest version of Oracle Linux, and performing some basic initialization steps. Stay tuned for more articles.

Tech Article: How to Initialize an Oracle Linux System

- Rick

Follow me on:
Blog | Facebook | Twitter | YouTube | The Great Peruvian Novel

Friday Jun 07, 2013

How to Get Started Using DTrace on Oracle Linux

I. hate. slow. code. (Image removed from blog.)

We all hate slow code. Bunch of princesses is what we've become. During the American Civil War, they had to deliver their text messages by horseback! It took weeks! And half the time, they got blown off their horse by a cannonball to the neck!

Today? Today we have to have our stuff back in milliseconds, or we start tweeting about it. So, if you're developing or deploying applications, how do you keep them performing at the speed to which we have become accustomed? DTrace, of course.

"But I'm a Linux guy," you say. "I don't DO Oracle Solaris."

That's fine. The folks at Oracle Solaris are not only wicked smart, they are generous. Now you can use DTrace on Oracle Linux. Let me point out, by the way, that DTrace is just as useful for sysadmins as it is for developers. In this video, taken a couple of years ago, Brendan Gregg explains how sysadmins can make their deployed applications run faster even after the developers who wrote them pushed back the last bits of their code:

Video Interview: How to Improve the Performance of Deployed Applications Using DTrace

Brendan Gregg describes the best ways for sysadmins to tune deployed applications to get more performance out of them in their particular computing environment.

Bonus: More info about Brendan Gregg plus links to his personal and professional blogs.

If you'd like to try DTrace on Oracle Linux, here are some resources to get you started.

What DTrace Probes Are Available on Oracle Linux?

If you are running Oracle Linux 6 with the DTrace-enabled Unbreakable Enterprise Kernel Release 2 (2.6.39), you can run this command to list all the DTrace probes available on your system:

dtrace -l

If you are not running that version of Oracle Linux, you can download it from the ol6_x86_64_Dtrace_latest channel on the Unbreakable Linux Network (ULN). For more info about installing and configuring DTrace, see the DTrace chapter in the Oracle Linux Administrator's Solutions Guide for Release 6.

For each probe listed by dtrace -l, the output includes a name, the portion of the program where it resides, and the Oracle Linux kernel module that does the probing. Once you have that, go to Chapter 11 of the DTrace Guide to find out what each probe does.

Article: How to Get Started Using DTrace on Oracle Linux

DTrace is a powerful tool, and it can do some amazing things. But it's not that difficult to get started doing simple things. You can build up from there. In this article, Richard Friedman gives you a high-level overview of DTrace and its major components:providers, modules, functions, and probes. He explains how you can use either one-liner commands on the command line, or write more complex instructions in scripts, using the D language. He provides simple examples for each. It's a great way to get your feet wet.

Article: How to Get Started Using DTrace on Oracle Linux
Bonus: Brendan Gregg's one liners for DTrace (some of the existing DTrace one-liners will require modification to work on Oracle Linux).

The DTrace Book

You can get all the info you need about DTrace through the Dynamic Tracing in Oracle Solaris, Mac OS X, and FreeBSD, by Brendan Gregg and Jim Mauro. Of course, you can also buy your own paper or electronic copy through any of the major retailers. (We're working on getting a good discount for the book, but you'll have to subscribe to the OTN Systems Community Newsletter to find out about it.)

Bonus:How the DTrace book got done, by Deirdre Straughan

DTrace Forums

Lots of developers and sysadmins are using Dtrace and posting their questions and tips on the DTrace Forum. Here's an example of one conversation:

Q: Unexpected output of dtrace script
m1436 wrote a dtrace script to monitor the bytes returned by the read() system call to the user programme, but was getting strange results. He includes the dtrace script and the strange output.

A: kvh responds, explaining that the problem m1436 encountered is the result of a common misconception about copyin(). "It is intended to be used to copy content of userspace memory into a scratch buffer so that it can be accessed directly from within kernel space (where the DTrace core executes). That said, it is often interpreted as somehow being equivalent to malloc() whereas in reality it actually works like alloca() instead. So, what you are seeing is basically the artifact of the scratch buffer being overwritten with other data. ... in order for this to work, you should do things a bit differently.

The DTrace forum always has great discussions. Let me know if you find any that are worthy of highlighting. And good luck!

- Rick

Follow me on:
Blog | Facebook | Twitter | YouTube | The Great Peruvian Novel

Tuesday Apr 16, 2013

Evaluating Oracle Solaris and Oracle Linux From Your Laptop

Evaluating Oracle Linux From Inside VirtualBox

After importing your Oracle Linux virtual image, you can use the yum install command to download additional packages into your Linux environment. Yuli explains how.

But what's really cool about evaluating an OS from inside VirtualBox is that you can assign each virtual image a unique IP address, and have it communicate with the outside world as if it were its own physical machine on the network. Yuli describes how to do this, and also how to install guest additions to, for instance, share files between the guest and host systems.

Evaluating Oracle Solaris 11 From Inside VirtualBox

In this article Yuli shows you how to create and manage user accounts with either the GUI or the CLI, how to set up networking, and how to use the Service Management Facility (SMF) to, for instance, control SSH connections to the outside world.

Both article cover the basics to get you started, but also very valuable are the links that Yuli provides to help you move further along in your evaluation.

- Rick

Follow me on:
Blog | Facebook | Twitter | YouTube | The Great Peruvian Novel

Thursday Jan 31, 2013

Deep Inside Every Sysadmin Is ...

#WWI-Ace

photo courtesy of James Vaughan - all rights reserved

... an Oracle ACE!

The thrills. The glory. The fame. Who can resist?

Turns out sysadmins can.

Last time I checked, the Oracle ACE program had 417 ACES and ACE Directors. Of those 417, only 6 have a specialty in Oracle Solaris or Oracle Linux.

That's simply not enough to defend the homeland! I know there are many more sysadmins and developers proficient in Oracle Solaris and Oracle Linux who can qualify to become Oracle ACES. Toss your silk scarf around your neck and grab your goggles. Then talk to me on the OTN Garage page on Facebook. I'll explain the benefits and help you enroll in pilot training.

Current Oracle ACES With Specialties in Oracle Solaris or Oracle Linux

Suk Kim, ACE Director, Oracle Solaris, Korea

Proficient in Oracle Solaris system tuning, troubleshooting Oracle Solaris security, audit information security, penetration tester incident and response, digital forensics virtualization, and cloud computing. Member of Korea Oracle Solaris User Network, Chairman of Oracle Solaris Tehchnet, Manager of Solaris School, adjunct professor at Ansan University, senior consultant at NoBreak Co., LTD.

Diego Aguirre, ACE, Oracle Solaris, Argentina

Diego Aguirre has been a Solaris Support Specialist since 1998. Over the past several years, he has contributed to the Oracle Solaris Community and has published technical articles for Sun Microsystems and now Oracle. He is the author of http://solaris4ever.blogspot.com.

Alexander Eremin, ACE, Oracle Solaris, Russia

Alexander Eremin is a user on Solaris and Linux platforms since 1995. Over the past ten years, he has worked as a Senior Unix Administrator. He is also the creator of the MilaX - Small Live Distribution of OpenSolaris. Alexander is also taking part in the Caiman OpenSolaris project.

Julien Gabel, ACE, Oracle Solaris, France

Julien Gabel is a Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments. He has architecture and expertise in building Solaris and UNIX experience in large enterprises such as banking and financial services, IT services, Telecoms and multimedia companies.

Raimonds Simanovskis, ACE, Oracle Linux, Latvia

Raimonds Simanovskis in founder of EazyOne which develops business intelligence web application eazyBI.com. Previously he was working at Tieto Latvia where he was using and promoting new technologies, open source and Agile software development. Raimonds has participated in many Oracle E-Business Suite implementation projects as well as Oracle based software development projects. In recent years he is active Ruby language and Ruby on Rails framework user and contributor. He has created and maintains Oracle database adapter for Ruby on Rails as well as PL/SQL and Ruby integration libraries.

Damian Wojslaw, ACE, Oracle Solaris, Poland

Damian is currently working as systems operator since 1999. Since 2006 he has worked with Solaris and OpenSolaris operating systems and other Sun Microsystems born applications. He blogs regularly on TrochejEN and reposts on Planet OpenSolaris. Damian has translated four OpenSolaris related Guides (ZFS Administrator Guide, OpenSolaris Installation Guide: Basic Installations, DTrace User Guide, Device Driver Tutorial) to Polish.

Defend the homeland!

- Rick

Website Newsletter Facebook Twitter My Personal Blog

Friday Jan 11, 2013

How to Install Oracle Linux from a USB Stick

source

If you want to install Oracle Linux from a USB drive, keep in mind that not all hardware supports USB device booting. Also, during the boot process you may have to instruct your BIOS to boot from that specific USB device. Finally, keep in mind that this method of installation is not officially sanctioned by Oracle support. You'll need an Oracle Linux 6.0 or higher system to produce the key. Earlier versions may work, but additional prerequisites may be required. The examples in this article assume a USB key device name of /dev/sdb1. Be sure to verify the device name of your USB key to avoid accident data loss.

Prerequisites

  1. The first thing you will need is an ISO image of Oracle Linux. The quickest way to obtain an ISO image is from the Oracle Software Delivery Cloud
  2. You will need a desktop or server system running Oracle Linux in order to prepare your USB drive.
  3. You will also need to download this script to create the bootable USB drive.
  4. Your Oracle Linux system will also need the package syslinux installed. You can install syslinux using yum with the following command:
  5. yum install syslinux

Marking Partition One as Bootable

Once your prerequisites are in order, you need to designate partition one as bootable. Use the parted application, as in this example:

[root@host]# parted /dev/sdb 
GNU Parted 2.1 Using /dev/sdb Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) toggle 1 boot
(parted) quit
Information: You may need to update /etc/fstab.

The example above uses a USB key labelled /dev/sdb. The parted application will only accept device files without partition numbers. So, if we had selected /dev/sdb1 instead, we would have gotten an error message when we tried to write the changes to disk.

Creating the USB Key

Now you can start creating USB key via the script that you downloaded earlier. The script accepts two paths: first the source ISO file and then the USB key:

[root@host]# sh Install_OL_fromUSBStick_Script --reset-mbr /home/user/OL6.3.iso /dev/sdb1 
Verifying image...
livecd-iso-to-disk.sh: line 527: checkisomd5: command not found Are you SURE you want to continue?
Press Enter to continue or ctrl-c to abort
Size of DVD image: 2957
Size of images/install.img: 132
Available space: 31186
Copying DVD image to USB stick
install.img
    137834496 100%   10.87MB/s    0:00:12 (xfer#1, to-check=0/1)
sent 137851396 bytes  received 31 bytes  11028114.16 bytes/sec total size is 137834496  speedup is 1.00
sent 37 bytes  received 12 bytes  98.00 bytes/sec total size is 3100217344  speedup is 63269741.71 Updating boot config file Installing boot loader USB stick set up as live image!

Once the script is finished running you have a bootable USB drive that can install Oracle Linux. While booting, pay attention to your BIOS boot screens as they will often provide direction on how to select a specific boot device other than the ones in the standard boot sequence. For some older systems you may need to go directly into the BIOS setup utility to specify the USB device in your boot sequence. Once you have booted successfully off of your USB device and the installer starts installation will proceed just like an installation from regular DVD media.

- Robert Chase

Website Newsletter Facebook Twitter

Wednesday Jan 09, 2013

How to Treat an NFS File As a Block Storage Device

source

Wim actually beat me in blogging about this feature while I was on vacation, but I'd like to add a little more background about dm-nfs, which I gathered from our kernel developers:

What is dm-nfs?

The dm-nfs kernel module provides a device-mapper target that allows you to treat an NFS file as a block device. It provides loopback-style emulation of a block device using a regular file as backing storage. The backing file resides on a remote system and is accessed via the NFS protocol.

The general idea is to have a more-efficient-than-loop access to files on NFS. The device mapper module directly converts requests to the dm device into NFS RPC calls.

dm-nfs is used transparently by Oracle VM's Dom0 when mounting NFS-backed virtual disks. It essentially allows for asynchronous and direct I/O to an NFS-backed block device, which is a lot faster than normal NFS for virtual disks. The Xen block hotplug script has been modified on OVM to look for files which are on NFS filesystems. If the file is on NFS, OVM uses dm-nfs automatically, otherwise it falls back to using the regular (but slower) loop mount method.

The original dm-nfs module was written by Chuck Lever. It has been supported and used by Oracle VM since version 2.2 and is also included in the Unbreakable Enterprise Kernel for Oracle Linux.

Why this feature matters

This feature creates virtual disk devices (LUNs) where the data is stored in an NFS file instead of on local storage. Managed networked storage has many benefits over keeping virtual devices on a disk local to the physical host.

A sample use case is the fast migration of guest VMs for load balancing or if a physical host requires maintenance. This functionality is also possible using iSCSI LUNs, but the advantage of dm-nfs is that you can manage new virtual drives on a local host system, rather than requiring a storage administrator to initialize new LUNs on the storage subsystem. Host administrators can handle their own virtual disk provisioning.

For durability and performance, dm-nfs uses asynchronous and direct I/O so all I/O operations are performed efficiently and coherently. Guest disk data is not double cached on the underlying host. If the underlying host crashes, there's a lower probability of data corruption. If the guest is frozen, a clean backup can be taken of the virtual disk, as you can be certain that its data has been fully written out.

How to use it

You use dm-nfs by first loading the kernel module, then using dmsetup to create a device mapper device on your file. The syntax is very similar to the dm-linear module.

The following sample code demonstrates how to use dmsetup to create a mapped device (/dev/mapper/$dm_nfsdev) for the file $filename that is accessible on a mounted NFS file system:

nblks=`stat -c '%s' $filename`
echo -n "0 $nblks nfs $filename 0" | dmsetup create $dm_nfsdev

Now you can mount /dev/mapper/$dm_nfsdev like any other filesystem image.

- Lenz Grimmer (Oracle Linux Blog)

Website Newsletter Facebook Twitter

Thursday Dec 20, 2012

Top 10 Articles of 2012 Include Oracle Solaris, Linux, Virtualization

source

That's a 72 Norton Commando fashioned into a cafe racer. Heavy.com named a newer version the #1 bike in the 2012 New York International Motorcycle Show. (I didn't like Heavy.com's picture, so I found a better one from the blog listed as source, above.)

OTN also has an annual top 10. In that post by Bob Rhubart, from OTN's Architect community, six of the top ten technical articles were about technologies of interest to system admins and developers.

Boo-yah!

#2 - How Dell Migrated from SUSE Linux to Oracle Linux

by Jon Senger, Aik Zu Shyong, and Suzanne Zorn

In June of 2010, Dell made the decision to migrate 1,700 systems from SUSE Linux to Oracle Linux, while leaving the hardware and application layers unchanged. The people who worked on the migration describe how Dell planned and implemented the migration, including key conversion issues and an overview of their transition process.

#4 - Getting Started with Oracle Unbreakable Enterprise Kernel Release 2

by Lenz Grimmer

How to update your Oracle Linux systems to the latest version of the Unbreakable Enterprise Kernel. Switching is easy—applications and the operating system remain unchanged. There is no need to perform a full re-install; only the relevant RPM packages are replaced.

#6 - How to Use Oracle VM VirtualBox Templates

by Yuli Vasiliev

This article explains how to use Oracle VM VirtualBox Templates in Oracle VM VirtualBox. It is similar to the article that explains how to prepare an Oracle VM environment to use Oracle VM Templates, but it describes how to download, install, and configure the templates within Oracle VM VirtualBox, instead of on bare metal.

#7 - How to Update Oracle Solaris 11 Systems From Oracle Support Repositories

by Glynn Foster

You may already know that you don't have to worry about manually tracking and validating patch dependencies when you update a version of Oracle Solaris 11. This makes updates much easier. Glynn Foster demonstrates how easy it is to update the OS from a support repository, and how to make sure everything went well.

#8 - Tips for Hardening an Oracle Linux Server

by Lenz Grimmer and James Morris

General strategies for hardening an Oracle Linux server. Oracle Linux comes "secure by default," but the actions you take when deploying the server can increase or decrease its security. How to minimize active services, lock down network services, and many other tips.

#9 - How to Create a Local Yum Repository for Oracle Linux

by Jared Greenwald

How to create a local yum repository for Oracle Linux, and configure up2date and yum to install and update packages from the repositories.

More About OTN's Technical Articles

See all system admin- and systems developer-related technical articles published on OTN here.

Interested in publishing an article on OTN? Click here or join the conversation on the OTN Garage Facebook page.

- Rick

Website Newsletter Facebook Twitter

Friday Oct 05, 2012

Hurry! See the uncensored OOW videos before they get edited!

source

Uploaded so far:

Which Oracle Solaris 11 Technologies Have Sysadmins Been Using Most?

Director's Cut - Uncensored - Markus Flierl, VP Solaris Core Engineering, describes how Oracle Solaris 11 customers are taking advantage of the Image Packaging System and the snapshot capability of ZFS to run more frequent updates of not only the OS, but also the applications (agile development, anyone?), and how they're using the network virtualization capabilities in Oracle Solaris 11 to isolate applications and manage workloads on the cloud.

Watch How Hybrid Columnar Compression Saves Storage Space

Director's Cut - Uncensored - Art Licht shows how hyprid columnar compression (HCC) compresses data 30x without slowing down other queries that the database is performing. First he shows what happens when he runs database queries without HCC, then he shows what happens when he runs the queries with HCC.

Security Capabilities and Design in Oracle Solaris 11

Director's Cut - Uncensored - Compliance reporting. Extended policy. Immutable zones. Three of the best minds in Oracle Solaris security explain what they are, what customers are doing with them, and how they were engineered. Filmed at Oracle Open World 2012.

Why DTrace and Ksplice Have Made Oracle Linux 6 Popular with Sysadmins

Use the DTrace scripts you wrote for Oracle Solaris on Oracle Linux without modification. Wim Coekaerts, VP of Engineering for Oracle Linux, explains how this capability of DTrace, the zero downtime updates enabled by KSplice, and other performance and stability enhancements have made Oracle Linux 6 popular with sysadmins.

Why Solaris 11 Is Being Adopted Faster Than Solaris 10

Sneak Preview - Uncut Version - Lynn Rohrer, Director of Oracle Solaris Product Management explains why customers are adopting Oracle Solaris 11 at a faster rate than Oracle Solaris 10, and proves why you should never challenge a Montana woman to a test of strength.

What Forsythe Corp Is Helping Its Customers Do With Oracle Solaris 11

Director's Cut - Unedited - Lee Diamante, Solutions Architect for Forsythe Corp, an Oracle Solaris Partner, explains why Forsythe has been recommending Oracle Solaris to its customers, and what those customers have been doing with it.

Lots more to come ...

- Rick

Website Newsletter Facebook Twitter

Thursday Sep 27, 2012

Heading Out to Oracle Open World

In case you haven't figured it out by now, Oracle reserves an awful lot of announcements for Oracle Open World. As a result, the show is always a lot of fun for geeks. What will the Oracle Solaris team have to say? Will the Oracle Linux team have any surprises? And what about Oracle hardware?

For my part, I'll be one of the lizards at the OTN Lounge with the OTN crew, handing out t-shirts to system admins and developers, or anyone who is willing to impersonate one. I understand, not everyone can have the raw animal magnetism of a sysadmin, or the debonair sophistication of a C++ developer, so some of you have no choice but to pretend. I won't judge.

I'll also be doing video interviews of as many techie people as I can corner. I've got more than 30 interviews already scheduled. Most of them will be 3-5 minutes long. I'll be asking our best technical minds what's cool about their latest technologies and what impact it will have on system admins or system developers. I'll be posting those videos here:

Find OTN Systems Videos from Oracle Open World Here!

We've got some great topics in mind. A dummies guide to hardware-assisted cryptography with Glenn Brunette. ZFS deduplication. The momentum building around Oracle Solaris 11, with Lynn Rohrer, plus conversations with partners who have deployed Oracle Solaris 11. Migrating to Oracle Database with SQL Developer. The whole database cloud thing. Oracle VM and, of course, Oracle Linux.

So even if you can't be part of the fun, keep an eye out for the videos on our YouTube channel.

- Rick

Website Newsletter Facebook Twitter

Wednesday Sep 05, 2012

Is 'Old-School' the Wrong Way to Describe Reliable Security?

source

The Hotel Toronto apparently knows how to secure its environment.

"Built directly into the bedrock in 1913, the vault features an incredible 4-foot thick steel door that weighs 40 tonnes, yet can nonetheless be moved with a single finger. During construction, the gargantuan door was hauled up Yonge Street from the harbour by a team of 18 horses. "

1913. Those were the days. Sysadmins had to be strong as bulls and willing to shovel horse maneur. At least nowadays you don't have to be that strong. And, if you happen to be trying to secure your Oracle Linux environment, you may be able to avoid the shoveling, as well. Provided you know the tricks of the trade contained in these two recently published articles.

Tips for Hardening an Oracle Linux Server

General strategies for hardening an Oracle Linux server. Oracle Linux comes "secure by default," but the actions you take when deploying the server can increase or decrease its security. How to minimize active services, lock down network services, and many other tips. By Ginny Henningsen, James Morris and Lenz Grimmer.

Tips for Securing an Oracle Linux Environment

System logging with logwatch and process accounting with psacct can help detect intrusion attempts and determine whether a system has been compromised. So can using the RPM package manager to verifying the integrity of installed software. These and other tools are described in this second article, which takes a wider perspective and gives you tips for securing your entire Oracle Linux environment. Also by the crack team of Ginny Henningsen, James Morris and Lenz Grimmer.

- Rick

Website Newsletter Facebook Twitter

Wednesday Aug 15, 2012

It's Better with Btrfs

source

Two recently published articles to help you become proficient with the Btrfs file system in Oracle Linux:

How I Got Started with the Btrfs File System in Oracle Linux

By Margaret Bierman

Scalability and volume management. Write methodology and access. Tunables. Margaret describes these capabilities of the Btrfs file system, plus how it deals with redundant configurations, checksums, fault isolation and much more. She also walks you through the steps to create and set up a Btrfs file system so you can become familiar with it.

How I Use the Advanced Features of the Btrfs File System

By Margaret Bierman

How to create and mount a Btrfs file system. How to copy and delete files. How to create and manage a redundant file system configuration. How to check the integrity of the file system and its remaining capacity. How to take snapshots. How to clone. And more. In this article Margaret explores the more advanced features of the Btrfs file system.

Let us know what you think, and what you'd like to see Margaret write about in the future.

- Rick

Website Newsletter Facebook Twitter

Wednesday Jul 25, 2012

OTN Sysadmin Day in Denver, Colorado

Source

Can you find the sysadmin in the picture?

You might be able to on Thursday, August 23rd. OTN is hosting its next Sysadmin Day in Denver, Colorado, and we can never keep track of our sysadmins. In a place as purty as Colorado, it will be even harder.

Note: The date on the link above is incorrect. The correct date is Thursday, August 23rd.

Our previous OTN Sysadmin Day in Santa Clara had almost 100 attendees. The one in Denver will have similar presentations, but we're adding some content on virtualization. Which we hope to expand into a third track in the future. As usual, Pavel Anni opens our OTN Sysadmin Days with a talk about Oracle's dual OS strategy. He explains why Oracle offers two operating systems, and summarizes the main features of each one. Then we split off into two different groups to get our hands on each OS.

One group gets their hands on the ZFS filesystem, virtualization capabilities, and security controls of Oracle Solaris.

The other group gets their hands on the package management tools, services, and runs levels of Oracle Linux, plus its volume management tools and the Btrfs filesystem.

Both groups learn by doing, using the hands-on labs similar to those on OTN's Hands-On Labs page. Why attend an event in person when you could simply work the labs on your own? Two reasons:

  1. Since you are away from the obligations of the data center, you get to focus on working the labs without interruption.
  2. You get help from Oracle experts and other sysadmins who are working on the same labs as you.
The event is free. Here's the agenda:

Time Session
8:00 am System Shakedown
9:00 am Oracle's Dual OS Strategy
 

Oracle Solaris Track

Oracle Linux Track

10:00 am HOL: Oracle Solaris ZFS HOL: Package Management and Configuration
11:30 am HOL: Virtualization HOL: Storage Management
1:00 pm Lunch / Surfing OTN
2:00 pm HOL: Oracle Solaris Security HOL: Btrfs filesystem
3:00 pm Presentation: Oracle Enterprise Manager Ops Center 11g
3:30 pm Presentation: Oracle VM Manager
4:00 pm Discussion: What are the most pressing issues for sysadmins today?
5:00 pm Get lost in the mountains.

- Rick

Website Newsletter Facebook Twitter
About

Contributors:
Rick Ramsey
Kemer Thomson
and members of the OTN community

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
12
13
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Blogs We Like