tag:blogger.com,1999:blog-52401415531638277412024-03-13T08:19:31.344-07:00KSLinKSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.comBlogger19125tag:blogger.com,1999:blog-5240141553163827741.post-1577057914380982712011-10-06T20:51:00.001-07:002011-10-06T20:51:29.619-07:00scp without password8 steps explain how to perform SSH and SCP from local-host to a remote-host without entering the password on openSSH system<br /><br />1. Verify that local-host and remote-host is running openSSH<br /><br />[local-host]$ ssh -V<br />OpenSSH_4.3p2, OpenSSL 0.9.8b 04 May 2006<br /><br />[remote-host]$ ssh -V<br />OpenSSH_4.3p2, OpenSSL 0.9.8b 04 May 2006<br /><br />2. Generate key-pair on the local-host using ssh-keygen<br /><br />[local-host]$ ssh-keygen<br />Generating public/private rsa key pair.<br />Enter file in which to save the key (/home/jsmith/.ssh/id_rsa):<Hit enter><br />Enter passphrase (empty for no passphrase): <Enter your passphrase here><br />Enter same passphrase again:<Enter your passphrase again><br />Your identification has been saved in /home/jsmith/.ssh/id_rsa.<br />Your public key has been saved in /home/jsmith/.ssh/id_rsa.pub.<br />The key fingerprint is:<br />31:3a:5d:dc:bc:81:81:71:be:31:2b:11:b8:e8:39:a0 jsmith@local-host<br />The public key and private key are typically stored in .ssh folder under your home directory. In this example, it is under /home/jsmith/.sshd. You should not share the private key with anybody.<br /><br />By default the ssh-keygen on openSSH generates RSA key pair. You can also generate DSA key pair using: ssh-keygen -t dsa command.<br /> <br />3. Install public key on the remote-host.<br /><br />Copy the content of the public key from the local-host and paste it to the /home/jsmith/.ssh/authorized_keys on the remote-host. If the /home/jsmith/.ssh/authorized_keys already has some other public key, you can append this to the end of it. If the .ssh directory under your home directory on remote-host doesn’t exist, please create it.<br /><br />[remote-host]$ vi ~/.ssh/authorized_keys <br />ssh-rsa ABIwAAAQEAzRPh9rWfjZ1+7Q369zsBEa7wS1RxzWR jsmith@local-host<br />In simple words, copy the local-host:/home/jsmith/.ssh/id_rsa.pub to remote-host:/home/jsmith/.ssh/authorized_keys<br /><br />4. Give appropriate permission to the .ssh directory on the remote-host.<br /><br />[remote-host]$ chmod 755 ~/.ssh<br />[remote-host]$ chmod 644 ~/.ssh/authorized_keys<br /><br />5. Login from the local-host to remote-host using the SSH key authentication to verify whether it works properly.<br /><br />[local-host]$ <You are on local-host here><br /><br />[local-host]$ ssh -l jsmith remote-host<br />Enter passphrase for key '/home/jsmith/.ssh/id_rsa': <Enter your passphrase here><br />Last login: Sat Jun 07 2008 23:03:04 -0700 from 192.168.1.102<br />No mail.<br /><br />[remote-host]$ <You are on remote-host here><br /><br />6. Start the SSH Agent on local-host to perform ssh and scp without having to enter the passphrase several times.<br /><br />Verify whether SSH agent is already running, if not start it as shown below.<br /><br />[local-host]$ ps -ef | grep ssh-agent<br /> 511 9789 9425 0 00:05 pts/1 00:00:00 grep ssh-agent<br /> <br />[local-host]$ ssh-agent $SHELL<br /> <br />[local-host]$ ps -ef | grep ssh-agent<br /> 511 9791 9790 0 00:05 ? 00:00:00 ssh-agent /bin/bash<br /> 511 9793 9790 0 00:05 pts/1 00:00:00 grep ssh-agent<br /><br />7. Load the private key to the SSH agent on the local-host.<br /><br />[local-host]$ ssh-add<br />Enter passphrase for /home/jsmith/.ssh/id_rsa: <Enter your passphrase here><br />Identity added: /home/jsmith/.ssh/id_rsa (/home/jsmith/.ssh/id_rsa)<br />Following are the different options available in the ssh-add:<br /><br />ssh-add <key-file-name>: Load a specific key file.<br />ssh-add -l: List all the key loaded in the ssh agent.<br />ssh-add -d <key-file-name>: Delete a specificy key from the ssh agent<br />ssh-add -D: Delete all key<br /><br />8. Perform SSH or SCP to remote-home from local-host without entering the password.<br /><br />[local-host]$<You are on local-host here><br /><br />[local-host]$ ssh -l jsmith remote-host<br />Last login: Sat Jun 07 2008 23:03:04 -0700 from 192.168.1.102<br /> No mail.<br /><ssh did not ask for passphrase this time><br />[remote-host]$ <You are on remote-host here>KSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-59257866247587242262010-04-17T07:23:00.000-07:002010-04-17T07:26:37.824-07:00PHP Snippet codesGet Script name & URL
<br />=====================
<br /><?
<br />$url = $_SERVER['SCRIPT_NAME'];
<br />if( $url ) {
<br /> $url = strrev($url);
<br /> $last_slash = strlen($url) - strpos($url,'/') - 1;
<br /> $url = strrev($url);
<br /> if( $last_slash ) {
<br /> $file_name = substr($url,$last_slash);
<br /> $filename = explode('/',$file_name);
<br /> $fname = $filename[1];
<br /> }
<br />}
<br />echo "Script URL is " . $url;
<br />echo "<br> Script name is ". $fname;
<br />?>
<br />KSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-34728872113052440392008-08-06T01:57:00.000-07:002008-08-06T01:58:11.411-07:00Generate ssl certshttps certs<br />===========<br />Setp 1> Generate ssl certificates<br /><br />#openssl genrsa -des3 -out hostname.key 1024<br /><br />#openssl req -new -key hostname.key -out hostname.csr<br /><br />#openssl x509 -req -days 365 -in hostname.csr -signkey hostname.key -out hostname.crt<br /><br />step 2> Add Certificate to /etc/httpd/conf.d/ssl.conf<br /><br /><br /># vi /etc/httpd/conf.d/ssl.conf<br /><br />(note: just remove comment "#" from SSLCertificate and add filename)<br /><br /># Server Certificate:<br />SSLCertificateFile /etc/httpd/conf/cert/hostname.crt<br /># Server Private Key:<br />SSLCertificateKeyFile /etc/httpd/conf/cert/hostname.key<br /><br />dovecot ssl certs<br />==================<br />Setp 1> Generate ssl certificates<br /><br /><br />#openssl genrsa -des3 -out /usr/share/ssl/private/dovecot.pem 2048<br /><br />#openssl req -new -x509 -key /usr/share/ssl/private/dovecot.pem -out /usr/share/ssl/certs/dovecot.pem -days 1095<br /><br />step 2> modify into /etc/dovecot.confKSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-25713687538917172072008-08-06T01:51:00.000-07:002008-08-06T01:53:04.626-07:00URL redirectRedirect Directive<br /><br />Description: Sends an external redirect asking the client to fetch a different URL<br />Syntax: Redirect [status] URL-path URL<br />Context: server config, virtual host, directory, .htaccess<br />Override: FileInfo<br />Status: Base<br />Module: mod_alias<br /><br />The Redirect directive maps an old URL into a new one by asking the client to refetch the resource at the new location.<br /><br />The old URL-path is a case-sensitive (%-decoded) path beginning with a slash. A relative path is not allowed. The new URL should be an absolute URL beginning with a scheme and hostname.<br /><br />Example:<br /><br />vi /etc/apache2/apache2.conf<br /><br />RewriteEngine on<br />Redirect /service http://www.bar.com/service<br /><br />If the client requests http://myserver/service/foo.txt, it will be told to access http://www.bar.com/service/foo.txt instead.<br /><br /><br />Meta Refresh URL Redirect<br /><br />Meta Refresh URL Redirect is an example of a meta refresh URL redirect.<br />The code is,<br /><br />< meta http-equiv="refresh" content="5;url=http://www.foo.org" /><br /><br />This method displays the new page that the refresh points to by 5 seonds.<br /><br /><br />PHP URL Redirect<br /><br />The code for redirect URL, code goes at the top of the page.<br /><?php<br />header("location:http://www.foo.org/index.php");<br />exit;<br />?>KSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-77033329240964916112008-08-04T22:55:00.000-07:002008-08-04T23:09:06.538-07:00All about RPM<meta equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Cadmin%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CDOCUME%7E1%5Cadmin%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5Cadmin%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>X-NONE</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:dontvertaligncellwithsp/> <w:dontbreakconstrainedforcedtables/> <w:dontvertalignintxbx/> <w:word11kerningpairs/> <w:cachedcolbalance/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {mso-style-noshow:yes; mso-style-priority:99; color:purple; mso-themecolor:followedhyperlink; text-decoration:underline; text-underline:single;} code {mso-style-noshow:yes; mso-style-priority:99; font-family:"Courier New"; mso-ascii-font-family:"Courier New"; mso-fareast-font-family:"Times New Roman"; mso-hansi-font-family:"Courier New"; mso-bidi-font-family:"Courier New";} pre {mso-style-noshow:yes; mso-style-priority:99; mso-style-link:"HTML Preformatted Char"; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Courier New"; mso-fareast-font-family:"Times New Roman";} span.HTMLPreformattedChar {mso-style-name:"HTML Preformatted Char"; mso-style-noshow:yes; mso-style-priority:99; mso-style-unhide:no; mso-style-locked:yes; mso-style-link:"HTML Preformatted"; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; font-family:"Courier New"; mso-ascii-font-family:"Courier New"; mso-fareast-font-family:"Times New Roman"; mso-hansi-font-family:"Courier New"; mso-bidi-font-family:"Courier New";} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;} </style> <![endif]--><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code><span style="color: rgb(255, 0, 0);">How can I install or upgrade a package? Can I install an old one?</span>
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// Simply install rpm</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -i package.rpm
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// The "-v" is for verbose and "-h" for the hashing marks.</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -ivh package.rpm
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// Upgrade / Install a new-package</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -Uvh new-package.rpm
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// Downgrade Samba to old version</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -Uvh --oldpackage Samba-old-version.rpm </code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// Simply remove a package</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -e package
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// Simulate what will be done before erase</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -e --test package;
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// Backup the package before erase</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -e --repackage package
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// see dependencies of the RPM package you're trying to erase</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -q --whatrequires kernel </code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// Simply query an installed package</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -q yum </code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// know all installed packages on your system</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm –qa
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// Check if pkg is installed</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -qa | grep -i pkg
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// Query an uninstalled pkg</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -qpi vnc-server-4.0-0.beta4.3.2.i386.rpm </code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// get list of packages & programs required for some pkg installation</code></span><span style="font-size:100%;"><code>
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -qpR package.rpm</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// query an installed package eg. Kernel</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -qR kernel
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// find which package the file /usr/bin/smbmount belongs to</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -qf /usr/bin/smbmount
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// list what files will be installed by a package</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -ql cpp
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// list what files will be installed by an RPM package</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -qpl cpp-3.3.2-1.i386.rpm
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>//Direct install frm ftp server</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -Uvh ftp://user:pass@ftpserver/directory/package.rpm </code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// anonymous ftp and using proxy</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -qpl --ftpproxy proxyserver --ftpport port ftp://ftpserver/dir/remote-package.rpm
<br />rpm -qpR --httpproxy proxyserver --httpport port http://webserver/dir/remote-package.rpm
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// simulate the effect of execution- "rpm -ivh new-kernel.rpm"</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -ivh --test new-kernel.rpm
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// Freshen / Upgrade only installed packages</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -Fvh new-package.rpm
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// figure out the Kernel version(smp, bigmem) and base arch(i386, athlon)?</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code></code></span><span style="font-size:100%;"><code>rpm -q --qf "Kernel arch type is: %{ARCH}\nKernel name is: %{VERSION}\n" kernel
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code><span style="color: rgb(255, 0, 0);">How can I install a new Kernel version but keeping my old one installed? </span>
<br />When upgrading or installing a new Kernel version from a RPM package, the first thing you have to know is what Kernel to use. Always try to keep the current Kernel installed when upgrading, so you can test the new installed image an see if you'll get in trouble for some reason, if this happens so you can reboot with the current one. Starting from this point, we can say: Never use the "Freshen" or "Upgrade" commands unless you really knows what will going to happen. When upgrading critical packages like Kernel, try to use the Test option before executing the final command. And always try to install, not upgrade.
<br />And finally, when upgrading, use the Backup option "--repackage" so you can reinstall the old package you've removed during upgrade process. You can issue the command below to upgrade the Kernel and making a backup of the current and installed Kernel package:
<br />rpm -Uvh --repackage new-kernel.rpm
<br />The Old RPM will be generated on "_repackage_dir" RPM macro, usually /var/spool/repackage. If some problem occurs with the new installed Kernel version, then use the following command to reinstall the old one:
<br />rpm -ivh --oldpackage /var/spool/repackage/old-kernel.rpm
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code><span style="color: rgb(255, 0, 0);">Make backups of old packages when updating or removing them?</span></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code><span style="color: rgb(255, 0, 0);"></span>rpm -Uvh --repackage new-package.rpm
<br />rpm -e --repackage n
<br />The backup RPMs will be generated on "_repackage_dir" RPM macro, usually /var/spool/repackage. If some problem occurs, then use the following command to reinstall: ew-package.rpm
<br />rpm -Uvh --oldpackage /var/spool/repackage/old-package.rpm
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal; color: rgb(255, 0, 0);"><span style="font-size:100%;"><code>How can I check digests and signatures against a package? </code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>Every RPM package can be signed with a GPG key and has an MD5 hash inside its header so one can verify and validate a package. The first thing you must check is the presence of the GPG public key, you can only verify a signature if you have the right public key installed.
<br />To install the keys, look at the directory /usr/share/rhn/, this is usually the place where GPG-KEYS are. The following command will import/install the key:
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm --import /usr/share/rhn/GPG-KEY
<br />rpm -qi gpg-pubkey | more // See keys already installed in ur system
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -K package.rpm // to verify(md5, sha1, gpg) a package.
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>// example output against the Iptables package:</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code># rpm -K /ftp/linux/fedora/1/updates/i386/iptables-1.2.9-1.0.i386.rpm
<br />/ftp/linux/fedora/1/updates/i386/iptables-1.2.9-1.0.i386.rpm: (sha1) dsa sha1 md5 gpg OK
<br />
<br /># rpm --showrc | grep repackage // show values of macro
<br />-14: _repackage_all_erasures 0
<br />-14: _repackage_dir /var/spool/repackage
<br />-14: _repackage_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
<br />-14: _repackage_root %{nil}
<br />
<br /><span style="color: rgb(255, 0, 0);">How can I get RPM back? The command "rpm -qa" returns nothing! </span>
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>Sometimes the RPM database gets broken and rpm command freezes or doesn't work as expected. How to solve this problem:</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code> rm -f /var/lib/rpm/__* ; rpm -vv --rebuilddb</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal; color: rgb(255, 0, 0);"><span style="font-size:100%;"><code>How to figure out the installation time of my packages?</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -qa --queryformat '%{installtime} %{installtime:date} %{name}-%{version}\n' | sort -n | sed 's/^[0-9]*//'</code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code> OR
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -qa -last | tac
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code><span style="color: rgb(255, 0, 0);">How to figure out the size of a installed package?</span>
<br /></code></span></p><p class="MsoNormal" style="text-align: justify; line-height: normal;"><span style="font-size:100%;"><code>rpm -qa --queryformat '%10{size} %{name}-%{version}\n' | sort –n
<br />
<br /><o:p></o:p></code></span></p> KSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-18842781529216348232008-06-05T21:49:00.000-07:002008-06-05T21:52:17.011-07:00creating NAT using Linux IPtables<p> If you are running a recent 2.6 Linux Kernel this four step process should work for you. This has been specifically tested on FCore 3, 4, 5, and 6.. should work on any modern Linux distribution. All of these commands must be executed as the root user.<br /></p><p>First you need to tell your kernel that you want to allow IP forwarding. </p> <pre><code>echo 1 > /proc/sys/net/ipv4/ip_forward</code></pre> <p> Then you'll need to configure iptables to forward the packets from your internal network, on /dev/eth1, to your external network on /dev/eth0. You do this will the following commands: </p> <pre><code>/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE<br />/sbin/iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT<br />/sbin/iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT<br /></code></pre> <p> You should now be NATing. You can test this by pinging an external address from one of your internal hosts. The last step is to ensure that this setup survives over a reboot. Obviously you should only do these last two steps if your test is a success. </p> <p> You will need to edit <em>/etc/sysctl.conf</em> and change the line that says <strong>net.ipv4.ip_forward = 0</strong> to <strong>net.ipv4.ip_forward = 1</strong>. This essentially tells your kernel to do step one on boot. </p><p> Ok last step for Fedora/RHEL users. In order for your system to save the iptables rules we setup in step two you have to configure iptables correctly. You will need to edit <em>/etc/sysconfig/iptables-config</em> and make sure <strong>IPTABLES_MODULES_UNLOAD</strong>, <strong>IPTABLES_SAVE_ON_STOP</strong>, and <strong>IPTABLES_SAVE_ON_RESTART</strong> are all set to 'yes'. </p> For non-Fedora/RHEL users you can simply setup an init script for this or simply append these commands to the existing rc.local script so they are executed on bootKSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-56435214899075609612007-10-18T02:57:00.000-07:002007-10-18T03:00:19.535-07:00creating global rules in openwebmailopen Openwebmail cgi-bin folder (/var/www/cgi-bin/openwebmail)/etc/filter.book and add the rule. Local user rules exist in ~user/.openwebmail/webmail/filter.bookKSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-22793927527385551752007-10-10T04:10:00.000-07:002007-10-10T04:11:52.260-07:00amavis - To allow only password protected archives<pre>Add these two rules somewhere towards the end<br />of the list in $banned_filename_re:<br /><br /># allow if it is or contains any undecipherable components:<br />[ qr'^UNDECIPHERABLE$'=> 0 ],<br /><br />qr'^\.(zip|tar)$', # block zip and tar (unless password protected)</pre>KSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-33224789050604705712007-10-10T02:37:00.000-07:002007-10-10T02:42:14.597-07:00Encrypting file in Linux<strong>To encrypt</strong> single file, use command<strong> gpg</strong><br /><br />$ gpg -c filename<br /><br />Enter Passphrase:<br />Repeat passphrase:<br /><br />File becomes filename.gpg<br /><br /><strong>To Decrypt</strong><br /><br />gpg filename.gpg<br />gpg: CAST5 encrypted data<br />gpg: Enter passphrase<br /><br />original file is extracted out of the encrypted fileKSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-51370656100182167432007-09-28T00:00:00.000-07:002007-09-28T00:01:10.744-07:00pwck, grpckpwck for checking correctness of passwd file<br /><br />grpck for checking correctness of group fileKSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-76654554331196660752007-09-27T23:46:00.000-07:002007-09-27T23:47:24.655-07:00copy files by datescp files created in DIR_NAME on a particular date to TARGET_COMPUTER<br /><br />find DIR_NAME -mtime "{DATE}" -exec scp {} TARGET_COMPUTER \;KSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-16350549337428981662007-09-27T02:46:00.000-07:002007-09-27T02:47:41.962-07:00process statesuse top command to know the status of a process<br /><br /><span style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:85%;">state of the process:<br />S-sleeping,<br />R-running,<br />T-stopped or traced, <br />D-uniterruptable sleep,<br />Z=zombie.</span>KSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-72450771650477223062007-09-27T02:33:00.001-07:002007-09-27T05:25:37.597-07:00driver module for NIC cardGet full details of driver module for NIC card using "ethtool eth#<br /><br />eth# could be eth0 or eth1 or eth2 ...KSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-26736002957316960542007-09-27T02:27:00.000-07:002007-09-27T02:31:21.887-07:00Enhanced mem support upto 64 GBPAE is an Intel-provided memory address extension that enables support of<br />greater than 4 GB of physical memory upto 64 GB for most 32-bit (IA-32) Intel Pentium<br />Pro and later platforms.<br /><br />Details at http://en.wikipedia.org/wiki/Physical_Address_Extension<br /><br />To execute a PAE-enabled kernel add<br />swiotlb=force<br />to bootloader file grub.conf and reboot.KSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-49742348501947184412007-09-27T02:17:00.001-07:002007-09-27T02:17:47.760-07:00Get day of a date# date -d 2007-09-26 +%AKSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com1tag:blogger.com,1999:blog-5240141553163827741.post-12899796547826479752007-09-26T04:03:00.000-07:002007-09-26T04:05:07.071-07:00lshw command RHEL4lshw" is a small tool to extract detailed information on the hardware configuration of the machineKSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-17801789556243296312007-09-26T03:04:00.000-07:002007-09-26T03:09:04.598-07:00rhel4 x86_64 'thru' apt-get<h3 class="post-title entry-title"> <a href="http://anilinux.blogspot.com/2007/09/apt-get-install-for-rhel4.html">apt-get install for RHEL4 64 bit architecture</a> </h3> <p>#rpm -ivh http://apt.sw.be/redhat/el4/en/x86_64/dag/RPMS/apt-0.5.15lorg3.2-1.el4.rf.x86_64.rpm<br /><br />#vi /etc/apt/sources.list.d/os.list (add following mirrors)<br />repomd http://apt.sw.be redhat/el4/en/x86_64/dag/<br />repomd http://remi.collet.free.fr rpms/el4.x86_64/<br /><br />#apt-get update<br />#apt-cache search pkg<br />#apt-get install pkg<br />#apt-get remove pkg</p><p>replace pkg by package name<br /></p>KSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-33770297315717423672007-09-26T03:01:00.000-07:002007-09-27T02:52:02.122-07:00php-domphp dom module rpm for RHEL4 is implemented thru php-xml rpmKSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0tag:blogger.com,1999:blog-5240141553163827741.post-12553628745980609592007-09-20T02:16:00.000-07:002007-09-20T02:18:30.126-07:00Welcome Linux fansI am an Open source fan and would love to enrich my knowledge with others' and others with mine thru this platform Post anything related to Linux..KSLinhttp://www.blogger.com/profile/02607404516078645718noreply@blogger.com0