tag:blogger.com,1999:blog-41752846890693439382024-03-13T01:26:42.392-07:00Linux, Devops etcCollection of technical notesUnknownnoreply@blogger.comBlogger61125tag:blogger.com,1999:blog-4175284689069343938.post-88739664149768753632014-08-21T05:29:00.001-07:002014-08-21T05:39:22.479-07:00Failing ssh connections on Centos 7 docker host <div dir="ltr" style="text-align: left;" trbidi="on">
<div>
<div style="text-align: left;">
When I tried to connect to a container running on Centos 7 host running ssh service I was getting:</div>
</div>
<div>
<span style="background-color: #eeeeee; color: #222222; font-family: 'Ubuntu Mono', 'Ubuntu Beta Mono A', Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; line-height: 18.200000762939453px; white-space: pre-wrap;"><br /></span></div>
<div>
<span style="background-color: #eeeeee; color: #222222; font-family: 'Ubuntu Mono', 'Ubuntu Beta Mono A', Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; line-height: 18.200000762939453px; white-space: pre-wrap;">Read from socket failed: Connection reset by peer</span></div>
<div>
<br />
I was running a container with ssh service inside it on Ubuntu using Dockerfile from: https://docs.docker.com/examples/running_ssh_service/</div>
<div>
<br /></div>
<div>
<pre class="prettyprint well" style="background-color: #fcfcfc; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgb(227, 227, 227); color: #333333; font-family: Monaco, Consolas, 'Lucida Console', monospace; font-size: 14px; line-height: 23.799999237060547px; margin-bottom: 20px; min-height: 20px; overflow-x: auto; padding: 8px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;"><code style="background-color: transparent; border: 0px; color: inherit; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; line-height: 1.7; overflow-wrap: normal; padding: 0px; white-space: pre;"><span class="com" style="color: #93a1a1; line-height: 1.7;"># sshd</span><span class="pln" style="color: #48484c; line-height: 1.7;">
</span><span class="com" style="color: #93a1a1; line-height: 1.7;">#</span><span class="pln" style="color: #48484c; line-height: 1.7;">
</span><span class="com" style="color: #93a1a1; line-height: 1.7;"># VERSION 0.0.1</span><span class="pln" style="color: #48484c; line-height: 1.7;">
FROM ubuntu</span><span class="pun" style="color: #93a1a1; line-height: 1.7;">:</span><span class="lit" style="color: #195f91; line-height: 1.7;">12.04</span><span class="pln" style="color: #48484c; line-height: 1.7;">
MAINTAINER </span><span class="typ" style="color: teal; line-height: 1.7;">Thatcher</span><span class="pln" style="color: #48484c; line-height: 1.7;"> R</span><span class="pun" style="color: #93a1a1; line-height: 1.7;">.</span><span class="pln" style="color: #48484c; line-height: 1.7;"> </span><span class="typ" style="color: teal; line-height: 1.7;">Peskens</span><span class="pln" style="color: #48484c; line-height: 1.7;"> </span><span class="str" style="color: #dd1144; line-height: 1.7;">"thatcher@dotcloud.com"</span><span class="pln" style="color: #48484c; line-height: 1.7;">
</span><span class="com" style="color: #93a1a1; line-height: 1.7;"># make sure the package repository is up to date</span><span class="pln" style="color: #48484c; line-height: 1.7;">
RUN apt</span><span class="pun" style="color: #93a1a1; line-height: 1.7;">-</span><span class="kwd" style="color: #1e347b; line-height: 1.7;">get</span><span class="pln" style="color: #48484c; line-height: 1.7;"> update
RUN apt</span><span class="pun" style="color: #93a1a1; line-height: 1.7;">-</span><span class="kwd" style="color: #1e347b; line-height: 1.7;">get</span><span class="pln" style="color: #48484c; line-height: 1.7;"> install </span><span class="pun" style="color: #93a1a1; line-height: 1.7;">-</span><span class="pln" style="color: #48484c; line-height: 1.7;">y openssh</span><span class="pun" style="color: #93a1a1; line-height: 1.7;">-</span><span class="pln" style="color: #48484c; line-height: 1.7;">server
RUN mkdir </span><span class="pun" style="color: #93a1a1; line-height: 1.7;">/</span><span class="kwd" style="color: #1e347b; line-height: 1.7;">var</span><span class="pun" style="color: #93a1a1; line-height: 1.7;">/</span><span class="pln" style="color: #48484c; line-height: 1.7;">run</span><span class="pun" style="color: #93a1a1; line-height: 1.7;">/</span><span class="pln" style="color: #48484c; line-height: 1.7;">sshd
RUN echo </span><span class="str" style="color: #dd1144; line-height: 1.7;">'root:screencast'</span><span class="pln" style="color: #48484c; line-height: 1.7;"> </span><span class="pun" style="color: #93a1a1; line-height: 1.7;">|</span><span class="pln" style="color: #48484c; line-height: 1.7;">chpasswd
EXPOSE </span><span class="lit" style="color: #195f91; line-height: 1.7;">22</span><span class="pln" style="color: #48484c; line-height: 1.7;">
CMD </span><span class="pun" style="color: #93a1a1; line-height: 1.7;">[</span><span class="str" style="color: #dd1144; line-height: 1.7;">"/usr/sbin/sshd"</span><span class="pun" style="color: #93a1a1; line-height: 1.7;">,</span><span class="pln" style="color: #48484c; line-height: 1.7;"> </span><span class="str" style="color: #dd1144; line-height: 1.7;">"-D"</span><span class="pun" style="color: #93a1a1; line-height: 1.7;">]</span></code></pre>
<div style="background-color: white; margin-bottom: 1em;">
<div style="text-align: left;">
<br> It worked perfectly on Ubuntu 14.04 as the docker host, but when I tried the same docker file build on Centos 7 host I was unable to connect to the ssh service running inside container. I've tried all the available solutions mentioned on the internet like disabling selinux, disabling firewalld , changing container ssh configuration from UsePAM yes to UsePAM no and generating ssh keys inside the container before running sshd daemon. Also used the docker file from here: <span style="background-color: transparent;">https://github.com/tutumcloud/tutum-entos/blob/master/Dockerfile</span></div> </br>
<span style="background-color: transparent;"><br /></span>
<span style="background-color: transparent;">Running netcat and using telnet to connect works.</span></div>
<div style="background-color: white; margin-bottom: 1em;">
<span style="background-color: transparent;">But the ssh problem still persisted and after searching further found this discussion:</span></div>
<div style="background-color: white; margin-bottom: 1em;">
<span style="background-color: transparent;">https://github.com/sameersbn/docker-gitlab/issues/122</span></div>
<div style="background-color: white; margin-bottom: 1em;">
which helped me resolve the problem. So basically to summarize the solution</div>
<div style="background-color: white; margin-bottom: 1em;">
set <code style="background-color: rgba(0, 0, 0, 0.0392157); border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; margin: 0px; padding: 0.2em 0px;">UsePrivilegeSeparation no</code><span style="color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 14px; line-height: 22.399999618530273px;"> in the sshd_config of the container and you should be able to login </span></div>
<div style="background-color: white; margin-bottom: 1em;">
<span style="color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 14px; line-height: 22.399999618530273px;">Dockerfile for the same adapted from (</span><span style="background-color: transparent; font-size: 14px; line-height: 22.399999618530273px;"><span style="color: #333333; font-family: Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif;">https://github.com/tutumcloud/tutum-centos)</span></span><span style="color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 14px; line-height: 22.399999618530273px;"> :</span></div>
<div style="background-color: white; margin-bottom: 1em;">
<br />
One nice tip learned from this troubleshooting is that you can enter a container using tool called nsenter as follows:</div>
<pre><span style="background-color: white; font-family: 'Times New Roman'; white-space: normal;">
</span></pre>
<pre><pre style="background-color: #eeeeff; border: 1px solid rgb(221, 221, 221); line-height: 22.424999237060547px; padding: 0px 0.4em; text-align: justify;"><code class="text language-text" data-lang="text" style="border: none; margin: 0px; padding: 0px 0.2em;">PID=$(docker inspect --format '{{.State.Pid}}' my_container_id)</code></pre>
</pre>
<div style="background-color: white; margin-bottom: 1em;">
<span style="color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 14px; line-height: 22.399999618530273px;"><br /></span></div>
<pre style="background-color: #eeeeff; border: 1px solid rgb(221, 221, 221); line-height: 22.424999237060547px; padding: 0px 0.4em; text-align: justify;"><code class="text language-text" data-lang="text" style="border: none; margin: 0px; padding: 0px 0.2em;">nsenter --target $PID --mount --uts --ipc --net --pid</code></pre>
<div style="background-color: white; margin-bottom: 1em;">
<br />
But got another problem, the session hangs right after logging in. working on finding a fix for that issue.</div>
<div style="background-color: white; margin-bottom: 1em;">
<span style="color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 14px; line-height: 22.399999618530273px;">References:</span></div>
<div style="background-color: white; margin-bottom: 1em;">
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif;"><span style="font-size: 14px; line-height: 22.399999618530273px;">https://github.com/sameersbn/docker-gitlab/issues/122</span></span></div>
<div style="background-color: white; margin-bottom: 1em;">
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif;"><span style="font-size: 14px; line-height: 22.399999618530273px;">https://github.com/docker/docker/issues/6103</span></span></div>
<div style="background-color: white; margin-bottom: 1em;">
http://jpetazzo.github.io/2014/03/23/lxc-attach-nsinit-nsenter-docker-0-9/</div>
<div style="background-color: white; margin-bottom: 1em;">
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif;"><span style="font-size: 14px; line-height: 22.399999618530273px;"><br /></span></span></div>
<div style="background-color: white; margin-bottom: 1em;">
<span style="color: #333333; font-family: Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif;"><span style="font-size: 14px; line-height: 22.399999618530273px;"><br /></span></span></div>
<div style="background-color: white; margin-bottom: 1em;">
<span style="background-color: transparent;"><br /></span></div>
<div style="background-color: white; margin-bottom: 1em;">
<span style="background-color: transparent;"><br /></span></div>
</div>
</div>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-4175284689069343938.post-2151336015558924272012-05-30T05:16:00.002-07:002012-05-30T05:16:36.094-07:00Merging Branch with Trunk<div dir="ltr" style="text-align: left;" trbidi="on">
SVN: Merge a branch with your trunk<br /><br />When created a branch a few days back to try some fancy new technology in application. Now I want to merge the code in the branch with my trunk.<br /><br />I have a checked-out working copy of the branch available.<br /><br /><br />First, make sure you have a working copy of your trunk. I choose to switch my working copy back: (oh, make sure you have all your changes checked in in your branch before you switch!)<br /><br />$ svn switch http://example.com/svn/myproject/trunk<br />This removes, adds and updates all files you have worked on in your branch and creates a working copy of the code in the trunk.<br /><br />Now, with my trunk in place, I can call 'merge' and apply the changes.<br /><br />$ svn merge http://example.com/svn/myproject/trunk http://example.com/svn/myproject/branches/TRY-AJAX<br />Since the files from the trunk and the beginning of the TRY-branch are still exact copies, I won't get in any trouble. If you do (and you did change your code in your trunk), make sure to resolve merging problems before checking in. When ready, check in your new code!<br /><br />$ svn ci -m "Merge TRY-AJAX branch with trunk"<br />That's it. You have now merged the branch with your trunk. Enjoy!</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-54510456900876005152012-05-25T02:32:00.001-07:002012-05-30T05:16:55.463-07:00<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; background-image: none; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; color: black; font-family: sans-serif; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0px 0px 0.6em; orphans: 2; padding-bottom: 0.17em; padding-top: 0.5em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span class="mw-headline" id="Creating_your_first_Organizational_Units">LDAP: Creating your first Organizational Units </span></h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
On the offchance that you haven't installed LAM, and thus haven't created the organizational units<span class="Apple-converted-space"> </span><i>people</i>,<span class="Apple-converted-space"> </span><i>groups</i>,<span class="Apple-converted-space"> </span><i>hosts</i><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span><i>domains</i>, here's how to create them manually. Create a file containing the following information:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f9f9f9; border: 1px dashed rgb(47, 111, 171); color: black; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.1em; orphans: 2; padding: 1em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;">dn: ou=people,dc=saruman,dc=biz
ou: people
objectClass: top
objectClass: organizationalUnit
dn: ou=groups,dc=saruman,dc=biz
ou: groups
objectClass: top
objectClass: organizationalUnit
dn: ou=hosts,dc=saruman,dc=biz
ou: hosts
objectClass: top
objectClass: organizationalUnit
dn: ou=domains,dc=saruman,dc=biz
ou: domains
objectClass: top
objectClass: organizationalUnit
</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
Let's suppose this file is named<span class="Apple-converted-space"> </span><i>orgunits.ldif</i>. Now from the directory that contains this file, feed the information into your OpenLDAP using the following commands:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f9f9f9; border: 1px dashed rgb(47, 111, 171); color: black; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.1em; orphans: 2; padding: 1em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;">sudo invoke-rc.d slapd stop
sudo slapadd -c -v -l orgunits.ldif
sudo invoke-rc.d slapd start
</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
This effectively stops the server, writes the information directly into the database, and then starts the server again.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
Another way to do (almost) the<span class="Apple-converted-space"> </span><i>same</i><span class="Apple-converted-space"> </span>thing, would be to add the information with the<span class="Apple-converted-space"> </span><i>ldapadd</i><span class="Apple-converted-space"> </span>command:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f9f9f9; border: 1px dashed rgb(47, 111, 171); color: black; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.1em; orphans: 2; padding: 1em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;">ldapadd -c -x -D cn=admin,dc=saruman,dc=biz -W -f orgunits.ldif
</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
This binds to the OpenLDAP server (which must be running) using the admin account. This in turn causes the command to request the admin password, and then feed the contents from the<span class="Apple-converted-space"> </span><i>orgunits.ldif</i><span class="Apple-converted-space"> </span>file into the database. However, adding data to a live database precludes you from adding system controlled attributes, as structuralObjectClass is. So for live addition, remove those four particular lines from the<span class="Apple-converted-space"> </span><i>orgunits.ldif</i><span class="Apple-converted-space"> </span>file.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
Explanation of this difference:<span class="Apple-converted-space"> </span><i>slapadd</i><span class="Apple-converted-space"> </span>is meant as a restore tool, so it must (and can) create system controlled attributes.<span class="Apple-converted-space"> </span><i>ldapadd</i><span class="Apple-converted-space"> </span>is a modification tool, so it shouldn't need to (and can't) create these attributes.</div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; background-image: none; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; color: black; font-family: sans-serif; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0px 0px 0.6em; orphans: 2; padding-bottom: 0.17em; padding-top: 0.5em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span class="mw-headline" id="Migrating_User.2C_Password_and_Group_entries_to_an_LDAP_server">Migrating User, Password and Group entries to an LDAP server</span></h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
It's nice to have an LDAP, but it's<span class="Apple-converted-space"> </span><i>much</i><span class="Apple-converted-space"> </span>nicer if it is filled with information. We'll try to enter all existing users and groups from the host server into LDAP, using<span class="Apple-converted-space"> </span><a class="new" href="http://www.saruman.biz/wiki/index.php?title=Migrating_existing_Unix_users_to_OpenLDAP&action=edit&redlink=1" style="background-image: none; background-position: initial initial; background-repeat: initial initial; color: #a55858; text-decoration: none;" title="Migrating existing Unix users to OpenLDAP (page does not exist)">the available migration tools</a>.</div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; background-image: none; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; color: black; font-family: sans-serif; font-size: 19px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0px 0px 0.6em; orphans: 2; padding-bottom: 0.17em; padding-top: 0.5em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span class="mw-headline" id="Creating_new_users">Creating new users</span></h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
If we need new users (e.g. when the server you're setting up is spankin' new) then we can create them in several ways. Let's discuss two of them:</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; background-image: none; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; color: black; font-family: sans-serif; font-size: 17px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: 19px; margin: 0px 0px 0.3em; orphans: 2; padding-bottom: 0.17em; padding-top: 0.5em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span class="mw-headline" id="Adding_a_user_with_an_LDIF_file">Adding a user with an LDIF file</span></h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
To add a user with the LDAP command line utilities, we first need to create an LDIF file. This file is a simple text file, created with a text editor like<span class="Apple-converted-space"> </span><i><a href="http://www.saruman.biz/wiki/index.php/Vim" style="background-image: none; background-position: initial initial; background-repeat: initial initial; color: #5a3696; text-decoration: none;" title="Vim">vi</a></i>. The file could look something like the text below. In that file, we create a posix group "networkusers", and a user "sixpacjo" that's a member of this posix group. However, first we need to<span class="Apple-converted-space"> </span>generate a password<span class="Apple-converted-space"> </span>for our user, e.g. "raQaMad3", then hash it:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f9f9f9; border: 1px dashed rgb(47, 111, 171); color: black; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.1em; orphans: 2; padding: 1em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;">slappasswd -u -h {SSHA} -s raQaMad3
{SSHA}OcAQWgcTCzpu6v8n4yUUthiKPM6rlODq
</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
Now with this hashed password, and all other information on user sixpacjo and group networkusers, we can create the actual LDIF file</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f9f9f9; border: 1px dashed rgb(47, 111, 171); color: black; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.1em; orphans: 2; padding: 1em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"># Create the user group
dn: cn=networkusers,ou=groups,dc=saruman,dc=biz
objectClass: posixGroup
gidNumber: 10001
cn: networkusers
description: Internal network users
# Create a new user:
dn: uid=sixpacjo,ou=people,dc=saruman,dc=biz
objectClass: top
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetOrgPerson
cn: Joe Sixpack
description: Your Average Network User
givenName: Joe
sn: Sixpack
mail: joe.sixpack@saruman.biz
mail: j.sixpack@saruman.biz
# The Unix login-name for the user:
uid: sixpacjo
# The group and user IDs:
gidNumber: 10001
uidNumber: 10001
# The Unix account data:
homeDirectory: /home/sixpacjo
loginShell: /bin/bash
# The encrypted password for the user:
userPassword: {SSHA}OcAQWgcTCzpu6v8n4yUUthiKPM6rlODq
</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
For a line-by-line explanation of this LDIF file, go<span class="Apple-converted-space"> </span><a href="http://www.saruman.biz/wiki/index.php/LDIF_syntax_explanation" style="background-image: none; background-position: initial initial; background-repeat: initial initial; color: #5a3696; text-decoration: none;" title="LDIF syntax explanation">here</a>; we also explain the<span class="Apple-converted-space"> </span><a href="http://www.saruman.biz/wiki/index.php/LDIF_syntax_explanation" style="background-image: none; background-position: initial initial; background-repeat: initial initial; color: #5a3696; text-decoration: none;" title="LDIF syntax explanation">password hashing</a><span class="Apple-converted-space"> </span>there. If you need to create more users, you can put them all in the same LDIF file, as long as you leave empty lines between each user.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
To put the information from this file into our LDAP server, we have two options:</div>
<ol style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; list-style-image: none; margin: 0.3em 0px 0px 3.2em; orphans: 2; padding: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="margin-bottom: 0.1em;">Shut down the OpenLDAP server, put the information straight into the database using<span class="Apple-converted-space"> </span><i>slapadd</i>, and then starting the server again. This would be the recommended way to enter information if we hadn't just typed it in ourselves, but previously made a backup of some sorts from the LDAP server using<span class="Apple-converted-space"> </span><i>slapcat</i>.</li>
<li style="margin-bottom: 0.1em;">Keep the OpenLDAP running, and use the<span class="Apple-converted-space"> </span><i>ldapadd</i><span class="Apple-converted-space"> </span>utility to read the data into the live LDAP database. This makes use of the credentials of some user that has the right to write in the database, at least at the places where your LDIF file wants to store information (in the above example: in the<span class="Apple-converted-space"> </span><i>groups</i><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span><i>people</i><span class="Apple-converted-space"> </span>OU's).</li>
</ol>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
The<span class="Apple-converted-space"> </span><i>ldapadd</i><span class="Apple-converted-space"> </span>method works like this: after creating the file, e.g.<span class="Apple-converted-space"> </span><i>sixpack.ldif</i><span class="Apple-converted-space"> </span>in a certain place, e.g. our home directory, we run the following command:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f9f9f9; border: 1px dashed rgb(47, 111, 171); color: black; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.1em; orphans: 2; padding: 1em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;">ldapadd -v -x -D cn=admin.dc=saruman.dc=biz -W -f ~/sixpack.ldif
</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
The meaning of the options is as follows:</div>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; list-style-image: url(http://www.saruman.biz/wiki/skins/monobook/bullet.gif); list-style-type: square; margin: 0.3em 0px 0px 1.5em; orphans: 2; padding: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="margin-bottom: 0.1em;"><b>-v</b><span class="Apple-converted-space"> </span>the everamusing "verbose" for extra diagnostic messages.</li>
<li style="margin-bottom: 0.1em;"><b>-x</b><span class="Apple-converted-space"> </span>use "simple bind" and not a TLS-encrypted connection.</li>
<li style="margin-bottom: 0.1em;"><b>-D cn=admin.dc=saruman.dc=biz</b><span class="Apple-converted-space"> </span>is the Distinguished Name with which to bind to the LDAP server.</li>
<li style="margin-bottom: 0.1em;"><b>-W</b><span class="Apple-converted-space"> </span>prompt for the password of the -D credential. Alternatively, use<span class="Apple-converted-space"> </span><i>-w <password></password></i>, but ofcourse then the password winds up in your Bash history file et cetera.</li>
<li style="margin-bottom: 0.1em;"><b>-f ~/sixpack.ldif</b><span class="Apple-converted-space"> </span>read the LDIF information from this particular file, instead of the StdIn</li>
</ul>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
The output of such an action could look like this:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f9f9f9; border: 1px dashed rgb(47, 111, 171); color: black; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.1em; orphans: 2; padding: 1em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;">ldapadd -v -x -D cn=admin,dc=saruman,dc=biz -W -f sixpack.ldif
ldap_initialize( <default> )
Enter LDAP Password:
add objectClass:
posixGroup
add gidNumber:
10001
add cn:
networkusers
add description:
Internal network users
adding new entry "cn=networkusers,ou=groups,dc=saruman,dc=biz"
modify complete
add objectClass:
posixAccount
shadowAccount
inetOrgPerson
add cn:
Joe Sixpack
add description:
Your Average Network User
....
(et cetera et cetera)
....
adding new entry "uid=sixpacjo,ou=people,dc=saruman,dc=biz"
modify complete
</default></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
There, wasn't that fun? We now have Joe Sixpack in our LDAP server with all data necessary for a valid account - even though he as yet can't do anything yet on our server! To change that, we'll have to instruct our server to give user<span class="Apple-converted-space"> </span><i>sixpacjo</i><span class="Apple-converted-space"> </span><a href="http://www.saruman.biz/wiki/index.php/Accessing_a_shell_with_LDAP_authentication" style="background-image: none; background-position: initial initial; background-repeat: initial initial; color: #5a3696; text-decoration: none;" title="Accessing a shell with LDAP authentication">shell access</a>.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; background-image: none; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; color: black; font-family: sans-serif; font-size: 17px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: 19px; margin: 0px 0px 0.3em; orphans: 2; padding-bottom: 0.17em; padding-top: 0.5em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span class="mw-headline" id="Adding_a_user_with_LAM">Adding a user with LAM</span></h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
To add a user with LAM is not exactly challenging. Log into LAM with an admin account; in the top menu, click Users; at the left bottom, you'll find a button "New user". Click it.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
You'll find yourself in a browser screen with four "tabs": Personal, Unix, Shadow, and Samba3. Incidentally, if the system complains about "No Samba3 domains found in LDAP": ignore that for now.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; margin: 0.4em 0px 0.5em; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
In the first tab Personal, we find a (large) number of attributes that we can fill; the mandatory attributes are marked with an asterisk. At a minimum, fill in those required attributes. Then switch to the next tab, Unix. Here we fill in the required attributes, taking care to select a unique UID number, selecting the right primary group (that you've made beforehand, naturally, e.g. with the LDIF file mentioned previously), and setting a password. We don't need to add anything to the 3rd and 4th tab, so we can finish by clicking save at the left top hand. LAM should respond with "LDAP operation succesfull".</div>
<br /></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-85120327403820752712012-05-02T08:47:00.003-07:002012-05-02T08:47:49.926-07:00Oracle Client installation on Ubuntu<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="line862" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Oracle Instant Client is a free<span class="Apple-converted-space"> </span><a href="https://help.ubuntu.com/community/Oracle" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #dd4814; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; vertical-align: baseline;">Oracle</a><span class="Apple-converted-space"> </span>database client. The current version is 11.2.0.1.0, and several versions back to 10.1.0.5 are available.<span class="anchor" id="line-5" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-6" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<h1 id="Install_RPMs" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 28px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 32px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0em; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Install RPMs</h1>
<span class="anchor" id="line-7" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><span class="anchor" id="line-8" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1.5; margin-bottom: 8px; margin-left: 2.4em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"><div class="line862" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;">
Download the Oracle Instantclient RPM files from<a class="http" href="http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #dd4814; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; vertical-align: baseline;">http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html</a>. Everyone needs either "Basic" or "Basic lite", and most users will want "SQL*Plus" and the "SDK".<span class="anchor" id="line-9" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
</li>
<li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1.5; margin-bottom: 8px; margin-left: 2.4em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"><div class="line862" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;">
Convert these .rpm files into .deb packages and install using "<a class="nonexistent" href="https://help.ubuntu.com/community/alien" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #dd4814; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-decoration: none; vertical-align: baseline;">alien</a>" ("sudo apt-get install alien" if you don't have it):<span class="anchor" id="line-10" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-11" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-12" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-13" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-14" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<pre style="background-color: #f3f3f3; border-bottom-color: rgb(193, 180, 150); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(193, 180, 150); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(193, 180, 150); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(193, 180, 150); border-top-style: dashed; border-top-width: 1px; font-family: UbuntuMono, courier, monospace; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 16px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 4pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; text-align: left; vertical-align: baseline; white-space: pre-wrap; word-wrap: break-word;"><span class="anchor" id="line-1" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span>alien -i oracle-instantclient-basic*.rpm
<span class="anchor" id="line-2" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span>alien -i oracle-instantclient-sqlplus*.rpm
<span class="anchor" id="line-3" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span>alien -i oracle-instantclient-devel*.rpm</pre>
<span class="anchor" id="line-15" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></li>
<li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1.5; margin-bottom: 0px; margin-left: 2.4em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;">Test your Instantclient install by using "sqlplus" to connect to your database:<span class="anchor" id="line-16" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></li>
</ul>
<div class="line867" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<span class="anchor" id="line-17" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-18" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f3f3f3; border-bottom-color: rgb(193, 180, 150); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(193, 180, 150); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(193, 180, 150); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(193, 180, 150); border-top-style: dashed; border-top-width: 1px; color: #333333; font-family: UbuntuMono, courier, monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 4pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: pre-wrap; widows: 2; word-spacing: 0px; word-wrap: break-word;"><span class="anchor" id="line-1-1" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span>sqlplus username/password@//dbhost:1521/SID</pre>
<span class="anchor" id="line-19" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><span class="anchor" id="line-20" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><div class="line874" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
If sqlplus complains of a missing libaio.so.1 file, run<span class="Apple-converted-space"> </span><span class="anchor" id="line-21" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-22" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-23" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f3f3f3; border-bottom-color: rgb(193, 180, 150); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(193, 180, 150); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(193, 180, 150); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(193, 180, 150); border-top-style: dashed; border-top-width: 1px; color: #333333; font-family: UbuntuMono, courier, monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 4pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: pre-wrap; widows: 2; word-spacing: 0px; word-wrap: break-word;"><span class="anchor" id="line-1-2" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span>sudo apt-get install libaio1</pre>
<span class="anchor" id="line-24" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><span class="anchor" id="line-25" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><div class="line874" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
If sqlplus complains of a missing libsqlplus.so file, follow the steps in the section "Integrate Oracle Libraries" below.<span class="anchor" id="line-26" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-27" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<div class="line874" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
If you execute sqlplus and get "sqlplus: command not found", see the section below about adding the ORACLE_HOME variable.<span class="Apple-converted-space"> </span><span class="anchor" id="line-28" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-29" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<h1 id="Integrate_Oracle_Libraries" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 28px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 32px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0em; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Integrate Oracle Libraries</h1>
<span class="anchor" id="line-30" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><div class="line874" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
If oracle applications, such as sqlplus, are complaining about missing libraries, you can add the Oracle libraries to the LD_LIBRARY_PATH each time it is used, or to add it to the system library list create a new file as follows:<span class="anchor" id="line-31" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-32" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-33" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f3f3f3; border-bottom-color: rgb(193, 180, 150); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(193, 180, 150); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(193, 180, 150); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(193, 180, 150); border-top-style: dashed; border-top-width: 1px; color: #333333; font-family: UbuntuMono, courier, monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 4pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: pre-wrap; widows: 2; word-spacing: 0px; word-wrap: break-word;"><span class="anchor" id="line-1-3" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span>sudo vi /etc/ld.so.conf.d/oracle.conf</pre>
<span class="anchor" id="line-34" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1.5; list-style-type: none; margin-bottom: 0px; margin-left: 2.4em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;">and add the oracle library path as the first line. For example,<span class="anchor" id="line-35" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></li>
</ul>
<div class="line867" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<span class="anchor" id="line-36" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-37" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f3f3f3; border-bottom-color: rgb(193, 180, 150); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(193, 180, 150); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(193, 180, 150); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(193, 180, 150); border-top-style: dashed; border-top-width: 1px; color: #333333; font-family: UbuntuMono, courier, monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 4pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: pre-wrap; widows: 2; word-spacing: 0px; word-wrap: break-word;"><span class="anchor" id="line-1-4" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span>/usr/lib/oracle/11.1.0.1/client/lib</pre>
<span class="anchor" id="line-38" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1.5; list-style-type: none; margin-bottom: 0px; margin-left: 2.4em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;">or<span class="anchor" id="line-39" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></li>
</ul>
<div class="line867" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<span class="anchor" id="line-40" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-41" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f3f3f3; border-bottom-color: rgb(193, 180, 150); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(193, 180, 150); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(193, 180, 150); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(193, 180, 150); border-top-style: dashed; border-top-width: 1px; color: #333333; font-family: UbuntuMono, courier, monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 4pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: pre-wrap; widows: 2; word-spacing: 0px; word-wrap: break-word;"><span class="anchor" id="line-1-5" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span>/usr/lib/oracle/11.2/client/lib/</pre>
<span class="anchor" id="line-42" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><span class="anchor" id="line-43" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1.5; list-style-type: none; margin-bottom: 0px; margin-left: 2.4em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;">Then run ldconfig:<span class="anchor" id="line-44" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-45" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-46" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><pre style="background-color: #f3f3f3; border-bottom-color: rgb(193, 180, 150); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(193, 180, 150); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(193, 180, 150); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(193, 180, 150); border-top-style: dashed; border-top-width: 1px; font-family: UbuntuMono, courier, monospace; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 16px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 4pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; text-align: left; vertical-align: baseline; white-space: pre-wrap; word-wrap: break-word;"><span class="anchor" id="line-1-6" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span>sudo ldconfig</pre>
<span class="anchor" id="line-47" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-48" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></li>
</ul>
<h1 id="ORACLE_HOME" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 28px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 32px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0em; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
ORACLE_HOME</h1>
<span class="anchor" id="line-49" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><div class="line874" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Many Oracle database applications look for Oracle software in the location specified in the environment variable 'ORACLE_HOME'.<span class="anchor" id="line-50" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-51" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<div class="line874" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Typical workstations will only have one Oracle install, and will want to define this variable in a system-wide location.<span class="anchor" id="line-52" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-53" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<div class="line867" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<span class="anchor" id="line-54" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-55" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f3f3f3; border-bottom-color: rgb(193, 180, 150); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(193, 180, 150); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(193, 180, 150); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(193, 180, 150); border-top-style: dashed; border-top-width: 1px; color: #333333; font-family: UbuntuMono, courier, monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 4pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: pre-wrap; widows: 2; word-spacing: 0px; word-wrap: break-word;"><span class="anchor" id="line-1-7" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span>sudo vi /etc/profile.d/oracle.sh</pre>
<span class="anchor" id="line-56" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><span class="anchor" id="line-57" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><div class="line874" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Add the following:<span class="anchor" id="line-58" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-59" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-60" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f3f3f3; border-bottom-color: rgb(193, 180, 150); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(193, 180, 150); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(193, 180, 150); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(193, 180, 150); border-top-style: dashed; border-top-width: 1px; color: #333333; font-family: UbuntuMono, courier, monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 4pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: pre-wrap; widows: 2; word-spacing: 0px; word-wrap: break-word;"><span class="anchor" id="line-1-8" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span>export ORACLE_HOME=/usr/lib/oracle/11.1.0.1/client</pre>
<span class="anchor" id="line-61" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><div class="line874" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
or<span class="anchor" id="line-62" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-63" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-64" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f3f3f3; border-bottom-color: rgb(193, 180, 150); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(193, 180, 150); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(193, 180, 150); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(193, 180, 150); border-top-style: dashed; border-top-width: 1px; color: #333333; font-family: UbuntuMono, courier, monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 4pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: pre-wrap; widows: 2; word-spacing: 0px; word-wrap: break-word;"><span class="anchor" id="line-1-9" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span>export ORACLE_HOME=/usr/lib/oracle/11.2/client</pre>
<span class="anchor" id="line-65" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><span class="anchor" id="line-66" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><div class="line874" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Alternatively, each user can define this in their ~/.bash_profile<span class="anchor" id="line-67" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-68" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<div class="line874" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Note: For 11.04 sqlplus was not recognized as a command unless the following line was also included in the oracle.sh file:<span class="anchor" id="line-69" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-70" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-71" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f3f3f3; border-bottom-color: rgb(193, 180, 150); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(193, 180, 150); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(193, 180, 150); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(193, 180, 150); border-top-style: dashed; border-top-width: 1px; color: #333333; font-family: UbuntuMono, courier, monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 4pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: pre-wrap; widows: 2; word-spacing: 0px; word-wrap: break-word;"><span class="anchor" id="line-1-10" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span>export PATH=$PATH:$ORACLE_HOME/bin</pre>
<span class="anchor" id="line-72" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><span class="anchor" id="line-73" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><span class="anchor" id="line-74" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><span class="anchor" id="line-75" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><h1 id="SDK_fix" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 28px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 32px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0em; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
SDK fix</h1>
<span class="anchor" id="line-76" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><div class="line874" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Some packages may look for 'oci.h' in $ORACLE_HOME/include, or in $ORACLE_HOME/rdbms/public<span class="anchor" id="line-77" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-78" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<div class="line862" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The instant client sometimes places the include files, such as oci.h, in /usr/include/oracle/<version>/client.<span class="anchor" id="line-79" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-80" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></version></div>
<div class="line874" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Inspect your system by running the following commands<span class="anchor" id="line-81" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-82" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-83" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-84" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f3f3f3; border-bottom-color: rgb(193, 180, 150); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(193, 180, 150); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(193, 180, 150); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(193, 180, 150); border-top-style: dashed; border-top-width: 1px; color: #333333; font-family: UbuntuMono, courier, monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 4pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: pre-wrap; widows: 2; word-spacing: 0px; word-wrap: break-word;"><span class="anchor" id="line-1-11" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span>ls $ORACLE_HOME
<span class="anchor" id="line-2-1" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span>ls -d /usr/include/oracle/*/client</pre>
<span class="anchor" id="line-85" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><span class="anchor" id="line-86" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><div class="line874" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
If there is no 'include' directory under ORACLE_HOME, and it is located over in /usr/include/oracle/ , create a symbolic link to assist packages looking for these header files. For example,<span class="anchor" id="line-87" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-88" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<div class="line867" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<span class="anchor" id="line-89" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-90" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f3f3f3; border-bottom-color: rgb(193, 180, 150); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(193, 180, 150); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(193, 180, 150); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(193, 180, 150); border-top-style: dashed; border-top-width: 1px; color: #333333; font-family: UbuntuMono, courier, monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 4pt; padding-left: 4pt; padding-right: 4pt; padding-top: 4pt; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: pre-wrap; widows: 2; word-spacing: 0px; word-wrap: break-word;"><span class="anchor" id="line-1-12" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span>sudo ln -s /usr/include/oracle/11.2/client $ORACLE_HOME/include</pre>
<span class="anchor" id="line-91" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><span class="anchor" id="line-92" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"></span><div class="line874" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Ubuntu, 'Ubuntu Beta', 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
</div>
<div class="line874" data-mce-style="margin: 0px 0px 8px; padding: 0px; border-width: 0px; font-weight: normal; font-style: normal; font-size: 13px; line-height: 1.5; font-family: Ubuntu,'Ubuntu Beta','Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif; text-align: left; vertical-align: baseline; color: #333333; font-variant: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #ffffff;" style="background-color: white; border-width: 0px; color: #333333; font-family: Ubuntu,'Ubuntu Beta','Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin: 0px 0px 8px; orphans: 2; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
And then check it is correct</div>
<span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><pre data-mce-style="margin: 0px 0px 8px; padding: 4pt; border-width: 1px; font-weight: normal; font-style: normal; font-size: 13px; line-height: 16px; font-family: UbuntuMono,courier,monospace; text-align: left; vertical-align: baseline; background-color: #f3f3f3; border-style: dashed; border-color: #c1b496; white-space: pre-wrap; word-wrap: break-word; color: #333333; font-variant: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;" style="background-color: #f3f3f3; border-color: rgb(193, 180, 150); border-style: dashed; border-width: 1px; color: #333333; font-family: UbuntuMono,courier,monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; margin: 0px 0px 8px; orphans: 2; padding: 4pt; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: pre-wrap; widows: 2; word-spacing: 0px; word-wrap: break-word;">ls $ORACLE_HOME </pre>
<span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><br /></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"><span data-mce-style="font-family: arial,helvetica,sans-serif; font-size: small;" style="font-family: arial,helvetica,sans-serif; font-size: x-small;"></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span> <br /><div class="line874" style="background-color: white; border-width: 0px; color: #333333; font-family: Ubuntu,'Ubuntu Beta','Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin: 0px 0px 8px; orphans: 2; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
</div>
<div class="line874" style="background-color: white; border-width: 0px; color: #333333; font-family: Ubuntu,'Ubuntu Beta','Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin: 0px 0px 8px; orphans: 2; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
</div>
<div class="line874" style="background-color: white; border-width: 0px; color: #333333; font-family: Ubuntu,'Ubuntu Beta','Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin: 0px 0px 8px; orphans: 2; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
</div>
<div class="line874" style="background-color: white; border-width: 0px; color: #333333; font-family: Ubuntu,'Ubuntu Beta','Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin: 0px 0px 8px; orphans: 2; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
</div>
<div class="line874" style="background-color: white; border-width: 0px; color: #333333; font-family: Ubuntu,'Ubuntu Beta','Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin: 0px 0px 8px; orphans: 2; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<u><span class="anchor" id="line-93" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;">References:</span></u></div>
<div class="line874" style="background-color: white; border-width: 0px; color: #333333; font-family: Ubuntu,'Ubuntu Beta','Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5; margin: 0px 0px 8px; orphans: 2; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<span class="anchor" id="line-93" style="border-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin: 0px; padding: 0px; text-align: left; vertical-align: baseline;"> </span><span class="anchor" id="line-93" style="border-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin: 0px; padding: 0px; text-align: left; vertical-align: baseline;">1) </span><a href="https://help.ubuntu.com/community/Oracle%20Instant%20Client">https://help.ubuntu.com/community/Oracle%20Instant%20Client</a><span class="anchor" id="line-93" style="border-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin: 0px; padding: 0px; text-align: left; vertical-align: baseline;"> </span><span class="anchor" id="line-94" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span><span class="anchor" id="line-95" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"></span></div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-86892667073795684652012-04-19T04:01:00.000-07:002012-04-19T04:01:06.638-07:00Centos 5 post install config including locale info<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #80c41c; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 26px; font-style: normal; font-variant: normal; font-weight: inherit; letter-spacing: normal; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
OS check</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
First thing is to confirm what OS we're using. We know we should be using CentOS but let's see:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">cat /etc/redhat-release</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
You should get an output similar to this:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">CentOS release 5.5 (Final)</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Good.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #80c41c; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 26px; font-style: normal; font-variant: normal; font-weight: inherit; letter-spacing: normal; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Using free</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Memory usage should be very low at this point but let's check using 'free -m' (the -m suffix displays the result in MB's which I find easier to read):</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">free -m</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
It's nice to know what is going on so let's look at that output:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">. total used free shared buffers cached
Mem: 254 55 199 0 2 21
-/+ buffers/cache: 30 223
Swap: 511 0 511</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The line to take notice of is the second one as the first line includes cached memory - in this demo slice I have 254MB memory in total with 30MB actually used, 223MB free and no swap used. Nice.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #80c41c; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 26px; font-style: normal; font-variant: normal; font-weight: inherit; letter-spacing: normal; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
.bashrc</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Normally the "ls" command doesn't list files that start with a period. Those are usually configuration files or directories, and ls hides them so they don't clutter up your directory view. To see all of what's there, run:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">ls -a ~</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The "-a" option is what tells ls to list all files, not just the non-configuration files.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
You'll see several files, but let's focus on ".bashrc" right now. This is ultimately where your user environment (the "shell") will look for its settings. Go ahead and open it for editing:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">nano ~/.bashrc</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Inside you'll see a lot of shell script commands — don't worry if you don't understand it all. Anything we add at the end of the file will override what came before. If you want to, say, change your prompt, you don't necessarily need to figure out what all the "if" statements in there by default are for, and which line you need to edit. You can just add your own setting at the end.</div>
<h4 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #80c41c; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font-weight: inherit; letter-spacing: normal; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Custom prompt</h4>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
With that in mind, let's look at how to change your prompt. At its simplest, the prompt's format is set with the "PS1" environment variable. It consists of some numbers that determine color and some codes that act as stand-ins for variables like the current working directory and your hostname. To set your prompt to just your hostname and working directory, both in different colors, you could add this line to the end of the .bashrc file:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">PS1='\[\033[0;35m\]\h\[\033[0;33m\] \w\[\033[00m\]: '</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The chunks like "0;35m" and "0;33m" are what control the colors - those are pink and brown, for example. Other colors you can substitute include "0;32m" for green and "0;36m" for blue — it's just a matter of changing those numbers.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Other important parts of that jumbled collection of characters are "\h" and "\w", which represent the hostname and working directory, respectively. If you wanted to include your username in the prompt you could add the "\u" code along with an "@" symbol, and it would look like this:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">PS1='\[\033[0;35m\]\u@\h\[\033[0;33m\] \w\[\033[00m\]: '</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Before we see what that will look like, however, let's also look at another useful feature of your shell, aliases.</div>
<h4 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #80c41c; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font-weight: inherit; letter-spacing: normal; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Alias</h4>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The "alias" keyword lets you set a shortcut for another command. Some examples to get you started, which can be added to the end of your .bashrc file:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">alias free="free -m"
alias update="sudo yum update"
alias install="sudo yum install"
alias upgrade="sudo yum upgrade"
alias remove="sudo yum remove"</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
They're pretty simple examples, and are just meant to save you a little typing. Notice that you can essentially replace a command with an alias, like we did by setting the alias "free" to be a shortcut for "free -m". With that alias set, when you type "free" on the command line, behind the scenes the shell actually runs "free -m", so you don't have to type the extra characters to get the memory usage numbers in megabytes.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Similarly, those other aliases are shorthand for some yum commands to update or install packages. Since "sudo" is run behind the scenes you'll still have to type your password, but at least before that you won't have to type as much to run an update or install a package.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
To activate the changes you've made to the .bashrc file, either log out and log back in or enter this command:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">source ~/.bashrc</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
If you set a value for "PS1" above, you'll see your prompt change. Feel free to go back and change the colors or format of the prompt, or add your own aliases.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #80c41c; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 26px; font-style: normal; font-variant: normal; font-weight: inherit; letter-spacing: normal; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Set locale</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
You can check the current locale setting for your slice by running:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">/usr/bin/locale</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
If the code doesn't match what it should be for the localization you would like to use for your slice (or if it uses a generic locale like 'POSIX'), run something like the following commands:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">sudo /usr/bin/localedef -i en_US -f UTF-8 en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
'Something like' because you may want to use a locale other than US English. If so, substitute the language code for 'en' and the region code for 'US' above. The locale code 'cy_GB' would designate Welsh for the language and Great Britain for the region, for example. </div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Note that if you need another character set (we recommend UTF-8), you can change that as well.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Now that you've made those changes, type 'locale' again to make sure those are the language and region settings you want. If everything looks good, you need to make one more change to ensure that those locale settings will be automatically applied for all users. Run:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">sudo nano /etc/sysconfig/i18n</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Note that 'i18n' is shorthand for 'internationalization' (since there are 18 letters between the 'i' and the 'n'). Just so you know why that configuration file has such an odd name.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Change the LANG entry in that file, and add a line for LC_ALL, like you did with the 'export' commands above (but without the export). So when you're done, the two lines for your locale might look like:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
You might want to test to be sure the locale settings are properly set up by logging out and logging back in, then running 'locale' to check the output.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #80c41c; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 26px; font-style: normal; font-variant: normal; font-weight: inherit; letter-spacing: normal; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Package repositories</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
A CentOS Slice comes with a basic set of repositories.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Have a look at the enabled repositories by running:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">sudo yum repolist enabled</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Each repository listed should include a brief description and the number of packages available from that source.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
If you'd like to have a look at the configuration files that point to each repository, they're stored in this directory:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">/etc/yum.repos.d</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
If you look through one of the files there, you will see each repository has a set of definitions including which mirror to use and what gpg key to use (and actually whether to check the package signature at all).</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
You can, of course, add more repositories whenever you want to but I would just give a word of caution: Some of the available repositories are not officially supported and may not receive any security updates should a flaw be discovered.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Keep in mind it is a server we are building and security and stability are paramount.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #80c41c; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 26px; font-style: normal; font-variant: normal; font-weight: inherit; letter-spacing: normal; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Update</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Now we can update the package list that yum uses.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The following command will also offer to install any updated packages. As with all installs have a careful look at the list and, once happy, press 'y' to continue:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">sudo yum update</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<b>NOTE:</b><span class="Apple-converted-space"> </span>If you have used the .bashrc aliases shown above you just need to enter 'update' as the alias will use the entire command. I've put the whole thing here so you know what is happening.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
That's really the basics done for the Slice.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Once any updates have been installed, we can move on to installing some essential packages.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #80c41c; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 26px; font-style: normal; font-variant: normal; font-weight: inherit; letter-spacing: normal; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Development Tools</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
CentOS has some handy meta-packages that include sets of pre-defined programs required for a single purpose.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
So instead of installing a dozen different package names, you can install just one meta-package. One such package is called 'Development Tools'. Issue the command:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #232323; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 3px; border-left-color: rgb(0, 0, 0); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 3px; border-top-color: rgb(0, 0, 0); border-top-style: solid; border-top-width: 3px; color: white; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 1em; padding-left: 10px; padding-right: 10px; padding-top: 1em; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"><code style="font-family: monospace; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">sudo yum groupinstall 'Development Tools'</code></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Notice the programs that are to be installed include gcc, make, patch and so on. All these are needed for many other programs to install properly. A neat system indeed.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Enter 'y' and install them.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Now we have the necessary packages should we want to build an application from source.</div>
<div style="background-color: #d5dde6; border-width: 0px; color: #444444; font-family: HelveticaNeue,Helvetica,Verdana,sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin: 0px 0px 20px; orphans: 2; outline-width: 0px; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
References:</div>
<div style="background-color: #d5dde6; border-width: 0px; color: #444444; font-family: HelveticaNeue,Helvetica,Verdana,sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin: 0px 0px 20px; orphans: 2; outline-width: 0px; padding: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<a href="http://articles.slicehost.com/2010/5/15/centos-5-5-setup-part-2">http://articles.slicehost.com/2010/5/15/centos-5-5-setup-part-2</a> </div>
<br /><ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d5dde6; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: HelveticaNeue, Helvetica, Verdana, sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"><br class="Apple-interchange-newline" /></ul>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-8798439291337533702012-04-12T09:02:00.000-07:002012-04-12T09:02:15.783-07:00lock a user to chroot directory<div dir="ltr" style="text-align: left;" trbidi="on">
To lock users to their home directories in Linux, I've used the following:<br />
<br />
Created the chrooted jail as follows:<br />
<br />
<span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #eeeeee; color: #111111; display: inline !important; float: none; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-converted-space"> #</span>mkdir -p /users/{dev,etc,lib,usr,bin}</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: #111111; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #eeeeee; color: #111111; display: inline !important; float: none; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"># mkdir -p /users/usr/bin</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: #111111; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #eeeeee; color: #111111; display: inline !important; float: none; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"># mkdir -p /users/libexec/openssh</span><br />
<br />
<br />
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #111111; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 1.571em; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
Create /users/dev/null:<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /><code style="background-attachment: scroll; background-clip: initial; background-color: #eeeeee; background-image: none; background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; display: block; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em;"># mknod -m 666 /users/dev/null c 1 3</code><br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" />Copy required /etc/ configuration files, as described above to your jail directory /users/etc:<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /><code style="background-attachment: scroll; background-clip: initial; background-color: #eeeeee; background-image: none; background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; display: block; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em;"># cd /users/etc<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cp /etc/ld.so.cache .<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cp -avr /etc/ld.so.cache.d/ .<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cp /etc/ld.so.conf .<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cp /etc/nsswitch.conf .<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cp /etc/passwd .<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cp /etc/group .<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cp /etc/hosts .<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cp /etc/resolv.conf .</code><br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" />Open /usres/group and /users/passwd file and remove root and all other accounts.</div>
<div style="background-color: white; color: #111111; font-family: Arial,'Helvetica Neue',Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 0px 0px 1.571em; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
Copy required binary files, as described above to your jail directory /users/bin and other locations:<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /><code style="background-attachment: scroll; background-clip: initial; background-color: #eeeeee; background-image: none; background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; display: block; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em;"># cd /users/usr/bin<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cp /usr/bin/scp .<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cp /usr/bin/rssh .<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cp /usr/bin/sftp .<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cd /users/usr/libexec/openssh/<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cp /usr/libexec/openssh/sftp-server .</code><br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" />OR<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /><code style="background-attachment: scroll; background-clip: initial; background-color: #eeeeee; background-image: none; background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; display: block; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em;"># cp /usr/lib/openssh/sftp-server .<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cd /users/usr/libexec/<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cp /usr/libexec/rssh_chroot_helper</code><br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" />OR<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /><code style="background-attachment: scroll; background-clip: initial; background-color: #eeeeee; background-image: none; background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; display: block; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em;"># cp /usr/lib/rssh/rssh_chroot_helper<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cd /users/bin/<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># cp /bin/sh .</code><br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" />OR<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /><code style="background-attachment: scroll; background-clip: initial; background-color: #eeeeee; background-image: none; background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; display: block; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em;"># cp /bin/bash</code></div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #111111; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 1.286em; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; line-height: 22px; margin-bottom: 0.611em; margin-left: 0px; margin-right: 0px; margin-top: 1.833em; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
Copy all shared library files</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #111111; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 1.571em; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
The library files that any of these binary files need can be found by using the ldd / strace command. For example, running ldd against /usr/bin/sftp provides the following output:<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /><code style="background-attachment: scroll; background-clip: initial; background-color: #eeeeee; background-image: none; background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; display: block; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em;">ldd /usr/bin/sftp</code><br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" />Output:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; clear: both; color: #111111; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> linux-gate.so.1 => (0x00456000)
libresolv.so.2 => /lib/libresolv.so.2 (0x0050e000)
libcrypto.so.6 => /lib/libcrypto.so.6 (0x0013e000)
libutil.so.1 => /lib/libutil.so.1 (0x008ba000)
libz.so.1 => /usr/lib/libz.so.1 (0x00110000)
libnsl.so.1 => /lib/libnsl.so.1 (0x0080e000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00a8c000)
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00656000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00271000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00304000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x00777000)
libdl.so.2 => /lib/libdl.so.2 (0x00123000)
libnss3.so => /usr/lib/libnss3.so (0x00569000)
libc.so.6 => /lib/libc.so.6 (0x00b6c000)
libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00127000)
libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00130000)
/lib/ld-linux.so.2 (0x00525000)
libplc4.so => /usr/lib/libplc4.so (0x008c9000)
libplds4.so => /usr/lib/libplds4.so (0x00133000)
libnspr4.so => /usr/lib/libnspr4.so (0x00d04000)
libpthread.so.0 => /lib/libpthread.so.0 (0x0032a000)
libselinux.so.1 => /lib/libselinux.so.1 (0x00341000)
libsepol.so.1 => /lib/libsepol.so.1 (0x00964000)
</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #111111; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 1.571em; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
You need to copy all those libraries to /lib and other appropriate location. However, I recommend using my automated script called<span class="Apple-converted-space"> </span><a href="http://www.cyberciti.biz/files/lighttpd/l2chroot.txt" style="color: #2361a1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline;">l2chroot</a>:<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /><code style="background-attachment: scroll; background-clip: initial; background-color: #eeeeee; background-image: none; background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; display: block; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em;"># cd /sbin<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># wget -O l2chroot http://www.cyberciti.biz/files/lighttpd/l2chroot.txt<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># chmod +x l2chroot</code><br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" />Open l2chroot and set BASE variable to point to chroot directory (jail) location:<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /><code style="background-attachment: scroll; background-clip: initial; background-color: #eeeeee; background-image: none; background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; display: block; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em;">BASE="/users"</code><br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" />Now copy all shared library files<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /><code style="background-attachment: scroll; background-clip: initial; background-color: #eeeeee; background-image: none; background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; display: block; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em;"># l2chroot /usr/bin/scp<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># l2chroot /usr/bin/rssh<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># l2chroot /usr/bin/sftp<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># l2chroot /usr/libexec/openssh/sftp-server</code><br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" />OR<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /><code style="background-attachment: scroll; background-clip: initial; background-color: #eeeeee; background-image: none; background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; display: block; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em;"># l2chroot /usr/lib/openssh/sftp-server<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># l2chroot /usr/libexec/rssh_chroot_helper</code><br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" />OR<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /><code style="background-attachment: scroll; background-clip: initial; background-color: #eeeeee; background-image: none; background-origin: initial; background-position: 0px 0px; background-repeat: repeat repeat; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; display: block; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em;"># l2chroot /usr/lib/rssh/rssh_chroot_helper<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /># l2chroot /bin/sh</code><br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" />OR<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /><code style="background-attachment: scroll; background-color: #eeeeee; background-image: none; background-position: 0px 0px; border-color: rgb(221, 221, 221); border-style: solid; border-width: 1px; display: block; font-family: Consolas,'Andale Mono',Monaco,Courier,'Courier New',Verdana,sans-serif; font-size: 0.857em; line-height: 1.5em; margin: 0px 0px 1.833em; overflow: auto; padding: 0.667em 0.917em;"># l2chroot /bin/bash</code>Once the Directories are created and populated accordingly, if openssh is newer than 4.6 version then we can add the following in the /etc/ssh/sshd_config for user based restrictions ( group based restrictions can be configured in a similar fashion):</div>
<div style="background-color: white; color: #111111; font-family: Arial,'Helvetica Neue',Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 0px 0px 1.571em; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
Match User user1<br /> ChrootDirectory /users <br /> AllowTcpForwarding no</div>
<div style="background-color: white; color: #111111; font-family: Arial,'Helvetica Neue',Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 0px 0px 1.571em; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
We also need to make sure that the permissions are correct so that the above chrooting works, that is the user should own the files/directories inside the chroot but the chroot directory itself must be owned by root.</div>
<div style="background-color: white; color: #111111; font-family: Arial,'Helvetica Neue',Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 0px 0px 1.571em; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
chown root:root /users</div>
<div style="background-color: white; color: #111111; font-family: Arial,'Helvetica Neue',Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 0px 0px 1.571em; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
user1 owns the remaining files/directories inside</div>
<div style="background-color: white; color: #111111; font-family: Arial,'Helvetica Neue',Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 0px 0px 1.571em; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
chown user1:user1 /users</div>
<div style="background-color: white; color: #111111; font-family: Arial,'Helvetica Neue',Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 0px 0px 1.571em; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
and create a home directory as well </div>
<div style="background-color: white; color: #111111; font-family: Arial,'Helvetica Neue',Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 0px 0px 1.571em; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
mkdir -p /users/home/user1/</div>
<div style="background-color: white; color: #111111; font-family: Arial,'Helvetica Neue',Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 0px 0px 1.571em; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
References:</div>
<div style="background-color: white; color: #111111; font-family: Arial,'Helvetica Neue',Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 0px 0px 1.571em; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<a href="http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html">http://www.cyberciti.biz/tips/howto-linux-unix-rssh-chroot-jail-setup.html</a> </div>
<div style="background-color: white; color: #111111; font-family: Arial,'Helvetica Neue',Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 0px 0px 1.571em; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<a href="http://www.techrepublic.com/blog/opensource/chroot-users-with-openssh-an-easier-way-to-confine-users-to-their-home-directories/229">http://www.techrepublic.com/blog/opensource/chroot-users-with-openssh-an-easier-way-to-confine-users-to-their-home-directories/229</a></div>
<div style="background-color: white; color: #111111; font-family: Arial,'Helvetica Neue',Helvetica,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 0px 0px 1.571em; orphans: 2; padding: 0px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-39894898589580692872012-04-12T08:44:00.001-07:002012-04-12T08:44:08.041-07:00Openssh Upgrade on Centos 5.7<div dir="ltr" style="text-align: left;" trbidi="on">
Openssh packages on centos 5.7 are still 4.3 and the security features of newer ssh packages are backported. But there are many interesting features which are not available with the openssh4.3 version such as chrooting without any pathches, for this particular feature I've upgraded the openssh on my servers as follows:<br />
<br />
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgba(255, 255, 255, 0.875); border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 14px; margin-left: 0px; margin-right: 0px; margin-top: 14px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
There are some prereques for an RPM build</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgba(255, 255, 255, 0.875); border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 14px; margin-left: 0px; margin-right: 0px; margin-top: 14px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">yum install gcc</em></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgba(255, 255, 255, 0.875); border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 14px; margin-left: 0px; margin-right: 0px; margin-top: 14px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">yum install openssl-devel</em></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgba(255, 255, 255, 0.875); border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 14px; margin-left: 0px; margin-right: 0px; margin-top: 14px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">yum install pam-devel</em></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgba(255, 255, 255, 0.875); border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 14px; margin-left: 0px; margin-right: 0px; margin-top: 14px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">yum install rpm-build</em></div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-width: 0px; font-size: 13px; font-style: italic; margin: 0px; outline-width: 0px; padding: 0px;">yum install rpmdevtools</em></div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
</div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"> </em><em></em>As a normal user, run the following commands</div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-width: 0px; font-size: 13px; font-style: italic; margin: 0px; outline-width: 0px; padding: 0px;">rpmdev-setuptree </em></div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-width: 0px; font-size: 13px; font-style: italic; margin: 0px; outline-width: 0px; padding: 0px;">mkdir /software</em></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgba(255, 255, 255, 0.875); border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 14px; margin-left: 0px; margin-right: 0px; margin-top: 14px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">cd /software</em></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgba(255, 255, 255, 0.875); border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 14px; margin-left: 0px; margin-right: 0px; margin-top: 14px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
wget<span class="Apple-converted-space"> </span><em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">http://mirror.bytemark.co.uk/pub/OpenBSD/OpenSSH/portable/openssh-5.8p2.tar.gz</em></div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-width: 0px; font-size: 13px; font-style: italic; margin: 0px; outline-width: 0px; padding: 0px;">cp openssh-5.8p2.tar.gz rpmbuild/SOURCES </em></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgba(255, 255, 255, 0.875); border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 14px; margin-left: 0px; margin-right: 0px; margin-top: 14px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">gzip -d openssh-5.8p2.tar.gz</em></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgba(255, 255, 255, 0.875); border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 14px; margin-left: 0px; margin-right: 0px; margin-top: 14px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">tar -xvf<span class="Apple-converted-space"> </span></em><em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">openssh-5.8p2.tar.gz</em></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgba(255, 255, 255, 0.875); border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 14px; margin-left: 0px; margin-right: 0px; margin-top: 14px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">cp<span class="Apple-converted-space"> </span><em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">openssh-5.8p2/contrib/redhat/openssh.spec /usr/src/redhat/SPECS/</em></em></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgba(255, 255, 255, 0.875); border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 14px; margin-left: 0px; margin-right: 0px; margin-top: 14px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">gzip openssh-5.8p2.tar</em></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgba(255, 255, 255, 0.875); border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 14px; margin-left: 0px; margin-right: 0px; margin-top: 14px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">cp openssh-5.2p1.tar.gz /usr/src/redhat/SOURCES/</em></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgba(255, 255, 255, 0.875); border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 14px; margin-left: 0px; margin-right: 0px; margin-top: 14px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">cd /usr/src/redhat/SPECS</em></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgba(255, 255, 255, 0.875); border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 14px; margin-left: 0px; margin-right: 0px; margin-top: 14px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"> perl -i.bak -pe ‘s/^(%define no_(gnome|x11)_askpass)\s+0$/$1 1/’ openssh.spec</em><br /><em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"></em></div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-width: 0px; font-size: 13px; font-style: italic; margin: 0px; outline-width: 0px; padding: 0px;">rpmbuild -bb openssh.spec</em><br /><em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"></em></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgba(255, 255, 255, 0.875); border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 14px; margin-left: 0px; margin-right: 0px; margin-top: 14px; orphans: 2; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"> cd /usr/src/redhat/RPMS/`uname -i</em></div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
I got the following errors while running rpmbuild: </div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">RPM build errors:</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">File not found by glob: /var/tmp/openssh-5.6p1-buildroot/usr/share/man/man1/scp.1*</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">File not found by glob: /var/tmp/openssh-5.6p1-buildroot/usr/share/man/man1/ssh-keygen.1*</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">File not found by glob: /var/tmp/openssh-5.6p1-buildroot/usr/share/man/man8/ssh-keysign.8*</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">File not found by glob: /var/tmp/openssh-5.6p1-buildroot/usr/share/man/man8/ssh-pkcs11-helper.8*</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">File not found by glob: /var/tmp/openssh-5.6p1-buildroot/usr/share/man/man1/ssh.1*</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">File not found by glob: /var/tmp/openssh-5.6p1-buildroot/usr/share/man/man5/ssh_config.5*</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">File not found by glob: /var/tmp/openssh-5.6p1-buildroot/usr/share/man/man1/slogin.1*</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">File not found by glob: /var/tmp/openssh-5.6p1-buildroot/usr/share/man/man1/ssh-agent.1*</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">File not found by glob: /var/tmp/openssh-5.6p1-buildroot/usr/share/man/man1/ssh-add.1*</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">File not found by glob: /var/tmp/openssh-5.6p1-buildroot/usr/share/man/man1/ssh-keyscan.1*</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">File not found by glob: /var/tmp/openssh-5.6p1-buildroot/usr/share/man/man1/sftp.1*</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">File not found by glob: /var/tmp/openssh-5.6p1-buildroot/usr/share/man/man8/sshd.8*</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">File not found by glob: /var/tmp/openssh-5.6p1-buildroot/usr/share/man/man5/moduli.5*</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">File not found by glob: /var/tmp/openssh-5.6p1-buildroot/usr/share/man/man5/sshd_config.5*</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">File not found by glob: /var/tmp/openssh-5.6p1-buildroot/usr/share/man/man8/sftp-server.8*</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Installed (but unpackaged) file(s) found:</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">/usr/share/man/cat1/scp.1</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">/usr/share/man/cat1/sftp.1</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">/usr/share/man/cat1/slogin.1</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">/usr/share/man/cat1/ssh-add.1</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">/usr/share/man/cat1/ssh-agent.1</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">/usr/share/man/cat1/ssh-keygen.1</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">/usr/share/man/cat1/ssh-keyscan.1</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">/usr/share/man/cat1/ssh.1</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">/usr/share/man/cat5/moduli.5</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">/usr/share/man/cat5/ssh_config.5</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">/usr/share/man/cat5/sshd_config.5</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">/usr/share/man/cat8/sftp-server.8</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">/usr/share/man/cat8/ssh-keysign.8</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">/usr/share/man/cat8/ssh-pkcs11-helper.8</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #444444; display: inline !important; float: none; font-family: Georgia, serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">/usr/share/man/cat8/sshd.8</span></div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="background-color: white; color: #444444; display: inline ! important; float: none; font-family: Georgia,serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">After realising the man pages were in the wrong spot, we added a flag to the configure line in the openssh.spec file as follows:</span></div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="background-color: white; color: #444444; display: inline ! important; float: none; font-family: Georgia,serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">%configure \<br /> --sysconfdir=%{_sysconfdir}/ssh \<br /> --libexecdir=%{_libexecdir}/openssh \<br /> --datadir=%{_datadir}/openssh \<br /> --with-tcp-wrappers \<br /> --with-rsh=%{_bindir}/rsh \<br /> --with-mantype=man \<br /> --with-default-path=/usr/local/bin:/bin:/usr/bin \<br /> --with-superuser-path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin \<br /> --with-privsep-path=%{_var}/empty/sshd \<br /> --with-md5-passwords \</span></div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="background-color: white; color: #444444; display: inline ! important; float: none; font-family: Georgia,serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">and ran the rpmbuild again then had some issue with %doc section as rpmbuild couldn't stat MISSING* so removed that and rpmbuild generated the openssh rpms in RPMS directory.</span></div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="background-color: white; color: #444444; display: inline ! important; float: none; font-family: Georgia,serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br /></span></div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<span style="background-color: white; color: #444444; display: inline ! important; float: none; font-family: Georgia,serif; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">References:</span></div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<a href="http://srihosting.com/blog/2012/03/pci-compliance-on-centos-5-openssh-5-8-rpm-upgradehowto/?Itemid=223">http://srihosting.com/blog/2012/03/pci-compliance-on-centos-5-openssh-5-8-rpm-upgradehowto/?Itemid=223</a></div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<a href="http://survivalguides.wordpress.com/2011/05/20/installing-openssh-5-8-centos-5-5/">http://survivalguides.wordpress.com/2011/05/20/installing-openssh-5-8-centos-5-5/</a> </div>
<div style="background-color: rgba(255, 255, 255, 0.875); border-width: 0px; color: black; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin: 14px 0px; orphans: 2; outline-width: 0px; padding: 0px 0px 0px 30px; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-43963705863593637162012-04-05T07:21:00.000-07:002012-04-05T07:21:52.965-07:00Linux/Unix Command for listing just files in the current directory<div dir="ltr" style="text-align: left;" trbidi="on">
Following is the command I recently used to move all the files in the home directory to a directory named others.<br />
<br />
<i>$ for i in `ls -l | grep -v '^d' | grep -v '^l' | awk '{print $8}'`; do mv "$i"\* others ; done</i></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-37496498398240486062012-03-28T07:22:00.000-07:002012-03-28T07:22:18.824-07:00Resetting MySQL root password<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d1cbbf; color: #666666; display: inline !important; float: none; font-family: helvetica, verdana, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Set / change / reset the MySQL root password on Ubuntu Linux. Enter the following lines in your terminal.</span><br />
<ol style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d1cbbf; color: #666666; font-family: helvetica, verdana, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<li>Stop the MySQL Server.<br /><pre class="terminal" style="background-color: black; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: black; border-left-style: solid; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 1px; border-top-color: black; border-top-style: solid; border-top-width: 1px; color: white; font-family: monospace; font-size: 11px; list-style-type: none; margin-bottom: 5px; margin-left: 0px; margin-right: 5px; margin-top: 5px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;">sudo /etc/init.d/mysql stop</pre>
</li>
<br />
<li>Start the mysqld configuration.<br /><pre class="terminal" style="background-color: black; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: black; border-left-style: solid; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 1px; border-top-color: black; border-top-style: solid; border-top-width: 1px; color: white; font-family: monospace; font-size: 11px; list-style-type: none; margin-bottom: 5px; margin-left: 0px; margin-right: 5px; margin-top: 5px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;">sudo mysqld --skip-grant-tables &</pre>
</li>
<br />
<li>Login to MySQL as root.<br /><pre class="terminal" style="background-color: black; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: black; border-left-style: solid; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 1px; border-top-color: black; border-top-style: solid; border-top-width: 1px; color: white; font-family: monospace; font-size: 11px; list-style-type: none; margin-bottom: 5px; margin-left: 0px; margin-right: 5px; margin-top: 5px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;">mysql -u root mysql</pre>
</li>
<br />
<li>Replace YOURNEWPASSWORD with your new password!<br /><pre class="terminal" style="background-color: black; border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: black; border-left-style: solid; border-left-width: 1px; border-right-color: black; border-right-style: solid; border-right-width: 1px; border-top-color: black; border-top-style: solid; border-top-width: 1px; color: white; font-family: monospace; font-size: 11px; list-style-type: none; margin-bottom: 5px; margin-left: 0px; margin-right: 5px; margin-top: 5px; overflow-x: auto; overflow-y: auto; padding-bottom: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-top: 0.5em;">UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;</pre>
</li>
</ol>
<span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d1cbbf; color: #666666; display: inline !important; float: none; font-family: helvetica, verdana, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">Note: This method is not regarded as the securest way of resetting the password. However it works.</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d1cbbf; color: #666666; font-family: helvetica, verdana, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d1cbbf; color: #666666; font-family: helvetica, verdana, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d1cbbf; color: #666666; font-family: helvetica, verdana, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><strong style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d1cbbf; color: #666666; font-family: helvetica, verdana, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">References</strong><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d1cbbf; color: #666666; font-family: helvetica, verdana, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d1cbbf; color: #666666; font-family: helvetica, verdana, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><a href="http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #d1cbbf; color: #464e60; font-family: helvetica, verdana, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">MySQL 5.0 Reference Manual: How to Reset the Root Password</a></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-70163083359687411752012-03-23T08:00:00.002-07:002012-03-28T07:19:39.693-07:00Launching and Tearing down AWS wordpress instance<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<h2 style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Helvetica, Arial; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;">
Introduction</h2>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Most blogs and small business web sites are hosted on shared hosting services, where you pay a fixed monthly fee in exchange for a predefined set of features and installed software. Most of the time, it’s a perfectly valid option, but running your blog in Amazon’s cloud comes with benefits that make it an option worth considering:</div>
<br />
<span style="font-family: Arial,Helvetica,sans-serif;">Easy to upgrade. Creating a new server machine in Amazon’s cloud can be accomplished in a matter of minutes. So by using the service, you are always prepared to handle instant jumps in traffic. If a post jumps to the front page of Digg or Reddit, you can add more servers and balance the load. accordingly.</span><br style="font-family: Arial,Helvetica,sans-serif;" /><span style="font-family: Arial,Helvetica,sans-serif;"> Cost-efficient power for large scale services. If your site attracts a lot of users, and eventually outgrows the limits of your regular hosting, Amazon Web Services gives you free hands in designing a server architecture that matches your needs, in a cost-efficient way, without needing to hire a complete network operations team to do the setup for you! This is how many of the most popular Facebook developers have built their servers.</span><br style="font-family: Arial,Helvetica,sans-serif;" /><span style="font-family: Arial,Helvetica,sans-serif;"> Total control over the setup: Though this point might not be too important when running WordPress, if you want to get adventurous and build your next project using something more exotic than a combination of PHP and MySQL, you don’t have to ask your web hosting company. You install the software you wish, just like you would on a server of your own.</span><br /><br />
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Whether or not hosting your WordPress site on Amazon is the right choice depends on the traffic your blog receives, as well as how much you value the opportunity to configure your server exactly to your needs.</div>
<br /><h2 style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Helvetica, Arial; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;">
<span style="border-width: 0px; color: #5f5f5f; font-family: inherit; font-size: 30px; font-style: inherit; font-weight: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">Step 1 -</span> Create an Amazon Web Services Account</h2>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Before you can start using Amazon’s cloud for your web hosting needs, you need to create an account with Amazon Web Services (AWS). Point your browser to <a href="http://aws.amazon.com/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #4b7897; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">aws.amazon.com</a> and click on the “Sign Up Now” button.</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/0.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/0.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
If you’ve used Amazon.com before, you can use your same e-mail and password to login to AWS. You can also create a new account by choosing “<i style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">I am a new user.</i>”</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/1.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/1.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
At this stage, you will need to enter your contact information and credit card number so that Amazon can bill you for any services you use. Creating an account is free, though everything else will cost you money.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
<a href="http://aws.amazon.com/ec2/pricing/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #4b7897; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">The pricing model</a> is rather simple — you pay for every hour your server is running — but because of the variety of options, calculating the actual price can get quite a bit more complex than that. When running your own site at Amazon, it’s best to be careful and double check your price calculations before leaving the servers running unattended so you don’t get any surprises at the end of the month.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Building our WordPress setup shouldn’t last but an hour, and we will stop everything when we’re finished, so the price for completing the tutorial will be close to zero.</div>
<hr style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; clear: both; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; height: 1px; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 30px; text-align: -webkit-auto; width: 680px;" />
<h2 style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Helvetica, Arial; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;">
<span style="border-width: 0px; color: #5f5f5f; font-family: inherit; font-size: 30px; font-style: inherit; font-weight: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">Step 2 -</span> Launch Your First Server Machine</h2>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Our server setup will consist of two parts: <br />
<br />
Application server hosted on Amazon’s Elastic Computing Cloud (EC2), running Apache and PHP, with WordPress installed on it.<br />MySQL database hosted on Amazon’s Relational Database Service (RDS).<br /></div>
<ul style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;"></ul>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Another cheaper, but more difficult, option would be to manually install the MySQL server on the same machine with Apache and PHP. In this tutorial, I decided to go with the Relational Database Service because of its ease of use, as well as the fact that, this way, Amazon will take care of backups and maintenance for the database, and you won’t have to worry about that level of additional security.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Let’s start by creating our first application server instance.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Click on the EC2 tab in the <a href="https://console.aws.amazon.com/s3/home" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #4b7897; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">AWS Management Console</a>. As this is your first time using the EC2 service, you will need to separately sign up for it. Click on the “Sign Up For Amazon EC2″ button:</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/2.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/2.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
As a special step, Amazon will verify your identity by placing a call to your phone. The whole process is automated: you type a code from the web page into your phone and, once the system has verified that the codes match, you will be redirected to the next page.</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/3.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/3.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
When you are finished with the sign up process, return to the Management Console and the EC2 tab. You will see a page that looks like this. Click on the “Launch Instance” button.</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/4.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/4.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
A popup with a list of Amazon Machine Images (AMIs) opens.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
(AMI's are snapshots running computers) <br />
<br />
Most consist of an operating system and a few utilities, but you can create AMIs with as much complexity as you wish — even containing your full application, ready to be started on a virtual machine with a click of a button.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
We will pick the most basic option: “Basic 32-bit Amazon Linux AMI 1.0.” Click on “Select” next to the AMI and you are ready to go.</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/5.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/5.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
After selecting the AMI, our next step is to decide what kind of hardware we will use to run it. Depending on whether you picked a 32-bit or a 64-bit AMI, you will see a different list, the 32-bit AMIs offering the cheaper options.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
For testing, we don’t need much memory or processing power, so we will start with a Micro instance. Select the instance type and click “Continue.”</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/6.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/6.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
In the next screen, the defaults do just fine. Click “Continue.”</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/7.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/7.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
When you have many machines with different roles, it’s easy to get lost with the machines and end up spending a lot of time searching for the right machine. Naming the machines helps a lot. In our case, naming is not too important, as we will run only one EC2 instance, but let’s give it a name anyhow. Enter your desired name and click “Continue.”</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/8.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/8.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Next, you will be asked to create a key pair file for securely connecting to the machine. The key replaces a password when connecting to the machine with SSH. Name your key pair file, and click on “Create & Download your Key Pair.” Copy the key pair file to a safe location (A good place, if you are on a Unix system such as Mac OSX or Linux, is <code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">~/.ssh</code>). After copying the file, change its permissions to <code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">400</code>:</div>
<div class="dp-highlighter" style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Consolas, 'Courier New', Courier, mono; font-size: 12px; line-height: 21px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; text-align: -webkit-auto; vertical-align: baseline; width: 673px;">
<ol class="dp-c" start="1" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-style: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<li class="alt" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span style="border-width: 0px; color: black; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;"><span style="border-width: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">chmod 400 wordpress_demo.pem </span></span></li>
</ol>
</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
If you are using Windows, you probably use PuTTY for SSH. PuTTY uses its own key format (<code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">ppk</code>), so you will need to convert the key to that format by using the Puttygen tool available at the <a href="http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #4b7897; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">PuTTY download page</a>.</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/9.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/9.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
After you’ve created the key pair, you will still be asked to configure the firewall for your new machine. By default, no one is allowed to connect to the machine — every port is closed. Let’s open ports <code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">22</code> (SSH) and<code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">80</code> (HTTP), so we can configure the machine over SSH and access the blog from a browser. Select the type of connection from the drop down list at the bottom of the popup and click on “Add Rule.” When you are done with the setup, click “Continue.”</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/10.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/10.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Review the configuration, and, if everything appears to be correct, click “Launch.”</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/11.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/11.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Now the machine is launching! Close the popup to return to the dashboard. At first, you’ll notice that the instance’s status is set to “<i style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">pending</i>,” and within a couple of minutes it switches to “<i style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">running</i>.” This means the server is up and running — you can start using it.</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/12.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/12.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
When the machine is running, it can be accessed through the ports you defined in the firewall configuration. Let’s use SSH to connect to the machine and finish its setup by installing Apache, PHP, the MySQL extension to PHP, and finally WordPress.</div>
<hr style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; clear: both; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; height: 1px; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 30px; text-align: -webkit-auto; width: 680px;" />
<h2 style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Helvetica, Arial; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;">
<span style="border-width: 0px; color: #5f5f5f; font-family: inherit; font-size: 30px; font-style: inherit; font-weight: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">Step 3 -</span> Install Required Server Software</h2>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Right click on the name of the machine, and select “Connect” from the drop down list. A popup with an SSH command will open.</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/13.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/13.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Highlight the command, and copy it to a console if you are using a Mac or a Unix machine. The command will be similar to the following:</div>
<div class="dp-highlighter" style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Consolas, 'Courier New', Courier, mono; font-size: 12px; line-height: 21px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; text-align: -webkit-auto; vertical-align: baseline; width: 673px;">
<ol class="dp-c" start="1" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-style: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<li class="alt" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span style="border-width: 0px; color: black; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;"><span style="border-width: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">ssh -i wordpress_demo.pem root@ec2-....compute-1.amazonaws.com </span></span></li>
</ol>
</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
If you saved your <code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">pem</code> key to <code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">~/.ssh</code>, update the path in the command. Also, you’ll need to change <code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">root</code>into <code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">ec2-user</code> — Amazon hasn’t yet updated the command to match its new AMI setups that don’t allow connecting with the root user.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
If you are on Windows, or prefer to use a more graphical SSH application, simply copy the name of the machine and open it in your SSH application of choice. Remember to use the user name <code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">ec2-user</code> and the related key pair file (<code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">wordpress_demo.pem</code>).</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/14.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/14.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Once logged in, you can use the virtual machine just as you would use any Linux machine.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
To install software, we will use an easy to use installer called Yum. First, to install the Apache web server, type the following command:</div>
<div class="dp-highlighter" style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Consolas, 'Courier New', Courier, mono; font-size: 12px; line-height: 21px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; text-align: -webkit-auto; vertical-align: baseline; width: 673px;">
<ol class="dp-c" start="1" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-style: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<li class="alt" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span style="border-width: 0px; color: black; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;"><span style="border-width: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">sudo yum install httpd </span></span></li>
</ol>
</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
The installer asks you to confirm the package to install and possibly some other steps as well. Reply with “<i style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Y</i>” to every question, and, in no time at all, you will have Apache installed.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Next up, PHP:</div>
<div class="dp-highlighter" style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Consolas, 'Courier New', Courier, mono; font-size: 12px; line-height: 21px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; text-align: -webkit-auto; vertical-align: baseline; width: 673px;">
<ol class="dp-c" start="1" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-style: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<li class="alt" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span style="border-width: 0px; color: black; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;"><span style="border-width: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">sudo yum install php </span></span></li>
</ol>
</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
And the same for the MySQL extensions:</div>
<div class="dp-highlighter" style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Consolas, 'Courier New', Courier, mono; font-size: 12px; line-height: 21px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; text-align: -webkit-auto; vertical-align: baseline; width: 673px;">
<ol class="dp-c" start="1" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-style: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<li class="alt" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span style="border-width: 0px; color: black; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;"><span style="border-width: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">sudo yum install php-mysql </span></span></li>
</ol>
</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
That’s it: the setup is done and we are ready to test Apache. Start it with this command (you can later replace “<code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">start</code>” with “<code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">stop</code>” or “<code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">restart</code>” depending on what you want the web server to do):</div>
<div class="dp-highlighter" style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Consolas, 'Courier New', Courier, mono; font-size: 12px; line-height: 21px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; text-align: -webkit-auto; vertical-align: baseline; width: 673px;">
<ol class="dp-c" start="1" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-style: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<li class="alt" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span style="border-width: 0px; color: black; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;"><span style="border-width: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">sudo /etc/init.d/httpd start </span></span></li>
</ol>
</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
The web server is up, and you can test it by copying the URL of the machine to your browser:</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/15.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/15.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<h2 style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Helvetica, Arial; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;">
<span style="border-width: 0px; color: #5f5f5f; font-family: inherit; font-size: 30px; font-style: inherit; font-weight: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">Step 4 -</span> Create the Database Machine</h2>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Before installing WordPress, we still need a database. Setting up a database using RDS is as easy as entering some values to a couple of settings screens and pressing a few buttons, so let’s get started.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
In your AWS console, switch to the RDS tab. As you have never used the service before, you will be asked to enable it. This time, the process is much faster and simpler than when you enabled EC2. Click on “Sign Up For Amazon RDS” to get started.</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/16.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/16.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Follow the process through and, when you are finished, head back to the RDS tab in the AWS console. The screen you will see looks a lot like the EC2 console we used in the previous step. Click “Launch DB Instance.”</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/17.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/17.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
In the popup that opens, you can choose the properties for the database server to start, such as the server instance and storage space to allocate. Let’s pick the smallest values as they are more than enough for our simple test.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Pick a name for you database server and the root user on it. I used “<code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">wordpress-db</code>” as the database server name and “<code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">root</code>” / “<code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">rootpass</code>” as master login. Not the most secure of options, mind you, but this machine is not intended to last for long, so it’s okay in this instance.</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/18.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/18.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
After setting up the database server information, you will be asked to define a default database to be created on the server. We will call it “<code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">wordpress</code>” to follow the WordPress conventions. The rest of the settings on this screen can be left untouched.</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/19.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/19.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
On the next screen, you can define settings for database backups. For now, leave the values to their defaults and click “Continue.”</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/20.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/20.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
After verifying the settings, click “Launch DB Instance.”</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/21.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/21.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Creating a database instance takes quite a bit longer than creating the EC2 instance, but after about five minutes of waiting, you should see the database instance as “available” on the instances tab.</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/22.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/22.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Click on the instance to see more data about it, then copy the “<code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">endpoint</code>” value. This is the URL of the database server that we will use in the WordPress setup.</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/23.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/23.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
There is one more step before we can move on to installing WordPress: we need to configure the firewall for this database so that the application server can access it.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Still on the RDS tab in the AWS console, click on “DB Security Groups.” You will see that there are no authorizations yet:</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/24.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/24.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
To give our application server access to the database, we need to authorize its security group to this database security group. Select “EC2 Instance” from the drop down list below “No Authorizations” and enter the name of the security group (“<code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">wordpress_app_server</code>“) and your Amazon Account ID to the two text fields that appear next to the drop down list.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
The account ID is hidden quite deep in the AWS settings: you’ll find it by first clicking the “Account” link at the top of the page, and then the “Security Credentials” link on the page that opens.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
After you’ve entered the required information and clicked “Add,” you will see the security group as authorized. We are ready to install WordPress.</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/25.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/25.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<hr style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; clear: both; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; height: 1px; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 30px; text-align: -webkit-auto; width: 680px;" />
<h2 style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Helvetica, Arial; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;">
<span style="border-width: 0px; color: #5f5f5f; font-family: inherit; font-size: 30px; font-style: inherit; font-weight: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">Step 5 -</span> Install WordPress</h2>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
If you are not connected to the application server anymore, open an SSH connection to it again. We’ll start by downloading WordPress on the machine. By default, Apache is configured to look for HTML files from<code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">/var/www/html/</code>, so let’s download WordPress to that directory.</div>
<div class="dp-highlighter" style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Consolas, 'Courier New', Courier, mono; font-size: 12px; line-height: 21px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; text-align: -webkit-auto; vertical-align: baseline; width: 673px;">
<div class="bar" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<div class="tools" style="background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;">
<a href="http://wp.tutsplus.com/tutorials/scaling-caching/deploy-your-wordpress-blog-to-the-cloud/#" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;">view plain</a><a href="http://wp.tutsplus.com/tutorials/scaling-caching/deploy-your-wordpress-blog-to-the-cloud/#" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;">copy to clipboard</a><a href="http://wp.tutsplus.com/tutorials/scaling-caching/deploy-your-wordpress-blog-to-the-cloud/#" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;">print</a><a href="http://wp.tutsplus.com/tutorials/scaling-caching/deploy-your-wordpress-blog-to-the-cloud/#" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;">?</a></div>
</div>
<ol class="dp-c" start="1" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-style: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<li class="alt" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span style="border-width: 0px; color: black; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;"><span style="border-width: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">cd /</span><span class="keyword" style="border-width: 0px; color: #006699; font-family: inherit; font-style: inherit; font-weight: bold; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">var</span><span style="border-width: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">/www/html </span></span></li>
</ol>
</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
To make things easier in the future, we will change <code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">ec2-user</code> to be the owner of that directory:</div>
<div class="dp-highlighter" style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Consolas, 'Courier New', Courier, mono; font-size: 12px; line-height: 21px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; text-align: -webkit-auto; vertical-align: baseline; width: 673px;">
<ol class="dp-c" start="1" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-style: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<li class="alt" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span style="border-width: 0px; color: black; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;"><span style="border-width: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">sudo chown ec2-user . </span></span></li>
</ol>
</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
You can download WordPress to your own computer and upload it from there using SCP, but I find it easier to download it directly to the Amazon machine using wget:</div>
<div class="dp-highlighter" style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Consolas, 'Courier New', Courier, mono; font-size: 12px; line-height: 21px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; text-align: -webkit-auto; vertical-align: baseline; width: 673px;">
<div class="bar" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<div class="tools" style="background-color: #f8f8f8; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: silver; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 8px; padding-top: 3px; vertical-align: baseline;">
<a href="http://wp.tutsplus.com/tutorials/scaling-caching/deploy-your-wordpress-blog-to-the-cloud/#" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;">view plain</a><a href="http://wp.tutsplus.com/tutorials/scaling-caching/deploy-your-wordpress-blog-to-the-cloud/#" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;">copy to clipboard</a><a href="http://wp.tutsplus.com/tutorials/scaling-caching/deploy-your-wordpress-blog-to-the-cloud/#" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;">print</a><a href="http://wp.tutsplus.com/tutorials/scaling-caching/deploy-your-wordpress-blog-to-the-cloud/#" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #a0a0a0; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 10px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;">?</a></div>
</div>
<ol class="dp-c" start="1" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-style: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<li class="alt" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span style="border-width: 0px; color: black; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;"><span style="border-width: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">wget http:</span><span class="comment" style="border-width: 0px; color: #008200; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">//wordpress.org/latest.zip </span><span style="border-width: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;"> </span></span></li>
</ol>
</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
This way, the WordPress package goes straight to its final location and all you need to do is to unzip it:</div>
<div class="dp-highlighter" style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Consolas, 'Courier New', Courier, mono; font-size: 12px; line-height: 21px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; text-align: -webkit-auto; vertical-align: baseline; width: 673px;">
<ol class="dp-c" start="1" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-style: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<li class="alt" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span style="border-width: 0px; color: black; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;"><span style="border-width: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">unzip latest.zip </span></span></li>
</ol>
</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
We are about ready to start configuring the blog. As our last step in the command line, change permissions of the <code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">wordpress</code> directory that was just created so that the installation script can create the <code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">wp-config.php</code> file:</div>
<div class="dp-highlighter" style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Consolas, 'Courier New', Courier, mono; font-size: 12px; line-height: 21px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1px; text-align: -webkit-auto; vertical-align: baseline; width: 673px;">
<ol class="dp-c" start="1" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #5c5c5c; font-family: inherit; font-style: inherit; list-style-image: initial !important; list-style-position: initial !important; list-style-type: decimal-leading-zero !important; margin-bottom: 1px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<li class="alt" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; line-height: 14px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 30px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span style="border-width: 0px; color: black; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;"><span style="border-width: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">chmod o+w wordpress </span></span></li>
</ol>
</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Now, open the WordPress URL in your browser (The URL of the EC2 instance followed by <code style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-family: Courier, 'Courier New', 'Lucida Console', Monaco; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">/wordpress</code>). Click on “Create a Configuration File” and then on the next page “Let’s go!”</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/26.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/26.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
You will end up on a page for entering the database settings. Enter the database name, user name and password, and the URL of the RDS instance. Then click “Submit.”</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/28.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/28.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
You are almost set. Configure the rest of the blog details to finish the installation and enjoy your newly created blog.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
You have successfully installed WordPress in the cloud!</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/29.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/29.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" width="600" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
</div>
<hr style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; clear: both; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; height: 1px; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 30px; text-align: -webkit-auto; width: 680px;" />
<h2 style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Helvetica, Arial; font-size: 36px; letter-spacing: -1px; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-shadow: rgb(255, 255, 255) 0px 1px 0px; vertical-align: baseline;">
<span style="border-width: 0px; color: #5f5f5f; font-family: inherit; font-size: 30px; font-style: inherit; font-weight: inherit; margin: 0px; outline-width: 0px; padding: 0px; vertical-align: baseline;">Step 6</span> Stop Everything</h2>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
As I mentioned at the beginning of this tutorial, AWS billing is based on the hours of usage, so to make sure you are not billed for time that you are not really using, make sure to stop everything once you are done testing.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
First, stop the EC2 instance by selecting it from the admin, right clicking on it and choosing “Stop.” If you later decide to start the machine again, all you need is to click on “Start” in the same drop down list and the machine will resume from where you left it.</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/30.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/30.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Stopping the database is just as easy, with the exception that you can’t resume the database again. That’s not so nice, but luckily you have the choice to save a snapshot of the data while stopping the database. You can later use this data to recreate the database setup whenever you need it again.</div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
On the RDS tab, right click on your database instance and select “Delete.”</div>
<div class="tutorial_image" style="background-color: white; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-style: italic; line-height: 21px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: hidden; overflow-y: hidden; padding-bottom: 15px; padding-left: 20px; padding-right: 20px; padding-top: 20px; text-align: center; vertical-align: baseline;">
<img border="0" original="http://nettuts.s3.amazonaws.com/981_wordpressCloud/31.jpg" src="http://nettuts.s3.amazonaws.com/981_wordpressCloud/31.jpg" style="background-color: #f4f4f4; border-bottom-color: rgb(137, 137, 137); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(137, 137, 137); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(137, 137, 137); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(137, 137, 137); border-top-style: solid; border-top-width: 1px; display: inline; font-family: inherit; font-style: inherit; margin-bottom: auto; margin-left: auto; margin-right: auto; margin-top: auto; max-width: 640px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" /></div>
<div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #575757; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 21px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; vertical-align: baseline;">
Verify that everything is stopped and log out of the AWS console. Your blog is gone, just as fast as it started.</div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-265787917443077672012-03-20T07:36:00.001-07:002012-03-20T07:36:05.668-07:00Setup a simple Subversion server with svnserve<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<h2>
1. Create a Repository</h2>
<pre>svnadmin create /svnrepos</pre>
<span id="more-179"></span><br />
<h2>
2. Create a SVN User</h2>
<pre>vi /svnrepos/conf/svnserve.conf</pre>
In that file add these three lines:<br />
<pre>anon-access = none
auth-access = write
password-db = passwd</pre>
Create a password file:<br />
<pre>vi /svnrepos/conf/passwd</pre>
In that file add a line for your user:<br />
<pre># add users in the format : user = password
tony = mypassword</pre>
<h2>
3. Import Your Project</h2>
(assuming you’ve put your project files in /projects/myrailsproject)<br />
<pre>svn import /projects/myrailsproject file:///svnrepos/myrailsproject</pre>
<h2>
4. Start the SVN Server as Daemon</h2>
<pre>svnserve -d</pre>
Done! You should now have a svn server running with one project named myrailsproject.<br />
Try checking it out of the repository:<br />
<pre>svn co svn://192.168.0.2/svnrepos/myyrailsproject</pre>
Since we set anon-access to none you should be prompted for username
and password which you created in the file /svnrepos/conf/passwd.<br />
<br />
<br />
<u>references:</u><br />
<br />
http://www.tonyspencer.com/2007/03/02/setup-a-subversion-server-in-4-minutes/<br />
<br />
http://geek.co.il/wp/2011/11/28/setting-up-subversion-svnserve-daemon-on-centos <br />
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-15276769082543845372012-03-16T03:59:00.001-07:002012-03-16T03:59:53.947-07:00Downloading an entire website in Linux<div dir="ltr" style="text-align: left;" trbidi="on">
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f7f7f7; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: 'Ubuntu Mono', 'Ubuntu Beta Mono A', Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; widows: 2; width: auto; word-spacing: 0px;"><code style="background-color: #e0e0e0; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: 'Ubuntu Mono', 'Ubuntu Beta Mono A', Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Complete Website can be downloaded using the following options with wget: </code></pre>
<pre style="background-color: #f7f7f7; border-width: 0px; color: #333333; font-family: 'Ubuntu Mono','Ubuntu Beta Mono A',Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; margin: 0px 0px 10px; max-height: 600px; orphans: 2; overflow: auto; padding: 5px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; widows: 2; width: auto; word-spacing: 0px;"><code style="background-color: #e0e0e0; border-width: 0px; color: #222222; font-family: 'Ubuntu Mono','Ubuntu Beta Mono A',Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace; font-size: 14px; margin: 0px; padding: 0px; vertical-align: baseline;">wget --mirror -p --convert-links -P ./LOCAL-DIR WEBSITE-URL
</code></pre>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: #f7f7f7; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: 'Ubuntu Beta', UbuntuBeta, Ubuntu, 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 17px; list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 1em; margin-left: 30px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="background-color: transparent; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; line-height: 16px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"><div style="background-color: transparent; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
<code style="background-color: #e0e0e0; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: 'Ubuntu Mono', 'Ubuntu Beta Mono A', Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 1px; padding-left: 5px; padding-right: 5px; padding-top: 1px; vertical-align: baseline;">–mirror</code><span class="Apple-converted-space"> </span>: turn on options suitable for mirroring.</div>
</li>
<li style="background-color: transparent; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; line-height: 16px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"><div style="background-color: transparent; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
<code style="background-color: #e0e0e0; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: 'Ubuntu Mono', 'Ubuntu Beta Mono A', Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 1px; padding-left: 5px; padding-right: 5px; padding-top: 1px; vertical-align: baseline;">-p</code><span class="Apple-converted-space"> </span>: download all files that are necessary to properly display a given HTML page.</div>
</li>
<li style="background-color: transparent; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; line-height: 16px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"><div style="background-color: transparent; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
<code style="background-color: #e0e0e0; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: 'Ubuntu Mono', 'Ubuntu Beta Mono A', Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 1px; padding-left: 5px; padding-right: 5px; padding-top: 1px; vertical-align: baseline;">–convert-links</code><span class="Apple-converted-space"> </span>: after the download, convert the links in document for local viewing.</div>
</li>
<li style="background-color: transparent; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; line-height: 16px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"><code style="background-color: #e0e0e0; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: 'Ubuntu Mono', 'Ubuntu Beta Mono A', Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">-P ./LOCAL-DIR</code><span class="Apple-converted-space"> </span>: save all the files and directories to the specified directory.</li>
</ul>
There are also other tools such as httrack.<br />
<br />
References:<br />
<br />
1) <a href="http://askubuntu.com/questions/20463/how-can-i-download-an-entire-website">http://askubuntu.com/questions/20463/how-can-i-download-an-entire-website</a></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-82279493262289864682012-03-07T03:40:00.004-08:002012-03-07T03:44:30.434-08:00Linux Screen and Byobu<div dir="ltr" style="text-align: left;" trbidi="on">
<style type="text/css">
<!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
PRE.cjk { font-family: "WenQuanYi Micro Hei", monospace }
CODE.cjk { font-family: "WenQuanYi Micro Hei", monospace }
A:link { so-language: zxx }
-->
</style>
<br />
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">Harry Potter may
have his wand, Thor may have Mjöllnir, and Buckethead may have his
axe, but all those gizmos pale in power to the QWERTY. With a few
taps at the command line, you can launch a Web site, recruit legions
to your cause, or vanquish a marauding thunder lizard.</span></span></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">Alas, even the
mighty QWERTY has a fatal weakness: It succumbs easily to a cut
connection. A noisy phone line, a lost cellular or wireless
connection, or a network time-out spells certain death for a remote
shell. If you've spent hours on a task, such as debugging an
application, it can be frustrating and maddening to lose your work in
an instant.</span></span></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">But
don't smash Mjöllnir into your head. Instead, adopt GNU Screen.
Screen creates and manages multiple shell windows within a console
(say, a dumb terminal physically connected to the host),
an </span></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">xterm</span></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> window,
or a Secure Shell (SSH) login. You can switch from one shell window
to another in a flash, and you can leave shells running perpetually
and reconnect at any time. Effectively, Screen provides many
virtualized consoles.</span></span></span></span></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Figures
1 through 5 picture the features and operation of Screen. Looking
at </span></span></span></span><span style="color: #996699;"><span style="font-family: arial,sans-serif;">Figure 1</span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">,
assume that you have used SSH to log in to a remote host. Initially,
you have your original shell on your local host (say, your laptop or
desktop) and a remote shell. As usual, you can use the remote shell
to run commands on the remote host; output is encrypted and sent over
the SSH connection to your local shell. (In the figures, blue
highlights the shell output that is currently visible.) As lamented
above, if your local shell or the remote shell or the connection
between the two is terminated, the remote shell is terminated, taking
your work to the big bit bucket in the sky.</span></span></span></span></div>
<div align="LEFT" class="western" style="border: none; orphans: 2; padding: 0cm; widows: 2;">
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="fig1"></a>
<br />
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Figure
1. A typical SSH connection</b></span></span></span><br />
<img align="BOTTOM" alt="A typical SSH connection" border="0" height="169" name="graphics1" src="http://www.ibm.com/developerworks/aix/library/au-gnu_screen/Figure_1.gif" width="86" /><span style="color: black;"> </span></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: #996699;"><span style="font-family: arial,sans-serif;">Figure 2</span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> depicts
state after you launch Screen on the remote host. The Screen utility
launches and in turn spawns a new shell window, </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><i><span style="font-weight: normal;">A,</span></i></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> in
which you can run commands. The output of A is visible, as connoted
by blue; the output comes from the shell, traverses through Screen,
goes through the remote login, and over the SSH connection, arriving
at your local login.</span></span></span></span></div>
<div align="LEFT" class="western" style="border: none; orphans: 2; padding: 0cm; widows: 2;">
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="fig2"></a>
<br />
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Figure
2. Screen manages shell windows</b></span></span></span><br />
<img align="BOTTOM" alt="Screen manages shell windows" border="0" height="332" name="graphics2" src="http://www.ibm.com/developerworks/aix/library/au-gnu_screen/Figure_2.gif" width="86" /><span style="color: black;"> </span></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">Screen does not
have a presence per se; it's a proxy to select among the available
and running windows it manages. Screen can only show the output of
one window at a time. Think of Screen as a virtual
keyboard-video-mouse (KVM) switch.</span></span></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">But
you can also detach from Screen, as shown in </span></span></span></span><span style="color: #996699;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Figure
3</span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">.
The Screen proxy persists, as do all windows it controls, but the
connection to Screen is temporarily severed, returning you to the
prompt of your remote login shell.</span></span></span></span></div>
<div align="LEFT" class="western" style="border: none; orphans: 2; padding: 0cm; widows: 2;">
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="fig3"></a>
<br />
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Figure
3. You can detach from Screen and its windows persist </b></span></span></span><br />
<img align="BOTTOM" alt="You can detach from Screen and its windows persist" border="0" height="331" name="graphics3" src="http://www.ibm.com/developerworks/aix/library/au-gnu_screen/Figure_3.gif" width="86" /><span style="color: black;"> </span></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: #996699;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Figure
4</span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> shows
a possible, eventual scenario. The connection to Screen has been
reestablished, and two additional windows—</span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><i><span style="font-weight: normal;">B</span></i></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">and </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><i><span style="font-weight: normal;">C</span></i></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">—have
been created. Windows A and B continue to run a shell and any
subordinate jobs, yet only the output of C is visible. Of course, you
can switch among the windows to monitor the state of your varied
jobs.</span></span></span></span></div>
<div align="LEFT" class="western" style="border: none; orphans: 2; padding: 0cm; widows: 2;">
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="fig4"></a>
<br />
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Figure
4. Screen can manage multiple windows</b></span></span></span><br />
<img align="BOTTOM" alt="Screen can manage multiple windows" border="0" height="342" name="graphics4" src="http://www.ibm.com/developerworks/aix/library/au-gnu_screen/Figure_4.gif" width="213" /><span style="color: black;"> </span></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Finally, </span></span></span></span><span style="color: #996699;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Figure
5</span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> captures
conditions if you detach from Screen and terminate your remote login.
Screen and its windows persist. You can log in anew, reconnect to
Screen (and by proxy to its windows), and carry on unperturbed.</span></span></span></span></div>
<div align="LEFT" class="western" style="border: none; orphans: 2; padding: 0cm; widows: 2;">
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="fig5"></a>
<br />
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Figure
5. You can detach and reattach to Screen at will</b></span></span></span><br />
<img align="BOTTOM" alt="You can detach and reattach to Screen at will" border="0" height="140" name="graphics5" src="http://www.ibm.com/developerworks/aix/library/au-gnu_screen/Figure_5.gif" width="213" /><span style="color: black;"> </span></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">If you regularly
access a remote server to perform maintenance or develop software,
GNU Screen is indispensable.</span></span></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="build"></a>
<span style="color: black;"><span style="font-family: arial,sans-serif;"><b>Building and
installing Screen</b></span></span></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">The
original version of Screen was released more than 10 years ago, so
chances are your system has the utility—typically
named</span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><i><span style="font-weight: normal;">/usr/bin/screen.</span></i></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> However,
if your system lacks Screen, it is easily installed from your
distribution's package manager. For example, if you use a variant of
Debian Linux®, such as Ubuntu, you can install Screen in one step
with </span></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">apt-get</span></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">:</span></span></span></span></div>
<table cellpadding="0" cellspacing="0">
<colgroup><col width="256*"></col>
</colgroup><tbody>
<tr>
<td bgcolor="#f7f7f7" style="border: none; padding: 0cm;" width="100%"><pre class="western" style="background: #f7f7f7; border: none; padding: 0cm;"><span style="color: black;"> <span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">$ sudo apt-get install screen</span></span></span></pre>
</td>
</tr>
</tbody></table>
<div class="western">
<br />
<br /></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Alternatively,
if you prefer to build from source, visit the GNU Screen project page </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> and download the latest code bundle. As of this writing, the
most recent release of Screen is version 4.0.3, posted just months
ago, in August 2008. To build and install from scratch, download and
extract the code, change to the resulting source directory, and run
the typical</span></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">./configure</span></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">, </span></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">make</span></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">,
and </span></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">sudo
make install</span></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> sequence:</span></span></span></span></div>
<table cellpadding="0" cellspacing="0">
<colgroup><col width="256*"></col>
</colgroup><tbody>
<tr>
<td bgcolor="#f7f7f7" style="border: none; padding: 0cm;" width="100%"><pre class="western" style="background: #f7f7f7; border: none; padding: 0cm;"><b><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">$ wget http://ftp.gnu.org/gnu/screen/screen-4.0.3.tar.gz</span></span></span></b>
<b><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">$ tar xzf tar xzf screen-4.0.3.tar.gz </span></span></span></b>
<b><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">$ cd screen-4.0.3</span></span></span></b>
<b><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">$ ./configure</span></span></span></b>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">this is screen version 4.0.3</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">...</span></span></span>
<b><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">$ make</span></span></span></b>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">CPP="gcc -E " srcdir=. sh ./osdef.sh</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">...</span></span></span>
<b><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">$ sudo make install</span></span></span></b>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">...</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">You may also want to install ./etc/etcscreenrc in </span></span></span>
<span style="color: black;"> <span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">/usr/etc/screenrc.</span></span></span>
<b><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">$ sudo cp ./etc/etcscreenrc /usr/etc/screenrc</span></span></span></b></pre>
</td>
</tr>
</tbody></table>
<div class="western">
<br />
<br /></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Screen
is now installed and ready to use. Type </span></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><b>man
screen</b></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> to
view the utility's man page.</span></span></span></span></div>
<div align="RIGHT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<br /></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="getstarted"></a>
<span style="color: black;"><span style="font-family: arial,sans-serif;"><b>Getting
started with Screen</b></span></span></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">To use Screen,
just launch it. When the license message appears, click <b>Return</b>;
you should now see a new login shell prompt. (In the transcripts
below, a nickname has been artificially added before each shell
prompt to differentiate between the numerous shell instances and to
draw parallels with Figures 1 through 5.)</span></span></div>
<table cellpadding="0" cellspacing="0">
<colgroup><col width="256*"></col>
</colgroup><tbody>
<tr>
<td bgcolor="#f7f7f7" style="border: none; padding: 0cm;" width="100%"><pre class="western" style="background: #f7f7f7; border: none; padding: 0cm;"><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">Local $ </span></span></span><b><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">ssh remote.example.com</span></span></span></b><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;"> </span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">Last login: Sun Dec 21 17:23:16 2008 from local.example.com</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">Remote $ </span></span></span><b><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">hostname</span></span></span></b>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">remote.example.com</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">Remote $ </span></span></span><b><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">screen</span></span></span></b>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">A $ </span></span></span><b><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">top</span></span></span></b></pre>
</td>
</tr>
</tbody></table>
<div class="western">
<br />
<br /></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Your
state now mirrors that of </span></span></span></span><span style="color: #996699;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Figure
2</span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">.
A Screen session is running (albeit unseen), and window A is active,
running the top system monitor, which refreshes system performance
information every few seconds.</span></span></span></span></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">To
temporarily detach from the Screen session and all its windows,
click </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Ctrl-a</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">,
then </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>d</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> (lowercase
D for "detach"). Ctrl-a is the Screen command prefix, and d
is the specific command to detach. You are now in the scenario shown
in </span></span></span></span><span style="color: #996699;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Figure
3</span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">.
The Screen session and window A remain alive. To verify, run </span></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><b>screen
-list</b></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">:</span></span></span></span></div>
<table cellpadding="0" cellspacing="0">
<colgroup><col width="256*"></col>
</colgroup><tbody>
<tr>
<td bgcolor="#f7f7f7" style="border: none; padding: 0cm;" width="100%"><pre class="western" style="background: #f7f7f7; border: none; padding: 0cm;"><b><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">$ screen -list</span></span></span></b>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">There is a screen on:</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">21020.pts-2.remote (Detached)</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">1 Socket in /tmp/screens/S-strike.</span></span></span></pre>
</td>
</tr>
</tbody></table>
<div class="western">
<br />
<br /></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">The </span></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">screen
-list</span></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> command
shows all available screen sessions. (As an aside, you can have
multiple screen sessions running simultaneously, each with its own
set of concurrent windows. This is shown in </span></span></span></span><span style="color: #996699;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Figure
6</span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">.
Each screen instance tracks its own current window. Some tips on the
advanced use of Screen such as this are presented later.) The session
numbered </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><i><span style="font-weight: normal;">21020</span></i></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> is
detached and marked accordingly. Because only one screen session
exists, you can reattach to it directly with </span></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">screen
-r</span></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">.
Oblivious to Screen's machinations, </span></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">top</span></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> continues
uninterrupted.</span></span></span></span></div>
<div align="LEFT" class="western" style="border: none; orphans: 2; padding: 0cm; widows: 2;">
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="fig6"></a>
<br />
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Figure
6. Screen provides multiple sessions, each with multiple windows </b></span></span></span><br />
<img align="BOTTOM" alt="Screen provides multiple sessions, each with multiple windows" border="0" height="149" name="graphics6" src="http://www.ibm.com/developerworks/aix/library/au-gnu_screen/Figure_6.gif" width="529" /><span style="color: black;"> </span></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">To
recreate </span></span></span></span><span style="color: #996699;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Figure
4</span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">,
reattach to the current session, then click </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Ctrl-a</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">,
then </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>c</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> (lowercase
C for "create") to create a new window. Next, click </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Ctrl-a</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">,
then </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>c</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> again.
You now have one Screen session managing three windows.</span></span></span></span></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">To
view the available windows in a session in a menu-like interface,
click </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Ctrl-a</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">,
then the double quotation mark (</span></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><b>"</b></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">)
key in the current window:</span></span></span></span></div>
<table cellpadding="0" cellspacing="0">
<colgroup><col width="256*"></col>
</colgroup><tbody>
<tr>
<td bgcolor="#f7f7f7" style="border: none; padding: 0cm;" width="100%"><pre class="western" style="background: #f7f7f7; border: none; padding: 0cm;"><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">Num Name Flags</span></span></span>
<span style="color: black;"> <span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">0 bash $</span></span></span>
<span style="color: black;"> <span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">1 bash $</span></span></span>
<span style="color: black;"> <span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">2 bash $</span></span></span></pre>
</td>
</tr>
</tbody></table>
<div class="western">
<br />
<br /></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">By default, the
name of a window is taken from the first command it
launches—commonly, a shell. Hence, there are three <i>bash</i>windows
in the menu above. To navigate the window menu, use the arrow keys to
move up and down the list; to choose a window, simply press Return.</span></span></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">To
dispose of the current window, type </span></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">exit</span></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> at
the window's shell prompt, or click the keyboard shortcut </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Ctrl-a</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">,
then </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>k</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> (lowercase
K for "kill"). If you use the latter method, an alert
appears at the bottom of the window to confirm that you want to kill
the window. Click </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>y</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> (lowercase
y for "yes") to acknowledge or </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>n</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> (lowercase
n for "no") to reject the command. If you kill all the
windows running under a Screen session, the originating screen
command prints a message and is terminated:</span></span></span></span></div>
<table cellpadding="0" cellspacing="0">
<colgroup><col width="256*"></col>
</colgroup><tbody>
<tr>
<td bgcolor="#f7f7f7" style="border: none; padding: 0cm;" width="100%"><pre class="western" style="background: #f7f7f7; border: none; padding: 0cm;"><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">Remote $ </span></span></span><b><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">screen</span></span></span></b>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">... Create and manipulate windows ...</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">... Exit from all windows...</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">[screen is terminating]</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">Remote $ </span></span></span><b><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">screen -list</span></span></span></b>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">No Sockets found in /tmp/uscreens/S-supergiantrobot.</span></span></span></pre>
</td>
</tr>
</tbody></table>
<div class="western">
<br />
<br /></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">If
you're following along and have killed all the open windows,
the </span></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">screen
-list</span></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> command
yields </span></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">No
sockets...</span></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">,
indicating that no screen sessions are available.</span></span></span></span></div>
<div align="RIGHT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<br /></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="smarter"></a>
<span style="color: black;"><span style="font-family: arial,sans-serif;"><b>Smarter
screens</b></span></span></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">So far, you've
seen how to create multiple windows within a Screen session. Alone,
this is enough to persist your command-line work and never lose work
again.</span></span></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">Admittedly,
however, managing seemingly identical, concurrent windows can become
confusing; it would be superior if you could easily differentiate
between one window and another without opening each one, especially
if any amount of time passes between a detach and a reattach.</span></span></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">Indeed, Screen
provides a number of options and tools to customize your work
environment. You can name each window, and you can place a status bar
at the bottom of each window to differentiate one from another.</span></span></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">To name a
window, activate the window. Click <b>Ctrl-a A</b> (uppercase
A, for "Annotate"), click <b>Backspace</b> as
needed to elide any existing moniker, then type a meaningful name at
the prompt:</span></span></div>
<table cellpadding="0" cellspacing="0">
<colgroup><col width="256*"></col>
</colgroup><tbody>
<tr>
<td bgcolor="#f7f7f7" style="border: none; padding: 0cm;" width="100%"><pre class="western" style="background: #f7f7f7; border: none; padding: 0cm;"><span style="color: black;"> </span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">Num Name Flags</span></span></span>
<span style="color: black;"> <span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">0 Window A $</span></span></span>
<span style="color: black;"> <span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">1 Window B $</span></span></span>
<span style="color: black;"> <span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">2 Window C $</span></span></span></pre>
</td>
</tr>
</tbody></table>
<div class="western">
<br />
<br /></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">This
is shown in </span></span></span></span><span style="color: #996699;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Figure
7</span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">,
where a window is tagged </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><i><span style="font-weight: normal;">Window
A.</span></i></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> A
window nickname need not be unique.</span></span></span></span></div>
<div align="LEFT" class="western" style="border: none; orphans: 2; padding: 0cm; widows: 2;">
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="fig7"></a>
<br />
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Figure
7. You can assign a descriptive name to each window </b></span></span></span><br />
<img align="BOTTOM" alt="You can assign a descriptive name to each window" border="0" height="251" name="graphics7" src="http://www.ibm.com/developerworks/aix/library/au-gnu_screen/Figure_7.jpg" width="459" /><span style="color: black;"> </span></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">You can provide
yourself additional visual cues to distinguish among windows with a
status bar. Launch your favorite text editor, and create the
file <i>.screenrc</i> in your home directory with the
following lines:</span></span></div>
<table cellpadding="0" cellspacing="0">
<colgroup><col width="256*"></col>
</colgroup><tbody>
<tr>
<td bgcolor="#f7f7f7" style="border: none; padding: 0cm;" width="100%"><pre class="western" style="background: #f7f7f7; border: none; padding: 0cm;"><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">hardstatus on</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">hardstatus alwayslastline</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "</span></span></span></pre>
</td>
</tr>
</tbody></table>
<div class="western">
<br />
<br /></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">With
such a .screenrc configuration file in place, each new window
displays a status line, including the window's name. </span></span></span></span><span style="color: #996699;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Figure
8</span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">shows
a window with a status line.</span></span></span></span></div>
<div align="LEFT" class="western" style="border: none; orphans: 2; padding: 0cm; widows: 2;">
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="fig8"></a>
<br />
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Figure
8. Use the status line to help identify each window at a glance </b></span></span></span><br />
<img align="BOTTOM" alt="Use the status line to help identify each window at a glance" border="0" height="335" name="graphics8" src="http://www.ibm.com/developerworks/aix/library/au-gnu_screen/Figure_8.jpg" width="549" /><span style="color: black;"> </span></div>
<div align="RIGHT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<br /></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="tips"></a>
<span style="color: black;"><span style="font-family: arial,sans-serif;"><b>Helpful
Screen tips</b></span></span></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">Screen has too
many features to list in a brief introduction, but fluent use
requires just a modicum of know-how and a few helpful options. Here
are some additional pointers:</span></span></div>
<ul>
<li><div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Type </b></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><b>screen</b></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b> without
any arguments in any window to open a new window.</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> Clicking </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Ctrl-a</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">,
then </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>c</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> and
typing </span></span></span></span><b><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">screen</span></span></span></span></span></b><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">are
synonymous, except that the latter provides command-line options to
immediately configure the new session.</span></span></span></span></div>
</li>
<li><div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>You
can name a window when you create it with </b></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><b>screen
-t </b></span></span></span></span></code><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><i><b>name</b></i></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>.</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> For
instance, to create a new window and tag it</span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><i><span style="font-weight: normal;">debugger,</span></i></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> go
to a Screen-managed window, then type </span></span></span></span><b><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">screen
-t debugger</span></span></span></span></span></b><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">.
If you open the window menu, one of your options should be
marked </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><i><span style="font-weight: normal;">debugger</span></i></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">.</span></span></span></span></div>
</li>
<li><div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>If
you've detached from a Screen session, you can reattach to a
specific window with </b></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><b>screen
-p </b></span></span></span></span></code><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><i><b>ID</b></i></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>,
where </b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><i><b>ID</b></i></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b> is
a number or a name.</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> Let's
try it:</span></span></span></span></div>
<table cellpadding="0" cellspacing="0">
<colgroup><col width="256*"></col>
</colgroup><tbody>
<tr>
<td bgcolor="#f7f7f7" style="border: none; padding: 0cm;" width="100%"><pre class="western" style="background: #f7f7f7; border: none; padding: 0cm;"><span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">Local $ ssh remote.example.com</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">Remote $ screen -t ghost</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">Ghost $ screen -t new</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">New $ </span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">... Press Control-a d to detach...</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">Remote $ screen -r -p ghost</span></span></span>
<span style="color: black;"><span style="font-family: Andale Mono,Lucida Console,Monaco,Liberation,fixed,monospace;"><span style="font-size: xx-small;">Ghost $</span></span></span></pre>
</td>
</tr>
</tbody></table>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
</div>
</li>
<li><div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>You
can log the output of every window with </b></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><b>screen
-L</b></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>.</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> Each
window has its own log file, typically
named</span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><i><span style="font-weight: normal;">~/screenlog.</span></i></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">n</span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><i><span style="font-weight: normal;">,</span></i></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> where </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><i><span style="font-weight: normal;">n</span></i></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> is
the window number shown in the window menu. This is another
fantastic feature to record complex steps—say, when a system is
being reconfigured.</span></span></span></span></div>
</li>
<li><div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><b>See the
Screen documentation for a complete list of accelerator keys.</b> Some
of the most useful combinations are <b>Ctrl-a</b>, then <b>0</b> (the
digit zero) through <b>Ctrl-a</b>, then <b>9</b> to
switch immediately to a specific window; <b>Ctrl-a</b>,
then <b>C</b> (uppercase C for "Clear") clears a
window; <b>Ctrl-a</b>, then <b>H</b> toggles logging
on and off; <b>Ctrl-a</b>, then <b>Ctrl-a</b> flip-flops
between the current window and the previous window; and <b>Ctrl-a</b>,
then <b>Ctrl-\</b> (the backslash) kills all windows and
terminates the current Screen session.</span></span></div>
</li>
</ul>
<div align="RIGHT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<br /></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="advanced_use"></a>
<span style="color: black;"><span style="font-family: arial,sans-serif;"><b>Advanced use
of Screen</b></span></span></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">As
mentioned earlier, you can create multiple, concurrent Screen
sessions, where each session can manage a suite of windows. Each
session has a unique identifier; use </span></span></span></span><b><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">screen
-list</span></span></span></span></span></b><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> to
catalog all available sessions. As with a window, you can name a
session to refer to by its handle. Use </span></span></span></span><b><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">screen
-S </span></span></span></span></span></b><b><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><i><span style="font-weight: normal;">label</span></i></span></span></span></b><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> to
assign a label to the new session.</span></span></span></span></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">Sharing is one
of the best uses of a named Screen session. If permitted, you can
connect to an existing session and collaborate with other users
within any of the session's windows. You can even switch to another
window within the session independently! If you're in the same window
as another, anything typed or displayed is reflected to all partners.
Let's try it:</span></span></div>
<ol>
<li><div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">Choose a
machine to work on, and log in.</span></span></div>
</li>
<li><div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Type </span></span></span></span><b><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">screen
-S sharing -t one></span></span></span></span></span></b><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> to
create a new Screen session named, aptly, </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><i><span style="font-weight: normal;">sharing,</span></i></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> and
a new window named</span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><i><span style="font-weight: normal;">one.</span></i></span></span></div>
</li>
<li><div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Create
a second window with </span></span></span></span><b><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">screen
-t two</span></span></span></span></span></b><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">.</span></span></span></span></div>
</li>
<li><div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">If
you like, check your work with </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Ctrl-a</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">,
then </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>d</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">, </span></span></span></span><b><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">screen
-list</span></span></span></span></span></b><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">, </span></span></span></span><b><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">screen
-r sharing</span></span></span></span></span></b><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">,
and </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>Ctrl-a</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">,
then </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><b>"</b></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">.</span></span></span></span></div>
</li>
<li><div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Emit
some output in the window named </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><i><span style="font-weight: normal;">one</span></i></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> by
typing </span></span></span></span><b><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">echo</span></span></span></span></span></b><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> in
that window.</span></span></span></span></div>
</li>
<li><div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">On the same
machine, open a second login window.</span></span></div>
</li>
<li><div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Within
that window, type </span></span></span></span><b><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">screen
-x -r sharing -p one</span></span></span></span></span></b><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">.</span></span></span></span></div>
<div align="LEFT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">The </span></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">-x</span></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> option
specifies multi-user mode; </span></span></span></span><code class="western"><span style="color: black;"><span style="font-family: monospace;"><span style="font-size: small;"><span style="font-style: normal;"><span style="font-weight: normal;">-p
one</span></span></span></span></span></code><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> attaches
directly to the window named </span></span></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><i><span style="font-weight: normal;">one.</span></i></span></span><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;"> You
should immediately see the same output as the other login session,
as shown in </span></span></span></span><a href="http://www.ibm.com/developerworks/aix/library/au-gnu_screen/#fig9"><span style="color: #996699;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">Figure
9</span></span></span></span></a><span style="color: black;"><span style="font-family: arial,sans-serif;"><span style="font-style: normal;"><span style="font-weight: normal;">.</span></span></span></span></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="fig9"></a>
<span style="color: black;"><span style="font-family: arial,sans-serif;"><br /><br /><b>Figure
9. A session can be shared</b><br /><img align="BOTTOM" alt="A session can be shared" border="0" height="391" name="graphics9" src="http://www.ibm.com/developerworks/aix/library/au-gnu_screen/Figure_9.jpg" width="489" /> </span></span></div>
</li>
</ol>
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">Using each login
window, run UNIX® commands to produce output, click Screen keyboard
shortcuts to switch among the windows in the shared session, and
watch the results.</span></span></div>
<div align="RIGHT" class="western" style="border: none; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<br /></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="magic"></a>
<span style="color: black;"><span style="font-family: arial,sans-serif;"><b>Magic Screen</b></span></span></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">To delve further
into Screen, read about split-screen mode and learn how you can
prevent access to individual windows with an old-fashioned lock.</span></span></div>
<div align="LEFT" class="western" style="border: none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">Screen is a
remarkable tool that you will quickly find invaluable in any work you
perform on the command line. In fact, use it once, and you will
wonder how you ever lived without it.</span></span></div>
<div align="LEFT" class="western" style="border: medium none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<br /></div>
<div align="LEFT" class="western" style="border: medium none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">References:</span></span></div>
<div align="LEFT" class="western" style="border: medium none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<br /></div>
<div align="LEFT" class="western" style="border: medium none; font-style: normal; font-weight: normal; margin-bottom: 0cm; orphans: 2; padding: 0cm; widows: 2;">
<span style="color: black;"><span style="font-family: arial,sans-serif;">1) </span></span><a href="http://www.ibm.com/developerworks/aix/library/au-gnu_screen/">http://www.ibm.com/developerworks/aix/library/au-gnu_screen/</a> <span style="color: black;"><span style="font-family: arial,sans-serif;"> </span></span></div>
<div class="western" style="margin-bottom: 0cm;">
<br /></div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-78596223273043306162012-02-21T04:27:00.000-08:002012-02-21T04:27:05.111-08:00Bash Test error "[: too many arguments"<div dir="ltr" style="text-align: left;" trbidi="on">
I was writing a shell script which checks whether a variable is null or not using:<br />
<br />
<code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><span class="kwd" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">if</span><span class="pln" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"> </span><span class="pun" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">[</span><span class="pln" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"> </span><span class="pun" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">-</span><span class="pln" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">n $diffCurr </span><span class="pun" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: black; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">]</span></code><br />
<br />
When I was running the script I was getting an error as follows:<br />
<br />
<i>[: too many arguments</i> <br />
<br />
<br />
This was happening because I have left out quotation marks around the variable that I passed into test (otherwise known as [)<br />
<br />
This means if the variable is empty, it will be as if I had no arguments ( [ -n ] ) and if the variable contains spaces, it will be as if I passwd multiple arguments.<br />
<br />
so to resolve the issue I used:<br />
<br />
<i>if [ -n "$diffCurr" ]</i><br />
<br />
Hope this helps me or someone in future if the silly mistake is committed.</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-34964236513106500712012-02-20T03:56:00.005-08:002012-02-20T03:56:43.582-08:00how to connect to remote qemu/xen/lxc instances using virsh<div dir="ltr" style="text-align: left;" trbidi="on">
libvirt has evolved to support remote qemu/xen/lxc connections. To connect to the remote instance:<br />
<br />
To determine the path of the hypervisor do the following on the remote hypervisor:<br />
<i><br /></i><br />
<i>[root@01 ~]# virsh uri<br />xen:///</i><br />
<br />
The above uri is for xen, it can be replaced by qemu, lxc etc.<br />
<br />
To connect to the remote hypervisor using ssh:<br />
<br />
<i>[root@01~]# virsh -c xen+ssh://02/system</i><br />
<br />
as mentioned earlier "xen" can be replace with qemu as follows:<br />
<br />
<i>[root@01~]#virsh -c qemu+ssh://03/system</i><br />
<br />
<br />
<u><i>References:</i></u><br />
<br />
<i>http://ubuntuforums.org/showthread.php?t=864955 </i></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-65587779812753247742012-01-31T08:59:00.000-08:002012-01-31T08:59:59.373-08:00Modifing ramdisk for creating custom initrd images<div dir="ltr" style="text-align: left;" trbidi="on">
initrd.img is a compressed file in gzip format <br />
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #111111; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 1.571em; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
So move initrd.img to initrd.gz as shown below.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; clear: both; color: #111111; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"># cp /tftpboot/el5/initrd.img .
# ls
cdrom initrd.img
# mv initrd.img initrd.gz</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #111111; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 1.571em; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
Unzip the initrd.gz file as shown below.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; clear: both; color: #111111; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"># gunzip initrd.gz
# ls
cdrom initrd</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #111111; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 1.571em; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
After unziping the initrd.gz file, the initrd is further in cpio ‘newc’ format. So extract the files from initrd using<strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"><span class="Apple-converted-space"> </span>cpio ‘newc’ format<span class="Apple-converted-space"> </span></strong>as shown below.<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /><strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Note:</strong><span class="Apple-converted-space"> </span><strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">info cpio</strong><span class="Apple-converted-space"> </span>will give more information about ‘newc’ format.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; clear: both; color: #111111; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"># mkdir tmp2
# cd tmp2/
# cpio -id < ../initrd
16524 blocks</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #111111; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 1.571em; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
Now you can view the content of initrd.img file</div>
<pre style="background-color: white; border-color: rgb(221, 221, 221); border-style: solid; border-width: 1px; clear: both; color: #111111; font-family: Consolas,'Andale Mono',Monaco,Courier,'Courier New',Verdana,sans-serif; font-size: 0.857em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5em; margin: 0px 0px 1.833em; orphans: 2; overflow: auto; padding: 0.667em 0.917em; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"># ls
bin dev etc init modules proc sbin selinux sys tmp var </pre>
<span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #111111; display: inline !important; float: none; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">After extracting the file as shown below, make appropriate modification to any of those files. Then pack the files back into the archive using the following commands. Pack the modified files back to cpio ‘newc’ format</span><br />
<br />
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; clear: both; color: #111111; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"># find . | cpio --create --format='newc' > /tmp/newinitrd
16524 blocks
# ls /tmp/
cdrom initrd newinitrd tmp2
# ls -l /tmp/newinitrd
-rw-r--r-- 1 root root 8460288 Jul 2 14:50 /tmp/newinitrd</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #111111; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 1.571em; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
Gzip the archive file.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; clear: both; color: #111111; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"># gzip newinitrd
# ls
cdrom initrd newinitrd.gz tmp2
# ls -l newinitrd.gz
-rw-r--r-- 1 root root 6649867 Jul 2 14:50 newinitrd.gz</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #111111; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; margin-bottom: 1.571em; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
Move file as an image file. You can use the newinitrd.img as your new boot image.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; clear: both; color: #111111; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.5em; margin-bottom: 1.833em; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"># mv newinitrd.gz newinitrd.img
# ls -l newinitrd.img
-rw-r--r-- 1 root root 6649867 Jul 2 14:50 newinitrd.img</pre>
<br />
<span style="background-color: white; color: #111111; display: inline ! important; float: none; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">If the file is in .cgz extention use the following commands:</span><br />
<span style="background-color: white; color: #111111; display: inline ! important; float: none; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 22px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><br /></span><br />
<h3 class="post-title entry-title" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-style: normal; font-variant: normal; font: normal normal normal 22px/normal Arial, Tahoma, Helvetica, FreeSans, sans-serif; letter-spacing: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.75em; orphans: 2; position: relative; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
How to decompress .cgz file</h3>
<div class="post-body entry-content" id="post-body-2286626922262874812" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.4; orphans: 2; position: relative; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; width: 520px; word-spacing: 0px;">
Decompress:<br /><code><br />zcat modules.cgz | cpio -ivd</code><br /><br />Compress:<br /><code><br />find . | cpio -ov -H crc | gzip -c9 > modules.cgz</code></div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-27972090829084419142012-01-16T02:54:00.000-08:002012-01-16T02:54:26.621-08:00<div dir="ltr" style="text-align: left;" trbidi="on">
<b>Rsync Backup root filesystem</b><br />
<br />
This rsync
script allows creating a full backup copy across filesystems. It is
setup so that the copy includes intact booting capabilities, optionally
excluding selected files.
<br />
The approach has benefits over omitting system files by just
copying personal data; if the system becomes corrupted in the main
partition, overcoming the problem means booting into the backup as
opposed to identifying and reinstalling affected programs.
<br />
<table class="toc" id="toc"><tbody>
<tr><td><br /></td></tr>
</tbody></table>
<h2>
<span class="mw-headline" id="Files">Files</span></h2>
Two files are needed: the backup script and a file stating which files to include/exclude from the backup source.
<br />
<h3>
<span class="mw-headline" id="Backup_script">Backup script</span></h3>
The script is very simple; it rsyncs in archive mode, ensuring that
symbolic links, devices, permissions and ownerships, among other file
attributes are preserved, while excluding files that match the patterns
from the include/exclude list.
<br />
Save it as <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">rbackup.sh</span> and make it executable:
<br />
<pre style="border-bottom: none; margin-bottom: 0; overflow: auto; padding-bottom: 0.8em;">rbackup.sh</pre>
<pre style="border-top-style: dashed; margin-top: 0; overflow: auto; padding-top: 0.8em;">#!/bin/sh
# rsync backup script
sudo sh -c "
rsync -av --delete-excluded --exclude-from=backup.lst / $1;
touch $1/BACKUP
"</pre>
<dl>
<dt>Backup source; <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">/</span>
</dt>
<dd>In this case it's performing a backup on the whole root.
</dd></dl>
<dl>
<dt>Backup destination; <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">$</span>1
</dt>
<dd>Passed as an argument to the script; e.g. <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">/media/backup</span>
</dd></dl>
<dl>
<dt>Include/exclude list; <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">--exclude-from=backup.lst</span>
</dt>
<dd>This example uses <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">backup.lst</span>.
</dd></dl>
<h3>
<span class="mw-headline" id="Include.2Fexclude_list">Include/exclude list</span></h3>
As deciding which files should populate this list can be difficult,
here's a typical backup example that excludes common files that do not
need to be backed up, such as the vast majority of <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">/dev</span>. Note that specifying every desired file or directory in <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">Include</span> is not needed; this section only acts as a filter for statements in <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">Exclude</span>. This file is in the traditional include/exclude rsync format.
<br />
Save the following as <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">backup.lst</span>:
<br />
<pre style="border-bottom: none; margin-bottom: 0; overflow: auto; padding-bottom: 0.8em;">backup.lst</pre>
<pre style="border-top-style: dashed; margin-top: 0; overflow: auto; padding-top: 0.8em;"># Include
+ /dev/console
+ /dev/initctl
+ /dev/null
+ /dev/zero
# Exclude
- /dev/*
- /proc/*
- /sys/*
- /tmp/*
- lost+found/
- /media/backup/*
</pre>
<dl>
<dt>Exclude</dt>
<dd> Content in system directories; <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">/dev</span>, <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">/proc</span>, <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">/sys</span> and <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">/tmp</span>
are excluded because they are created by the system at runtime, while
the directories themselves need to be preserved since they are <i>not</i> regenerated at boot. Lastly, all <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">lost+found</span> instances are skipped since they are partition-specific. For Archlinux <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">/var/lib/pacman/sync/*</span>
can also be excluded. This can save a lot of time on every backup since
the directory contains many small files that tend to change quite
often. These are description files for every package from the
repositories. These files can be regenerated with <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">pacman -Syu</span>.
</dd></dl>
<div style="background-color: #ffdddd; border: thin solid #DDBBBB; margin: 0.50em 0; overflow: hidden; padding: 5px;">
<strong> Warning: </strong>don't forget to also exclude the mounted directory where you'll put the backup to avoid an infinite loop (in this example <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;"><b>/media/backup/</b></span>).</div>
<dl>
<dt>Include</dt>
<dd> Even though <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">/dev</span> is excluded, 4 files that are not dynamically created by udev need to be preserved. These are <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">console</span>, <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">initctl</span>, <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">null</span> and <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">zero</span>.
</dd></dl>
<h2>
<span class="mw-headline" id="Backing_up">Backing up</span></h2>
Substitute <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">/media/<b>backup</b></span> as appropriate, and mount the destination device:
<br />
<pre># mount /dev/sdb1 /media/backup
</pre>
<div style="background-color: #ddffdd; border: thin solid #BBDDBB; margin: 0.50em 0; overflow: hidden; padding: 5px;">
<strong> Tip: </strong>if the ability to boot the backup isn't important, omit the previous step and simply backup to an arbitrary directory.</div>
Run the backup script (note that the trailing "<span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">/</span>" character is necessary):
<br />
<pre># ./rbackup.sh /media/backup/
</pre>
<h2>
<span class="mw-headline" id="Boot_setup">Boot setup</span></h2>
After the sync is finished, the backup destination's <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">/etc/fstab</span> has to be modified, a boot loader needs to be installed on the backup destination, and configuration in the destination's <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">/boot/grub/menu.lst</span> requires to reflect the new location.
<br />
<h3>
<span class="mw-headline" id="Modify_fstab">Modify fstab</span></h3>
Edit the backup destination's fstab:
<br />
<pre style="border-bottom: none; margin-bottom: 0; overflow: auto; padding-bottom: 0.8em;">$ nano /media/backup/etc/fstab</pre>
<pre style="border-top-style: dashed; margin-top: 0; overflow: auto; padding-top: 0.8em;">none /dev/pts devpts defaults 0 0
none /dev/shm tmpfs defaults 0 0
<i>/dev/sda1 /boot ext4 defaults 0 1
/dev/sda5 /var ext4 defaults 0 1
/dev/sda6 /usr ext4 defaults 0 1
/dev/sda7 / ext4 defaults 0 1
/dev/sda8 /home ext4 defaults 0 1
/dev/sda9 swap swap defaults 0 0</i>
</pre>
Because rsync has performed a recursive copy of the <i>entire</i> root filesystem, all of the <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">sda</span>
mounpoints are problematic and will cause the backup boot to fail. In
this example, all of the offending entries are replaced with a single
one:
<br />
<pre style="border-bottom: none; margin-bottom: 0; overflow: auto; padding-bottom: 0.8em;">$ nano /media/backup/etc/fstab</pre>
<pre style="border-top-style: dashed; margin-top: 0; overflow: auto; padding-top: 0.8em;">none /dev/pts devpts defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/<b>sdb1</b> / <b>ext4</b> defaults 0 1
</pre>
As before, remember to use the proper device name and filesystem type.
<br />
<h3>
<span class="mw-headline" id="Install_bootloader">Install bootloader</span></h3>
While these instructions assume GRUB is being employed, they could easily be adapted to other bootloaders, such as LILO
<br />
Open the GRUB console:
<br />
<pre># grub
</pre>
Direct the install towards the destination device:
<br />
<pre>root (hd<b>1,0</b>)
setup (hd<b>1</b>)
</pre>
<dl>
<dt>root; <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">hd 1,0</span>
</dt>
<dd>This should point to where the GRUB files are located--in this case, "<span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">hd 1</span>" means the second storage device (<span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">/dev/sdb</span>) and "<span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">0</span>" is the first partition (<span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">/dev/sdb<i>1</i></span>).
</dd></dl>
<dl>
<dt>setup; <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">hd 1</span>
</dt>
<dd>The command specifies where the actual boot loader is to be installed. In this example it is installed to the MBR of the second storage device.
</dd></dl>
<h3>
<span class="mw-headline" id="Configure_bootloader">Configure bootloader</span></h3>
The problem here is that even though the boot loader installs
correctly, its menu entries are for the main system's partitions, not
the backup system's.
<br />
It's possible to fix this by creating a custom <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">/boot/grub/menu.lst</span> for the backup destination. In order to do this, modify <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">rbackup.sh</span> so that it copies a custom <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">menu.lst</span>:
<br />
<pre style="border-bottom: none; margin-bottom: 0; overflow: auto; padding-bottom: 0.8em;">rbackup.sh</pre>
<pre style="border-top-style: dashed; margin-top: 0; overflow: auto; padding-top: 0.8em;">#!/bin/sh
# rsync backup script
sudo sh -c "
rsync -av --delete-excluded --exclude-from=backup.lst / $1;
<b>cp ~/custom.menu.lst $1/boot/grub/menu.lst;</b>
touch $1/BACKUP
"</pre>
<div style="background-color: #ddffdd; border: thin solid rgb(187, 221, 187); margin: 0.5em 0pt; overflow: hidden; padding: 5px;">
<strong> Tip: </strong>instead of replacing <span style="background-color: #ebf1f5; color: #222222; display: inline-block; font-family: monospace; padding: 0.1em 0.2em;">menu.lst</span>
with a custom version solely for the backup, add a new GRUB entry
pointing to the backup device or simply edit GRUB's menu during boot
time.</div>
<div style="background-color: #ddffdd; border: thin solid rgb(187, 221, 187); margin: 0.5em 0pt; overflow: hidden; padding: 5px;">
References:</div>
<div style="background-color: #ddffdd; border: thin solid rgb(187, 221, 187); margin: 0.5em 0pt; overflow: hidden; padding: 5px;">
https://wiki.archlinux.org/index.php/Full_System_Backup_with_rsync</div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-35917046838023587102011-12-08T09:22:00.001-08:002011-12-14T04:39:44.171-08:00Remote firefox over ssh<div dir="ltr" style="text-align: left;" trbidi="on">
To start firefox remotely on linux machines by forwarding "X" through ssh.<br />
<br />
try running firefox as <code>firefox -no-remote</code> (setting <code>MOZ_NO_REMOTE=1</code> as environment variable should work as well)<br />
<br />
we can also use xvfb [ X virtual framebuffer that performs all graphical operations in memory, not showing any screen output to start X applications in background. This will be extremely useful in case of running selenium tests on a headless server.<br />
<br />
To install xvfb::<br />
<br />
yum install xorg-x11-server-Xvfb.x86_64<br />
<br />
<br />Xvfb can be started as:<br />
<br />
Xvfb :1 -screen 0 1024x768x24 &<br />
<br />
<br />
<br />
References:<br />
<br />
1) http://unix.stackexchange.com/questions/2794/starting-firefox-on-a-remote-host-over-ssh-opens-a-new-window-locally-what-is<br />
<br />
2) http://www.theopensourcerer.com/2007/11/15/remote-firefox-over-xssh/</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-3644817331957977242011-12-07T03:47:00.001-08:002011-12-07T03:48:48.649-08:00Monitoring Linux servers using snmp and mrtg<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Introduction</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
You can monitor your system’s Web performance quite easily with graphical Linux tools. You’ll learn how to use several in this chapter, including MRTG, which is based on SNMP and monitors raw network traffic, and Webalizer, which tracks Web site hits.</div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
SNMP</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Most servers, routers and firewalls keep their operational statistics in object identifiers (OIDs) that you can remotely retrieve via the Simple Network Management Protocol (SNMP). For ease of use, equipment vendors provide Management Information Base (MIB) files for their devices that define the functions of the OIDs they contain. That’s a lot of new terms to digest in two sentences, so take a moment to look more closely.</div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
OIDs And MIBs</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
OIDs are arranged in a structure of management information (SMI) tree defined by the SNMP standard. The tree starts from a root node, which then descends through branches and leaves that each add their own reference value to the path separated by a period.. Figure 22-1 shows an OID structure in which the path to the enterprises OID branch passes through the org, dod, internet, and private branches first. The OID path for enterprises is, therefore, 1.3.6.1.4.1.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<a href="http://www.mohancheema.net/wp-content/uploads/2010/04/Snmp.gif" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: rgb(0, 155, 194) !important; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"><img alt="" class="aligncenter size-full wp-image-70" height="580" src="http://www.mohancheema.net/wp-content/uploads/2010/04/Snmp.gif" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: block; font-size: 15px; font: inherit; height: auto; margin-bottom: 20px; margin-left: auto; margin-right: auto; margin-top: 20px; max-width: 100%; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" title="Snmp" width="314" /></a></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Management Information Bases (MIBs) are text definitions of each of the OID branches. Table 22-1 shows how some commonly used OIDs map to their MIB definitions. For example, the SMI org MIB defines all the topmost OIDs found at the next layer, which is named dod; the internet MIB under dod defines the function of the topmost OIDs in the directory, mgmt, experimental, and private branches. This MIB information is very useful for SNMP management programs, enabling you to click on an OID and see its value, type, and description.</div>
<table border="1" cellpadding="2" cellspacing="0" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-collapse: collapse; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 10px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;"><caption style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><strong style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Table 1 OIDs And Their Equivalent MIBs</strong></caption><tbody style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<tr style="border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><th align="centre" style="background-color: green; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">OID</th><th align="centre" style="background-color: green; border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">MIB</th></tr>
<tr style="border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><td align="left" style="border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">1.3</td><td align="left" style="border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">org</td></tr>
<tr style="border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><td align="left" style="border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">1.3.6</td><td align="left" style="border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">dod</td></tr>
<tr style="border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><td align="left" style="border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">1.3.6.1</td><td align="left" style="border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">internet</td></tr>
<tr style="border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><td align="left" style="border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">1.3.6.1.1</td><td align="left" style="border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">directory</td></tr>
<tr style="border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><td align="left" style="border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">1.3.6.1.2</td><td align="left" style="border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">mgmt</td></tr>
<tr style="border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><td align="left" style="border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">1.3.6.1.3</td><td align="left" style="border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">experimental</td></tr>
<tr style="border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><td align="left" style="border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">1.3.6.1.4</td><td align="left" style="border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">private</td></tr>
<tr style="border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"><td align="left" style="border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">1.3.6.1.4.1</td><td align="left" style="border-bottom-width: 0px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; vertical-align: baseline;">enterprises</td></tr>
</tbody></table>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
You can refer to an OID by substituting the values in a branch with one of these more readable MIB aliases. For example, you can reference the OID 1.3.6.1.4.1.9.9.109.1.1.1.1.5 as enterprises.9.9.109.1.1.1.1.5.1 by substituting the branch name (enterprises) for its OID numbers (1.3.6.1.4.1).</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Remember, only the OID value at the very tip of a branch, the leaf, actually has a readable value. Think of OIDs like the directory structure on a hard disk. Each branch is equivalent to a subdirectory, and the very last value at the tip (the leaf) correlates to a file containing data.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The Linux snmpget command outputs the value of a single leaf, and the snmpwalk command provides the values of all leaves under a branch. I’ll discuss these commands later; for now, all you need to know is that the command output frequently doesn’t list the entire OID, just the MIB file in which it was found and the alias within the MIB. For example</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> SNMPv2-MIB::sysUpTime.0</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Here the OID value was found in the SNMPv2-MIB file and occupies position zero in the sysUpTime alias.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Equipment manufacturers are usually assigned their own dedicated OID branch under the enterprises MIB, and they must also provide information in universally accepted OIDs for ease of manageability. For example, NIC interface data throughput values must always be placed in a predefined location in the general tree, but a memory use value on a customized processor card may be defined in a MIB under the manufacturer’s own OID branch.</div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
SNMP Community Strings</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
As a security measure, you need to know the SNMP password, or community string, to query OIDs. There are a number of types of community strings, the most commonly used ones are the Read Only or “get” community string that only provides access for viewing statistics and system parameters. In many cases the Read Only community string or password is set to the word “public;” you should change it from this easy-to-guess value whenever possible. The Read/Write or “set” community string is for not only viewing statistics and system parameters but also for updating the parameters.</div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
SNMP Versions</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
There are currently three versions of SNMP.</div>
<ol style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px !important; padding-left: 30px !important; padding-right: 0px !important; padding-top: 7px !important; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">SNMP Version 1: The first version of SNMP to be implemented, version 1 was designed to be a protocol to provide device statistics and error reporting without consuming a lot of system resources. Security was limited to community strings and access controls based on the IP address of the querying server. Data communication wasn’t encrypted.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">SNMP Version 2: The second version of SNMP, often referred to as v2c, expanded the number of supported error codes, increased the size of counters used to track data, and had the ability to do bulk queries that more efficiently loaded response packets with data. SNMP v2c is backward compatible with version 1.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">SNMP Version 3: This version provides greater security and remote configuration capabilities than its predecessors. Access isn’t limited to a single community string for read-only and read/write access, as usernames and passwords have been introduced. Views of OIDs in a MIB can also be limited on a per-user basis. Support for encrypted SNMP data transfer and transfer error detection is also provided.</li>
</ol>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Remember their differences, because you will need to specify the version number when doing SNMP queries.</div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Doing SNMP Queries</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Configuring SNMP on a server isn’t hard, but it does require a number of detailed steps.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font: normal normal bold 1.2em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Installing SNMP Utilities on a Linux Server</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
If you intend to use your Linux box to query your network devices, other servers or even itself using MRTG or any other tool, you need to have the SNMP utility tools package net-snmp-utils installed. This package may also require pre-requisite packages, so it is best to use an automated package updater such yum or apt to do this.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
When searching for these packages the filenames will start with the package name followed by a version number, as in net-snmp-utils-5.1.1-2.i386.rpm.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font: normal normal bold 1.2em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
SNMP Utilities Command Syntax</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The SNMP utility tools package installs a number of new commands on your system for doing SNMP queries, most notably snmpget for individual OIDs and snmpwalk for obtaining the contents of an entire MIB. Both commands require you to specify the community string with a -c operator. They also require you to specify the version of the SNMP query to be used with a -v 1, -v 2c, or -v 3 operator for versions 1, 2, and 3, respectively. The first argument is the name or IP address of the target device and all other arguments list the MIBs to be queried.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
This example gets all the values in the interface MIB of the local server using SNMP version 1 and the community string of S3c999rity.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;">[root@SNMPSER tmp]# snmpwalk -v 1 -c S3c999rity localhost interface
...
...
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifDescr.3 = STRING: eth1
...
...
IF-MIB::ifPhysAddress.1 = STRING:
IF-MIB::ifPhysAddress.2 = STRING: 0:9:5b:2f:9e:d5
IF-MIB::ifPhysAddress.3 = STRING: 0:b0:d0:46:32:71
...
...
[root@SNMPSER tmp]#</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Upon inspecting the output of the snmpwalk command, you can see that the second interface seems to have the name eth0 and the MAC address 0:9:5b:2f:9e:d5. You can now retrieve the individual MAC address using the snmpget command.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER tmp]# snmpget -v 1 -c const1payted localhost ifPhysAddress.2
IF-MIB::ifPhysAddress.2 = STRING: 0:9:5b:2f:9e:d5
[root@SNMPSER tmp]#</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
You can confirm this information using the ifconfig command for interface eth0; the very first line shows a matching MAC address.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER tmp]# ifconfig -a eth0
eth0 Link encap:Ethernet HWaddr 00:09:5B:2F:9E:D5
inet addr:216.10.119.244 Bcast:216.10.119.255 Mask:255.255.255.240
...
...
[root@SNMPSER tmp]#</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
You’ll now see how you can configure SNMP on your Linux server to achieve these results.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font: normal normal bold 1.2em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Configuring Simple SNMP on a Linux Server</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
By default Fedora, installs the net-snmp package as its SNMP server product. This package uses a configuration file named /etc/snmp/snmpd.conf in which the community strings and other parameters may be set. The version of the configuration file that comes with net-snmp is quite complicated. I suggest archiving it and using a much simpler version with only a single line containing the keyword rocommunity followed by the community string. Here is an example.</div>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Save the old configuration file</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER tmp]# cd /etc/snmp/
[root@SNMPSER snmp]# mv snmpd.conf snmpd.conf.old
[root@SNMPSER snmp]# vi snmpd.conf</pre>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Enter the following line in the new configuration file to set the Read Only community string to S3c999rity.</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> rocommunity S3c999rity</pre>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Configure Linux to start SNMP services on each reboot with the chkconfig command:</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# chkconfig snmpd on
[root@SNMPSER root]#</pre>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Start SNMP to load the current configuration file.</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# service snmpd start
Starting snmpd: [ OK ]
[root@SNMPSER root]#</pre>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Test whether SNMP can read the system and interface MIBs using the snmpwalk command.</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# snmpwalk -v 1 -c S3c999rity localhost system
SNMPv2-MIB::sysDescr.0 = STRING: Linux bigboy 2.4.18-14 #1 Wed Sep 4 11:57:57 EDT 2002 i586
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
SNMPv2-MIB::sysUpTime.0 = Timeticks: (425) 0:00:04.25
SNMPv2-MIB::sysContact.0 = STRING: root@localhost
SNMPv2-MIB::sysName.0 = STRING: bigboy
...
...
...
[root@SNMPSER snmp]# snmpwalk -v 1 -c S3c999rity localhost interface
IF-MIB::ifNumber.0 = INTEGER: 3
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: wlan0
IF-MIB::ifDescr.3 = STRING: eth0
...
...
...
[root@SNMPSER root]#</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Now that you know SNMP is working correctly on your Linux server, you can configure SNMP statistics gathering software, such as MRTG, to create online graphs of your traffic flows.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font: normal normal bold 1.2em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
SNMP On Other Devices</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
In the example, you were polling localhost. You can poll any SNMP-aware network device that has SNMP enabled. All you need is the IP address and SNMP Read Only string and you’ll be able to get similar results. Here is an example of a query of a device with an IP address of 192.168.1.1.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# snmpwalk -v 1 -c chir1qui 192.168.1.1 interface</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<strong style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Note:</strong><span class="Apple-converted-space"> </span>When issuing snmpwalk and snmpget commands, remember to use the proper version switch (-v 1, -v 2c, or -v 3) for the version of SNMP you’re using.</div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Basic SNMP Security</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The security precautions that need to be taken with SNMP vary depending on the version you are using. This section outlines the basic steps for protecting your MIB data.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font: normal normal bold 1.2em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
SNMP Versions 1 and 2</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The most commonly supported versions of SNMP don’t encrypt your community string password so you shouldn’t do queries over insecure networks, such as the Internet. You should also make sure that you use all reasonable security measures to allow queries only from trusted IP addresses either via a firewall or the SNMP security features available in the snmp.conf file. You can also configure your server to use the TCP wrappers feature outlined in Appendix I, “Miscellaneous Linux Topics,” to limit access to specific servers without the need of a firewall.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
In case you need it, the snmpd.conf file can support limiting MIB access to trusted hosts and networks.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The snmpd.conf file has two security sections; a section with very restrictive access sits at the top of the file and is immediately followed by a less restrictive section. The example that follows is a modification of the less restrictive section. You will have to comment out the more restrictive statements at the top of the file for it to work correctly.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> ## sec.name source community
## ======== ====== =========
com2sec local localhost S3c999rity
com2sec network_1 172.16.1.0/24 S3c999rity
com2sec network_2 192.168.2.0/24 S3c999rity
## Access.group.name sec.model sec.name
## ================= ========= ========
group MyROGroup_1 v1 local
group MyROGroup_1 v1 network_1
group MyROGroup_2 v2c network_2
## MIB.view.name incl/excl MIB.subtree mask
## ============== ========= =========== ====
view all-mibs included .1 80
## MIB
## group.name context sec.model sec.level prefix read write notif
## ========== ======= ========= ========= ====== ==== ===== =====
access MyROGroup_1 "" v1 noauth exact all-mibs none none
access MyROGroup_2 "" v2c noauth exact all-mibs none none</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
In our example:</div>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Only three networks (localhost, 172.16.1.0/24, and 192.168.1.0/24) are allowed to access the server with the S3c999rity community string.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Each network is matched to a either a group called MyROGroup_1 using SNMP version 1, or group called MyROGroup_2 using SNMP version 2.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">All the MIBs on the server are defined by the view named all-mibs.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">An access statement ensures that only the defined networks have read only access to all the MIBs. MyROGroup_1 only has version 1 access with MyROGroup_2 only having version 2 access.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Modification of the MIBs via SNMP is denied because the word “none” is in the write section of the access statement.</li>
</ul>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
These precautions are probably unnecessary in a home environment where access is generally limited to devices on the home network by a NAT firewall.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font: normal normal bold 1.2em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
SNMP Version 3</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
SNMP Version 3 SNMPv3 is a much more secure alternative to earlier versions as it encrypts all its data and uses a username / password combination for client<a href="http://www.mohancheema.net/tag/authentication" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: rgb(0, 155, 194) !important; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;" title="authentication">authentication</a>. The username should be located in the /etc/snmp/snmpd.conf file with a corresponding automatically generated password located in the /var/net-snmp/snmpd.conf file. Here is how it’s done.</div>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Install the net-snmp-devel package as it contains the utility that will allow you to generate the password</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Stop the snmpd process.</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# service snmpd stop
Stopping snmpd: [ OK ]
[root@SNMPSER root]#</pre>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Automatically create the /etc/snmp/snmpd.conf and /var/net-snmp/snmpd.conf username and password entries using the net-snmp-config command. In this example the authentication password of “rootsrockreggae” for the read only (-ro) username “username4snmpv3″ is encrypted using the MD5 algorithm. The data received will not be encrypted.</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# net-snmp-config --create-snmpv3-user -ro
-a MD5 -A rootsrockreggae username4snmpv3
adding the following line to /var/net-snmp/snmpd.conf:
createUser username4snmpv3 MD5 "rootsrockreggae" DES
adding the following line to /etc/snmp/snmpd.conf:
rouser username4snmpv3
[root@SNMPSER root]# service snmpd start
Starting snmpd: [ OK ]
[root@SNMPSER root]#</pre>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">To encrypt the data received we use the net-snmp-config command again to create a username just for this purpose. A new read only username “securev3user” and authentication password “mandeville” are used, but this time the data will be encrypted using the DES algorithm with the privacy password of “savlamar”.</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# net-snmp-config --create-snmpv3-user -ro
-a MD5 -A mandeville -x DES -X savlamar securev3user
adding the following line to /var/net-snmp/snmpd.conf:
createUser securev3user MD5 "mandeville" DES savlamar
adding the following line to /etc/snmp/snmpd.conf:
rouser securev3user
[root@SNMPSER root]#</pre>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Start the snmpd process.</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# service snmpd start
Starting snmpd: [ OK ]
[root@SNMPSER root]#</pre>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">First we’ll do a query from remote host smallfry. We specify the authentication password and authentication encryption method, and we also use the -l flag to indicate that authentication will be used, but that data privacy will be disabled (the authNoPriv option).</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@smallfry ~]# snmpget -v 3 -u username4snmpv3 -l authNoPriv
-a MD5 -A rootsrockreggae 192.168.1.100 SNMPv2-MIB::sysORDescr.8</pre>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> SNMPv2-MIB::sysORDescr.8 = STRING: The management information definitions for the SNMP User-based Security Model.
[root@smallfry ~]#</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The query returns an easy to read string, “The management information definitions for the SNMP User-based Security Model”. This unencrypted string can also be seen in the tshark packet capture of the server’s interface.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# tshark -n -i eth1 -x port 161
Capturing on eth1
...
...
...
0.005889 192.168.1.100 -> 192.168.1.50 SNMP get-response
0000 00 c0 4f 46 0c 2e 00 b0 d0 46 32 71 08 00 45 00 ..OF.....F2q..E.
0010 00 f0 00 00 40 00 40 11 b3 b2 c0 a8 02 c8 c0 a8 ....@.@.........
0020 02 32 00 a1 80 0a 00 dc 87 38 30 81 d1 02 01 03 .2.......80.....
0030 30 11 02 04 45 a2 23 54 02 03 00 ff e3 04 01 01 0...E.#T........
0040 02 01 03 04 38 30 36 04 0d 80 00 1f 88 80 71 11 ....806.......q.
0050 68 72 0e b1 e7 45 02 01 12 02 01 39 04 0f 75 73 hr...E.....9..us
0060 65 72 6e 61 6d 65 34 73 6e 6d 70 76 33 04 0c 46 ername4snmpv3..F
0070 6c 74 26 51 4d aa 65 61 59 06 1a 04 00 30 7f 04 lt&QM.eaY....0..
0080 0d 80 00 1f 88 80 71 11 68 72 0e b1 e7 45 04 00 ......q.hr...E..
0090 a2 6c 02 04 43 4e da d7 02 01 00 02 01 00 30 5e .l..CN........0^
00a0 30 5c 06 0a 2b 06 01 02 01 01 09 01 03 08 04 4e 0..+..........N
00b0 54 68 65 20 6d 61 6e 61 67 65 6d 65 6e 74 20 69 The management i
00c0 6e 66 6f 72 6d 61 74 69 6f 6e 20 64 65 66 69 6e nformation defin
00d0 69 74 69 6f 6e 73 20 66 6f 72 20 74 68 65 20 53 itions for the S
00e0 4e 4d 50 20 55 73 65 72 2d 62 61 73 65 64 20 53 NMP User-based S
00f0 65 63 75 72 69 74 79 20 4d 6f 64 65 6c 2e ecurity Model.
4 packets captured
[root@SNMPSER root]#</pre>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Next we’ll do a query that will return a response over an encrypted data channel while crossing the network (the authPriv option).</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@smallfry ~]# snmpget -v 3 -u securev3user -l authPriv
-a MD5 -A mandeville -x DES -X savlamar 192.168.1.100 SNMPv2-MIB::sysORDescr.8
SNMPv2-MIB::sysORDescr.8 = STRING: The management information definitions for the SNMP User-based Security Model.
[root@smallfry ~]#
The query returns the same string, but the tshark packet capture only sees encrypted data, with only the username being visible.
[root@SNMPSER root]# tshark -n -i eth1 -x port 161
Capturing on eth1
...
...
...
0.003675 192.168.1.200 -> 192.168.1.50 SNMP Source port: 161 Destination port: 32778 [UDP CHECKSUM INCORRECT]
0000 00 c0 4f 46 0c 2e 00 b0 d0 46 32 71 08 00 45 00 ..OF.....F2q..E.
0010 01 00 00 00 40 00 40 11 b3 a2 c0 a8 02 c8 c0 a8 ....@.@.........
0020 02 32 00 a1 80 0a 00 ec 87 48 30 81 e1 02 01 03 .2.......H0.....
0030 30 11 02 04 17 52 82 96 02 03 00 ff e3 04 01 03 0....R..........
0040 02 01 03 04 3e 30 3c 04 0d 80 00 1f 88 80 71 11 ....>0<.......q.
0050 68 72 0e b1 e7 45 02 01 11 02 02 00 8e 04 0c 73 hr...E.........s
0060 65 63 75 72 65 76 33 75 73 65 72 04 0c 01 b2 00 ecurev3user.....
0070 6e 23 07 83 dc a2 b6 d6 3d 04 08 00 00 00 11 4e n#......=......N
0080 df 19 a3 04 81 88 36 dd e0 ce e0 52 19 ff 58 7e ......6....R..X~
0090 be fa d1 96 20 2b 28 65 59 30 e8 d4 cb 18 9f 8f .... +(eY0......
00a0 1e 5b a3 d6 ae f7 4a 86 bd ed 2a 4b a8 df 52 fb .[....J...*K..R.
00b0 00 b4 a8 37 3d 74 9e 6d 1d 56 9a ba f2 13 fa 72 ...7=t.m.V.....r
00c0 4d 47 fb 88 7b d3 54 e1 9d b3 66 f0 29 ab 8a 55 MG..{.T...f.)..U
00d0 6f 77 65 40 87 ab 0c 51 d9 0e bf 33 7f 9a cb ea owe@...Q...3....
00e0 37 50 3c 8e 65 dd 8f 3c 49 71 96 59 f9 d3 a8 23 7P<.e..</pre>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Your password and privilege information are stored in /var/net-snmp/snmpd.conf using the format displayed when you used the net-snmp-config command. here is an example.</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> # File: /var/net-snmp/snmpd.conf before SNMP starts
createUser securev3user MD5 "mandeville" DES savlamar
createUser username4snmpv3 MD5 "rootsrockreggae" DES</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The snmpd daemon will completely encrypt the SNMP password data in this file when it restarts which helps to further increase security. We can see an example of this configuration here.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> # File: /var/net-snmp/snmpd.conf after SNMP starts
usmUser 1 3 0x80001f88780711168720eb1e745
0x73656375626576337573657200
0x73656375726576337573657200
NULL .1.3.6.1.6.3.10.1.1.2 0xd951
ac1d95033f4afgf31243eb6907df .1.3.6.1.6.3.10.1.2.2
0xf1f4bb00452211d27b50c273c09031ac 0x00
usmUser 1 3 0x80001f8880711168720eb1e745
0x757365726e61657534736e6d70763300
0x757365726e616d6534736e6d70763300
NULL .1.3.6.1.6.3.10.
1.1.2 0x5e35c9f5352519aa4f53eded09bbdddd
.1.3.6.1.6.3.10.1.2.2 0x5e35c9f5122519aa4f53eded09bbdddd ""
setserialno 1464593474</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Practice using the net-snmp-config command so that you can become familiar with the syntax it uses to edit the SNMP configuration files. When in doubt, you can get a full syntax listing of the command if you use it without any arguments like this:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# net-snmp-config
...
...
SNMP Setup commands:
--create-snmpv3-user [-ro] [-A authpass] [-X privpass]
[-a MD5|SHA] [-x DES|AES] [username]
...
...
[root@SNMPSER root]#</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
With experience, you should become confident enough to edit the configuration files by yourself.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
As you can see, SNMPv3 is more secure than previous versions and should be your first SNMP choice whenever possible.</div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Simple SNMP Troubleshooting</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
If your SNMP queries fail, then verify that:</div>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">You restarted your snmp.conf file so the configuration settings become active. Remember, the snmpd.conf file is only read by the snmpd daemon when it starts up.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">You are using the correct community string.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Firewalls aren’t preventing SNMP queries from the SNMP client to the SNMP target.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Your SNMP security policy allows the query from your network.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Any TCP wrappers configuration on your SNMP target machine allows SNMP queries from your SNMP client. Generally speaking in a home environment protected by NAT your TCP wrappers files (/etc/hosts.allow) and (/etc/hosts.deny) should be blank.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Network routing between the client and target devices is correct. A simple ping or traceroute test should be sufficient.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">The snmpd daemon is running on the SNMP client.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">You are querying using the correct SNMP version.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Your /var/log/messages file does not contain errors that may have occurred while starting snmpd.</li>
</ul>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Troubleshooting to get functioning SNMP queries is important as many other supporting applications, such as MRTG which I’ll discuss next, rely on them in order to work correctly.</div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
MRTG</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
MRTG (Multi-Router Traffic Grapher) is a public domain package for producing graphs of various router statistics via a Web page. You can easily create graphs of traffic flow statistics through your home network’s firewall/router or even your Linux box’s NIC cards using MRTG. The product is available from the MRTG Web site (www.mrtg.org) and also on your distribution CDs. Figure 2 shows a sample MRTG graph.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<a href="http://www.mohancheema.net/wp-content/uploads/2010/04/Mrtg.gif" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: rgb(0, 155, 194) !important; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"><img alt="" class="aligncenter size-medium wp-image-71" height="171" src="http://www.mohancheema.net/wp-content/uploads/2010/04/Mrtg-300x171.gif" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: block; font-size: 15px; font: inherit; height: auto; margin-bottom: 20px; margin-left: auto; margin-right: auto; margin-top: 20px; max-width: 100%; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" title="Mrtg" width="300" /></a></div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font: normal normal bold 1.2em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
MRTG Download and Installation</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
You need to install MRTG before proceeding. Most RedHat and Fedora Linux software products are available in the RPM format. When searching for the file, remember that the MRTG RPM’s filename usually starts with mrtg and a version number, as in mrtg-2.10.5-3.i386.rpm.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
In addition to MRTG, you need to install the SNMP utility tools as explained earlier and you need to have a<span class="Apple-converted-space"> </span><a href="http://www.mohancheema.net/category/webserver" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: rgb(0, 155, 194) !important; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;" title="Web server">Web server</a><span class="Apple-converted-space"> </span>package installed for MRTG to work. RedHat Linux usually comes with the Apache Web server software preinstalled. The easiest way to tell if Apache is installed is to run the rpm -q httpd command. By default Apache expects the HTML files for your Web site to be located in /var/www/html. MRTG places its HTML files in /var/www/mrtg.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font: normal normal bold 1.2em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Configuring MRTG</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
By default, MRTG maps the inbound and outbound data throughput rates on the device it is polling. Methods for specifying other OIDs, such as CPU and memory usage, are discussed in “<a href="http://www.mohancheema.net/howtos/advanced-mrtg-howto" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: rgb(0, 155, 194) !important; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;" title="Advanced MRTG HowTo">Advanced MRTG</a>“. For now, I’ll stick with the default configuration.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
When the MRTG RPM is installed, it creates a directory called /etc/mrtg in which all future configuration files are stored. To create a replacement default /etc/mrtg/mrtg.cfg configuration file for the server, follow these steps.</div>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Use MRTG’s cfgmaker command to create a configuration file named mrtg.cfg for the server (bigboy) using a Read Only community string of S3c999rity. Place all data files in the directory /var/www/mrtg.</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# cfgmaker --output=/etc/mrtg/mrtg.cfg
--global "workdir: /var/www/mrtg" -ifref=ip
--global 'options[_]: growright,bits'
S3c999rity@localhost
--base: Get Device Info on S3c999rity@localhost:
--base: Vendor Id:
--base: Populating confcache
--snpo: confcache S3c999rity@localhost: Descr lo --> 1
--snpo: confcache S3c999rity@localhost: Descr wlan0 --> 2
...
...
...
--base: Walking ifAdminStatus
--base: Walking ifOperStatus
--base: Writing /etc/mrtg/mrtg.cfg
[root@SNMPSER root]#</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<strong style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">SNMPv2:</strong><span class="Apple-converted-space"> </span>As explained in the SNMP section, there are different versions of SNMP. If your query doesn’t work, check to make sure you are using the required version and then check other SNMP configuration parameters on the target device. You can specify MRTG’s SNMP query version with the –snmp-options cfgmaker option. Here is an example of cfgmaker using an SNMP version 2 query of a router with an IP address of 192.168.1.3. The –snmp-options option’s five colons before the 2 are important.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# cfgmaker --output=/etc/mrtg/192.168.1.3.cfg
-ifref=ip --global "workdir: /var/www/mrtg"
--snmp-options=:::::2 S3c999rity@192.168.1.3
[root@SNMPSER root]#</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<strong style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">SNMPv3:</strong><span class="Apple-converted-space"> </span>The cfgmaker command can also be used to poll SNMPv3 enabled devices, but you have to first install the Net::SNMP PERL module.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# yum -y install perl-Net-SNMP
or
[root@SNMPSER root]# perl -MCPAN -e "install Net::SNMP"</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
If you fail to install the module, you will get an error looking like this:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> Undefined subroutine &main::snmpmapOID called at ./cfgmaker line 1480.</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Next you need to know the SNMPv3 ID of the host you intend to poll. In fedora, this is value is located in the /var/net-snmp/snmpd.conf file. You can use the grep command to obtain it.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# grep oldEngineID /var/net-snmp/snmpd.conf
oldEngineID 0x80001f8880711168720eb1e745
[root@SNMPSER root]#</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
You can then repeat the cfgmaker command with options specific to the privacy and authentication schemes configured on the SNMP target device. Using the configurations of our previous SNMPv3 example, our configuration for encrypted authentication only would look like this:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# cfgmaker --global 'WorkDir: /var/www/mrtg'
--global 'Options[_]: growright, bits'
--output=/etc/mrtg/192.168.1.100.cfg
--enablesnmpv3 --username=username4snmpv3
--authpassword=rootsrockreggae --authproto=md5
--snmp-options=:::::3
--contextengineid=0x80001f8880711168720eb1e745
securev3user@192.168.1.100</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Our configuration for encrypted authentication and data privacy only would look like this:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# cfgmaker --global 'WorkDir: /var/www/mrtg'
--global 'Options[_]: growright, bits'
--output=/etc/mrtg/192.168.1.100-secure.cfg
--enablesnmpv3 --username=securev3user --authpassword=mandeville
--authproto=md5 --privpassword=savlamar --privprotocol=des
--snmp-options=:::::3
--contextengineid=0x80001f8880711168720eb1e745
securev3user@192.168.1.100</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Note: The MRTG cfgmaker command reliably supports SNMPv3 as of MRTG version 2.15. Prior to this version you would commonly see this error when attempting to do DNMPv3 queries.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> SNMP V3 requires a --username parameter as part of the User Security
Model for router securev3user@192.168.1.100:::::3
at ./cfgmaker line 121.</pre>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Edit /etc/mrtg/mrtg.cfg, and remove the sections related to interfaces you don’t need to monitor. A certain candidate would be the virtual loopback interface Lo: (with the IP address of 127.0.0.1), which doesn’t pass any network traffic at all.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Run MRTG using /etc/mrtg/mrtg.cfg as your argument three times. You’ll get an error the two times as MRTG tries to move old data files, and naturally, the first time it is run, MRTG has no data files to move.</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
Rateup WARNING: /usr/bin/rateup could not read the primary log file for localhost_192.168.1.100
Rateup WARNING: /usr/bin/rateup The backup log file for localhost_192.168.1.100 was invalid as well
Rateup WARNING: /usr/bin/rateup Can't remove localhost_192.168.1.100.old updating log file
Rateup WARNING: /usr/bin/rateup Can't rename localhost_192.168.1.100.log to localhost_192.168.1.100.old updating log file
[root@SNMPSER root]# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
Rateup WARNING: /usr/bin/rateup Can't remove localhost_192.168.1.100.old updating log file
[root@SNMPSER root]# env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
[root@SNMPSER root]#</pre>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Use MRTG’s indexmaker command to create a Web index page using your new mrtg.cfg file as a guide. The MRTG Web GUI expects to find the index file in the default MRTG Web directory of /var/www/mrtg/, so the format of the command would be.</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# indexmaker --output=/var/www/mrtg/index.html
/etc/mrtg/mrtg.cfg</pre>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">MRTG is run every five minutes by default, and the file that governs this is /etc/cron.d/mrtg. For MRTG to work correctly, edit this file, replacing all occurrences of /usr/bin/mrtg with env LANG=C /usr/bin/mrtg. The explanation for changing the language character set for MRTG is given in the “Troubleshooting MRTG” section.</li>
</ul>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
This isn’t all, you need to view the graphs too. This will be covered later, but first I’ll show you how to poll multiple devices.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font: normal normal bold 1.2em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Getting MRTG To Poll Multiple Devices</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The Fedora Core MRTG installation process creates a cron file named /etc/cron.d/mrtg. This file tells the cron daemon to run MRTG using the /etc/mrtg/mrtg.cfg file every five minutes to poll your network devices. You can configure MRTG to poll multiple devices, each with a separate configuration file. Here’s how:</div>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Create a new configuration file using the steps from the previous section; choose a filename that is not mrtg.cfg.</li>
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Add a new MRTG line in /etc/cron.d/mrtg for each new configuration file you create.</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> 0-59/5 * * * * root env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
0-59/5 * * * * root env LANG=C /usr/bin/mrtg /etc/mrtg/device1.cfg
0-59/5 * * * * root env LANG=C /usr/bin/mrtg /etc/mrtg/device2.cfg</pre>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Run the indexmaker command, and include all of your /etc/mrtg configuration files, to regenerate your Web index page.</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# indexmaker --output=/var/www/mrtg/index.html
/etc/mrtg/mrtg.cfg /etc/mrtg/device1.cfg /etc/mrtg/device2.cfg</pre>
<ul style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 1.3; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 7px; padding-left: 30px; padding-right: 0px; padding-top: 7px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<li style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Other versions of Linux keep their MRTG cron entries inside the /etc/crontab file. Edit this file using the same syntax as the Fedora /etc/cron.d/mrtg file, and then restart the cron daemon to re-read the configuration:</li>
</ul>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# service crond restart</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
You could also create a script with the /usr/bin/mrtg /etc/mrtg/device.cfg entries in it and make cron run it every five minutes. This way you can just edit the script each time you add a device without having to restart cron.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font: normal normal bold 1.2em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Configuring Apache To Work With MRTG</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
MRTG is useful because it can provide a graphical representation of your server’s performance statistics via a Web browser.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
With Fedora Core, MRTG creates an add-on configuration file named /etc/httpd/conf.d/mrtg.conf that includes all the necessary Apache commands for MRTG to work.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Some configuration may need to be done, because by default MRTG accepts Web requests from the Linux console only. You can add your home network to the file by inserting the network on the Allow from line, or you can allow universal access by commenting out that line along with the Deny from line. This example adds access from the 192.168.1.0 network.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> <location mrtg="">
Order deny,allow
Allow from all
</location></pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Remember to restart Apache once you have made these modifications in order for these changes to take effect.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<strong style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">Note:</strong><span class="Apple-converted-space"> </span>With newer versions of Fedora, Apache automatically reads the add-on files in the /etc/httpd/conf.d/ directory. With Fedora Core 1, you have to specifically configure the Apache configuration file /etc/httpd/conf/httpd.conf to find it. You can do this yourself by inserting this line at the very bottom of the main Apache configuration file before restarting Apache for the change to take effect.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> include "/etc/httpd/conf.d/mrtg.conf"</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<a href="" name="Basic_Security" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: rgb(0, 155, 194) !important; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"></a></div>
<h4 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 17px; font-style: normal; font-variant: normal; font: normal normal bold 1.1em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 22px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Basic Security</h4>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
If you are accessing MRTG graphs from the Internet, you may want to add password protection to the directory by using a .htaccess.</div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
How To View The MRTG Graphs In Your Web Browser</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
You can now access your MRTG graphs by pointing your browser to the URL:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> http://server-ip-address/mrtg/</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<a href="" name="Using_MRTG_To_Monitor_Other_Subsystems" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: rgb(0, 155, 194) !important; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"></a></div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Using MRTG To Monitor Other Subsystems</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
MRTG will generate HTML pages with daily, weekly, monthly, and yearly statistics for your interfaces. By default, MRTG provides only network interface statistics.</div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Troubleshooting MRTG</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
There are many simple steps you can use to troubleshoot MRTG. Take a look at some of the most common ones.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font: normal normal bold 1.2em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Basic Steps</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
MRTG won’t work if SNMP queries don’t work. Make sure you follow the SNMP troubleshooting steps if you have any difficulties.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font: normal normal bold 1.2em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Setting The Correct Character Set</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
MRTG usually works only if your system uses an ASCII-based (Western European) character set. If it isn’t set, then you’ll get errors such as this every time you run MRTG from the command line or as part of a cron job:</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# mrtg /etc/mrtg/mrtg.cfg
-------------------------------------------------------------------
ERROR: Mrtg will most likely not work propperly when the environment
variable LANG is set to UTF-8. Please run mrtg in an envir..
where this is not the case:
env LANG=C /usr/bin/mrtg ...
-------------------------------------------------------------------
[root@SNMPSER root]#</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Your system’s character set is defined in /etc/sysconfig/i18n, and the current Fedora default of en_US.UTF-8 won’t work, but en_US will after a system reboot. This is not necessarily a good idea, especially if the native language Linux uses on your system is not ASCII based, other things may fail to work.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
A better solution is to always run MRTG using this command instead of using just plain /usr/bin/mrtg.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> env LANG=C /usr/bin/mrtg</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
This will modify the character set used by MRTG alone and shouldn’t affect anything else.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font: normal normal bold 1.2em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Fedora Core 1 MRTG Errors With Net-SNMP</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
A bug appears in the MRTG implementation for some Fedora Core 1 MRTG versions when polling another Fedora Core 1 server.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
When using a -ifref=ip statement with the cfgmaker command, every line in the configuration file that is generated becomes commented out. When it works, this statement is very convenient, because it makes MRTG provide graphs sorted by the IP addresses of the interfaces instead of the default, which is the much harder to recognize interface MAC address. Upgrading to the latest Core 1 version of MRTG will fix the problem.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> ### Interface 6 >> Descr: | Name: | Ip: '192.168.1.100'
###
### The following interface is commented out because:
### * has a speed of which makes no sense
### * got 'Received SNMP response with error code
### error status: noSuchName
### index 1 (OID: 1.3.6.1.2.1.2.2.1.10.6)
### SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
### community: "S3c999rity"
### request ID: 824482716
### PDU bufsize: 8000 bytes
### timeout: 2s
### retries: 5
#
# Target[localhost_192.168.1.100]: /192.168.1.100:<nowiki>S3c999rity@localhost:</nowiki>
# SetEnv[localhost_192.168.1.100]: MRTG_INT_IP="192.168.1.100" MRTG_INT_DES
# MaxBytes[localhost_192.168.1.100]: 0
# Title[localhost_192.168.1.100]: Traffic Analysis for 192.168.1.100
# PageTop[localhost_192.168.1.100]: Traffic Analysis for 192.168.1.100</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
As all the lines in the configuration file are commented out with a # character, indexmaker fails to create an index.html file and gives errors.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER root]# indexmaker --output=/var/www/mrtg/stats/index.html /etc/mrtg/mrtg.cfg
Use of uninitialized value in hash element at /usr/bin/indexmaker line 307.
[root@SNMPSER root]#</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<a href="" name="Webalizer" style="border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: rgb(0, 155, 194) !important; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"></a></div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Webalizer</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Webalizer is a Web server log file analysis tool that comes installed by default on RedHat/Fedora Linux. Each night, Webalizer reads your Apache log files and creates a set of Web pages that enable you to view Web surfer statistics for your site. The information provided includes a list of your Web site’s most popular pages sorted by hits along with traffic graphs showing the times of day when your site is most popular.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font: normal normal bold 1.2em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
How To View Your Webalizer Statistics</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Fedora creates an add-on configuration file named /etc/httpd/conf.d/Webalizer.conf that includes all the necessary Apache commands for Webalizer to work. As in the case of the MRTG add-on file mentioned above, you have to edit it to allow access to the Webalizer pages from locations other than the Linux console. You also have to restart Apache to make the changes take effect.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
By default, Webalizer places its index page in the directory /var/www/html/usage and allows you to view your data by visiting the URL http://server-ip-address/usage.</div>
<h3 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 18px; font-style: normal; font-variant: normal; font: normal normal bold 1.2em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The Webalizer Configuration File</h3>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Webalizer stores its configuration in the file /etc/Webalizer.conf. The default settings should be sufficient for your Web server, but you may want to adjust the directory in which Webalizer places your graph statistics. This can be adjusted with the OutputDir directive in the file. After adjustments, Webalizer functions with few annoyances; however, be aware that running in quiet mode could hide deeper problems that could occur in future.</div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The top Command</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
You can monitor the amount of memory and CPU resources your system is using the top command.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER tmp]# top
3:04pm up 25 days, 23:23, 2 users, load average: 0.00, 0.02, 0.00
78 processes: 76 sleeping, 2 running, 0 zombie, 0 stopped
CPU states: 0.9% user, 0.5% system, 0.0% nice, 0.8% idle
Mem: 384716K av, 327180K used, 57536K free, 0K shrd, 101544K buff
Swap: 779112K av, 0K used, 779112K free 130776K cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
27191 root 15 0 1012 1012 780 R 5.6 0.2 0:00 top
4545 root 16 0 5892 5888 4956 S 0.9 1.5 169:26 magicdev
1 root 15 0 476 476 432 S 0.0 0.1 0:05 init
2 root 15 0 0 0 0 SW 0.0 0.0 0:00 keventd
5 root 15 0 0 0 0 SW 0.0 0.0 0:41 kswapd
6 root 25 0 0 0 0 SW 0.0 0.0 0:00 bdflush
[root@SNMPSER tmp]#</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Here the CPU usage is under 1.0% and 14% of memory (57536K) is free. The amount of free memory may appear low, but in this case, the server doesn’t seem to be swapping idle processes from memory to the swap disk partition as it isn’t being used at all. Excessive swapping can cause your system to slow down dramatically, the simplest ways to avoid this is to add more RAM or reduce the number of processes or users that are active on your system.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
If your system seems slow but the CPU and memory usage is low, then start looking at networking problems, such as poor duplex negotiation, bad cables, and network congestion due to excessive traffic.</div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The vmstat Command</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
You can also determine memory and swap usage with the vmstat command, which provides a summary of what top produces. In the example, memory is still 14% free (57,452MB used from a total of 130,780) and swap isn’t being used at all.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER tmp]# vmstat
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
0 0 0 0 57452 101584 130780 0 0 0 4 18 1 3 1 1
[root@SNMPSER tmp]#</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
As your memory fills up, your system will temporarily store programs and data on your hard disk’s “swap” partition. Excess swapping of programs and data between disk and memory can cause your system to slow down significantly and memory usage should be monitored to allow you to plan ways to either increase RAM or tune the way your system operates. System tuning is beyond the scope of this book, but there are many reference guides which can show you how to do this.</div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The free Utility</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
The free utility can determine the amount of free RAM on your system. The output is easier to understand than vmstat’s. Here’s a sample.</div>
<pre style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: #777777; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 1.3; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;"> [root@SNMPSER tmp]# free
total used free shared buffers cached
Mem: 126060 119096 6964 0 58972 40028
-/+ buffers/cache: 20096 105964
Swap: 522072 15496 506576
[root@SNMPSER tmp]#</pre>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
You should generally try to make your system run with at least 20% free memory on average, which should allow it to handle moderate spikes in usage caused by running memory-intensive cron batch jobs or tape backups. If you cannot achieve this, consider running more efficient versions of programs, offloading some applications to servers with less load, and, of course, upgrading the capacity of your RAM.</div>
<h2 style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 20px; font-style: normal; font-variant: normal; font: normal normal bold 1.3em/1.4 'Droid Sans', arial, sans-serif; letter-spacing: normal; margin-bottom: 12px; margin-left: 0px; margin-right: 0px; margin-top: 26px; orphans: 2; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Conclusion</h2>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
Server<span class="Apple-converted-space"> </span>monitoring<span class="Apple-converted-space"> </span>is always a good practice, because it can help you predict when things are going to go wrong or long term trends in your Web traffic.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-family: 'Droid Sans', arial, sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; font: inherit; letter-spacing: normal; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; orphans: 2; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
MRTG can be expanded not only to monitor traffic on your server’s NIC cards, but also to graph many of the statistics listed in top, free, and vmstat. </div>
<div style="-moz-font-feature-settings: inherit; -moz-font-language-override: inherit; background-color: white; border-width: 0px; color: #777777; font-family: 'Droid Sans',arial,sans-serif; font-size-adjust: inherit; font-size: inherit; font-stretch: inherit; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin: 0px; orphans: 2; padding: 0px 0px 20px; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div style="-moz-font-feature-settings: inherit; -moz-font-language-override: inherit; background-color: white; border-width: 0px; color: #777777; font-family: 'Droid Sans',arial,sans-serif; font-size-adjust: inherit; font-size: inherit; font-stretch: inherit; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin: 0px; orphans: 2; padding: 0px 0px 20px; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
references:</div>
<div style="-moz-font-feature-settings: inherit; -moz-font-language-override: inherit; background-color: white; border-width: 0px; color: #777777; font-family: 'Droid Sans',arial,sans-serif; font-size-adjust: inherit; font-size: inherit; font-stretch: inherit; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin: 0px; orphans: 2; padding: 0px 0px 20px; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
<a href="http://www.mohancheema.net/howtos/linux-snmp-and-mrtg-howto">http://www.mohancheema.net/howtos/linux-snmp-and-mrtg-howto</a></div>
<div style="-moz-font-feature-settings: inherit; -moz-font-language-override: inherit; background-color: white; border-width: 0px; color: #777777; font-family: 'Droid Sans',arial,sans-serif; font-size-adjust: inherit; font-size: inherit; font-stretch: inherit; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 24px; margin: 0px; orphans: 2; padding: 0px 0px 20px; text-indent: 0px; text-transform: none; vertical-align: baseline; white-space: normal; widows: 2; word-spacing: 0px;">
</div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-47242369933014988602011-10-11T08:05:00.000-07:002011-10-11T08:05:01.692-07:00Find & Replace across multiple files in linux<div dir="ltr" style="text-align: left;" trbidi="on">
<br />I was trying to find a solution todo a find & replace across multiple files which was purely command line based. There are plenty of scripts out there which will accomplish this but I needed a single line command. After some google searches and some experimentation I came up with this snippet.<br /><br /> find . -name "*.php" -print | xargs sed -i 's/foo/bar/g'<br /><br />It looks a bit complicated but its quite simple. There are three components to the command:<br /><br /> find . -name "*.php" -print – Find all files (recursively) which has “.php” in the file and print them out. This will give you output like this:<br /><br /> ./file.php<br /> ./includes/test.php<br /> ./classes/class.php<br /><br /> xargs- This command is used when you want to pass a lot of arguments to one command. xargs will combine the single line output of find and run commands with multiple<br /> arguments, multiple times if necessary to avoid the max chars per line limit. In this case we combine xargs with sed<br /> sed -i 's/foo/bar/g' – aka Stream Editor is a tool which should be in every sys admin’s toolkit. In this case every occurence of “foor” is replaced by “bar” in all the files found using the “find” command. Sed simply parses input and applies certain text transformations to it. There’s a lot to say about sed, you can find more at this tutorial.<br /><br />This pretty much covers the core of the find & replace command. You could also open up a particular folder in an IDE and use it’s find and replace feature. But find + sed is quite fast and powerful.<br /><br />Resources:<br /><br /> find – http://dmiessler.com/study/find/<br /> sed – http://www.grymoire.com/Unix/Sed.html</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-29299449994825634832011-10-04T08:20:00.000-07:002011-10-04T08:22:35.336-07:00drbd split brain recovery<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica; font-size: x-small;"></span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">I was trying to reboot redhat cluster for backups and gfs performance testing but while restarting I got spilt brain drbd messages in /var/log/messages and the following is the output of /proc/drbd: { we have primary/primary drbd config}</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">Primary:</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">version: 8.3.0 (api:88/proto:86-89)</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">GIT-hash: 9ba8b93e24d842f0dd3fb1f9b90e8348ddb95829 build by</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">argus@docidtxt03, 2009-03-09 18:04:20</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"> 0: cs:StandAlone ro:Primary/Unknown ds:UpToDate/DUnknown r---</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"> ns:0 nr:0 dw:94815205 dr:14861358 al:19160 bm:18136 lo:0 pe:0 ua:0</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">ap:0 ep:1 wo:b oos:18911216</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">Secondary:</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">version: 8.3.0 (api:88/proto:86-89)</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">GIT-hash: 9ba8b93e24d842f0dd3fb1f9b90e8348ddb95829 build by</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">argus@docidtxt04, 2009-03-04 16:23:58</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"> 0: cs:WFConnection ro:Secondary/Unknown ds:UpToDate/DUnknown A r---</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"> ns:0 nr:0 dw:0 dr:0 al:0 bm:14 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:55544 </span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">Following commands are used to recover from the situation:::</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">drbdadm -- --discard-my-data connect all (on node with "bad" data)</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">drbdadm connect all (on node with "good" data)</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">And now the resources are connected. </span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">Then verify the /proc/drbd status and if it isn't connecting check iptables and stop or allow the ports which are being used by drbd and then follow the commands again. or otherwise demote one of the node to secondary as </span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">drbdadm secondary r0 (on bad data node), after the successfull sync do</span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;"><br /></span><br />
<span class="Apple-style-span" style="font-family: Verdana, Arial, Helvetica;">drbdadm primary r0 (on both nodes)</span></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-35111030767123902492011-10-04T06:05:00.000-07:002011-10-04T06:05:24.914-07:00Copy/paste text with mouse in Linux<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="Apple-style-span" style="background-color: white; color: #111111; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 14px; line-height: 22px;"><div style="margin-bottom: 1.571em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<span style="color: red; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">Q.</span> How do I copy and paste text or output from a shell prompt? How do I copy text from one terminal window and paste it on diffrent server window using mouse?<br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /><span id="more-1411" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"></span><br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /><span style="color: #009900; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">A. </span>You can easily copy and paste between multiple shell prompts or the terminals using nothing but your mouse only. This is useful to transfer configuration lines from one terminal to another all opened over ssh session.</div>
<div style="margin-bottom: 1.571em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
Most Linux distros are configured the click of a middle mouse button as paste operation. All you have to do is select text, move your most to another window and hit the middle mouse button. If you have a scroll wheel, just press on it to past the text. If you see only two buttons, just hit both button simultaneously i.e. you can emulate a third, "middle" button by pressing both mouse buttons simultaneously.</div>
<h2 style="color: #111111; font-size: 1.286em; font-weight: bold; line-height: 1.222em; margin-bottom: 0.611em; margin-left: 0px; margin-right: 0px; margin-top: 1.833em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
Optional: Linux Mouse configuration</h2>
<div style="margin-bottom: 1.571em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
Usually you can reconfigure mouse by editing <strong style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">/etc/X11/xorg.conf</strong> file or your distributions mouse configuration tool. You can also use <span style="color: #009900; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">xmodmap</span> utility for modifying keymaps and mouse pointer button mappings in X. Here is my sample PS2 wheel Mouse entry:</div>
<pre style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; border-bottom-color: rgb(221, 221, 221); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; clear: both; font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; font-size: 0.857em; line-height: 1.5em; margin-bottom: 1.833em; overflow-x: auto; overflow-y: auto; padding-bottom: 0.667em; padding-left: 0.917em; padding-right: 0.917em; padding-top: 0.667em;">Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
EndSectio</pre>
<h3 style="font-size: 1.286em; line-height: 1.222em; margin-bottom: 0.611em; margin-left: 0px; margin-right: 0px; margin-top: 1.833em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
Further readings:</h3>
<ul style="list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 1.571em; margin-left: 1.571em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">
<li style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;">man pages xorg, xmodmap, xsetpointer etc</li>
</ul>
<div>
<br /></div>
<div>
Reference:</div>
<div>
<br /></div>
<div>
<a href="http://www.cyberciti.biz/faq/linux-copying-with-middle-mouse-button/">http://www.cyberciti.biz/faq/linux-copying-with-middle-mouse-button/</a></div>
</span></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-60663102856260050122011-09-28T04:22:00.000-07:002011-09-28T04:22:47.607-07:00Initrd modification and explanation<div dir="ltr" style="text-align: left;" trbidi="on">
Recently I had to change the initrd file accordingly for booting customised xen vm installtion. I did some research and found the following steps with which I've edited the init file inside initrd to point to the right harddrive ::<br />
<br />
mkdir ~/tmp<br />
cd ~/tmp<br />
cp /boot/initrd.img ./initrd.gz<br />
gunzip initrd.gz<br />
mkdir tmp2<br />
cd tmp2<br />
cpio -id < ../initrd.img<br />
<br />
now you should have a lot of files in ~/tmp/tmp2 directories, including a lot of subdirectories like sbin,lib<br />
<br />
now do the required changes to the files<br />
then pack the files back into the archive using the following command<br />
cd ~/tmp/tmp2<br />
<br />
find . | cpio --create --format='newc' > ~/tmp/newinitrd<br />
cd ~/tmp<br />
gzip newinitrd<br />
<br />
now you would have a newinitrd.gz<br />
rename this now -<br />
mv newinitrd.gz as newinitrd.img<br />
this is the new boot image now !! <br />
<br />
Following is much detailed explanation.<br />
<h2>
</h2>
<h2>
Introduction</h2>
Ever wondered what’s inside of the <i>initrd</i> file? This article tells you how to look into the <i>initrd</i> and even modify it.<br />
<h2>
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="few_words_about_initrd" title="few_words_about_initrd"></a>Few words about initrd</h2>
Linux uses the <i>initrd</i> or <i>initial ram-disk</i> during
the boot process. Linux kernel is very modular as you know. While the
kernel main file contains only the most needed stuff, rest of the
kernel, drivers included, reside in separate files – the kernel modules.<br />
It would be impossible to create a single kernel binary image that
would suit all the hardware configurations out there. Instead, kernel
supports the <i>initrd</i>. <i>initrd</i> is a virtual file-system
that contains drivers (kernel modules) needed to boot the system. For
instance, very often a SCSI controllers drivers reside inside of the <i>initrd</i>.
Kernel needs a SCSI controller driver to boot the operating system, but
it does not include it, nor it can read it from hard-disk (you’d need a
driver for the hard-disk, right?). And this is when the <i>initrd</i> becomes very handy.<br />
BIOS routines that read the actual kernel from the disk into RAM, do the same job with <i>initrd</i>. When Linux kernel boots, long before trying to mount the real root file-system, it loads <i>initrd</i> into memory and makes it a temporary root file-system.<br />
See how handy this is. <i>initrd</i> itself requires no drivers
whatsoever, because BIOS handles all the work of loading it into memory.
On the other hand, it contains all the drivers Linux needs to boot. And
you can easily rebuild it without changing the kernel.<br />
After loading <i>initrd</i> into RAM, the kernel runs a script named <i>init</i> that resides in <i>initrd</i>‘s
root directory. The script contains commands that would load all
required kernel modules. And only after that Linux tries to mount the
real root file-system.<br />
<h2>
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="few_words_about_history" title="few_words_about_history"></a>Few words about history</h2>
Content of the <i>initrd</i> file and its format has significantly
changed over last couple of years. Something like four years ago, it was
a common practice to create a real RAM-disk with a fixed size, format
it with ext2 file-system and write some data to it.<br />
To look into it, you had to open it up with <i>gzip</i> and then mount using <i>loopback</i> device (<i>mount -o loop</i>).<br />
Today things are totally different. Kernel configuration option that configures the size of <i>initrd</i> has gone. It wasn’t really convenient because your system was limited to certain <i>initrd</i> size. Instead kernel adapts itself to <i>initrd</i>, no matter what is it’s size.<br />
<h2>
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="back_to_the_real_thing" title="back_to_the_real_thing"></a>Back to the real thing<a class="toc_top" href="http://www.alexonlinux.com/opening-and-modifying-the-initrd#table_of_contents"></a></h2>
Like the kernel, <i>initrd</i> is compressed to save disk space.
Unlike the kernel, it can be easily decompressed. The tool we’ll use to
decompress it is, nothing fancy <i>gzip</i>. Same good old <i>gzip</i> that we use so often.<br />
Now before we begin it is a good idea to create a directory where we’ll work. After all, internal structure of <i>initrd </i>is quiet complex and we don’t want to mix contents the initrd with contents of your, let’s say, home directory. So, do <i>mkdir </i>and <i>cd</i> to create our clean environment. We’ll call this directory A. To make things even cleaner, place <i>initrd</i>
file into your newly created directory and an additional directory in
it. This is directory B. In that directory we will have the contents of
the <i>initrd</i>. Eventually, you should have a layout similar to this one.<br />
<div style="text-align: center;">
<a href="http://www.alexandersandler.net/wp-content/uploads/2008/05/initrd-directory-tree2.png"><img alt="" class="aligncenter size-full wp-image-117" height="205" src="http://www.alexandersandler.net/wp-content/uploads/2008/05/initrd-directory-tree2.png" title="initrd-directory-tree2" width="318" /></a></div>
Let’s start decompressing. Enter directory A and copy <i>initrd</i> that you would like to open into the directory. Then, rename it so that it would have .gz extension. The thing is that <i>initrd</i> is <i>gzip</i> compressed archive. Since <i>gzip</i> refuses do decompress something that doesn’t have .gz extension, we have to rename the file.<br />
Next we have to decompress the file. <i>gzip -d <file name=""> </file></i>does the job for us. Next step is to open up the <i>cpio</i> archive. Yes, modern <i>initrd</i> is a <i>cpio</i> archive. We can do that with <i>cpio -i < <file name=""></file></i>,
but before we do that, we have to enter directory B specifying file
name with double dots indicating file is in the parent directory – the A
directory.<br />
<div class="syntaxhighlighter " id="highlighter_391015">
<div class="lines">
<div class="line alt1">
<table><tbody>
<tr><td class="number"><code>01</code></td><td class="content"><code class="plain">sasha@sasha-linux:~/A$ cp /boot/initrd.img-2.6.24-16-generic .</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="number"><code>02</code></td><td class="content"><code class="plain">sasha@sasha-linux:~/A$ mv initrd.img-2.6.24-16-generic initrd.img-2.6.24-16-generi</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="number"><code>03</code></td><td class="content"><code class="plain">c.gz</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="number"><code>04</code></td><td class="content"><code class="plain">sasha@sasha-linux:~/A$ gzip -d initrd.img-2.6.24-16-generic.gz</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="number"><code>05</code></td><td class="content"><code class="plain">sasha@sasha-linux:~/A$ ls</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="number"><code>06</code></td><td class="content"><code class="plain">B/ initrd.img-2.6.24-16-generic</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="number"><code>07</code></td><td class="content"><code class="plain">sasha@sasha-linux:~/A$ cd B/</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="number"><code>08</code></td><td class="content"><code class="plain">sasha@sasha-linux:~/A/B$ cpio -i < ../initrd.img-2.6.24-16-generic</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="number"><code>09</code></td><td class="content"><code class="plain">42155 blocks</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="number"><code>10</code></td><td class="content"><code class="plain">sasha@sasha-linux:~/A/B$ ls -F</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="number"><code>11</code></td><td class="content"><code class="plain">bin/ conf/ etc/ init* lib/ modules/ sbin/ scripts/ usr/ var/</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="number"><code>12</code></td><td class="content"><code class="plain">sasha@sasha-linux:~/A/B$</code></td></tr>
</tbody></table>
</div>
</div>
</div>
In this example you can see me opening default <i>initial ram-disk</i> image from my Ubuntu 8.04 installation. We can see that the <i>initrd</i> opened up into a nice directory tree that resembles your root directory structure. In the heart of the <i>initrd</i> structure is the <i>init</i> script that does most of the job of loading right modules when system boots.<br />
The content of the <i>init</i> script is different from
distribution to distribution. The main difference is in approach. In
some distributions developers preferred to keep as many initializations
as possible out of the <i>initrd</i>. In other distributions developers didn’t care that much about keeping <i>initrd</i> small and fast. In general both approaches has a place under the sun. First approach based on the fact that <i>initrd</i>
is a limited environment, on the contrary to Linux when its fully
loaded. Thus when Linux is fully loaded, you can do more complex stuff
with less effort. Second approach on the other hand, sees in <i>initrd</i> an environment that works faster than “big” Linux, so it uses <i>initrd</i>‘s fastness to do some initializations.<br />
Ubuntu’s <i>initrd</i> image based upon first approach. It uses a shell program named <i>busybox</i>
– the shell environment originally designed for embedded systems and
known for its small memory footprint and good performance. <i>initrd</i> in OpenSuSE 10.2 on the other hand uses<i> bash</i> shell – same shell as you use regularly. This is a clear example of the second approach.<br />
Another interesting input to look at, is the fact that <i>init</i> script in Ubuntu 8.04 is ~200 lines long, while in OpenSuSE 10.2 it is ~1000 lines long.<br />
<h2>
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="changing_it" title="changing_it"></a>Changing it<a class="toc_top" href="http://www.alexonlinux.com/opening-and-modifying-the-initrd#table_of_contents"></a></h2>
Once you have it opened up, you can see things inside of it and even
make some modifications. As I already explained, structure of the <i>initial ram-disk</i>
changes from distribution to distribution. However, all distributions
share few common things. For instance, disregarding the distribution and
a particular <i>initrd</i> format, <i>lib/modules/</i> directory always contains kernel modules that <i>initrd</i> loads at boot time. You may swap one module with another without anyone even noticing.<br />
Number of modules, their names, etc controlled via <i>init</i> script in distribution dependent form. Therefore, no matter what distribution of Linux you have, <i>init </i>script is the key to understanding how <i>initrd</i> works. Apprehend the <i>init</i> script, and you will have full control over your <i>initrd</i>, it’s contents and what it does.<br />
<h2>
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="packing_it_back" title="packing_it_back"></a>Packing it back<a class="toc_top" href="http://www.alexonlinux.com/opening-and-modifying-the-initrd#table_of_contents"></a></h2>
Assuming you’re done playing around with <i>initrd</i> contents and you want to pack it back. Here is what you do.<br />
First you have to pack <i>cpio</i> archive. Remember the B directory we’ve created. This is where it becomes handy. We want to keep contents of the <i>initrd</i> as clean as possible. The A-B separation allows us to keep the original <i>initrd</i> image out of the way when packing it back.<br />
This is how we do that. First, we should enter the B directory. From there, run following command:<br />
<div class="syntaxhighlighter " id="highlighter_14714">
<div class="lines">
<div class="line alt1">
<table><tbody>
<tr><td class="number"><code>1</code></td><td class="content"><code class="plain">find | cpio -H newc -o > ../new_initrd_file</code></td></tr>
</tbody></table>
</div>
</div>
</div>
This will create a new <i>initrd</i> file named <i>new_initrd_file</i> inside of directory A.<br />
Next enter directory A and pack the <i>cpio</i> archive with <i>gzip</i>. Here’s the command that should do the job.<br />
<div class="syntaxhighlighter " id="highlighter_299859">
<div class="lines">
<div class="line alt1">
<table><tbody>
<tr><td class="number"><code>1</code></td><td class="content"><code class="plain">gzip -9 new_initrd_file</code></td></tr>
</tbody></table>
</div>
</div>
</div>
This will pack the <i>initrd</i> in <i>new_initrd_file</i> into
new_initrd_file.gz archive. Finally rename the file into whatever you
want to call it. Remember that getting rid of .gz extension is a common
practice, although not a necessity.<br />
This is how complete session will look like on Ubuntu:<br />
<div class="syntaxhighlighter " id="highlighter_187865">
<div class="lines">
<div class="line alt1">
<table><tbody>
<tr><td class="number"><code>01</code></td><td class="content"><code class="plain">sasha@sasha-linux:~$ cd A/B/</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="number"><code>02</code></td><td class="content"><code class="plain">sasha@sasha-linux:~/A/B$ find | cpio -H newc -o > ../new_initrd_image</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="number"><code>03</code></td><td class="content"><code class="plain">42155 blocks</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="number"><code>04</code></td><td class="content"><code class="plain">sasha@sasha-linux:~/A/B$ cd ../</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="number"><code>05</code></td><td class="content"><code class="plain">sasha@sasha-linux:~/A$ gzip -9 new_initrd_image</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="number"><code>06</code></td><td class="content"><code class="plain">sasha@sasha-linux:~/A$ ls</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="number"><code>07</code></td><td class="content"><code class="plain">B initrd.img-2.6.24-16-generic new_initrd_image.gz</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="number"><code>08</code></td><td class="content"><code class="plain">sasha@sasha-linux:~/A$ mv new_initrd_image.gz initrd.img-2.6.24-16-generic-modified</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="number"><code>09</code></td><td class="content"><code class="plain">sasha@sasha-linux:~/A$ ls</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="number"><code>10</code></td><td class="content"><code class="plain">B initrd.img-2.6.24-16-generic initrd.img-2.6.24-16-generic-modified</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="number"><code>11</code></td><td class="content"><code class="plain">sasha@sasha-linux:~/A$</code></td></tr>
</tbody></table>
</div>
</div>
</div>
<h2>
<a href="http://www.blogger.com/blogger.g?blogID=4175284689069343938" name="booting_with_the_new_initrd" title="booting_with_the_new_initrd"></a>Booting with the new initrd</h2>
Changing <i>initrd</i> is always a risky business. When playing
with matters of this kind, mistakes are common and it is important to
stay on the safe side. Adding a new <i>GRUB</i> configuration is not such a big deal, but by all means do so when trying to boot the brewed five minutes ago <i>initrd</i>.
You’ll save yourself lots of time reinstalling distributions and poking
around with different rescue systems to make your system boot again.<br />
Have fun!<br />
<br />
References:<br />
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-17865425555083665142011-09-23T07:29:00.000-07:002011-09-23T07:29:27.331-07:00Opening IPtables for VSFTPD<div dir="ltr" style="text-align: left;" trbidi="on">
While working with vsftpd configuring iptables is essential. It can be done as follows:<br />
<br />
<br />
<span class="Apple-style-span" style="-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></span><br />
<div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
Here's the document I refer people to so that they can following the FTP protocol:<a href="http://slacksite.com/other/ftp.html" rel="nofollow" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #10456a; cursor: pointer; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;">http://slacksite.com/other/ftp.html</a></div>
<ul style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 1em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">
<li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">To do active-mode FTP, you need to allow incoming connections to TCP port 21 and outgoing connections from port 20.</li>
<li style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">To do passive-mode FTP, you need to allow incoming connections to TCP port 21 and incoming connections to a randomly-generated port on the server computer (necessitating using a conntrack module in netfilter)</li>
</ul>
<div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
You don't have anything re: your OUTPUT chain in your post, so I'll include that here, too. If your OUTPUT chain is default-drop then this matters.</div>
<div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
Add these rules to your iptables configuration:</div>
<pre style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"><code style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">iptables -A INPUT -p tcp --dport 21 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 20 -j ACCEPT
</code></pre>
<div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
To support passive mode FTP, then, you need to load the ip_conntrack_ftp module on boot. Uncomment and modify the IPTABLES_MODULES line in the /etc/sysconfig/iptables-config file to read:</div>
<pre style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"><code style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">IPTABLES_MODULES="ip_conntrack_ftp"
</code></pre>
<div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
Save the iptables config and restart iptables.</div>
<pre style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"><code style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">service iptables save
service iptables restart
</code></pre>
<div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
To completely rule out VSFTPD as being a problem, stop VSFTPD, verify that it's not listening on port 21 with a "netstat -a" and then run a :</div>
<pre style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;"><code style="background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;">nc -l 21
</code></pre>
<div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
This will start netcat listening on port 21 and will echo input to your shell. From another host, TELNET to port 21 of your server and verify that you get a TCP connection and that you see output in the shell when you type in the TELNET connection.</div>
<div style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; font-size: 14px; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;">
Finally, bring VSFTPD back up, verify that it is listening on port 21, and try to connect again. If the connection to netcat worked then your iptables rules are fine. If the connection to VSFTPD doesn't work after netcat does then something is wrong w/ your VSFTPD configuration</div>
<div style="background-color: transparent; border-width: 0px; clear: both; font-size: 14px; margin: 0px 0px 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;">
<br /></div>
<div style="background-color: transparent; border-width: 0px; clear: both; font-size: 14px; margin: 0px 0px 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;">
<u>References:</u></div>
<div style="background-color: transparent; border-width: 0px; clear: both; font-size: 14px; margin: 0px 0px 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;">
<a href="http://serverfault.com/questions/38398/allowing-ftp-with-iptables">http://serverfault.com/questions/38398/allowing-ftp-with-iptables</a></div>
<div style="background-color: transparent; border-width: 0px; clear: both; font-size: 14px; margin: 0px 0px 1em; padding: 0px; vertical-align: baseline; word-wrap: break-word;">
</div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-4175284689069343938.post-50210259860864100812011-09-22T07:07:00.001-07:002011-09-22T07:41:08.544-07:00Error while loading shared libraries: libmysqlclient.so.16<div dir="ltr" style="text-align: left;" trbidi="on">
While migrating custom mysql installation, I got this error. To resolve I followed the following procedure:<br />
<br />
<span class="Apple-style-span" style="background-color: white; color: black; font-family: sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"></span><br />
<pre style="background-color: #f9f9f9; border-color: rgb(47, 111, 171); border-style: dashed; border-width: 1px; color: black; font-family: monospace,'Courier New'; font-size: 1.2em; line-height: 1.1em; padding: 1em;">bin/postconf: error while loading shared </pre>
<pre style="background-color: #f9f9f9; border-color: rgb(47, 111, 171); border-style: dashed; border-width: 1px; color: black; font-family: monospace,'Courier New'; font-size: 1.2em; line-height: 1.1em; padding: 1em;">libraries: libmysqlclient.so.16: cannot open </pre>
<pre style="background-color: #f9f9f9; border-color: rgb(47, 111, 171); border-style: dashed; border-width: 1px; color: black; font-family: monospace,'Courier New'; font-size: 1.2em; line-height: 1.1em; padding: 1em;">shared object file: No such file or directory
</pre>
<div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;">
<br />
This is because mysql library path is not in system library locations.</div>
<div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;">
To fix the error edit /etc/ld.so.conf</div>
<pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: monospace, 'Courier New'; font-size: 1.2em; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;">vi /etc/ld.so.conf
</pre>
<div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;">
Add following line to end of the file</div>
<pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: monospace, 'Courier New'; font-size: 1.2em; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;">/usr/lib/mysql
</pre>
<div style="line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em;">
<br />
Now run ldconfig</div>
<pre style="background-color: #f9f9f9; border-bottom-color: rgb(47, 111, 171); border-bottom-style: dashed; border-bottom-width: 1px; border-left-color: rgb(47, 111, 171); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(47, 111, 171); border-right-style: dashed; border-right-width: 1px; border-top-color: rgb(47, 111, 171); border-top-style: dashed; border-top-width: 1px; color: black; font-family: monospace, 'Courier New'; font-size: 1.2em; line-height: 1.1em; padding-bottom: 1em; padding-left: 1em; padding-right: 1em; padding-top: 1em;">ldconfig
</pre>
<br />
<br />
<br />
<br /></div>
Unknownnoreply@blogger.com0