<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2344356294223010471</id><updated>2012-02-01T16:55:54.252+01:00</updated><category term='I'/><title type='text'>MY Experiences</title><subtitle type='html'>No Description</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default?start-index=101&amp;max-results=100'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>193</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-4488808184623042732</id><published>2012-01-24T10:51:00.007+01:00</published><updated>2012-01-24T11:11:55.042+01:00</updated><title type='text'>Allow from IP without password prompt, and also allow from any address with password prompt</title><content type='html'>You should write in&lt;span&gt; &lt;/span&gt;&lt;span&gt;.htaccess&lt;/span&gt; as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); "&gt;Order deny,allow&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); "&gt;Deny from all&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); "&gt;AuthName "&lt;/span&gt;&lt;span&gt;htaccess password prompt&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153); "&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); "&gt;AuthUserFile &lt;/span&gt;&lt;span&gt;/Path-to-Your-Password-File/&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153); "&gt;.htpasswd&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); "&gt;AuthType Basic&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); "&gt;Require valid-user&lt;/span&gt;&lt;br /&gt;&lt;span&gt;#Your Allowed IP Here:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); "&gt;Allow from&lt;/span&gt;&lt;span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;XXX.XXX.XXX.XXX&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153); "&gt;Satisfy Any&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-4488808184623042732?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/4488808184623042732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=4488808184623042732&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4488808184623042732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4488808184623042732'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2012/01/allow-from-ip-without-password-prompt.html' title='Allow from IP without password prompt, and also allow from any address with password prompt'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-5697939803094311284</id><published>2012-01-20T23:24:00.011+01:00</published><updated>2012-02-01T16:55:54.262+01:00</updated><title type='text'>Apache and Active Directory Authentication on Debian</title><content type='html'>&lt;span style="color: rgb(0, 0, 0);   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; display: inline ! important; float: none;font-family:Arial,FreeSans,sans-serif;font-size:100%;"  &gt;Make sure your apache supports mod_authnz_ldap, then enable it:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;a2enmod ldap&lt;/span&gt;&lt;br style="color: rgb(0, 102, 0);"&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;a2enmod authnz_ldap&lt;/span&gt;&lt;/span&gt;&lt;br style="color: rgb(0, 153, 0);"&gt;&lt;br style="color: rgb(0, 153, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;and restart your Apache:&lt;/span&gt;&lt;br style="color: rgb(0, 153, 0);"&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/etc/init.d/apache2 restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);   font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; font-family:Arial, FreeSans, sans-serif;font-size:100%;"  &gt;For the first Step (finding the user) we already need access to the&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="highlightedSearchTerm" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 0);   font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-family:Arial, FreeSans, sans-serif;font-size:100%;"  &gt;Active&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);   font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; font-family:Arial, FreeSans, sans-serif;font-size:100%;"  &gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;Directory. As AD won't allow anonymous acces, you need a username and a password just to do the search. This is&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 0); font-family: Arial, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "&gt;not&lt;/strong&gt;&lt;/span&gt;&lt;p   style="margin: 0px 0px 1em; padding: 0px; color: rgb(0, 0, 0);   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; font-family:Arial,FreeSans,sans-serif;font-size:13px;"&gt;&lt;span style="font-size:100%;"&gt;your administration account! Create a new account with minimal rights.&lt;/span&gt;&lt;/p&gt;&lt;p   style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 0);   font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-family:Arial, FreeSans, sans-serif;font-size:13px;"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p   style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 0);   font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-family:Arial, FreeSans, sans-serif;font-size:13px;"&gt;&lt;span style="font-size:100%;"&gt;So what is the username? Depends on your AD Layout. This should give you a pretty good hint&lt;/span&gt;&lt;/p&gt;&lt;p   style="margin: 0px 0px 1em; padding: 0px; color: rgb(255, 0, 0);   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; font-family:Arial,FreeSans,sans-serif;font-size:13px;"&gt;&lt;span style="font-size:100%;"&gt;CN=YOUR-NAME,OU=IT Department,OU=Germany,DC=example,DC=com&lt;/span&gt;&lt;/p&gt;&lt;p   style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 0);   font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-family:Arial, FreeSans, sans-serif;font-size:13px;"&gt;&lt;span style="font-size:100%;"&gt;here is your sample .htaccess:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:100%;"&gt;&lt;br style="color: rgb(0, 0, 153);"&gt;&lt;/span&gt;&lt;pre   style="margin: 0px 0px 1em; padding: 1em;  background-color: rgb(255, 255, 255); color: rgb(0, 0, 153);  overflow-x: auto; line-height: 1.25em; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px;font-family:Consolas,Inconsolata,Menlo,'DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace;font-size:12px;"&gt;&lt;span style="font-size:100%;"&gt;# Using this to bind&lt;br /&gt;AuthLDAPBindDN "CN=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;YOUR-USER&lt;/span&gt;&lt;span style="font-size:100%;"&gt;,OU=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;IT Department&lt;/span&gt;&lt;span style="font-size:100%;"&gt;,DC=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;example&lt;/span&gt;&lt;span style="font-size:100%;"&gt;,DC=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;com&lt;/span&gt;&lt;span style="font-size:100%;"&gt;"&lt;br /&gt;AuthLDAPBindPassword "&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;XXX&lt;/span&gt;&lt;span style="font-size:100%;"&gt;"&lt;br /&gt;&lt;br /&gt;# search user&lt;br /&gt;AuthLDAPURL "ldap://&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;IP-DOMAIN-CONTROLLER&lt;/span&gt;&lt;span style="font-size:100%;"&gt;/ou=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;Germany&lt;/span&gt;&lt;span style="font-size:100%;"&gt;,dc=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;example&lt;/span&gt;&lt;span style="font-size:100%;"&gt;,dc=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;com&lt;/span&gt;&lt;span style="font-size:100%;"&gt;?sAMAccountName?sub?(objectClass=*)"&lt;br /&gt;AuthType Basic&lt;br /&gt;AuthName "USE YOUR WINDOWS ACCOUNT"&lt;br /&gt;AuthBasicProvider ldap&lt;br /&gt;&lt;br /&gt;# Important, otherwise "(9)Bad file descriptor: Could not open password file: (null)"&lt;br /&gt;AuthUserFile /dev/null&lt;br /&gt;require valid-user&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0); 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; display: inline ! important; float: none;font-family:Arial, FreeSans, sans-serif;font-size:100%;"  &gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;you always need to specify at least one organizational unit (ou).&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;&lt;br /&gt;PS.: If your users are split into multiple OU's, your are limiting the logons to OU's  from one OU. This is the case im my environment where users are split into different regions. You should use another port (3268).&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;AuthType Basic&lt;br /&gt;AuthBasicProvider ldap&lt;br /&gt;AuthzLDAPAuthoritative Off&lt;br /&gt;AuthName "whateveryouwant"&lt;br /&gt;AuthLDAPURL "ldap://&lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;IP-DOMAIN-CONTROLLER&lt;/span&gt;:3268/dc=&lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;example&lt;/span&gt;,dc=&lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;com&lt;/span&gt;?sAMAccountName?sub?(objectClass=*)"&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;# Using this to bind&lt;/span&gt;&lt;br /&gt;AuthLDAPBindDN "&lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;YOUR-USER&lt;/span&gt;@&lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;example.com&lt;/span&gt;"&lt;br /&gt;AuthLDAPBindPassword "&lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;XXX&lt;/span&gt;"&lt;br /&gt;require valid-user &lt;span style="color: rgb(0, 0, 0);   font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; font-family:Arial, FreeSans, sans-serif;font-size:100%;"  &gt;&lt;span class="Apple-converted-space"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-5697939803094311284?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/5697939803094311284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=5697939803094311284&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5697939803094311284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5697939803094311284'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2012/01/apache-and-active-directory.html' title='Apache and Active Directory Authentication on Debian'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-8610944377678844159</id><published>2012-01-13T11:46:00.003+01:00</published><updated>2012-01-13T11:53:08.956+01:00</updated><title type='text'>Fixing double-encoded UTF-8 data in MySQL</title><content type='html'>&lt;pre&gt;When the data has been double-encoded, you will still have funny looking characters in the database.&lt;br /&gt;&lt;strong&gt;Here is how to fix it&lt;/strong&gt;, in two simple steps, using the &lt;code style="color: rgb(0, 102, 0);" class="\'prettyprint\'"&gt;&lt;span class="pln"&gt;mysqldump&lt;/span&gt;&lt;/code&gt; and &lt;code style="color: rgb(0, 102, 0);" class="\'prettyprint\'"&gt;&lt;span class="pln"&gt;mysql&lt;/span&gt;&lt;/code&gt; commands:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Source Database:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;mysqldump -h&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;DB_HOST&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;-u&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; DB_USER&lt;/span&gt; -&lt;span style="color: rgb(0, 102, 0);"&gt;p&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;DB_PASSWORD&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;--opt --quote-names \&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;--skip-set-charset --default-character-set=latin1&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; DB_NAME&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; DB_NAME-dump.sql&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Target Database:&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;mysql -h &lt;span style="color: rgb(255, 0, 0);"&gt;DB_HOST&lt;/span&gt; -u &lt;span style="color: rgb(255, 0, 0);"&gt;DB_USER&lt;/span&gt; -p &lt;span style="color: rgb(255, 0, 0);"&gt;DB_PASSWORD&lt;/span&gt; \&lt;br /&gt;--default-character-set=utf8 &lt;span style="color: rgb(255, 0, 0);"&gt;DB_NAME&lt;/span&gt; &amp;lt; &lt;span style="color: rgb(255, 0, 0);"&gt;DB_NAME-dump.sql&lt;/span&gt;&lt;/span&gt; &lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-8610944377678844159?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/8610944377678844159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=8610944377678844159&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8610944377678844159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8610944377678844159'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2012/01/fixing-double-encoded-utf-8-data-in.html' title='Fixing double-encoded UTF-8 data in MySQL'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-2241434257610060126</id><published>2011-12-16T10:36:00.002+01:00</published><updated>2011-12-16T10:40:01.425+01:00</updated><title type='text'>Debian - files list file for package `PACKAGE-NAME' is missing final newline</title><content type='html'>You have some problem in this file:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;/var/lib/dpkg/info/&lt;span style="color: rgb(255, 0, 0);"&gt;PACKAGE-NAME&lt;/span&gt;.list &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;delete it and reinstall the package:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: monospace; color: rgb(0, 102, 0);"&gt;apt-get install &lt;span style="color: rgb(255, 0, 0);"&gt;PACKAGE-NAME&lt;/span&gt; --reinstall&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-2241434257610060126?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/2241434257610060126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=2241434257610060126&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/2241434257610060126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/2241434257610060126'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/12/debian-files-list-file-for-package.html' title='Debian - files list file for package `PACKAGE-NAME&apos; is missing final newline'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-3837427895875100489</id><published>2011-12-13T15:02:00.004+01:00</published><updated>2011-12-13T15:36:29.004+01:00</updated><title type='text'>URL based security constraint to SOLR</title><content type='html'>In  &lt;span style="color: rgb(0, 0, 153);"&gt;/var/lib/tomcat6/webapps/solr/WEB-INF/web.xml&lt;/span&gt;, add the following:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-EizbNP5dlLc/TudhkkL-3pI/AAAAAAAABEg/6mkaC6RcnKQ/s1600/screen.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 400px;" src="http://2.bp.blogspot.com/-EizbNP5dlLc/TudhkkL-3pI/AAAAAAAABEg/6mkaC6RcnKQ/s400/screen.jpg" alt="" id="BLOGGER_PHOTO_ID_5685620335395659410" border="0" /&gt;&lt;/a&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;Add a &lt;span style="color: rgb(255, 0, 0);"&gt;username/password&lt;/span&gt;  to &lt;span style="color: rgb(0, 0, 153);"&gt;/var/lib/tomcat6/conf/tomcat-users.xml&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;p style="margin-left: 0.24in; margin-bottom: 0.08in; background: transparent; widows: 2; orphans: 2; page-break-before: auto"&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;role rolename="yourRole"&gt;&lt;/role&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 0.24in; margin-bottom: 0.08in; background: transparent; widows: 2; orphans: 2; page-break-before: auto"&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;user username="yourUsername" password="yourPassword" roles="yourRole"&gt;&lt;/user&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 0.24in; margin-bottom: 0.08in; background: none repeat scroll 0% 0% transparent; widows: 2; orphans: 2; page-break-before: auto;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-py05E7VIq24/TudijYLmAHI/AAAAAAAABEs/kOxilLo6vwk/s1600/screen2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 100px;" src="http://1.bp.blogspot.com/-py05E7VIq24/TudijYLmAHI/AAAAAAAABEs/kOxilLo6vwk/s400/screen2.jpg" alt="" id="BLOGGER_PHOTO_ID_5685621414504562802" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin-left: 0.24in; margin-bottom: 0.08in; background: none repeat scroll 0% 0% transparent; widows: 2; orphans: 2; page-break-before: auto;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-left: 0.24in; margin-bottom: 0.08in; background: transparent; widows: 2; orphans: 2; page-break-before: auto"&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 0.24in; margin-bottom: 0.08in; background: transparent; widows: 2; orphans: 2; page-break-before: auto"&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;and restart the tomcat:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 0.24in; margin-bottom: 0.08in; background: none repeat scroll 0% 0% transparent; widows: 2; orphans: 2; page-break-before: auto; color: rgb(0, 102, 0);"&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;/etc/init.d/tomcat6 restart&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-3837427895875100489?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/3837427895875100489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=3837427895875100489&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3837427895875100489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3837427895875100489'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/12/url-based-security-constraint-to-solr.html' title='URL based security constraint to SOLR'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-EizbNP5dlLc/TudhkkL-3pI/AAAAAAAABEg/6mkaC6RcnKQ/s72-c/screen.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-6265209075970544416</id><published>2011-12-12T16:00:00.011+01:00</published><updated>2011-12-12T17:51:18.303+01:00</updated><title type='text'>Memcache and TYPO3</title><content type='html'>In debian install the &lt;span style="color: rgb(255, 0, 0);"&gt;php5-memcache&lt;/span&gt; and&lt;span style="color: rgb(255, 0, 0);"&gt; memcached&lt;/span&gt; packages:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get install php5-memcache memcached&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;add the memcache configuration lines to &lt;span style="color: rgb(255, 0, 0);"&gt;localconf.php&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre class="php"  style="font-family:monospace;"&gt;&lt;span style="color:#000088;"&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;$&lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;TYPO3_CONF_VARS&lt;/span&gt;['&lt;span style="color: rgb(102, 51, 102);"&gt;SYS&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;useCachingFramework&lt;/span&gt;'] = '&lt;span style="color: rgb(102, 51, 102);"&gt;1&lt;/span&gt;';&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;$&lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;TYPO3_CONF_VARS&lt;/span&gt;['&lt;span style="color: rgb(102, 51, 102);"&gt;SYS&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;caching&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cacheConfigurations&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cache_pages&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;backend&lt;/span&gt;'] = '&lt;span style="color: rgb(102, 51, 102);"&gt;t3lib_cache_backend_MemcachedBackend&lt;/span&gt;';&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;$&lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;TYPO3_CONF_VARS&lt;/span&gt;['&lt;span style="color: rgb(102, 51, 102);"&gt;SYS&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;caching&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cacheConfigurations&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cache_pages&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;options&lt;/span&gt;'] = &lt;span style="color: rgb(0, 102, 0);"&gt;array&lt;/span&gt;(&lt;br /&gt;'&lt;span style="color: rgb(102, 51, 102);"&gt;servers&lt;/span&gt;' &lt;span style="color: rgb(255, 204, 0);"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;array&lt;/span&gt;('&lt;span style="color: rgb(102, 51, 102);"&gt;localhost:11211&lt;/span&gt;'),&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;$&lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;TYPO3_CONF_VARS&lt;/span&gt;['SYS']['&lt;span style="color: rgb(102, 51, 102);"&gt;caching&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cacheConfigurations&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cache_pagesection&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;backend&lt;/span&gt;'] = '&lt;span style="color: rgb(102, 51, 102);"&gt;t3lib_cache_backend_MemcachedBackend&lt;/span&gt;';&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;$&lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;TYPO3_CONF_VARS&lt;/span&gt;['SYS']['&lt;span style="color: rgb(102, 51, 102);"&gt;caching&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cacheConfigurations&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cache_pagesection&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;options&lt;/span&gt;'] = &lt;span style="color: rgb(0, 102, 0);"&gt;array&lt;/span&gt;(&lt;br /&gt;'&lt;span style="color: rgb(102, 51, 102);"&gt;servers&lt;/span&gt;' &lt;span style="color: rgb(255, 204, 0);"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;array&lt;/span&gt;('&lt;span style="color: rgb(102, 51, 102);"&gt;localhost:11211&lt;/span&gt;'),&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;$&lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;TYPO3_CONF_VARS&lt;/span&gt;['SYS']['&lt;span style="color: rgb(102, 51, 102);"&gt;caching&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cacheConfigurations&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cache_hash&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;backend&lt;/span&gt;'] = '&lt;span style="color: rgb(102, 51, 102);"&gt;t3lib_cache_backend_MemcachedBackend&lt;/span&gt;';&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;$&lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;TYPO3_CONF_VARS&lt;/span&gt;['SYS']['&lt;span style="color: rgb(102, 51, 102);"&gt;caching&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cacheConfigurations&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cache_hash&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;options&lt;/span&gt;'] = &lt;span style="color: rgb(0, 102, 0);"&gt;array&lt;/span&gt;(&lt;br /&gt;'&lt;span style="color: rgb(102, 51, 102);"&gt;servers&lt;/span&gt;' &lt;span style="color: rgb(255, 204, 0);"&gt;=&amp;gt;&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;array&lt;/span&gt;('&lt;span style="color: rgb(102, 51, 102);"&gt;localhost:11211&lt;/span&gt;'),&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;$&lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;TYPO3_CONF_VARS&lt;/span&gt;['&lt;span style="color: rgb(102, 51, 102);"&gt;SYS&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;caching&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cacheConfigurations&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cache_pages&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;frontend&lt;/span&gt;']= '&lt;span style="color: rgb(102, 51, 102);"&gt;t3lib_cache_frontend_VariableFrontend&lt;/span&gt;';&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;$&lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;TYPO3_CONF_VARS&lt;/span&gt;['&lt;span style="color: rgb(102, 51, 102);"&gt;SYS&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;caching&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cacheConfigurations&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cache_pagesection&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;frontend&lt;/span&gt;']= '&lt;span style="color: rgb(102, 51, 102);"&gt;t3lib_cache_frontend_VariableFrontend&lt;/span&gt;';&lt;br /&gt;&lt;span style="color: rgb(255, 204, 0);"&gt;$&lt;/span&gt;&lt;span style="color: rgb(51, 153, 153);"&gt;TYPO3_CONF_VARS&lt;/span&gt;['&lt;span style="color: rgb(102, 51, 102);"&gt;SYS&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;caching&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cacheConfigurations&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;cache_hash&lt;/span&gt;']['&lt;span style="color: rgb(102, 51, 102);"&gt;frontend&lt;/span&gt;']= '&lt;span style="color: rgb(102, 51, 102);"&gt;t3lib_cache_frontend_VariableFrontend&lt;/span&gt;';&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#339933;"&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-6265209075970544416?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/6265209075970544416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=6265209075970544416&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6265209075970544416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6265209075970544416'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/12/memcache-and-typo3.html' title='Memcache and TYPO3'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-5947666136317054906</id><published>2011-12-08T15:56:00.002+01:00</published><updated>2011-12-08T15:59:02.897+01:00</updated><title type='text'>Typo3 Parstime</title><content type='html'>You could see the parse time for a page in source of that page by adding this line in the &lt;span style="color: rgb(255, 0, 0);"&gt;localconf.php&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;$TYPO3_CONF_VARS["FE"]["debug"] = '1';&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-5947666136317054906?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/5947666136317054906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=5947666136317054906&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5947666136317054906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5947666136317054906'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/12/typo3-parstime.html' title='Typo3 Parstime'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-3044761462906904773</id><published>2011-11-03T13:26:00.003+01:00</published><updated>2011-11-03T13:36:30.468+01:00</updated><title type='text'>TYPO3 Update - BLOB/TEXT column 'identifier' used in key specification without a key length</title><content type='html'>By upgrading typo3 (after &lt;span style="color: rgb(255, 0, 0);"&gt;Database Compare&lt;/span&gt;) it might be happened sometimes this Error:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;BLOB/TEXT column 'identifier' used in key specification without a key length&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can solve that simply by deleting &lt;span style="color: rgb(51, 51, 255);"&gt; &lt;/span&gt;&lt;strong style="color: rgb(51, 51, 255);"&gt;[multiplyDBfieldSize] = 2&lt;/strong&gt;  from&lt;span style="color: rgb(255, 0, 0);"&gt; localconf.php&lt;/span&gt;.&lt;br /&gt;If DB is utf-8, it wouldn't need to use this parameter.&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-3044761462906904773?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/3044761462906904773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=3044761462906904773&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3044761462906904773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3044761462906904773'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/11/typo3-update-blobtext-column-identifier.html' title='TYPO3 Update - BLOB/TEXT column &apos;identifier&apos; used in key specification without a key length'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-405239694755209000</id><published>2011-10-21T13:11:00.003+02:00</published><updated>2011-10-21T13:16:26.032+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='I'/><title type='text'>Plesk - Enabling change password in Webmail</title><content type='html'>It is easy.  Just rename the file&lt;span style="color: rgb(255, 0, 0);"&gt; /etc/xinetd.d/poppassd_psa.org&lt;/span&gt; to &lt;span style="color: rgb(255, 0, 0);"&gt;/etc/xinetd.d/poppassd_psa&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;then restart the xinet.d service:&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/etc/init.d/xinetd restart&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-405239694755209000?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/405239694755209000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=405239694755209000&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/405239694755209000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/405239694755209000'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/10/plesk-enabling-change-password-in.html' title='Plesk - Enabling change password in Webmail'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-1837164562343367920</id><published>2011-10-14T12:51:00.002+02:00</published><updated>2011-10-14T12:54:44.707+02:00</updated><title type='text'>Windows 2008 BRP: Local activation permission to the iis wamreg admin service required</title><content type='html'>* From the SBS console, click &lt;strong style="color: rgb(255, 0, 0);"&gt;Administrative Tools&lt;/strong&gt; &amp;gt; &lt;strong style="color: rgb(255, 0, 0);"&gt;Component Services&lt;/strong&gt;&lt;br /&gt;(or, if you prefer: click&lt;span style="color: rgb(255, 0, 0);"&gt; Run&lt;/span&gt; &amp;gt; &lt;span style="color: rgb(0, 102, 0);"&gt;comexp.msc&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;* Expand down &lt;strong style="color: rgb(255, 0, 0);"&gt;Component Services&lt;/strong&gt; &amp;gt; &lt;strong style="color: rgb(255, 0, 0);"&gt;Computers&lt;/strong&gt; &amp;gt; &lt;strong style="color: rgb(255, 0, 0);"&gt;My Computer&lt;/strong&gt; &amp;gt; &lt;strong style="color: rgb(255, 0, 0);"&gt;DCOM Config&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;* Right click on &lt;strong&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;IIS WAMREG Admin Service&lt;/span&gt;&lt;/strong&gt;, then click &lt;strong&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Properties&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* &lt;/strong&gt;Click on the&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;/span&gt;&lt;strong style="color: rgb(255, 0, 0);"&gt;Security&lt;/strong&gt; tab&lt;br /&gt;&lt;br /&gt;* Click the &lt;strong style="color: rgb(255, 0, 0);"&gt;Edit...&lt;/strong&gt; button within the Launch and Activation Permissions section&lt;br /&gt;&lt;br /&gt;* Click&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;/span&gt;&lt;strong style="color: rgb(255, 0, 0);"&gt;Add&lt;/strong&gt; and add the user named: '&lt;strong style="color: rgb(51, 51, 255);"&gt;Network Service&lt;/strong&gt;'&lt;br /&gt;&lt;em&gt;(NB:  this is the step that confuses people. Most instructions simply tell  you to add the appropriate user, but do not make it clear which user to  add!)&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;* Click on the checkbox to &lt;strong style="color: rgb(51, 51, 255);"&gt;Allow&lt;/strong&gt; (enable) the Local Activation rights option for this user&lt;br /&gt;&lt;br /&gt;* Click &lt;strong style="color: rgb(255, 0, 0);"&gt;OK&lt;/strong&gt; twice, and close Component Services&lt;br /&gt;&lt;br /&gt;* Finally reboot the server for good measure and to ensure the change takes effect&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msmvps.com/blogs/kwsupport/archive/2009/02/15/dcom-10016-event-error.aspx"&gt;http://msmvps.com/blogs/kwsupport/archive/2009/02/15/dcom-10016-event-error.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-1837164562343367920?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/1837164562343367920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=1837164562343367920&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1837164562343367920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1837164562343367920'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/10/windows-2008-brp-local-activation.html' title='Windows 2008 BRP: Local activation permission to the iis wamreg admin service required'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-4477376703985000798</id><published>2011-10-07T11:23:00.006+02:00</published><updated>2011-10-07T11:31:48.588+02:00</updated><title type='text'>Backing Up and Restoring Web Sites (Windows SharePoint Services 2.0)</title><content type='html'>&lt;pre class="FreeTextNG"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;stsadm.exe&lt;/span&gt; is at &lt;span style="color: rgb(0, 0, 153);"&gt;C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Find the list of sites:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;stsadm.exe -o enumsites -url &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;url&gt;&lt;/url&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span id="ctl00_MTCS_main_ctl08"&gt;&lt;pre class="libCScode" id="ctl00_MTCS_main_ctl08_code"&gt;To perform a simple backup of a site, you would use syntax similar to the following:&lt;/pre&gt;&lt;/span&gt;&lt;/pre&gt;  &lt;span style="color: rgb(0, 102, 0);" id="ctl00_MTCS_main_ctl09"&gt;&lt;div dir="ltr"  style="background-;color:#ddd;"&gt;     &lt;pre class="libCScode" id="ctl00_MTCS_main_ctl09_code"&gt;stsadm.exe -o backup -url &lt;span style="color: rgb(255, 0, 0);"&gt;http://server_name/site&lt;/span&gt; -filename &lt;span style="color: rgb(255, 0, 0);"&gt;backup.dat&lt;/span&gt;&lt;/pre&gt;     &lt;/div&gt;&lt;/span&gt;&lt;pre class="FreeTextNG"&gt;&lt;span id="ctl00_MTCS_main_ctl08"&gt;&lt;pre class="libCScode" id="ctl00_MTCS_main_ctl08_code"&gt;To restore a site from a backup file, either to a new site or a separate server,&lt;br /&gt;you would use syntax similar to the following:&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);" id="ctl00_MTCS_main_ctl14"&gt;&lt;pre class="libCScode" id="ctl00_MTCS_main_ctl14_code"&gt;stsadm.exe -o restore -url &lt;span style="color: rgb(255, 0, 0);"&gt;http://server_name/site&lt;/span&gt; -filename &lt;span style="color: rgb(255, 0, 0);"&gt;backup.dat&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span id="ctl00_MTCS_main_ctl08"&gt;&lt;pre class="libCScode" id="ctl00_MTCS_main_ctl08_code"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;See also:&lt;/span&gt; &lt;a href="http://technet.microsoft.com/en-us/library/cc288330%28office.12%29.aspx"&gt;http://technet.microsoft.com/en-us/library/cc288330%28office.12%29.aspx&lt;/a&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-4477376703985000798?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/4477376703985000798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=4477376703985000798&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4477376703985000798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4477376703985000798'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/10/backing-up-and-restoring-web-sites.html' title='Backing Up and Restoring Web Sites (Windows SharePoint Services 2.0)'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-5116979621791692849</id><published>2011-08-17T11:41:00.001+02:00</published><updated>2011-08-17T11:42:42.146+02:00</updated><title type='text'>List all the loaded apache's modules in debian</title><content type='html'>You can see the loaded modules by apache with this command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apache2ctl -t -D DUMP_MODULES&lt;/span&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-5116979621791692849?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/5116979621791692849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=5116979621791692849&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5116979621791692849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5116979621791692849'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/08/list-all-loaded-apaches-modules-in.html' title='List all the loaded apache&apos;s modules in debian'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-5915444344277432889</id><published>2011-08-03T13:04:00.002+02:00</published><updated>2011-08-03T13:11:16.658+02:00</updated><title type='text'>Add HTTPS to Amazon AWS Loadbalancer</title><content type='html'>First, I tried uploading the certificate using the AWS command line tools like so:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;iam-servercertupload -b &lt;span style="color: rgb(255, 0, 0);"&gt;MyCert.crt&lt;/span&gt; -k &lt;span style="color: rgb(255, 0, 0);"&gt;MyCert.key&lt;/span&gt; -s &lt;span style="color: rgb(255, 0, 0);"&gt;TESTKEY&lt;/span&gt; -c &lt;span style="color: rgb(255, 0, 0);"&gt;CA_Bundle.pem&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;CA_Bundle.pem&lt;/span&gt; is the chain key provided by Certificate Issuer.&lt;br /&gt;&lt;br /&gt;Find the name of uploaded certify:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;CERT&lt;/span&gt;=`&lt;span style="color: rgb(0, 102, 0);"&gt;iam-servercertlistbypath&lt;/span&gt;`&lt;br /&gt;&lt;br /&gt;add new listener to existed LoadBalancer:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;elb-create-lb-listeners &lt;span style="color: rgb(255, 0, 0);"&gt;my-load-balancer&lt;/span&gt; --listener "protocol=https, lb-port=443, instance-port=8080, cert-id=&lt;span style="color: rgb(255, 0, 0);"&gt;$CERT"&lt;/span&gt; --region &lt;span style="color: rgb(255, 0, 0);"&gt;eu-west-1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Make sure your instances accept HTTP connections on port          8080 (add port to apache conf).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-5915444344277432889?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/5915444344277432889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=5915444344277432889&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5915444344277432889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5915444344277432889'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/08/add-https-to-amazon-aws-loadbalancer.html' title='Add HTTPS to Amazon AWS Loadbalancer'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-8276218909167218050</id><published>2011-07-29T13:34:00.005+02:00</published><updated>2012-01-24T14:57:48.878+01:00</updated><title type='text'>Debian Lenny - Update PHP 5.2 to 5.3</title><content type='html'>It must be added the new source to apt-source. Edit the file &lt;span style="color: rgb(0, 0, 153);"&gt;/etc/apt/sources.list&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;vim /etc/apt/sources.list&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and add these lines to it:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;deb http://php53.dotdeb.org oldstable all&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;deb-src http://php53.dotdeb.org oldstable all&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Then remove all php packages from the system. For example in my case:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get remove  php5 libapache2-mod-php5 php5-gd php5-mysql &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get remove php5-curl php5-tidy  php5-de&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;v php-pear php5-cli&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get remove php5-common php5-suhosin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Update your sources:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get update&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and reinstall PHP packages:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get install  php5 libapache2-mod-php5 php5-gd php5-mysql &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; apt-get install php5-curl php5-tidy  php5-dev php-pear php5-cli &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; apt-get install php5-common php5-suhosin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;now the following command will show you the new PHP version:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;php -v&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-8276218909167218050?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/8276218909167218050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=8276218909167218050&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8276218909167218050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8276218909167218050'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/07/debian-lenny-update-php-52-to-53.html' title='Debian Lenny - Update PHP 5.2 to 5.3'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-5292364836485144695</id><published>2011-07-27T11:17:00.003+02:00</published><updated>2011-07-27T11:31:50.416+02:00</updated><title type='text'>Amazon AWS resize the Volume for a Linux instance</title><content type='html'>Follow these steps:Stop the instance&lt;ul&gt;&lt;li&gt;Make a snapshot (MySnap) from volume.&lt;/li&gt;&lt;li&gt;Create new volume with new size from your snapshot (MySnap).&lt;/li&gt;&lt;li&gt;Detach the old volume&lt;/li&gt;&lt;li&gt;Attach the new volume as /dev/sda1&lt;/li&gt;&lt;li&gt;Start the instance&lt;/li&gt;&lt;li&gt;in terminal resize the partition:&lt;/li&gt;&lt;/ul&gt;      &lt;span style="color: rgb(0, 102, 0);"&gt;resize2fs  -p /dev/xvda1&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;(see&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;fdisk -l&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;for your partition name)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-5292364836485144695?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/5292364836485144695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=5292364836485144695&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5292364836485144695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5292364836485144695'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/07/amazon-aws-resize-volume-for-linux.html' title='Amazon AWS resize the Volume for a Linux instance'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-6255102790436632331</id><published>2011-07-19T12:50:00.004+02:00</published><updated>2011-07-19T13:16:10.569+02:00</updated><title type='text'>VPN Server on Debian</title><content type='html'>&lt;p&gt;Install the pptp server package:&lt;/p&gt; &lt;blockquote style="color: rgb(0, 102, 0);"&gt;&lt;p&gt;&lt;code&gt;sudo apt-get install pptpd&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Edit the “&lt;span style="color: rgb(255, 0, 0);"&gt;/etc/pptpd.conf&lt;/span&gt;” configuration file:&lt;/p&gt; &lt;blockquote style="color: rgb(0, 102, 0);"&gt;&lt;p&gt;&lt;code&gt;sudo vim /etc/pptpd.conf&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Add to it:&lt;/p&gt;&lt;p&gt;&lt;code&gt;     &lt;span style="color: rgb(0, 0, 153);"&gt;localip 10.55.55.1&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;span style="color: rgb(0, 0, 153);"&gt; &lt;/span&gt;&lt;p&gt;&lt;code&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;     remoteip 10.55.55.100-200 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Georgia,serif;"&gt;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;that means Clients will get the IPs from 100 to 200.&lt;span id="yui_3_2_0_9_1311072075541122" class="yiv1657176072keys"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Edit the “&lt;span style="color: rgb(255, 0, 0);"&gt;/etc/ppp/pptpd-options&lt;/span&gt;” configuration file:&lt;/p&gt; &lt;blockquote style="color: rgb(0, 102, 0);"&gt;&lt;p&gt;&lt;code&gt;sudo vim /etc/ppp/pptpd-options&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Append to the end of the file, the following directives:&lt;/p&gt; &lt;blockquote style="color: rgb(0, 0, 153);"&gt;&lt;p&gt;&lt;code&gt;ms-dns &lt;span style="color: rgb(255, 0, 0);"&gt;xxx.xxx.xxx.xxx&lt;/span&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;&lt;code&gt;nobsdcomp&lt;/code&gt;&lt;/p&gt; &lt;p&gt;&lt;code&gt;noipx &lt;/code&gt;&lt;/p&gt; &lt;p&gt;&lt;code&gt;mtu 1490&lt;/code&gt;&lt;/p&gt; &lt;p&gt;&lt;code&gt;mru 1490 &lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Where the IP used for the ms-dns directive is the DNS server for the  local network your client will be connecting to and, again, it is your  responsibility to adjust this to your network’s configuration.&lt;/p&gt; &lt;p&gt;Edit the chap secrets file:&lt;/p&gt; &lt;blockquote style="color: rgb(0, 102, 0);"&gt;&lt;p&gt;&lt;code&gt;sudo vim /etc/ppp/chap-secrets&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Add to it the authentication credentials for a user’s connection, in the following syntax:&lt;/p&gt; &lt;blockquote style="color: rgb(0, 0, 153);"&gt;&lt;p&gt;&lt;span style="font-family:monospace;"&gt;username &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;tab&gt;&lt;/tab&gt;&lt;/span&gt; * &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;tab&gt;&lt;/tab&gt;&lt;/span&gt; users-password &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;tab&gt;&lt;/tab&gt;&lt;/span&gt; *&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Restart the connection’s daemon for the settings to take affect:&lt;/p&gt; &lt;blockquote style="color: rgb(0, 102, 0);"&gt;&lt;p&gt;&lt;code&gt;sudo /etc/init.d/pptpd restart&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;If you don’t want to grant yourself access to anything beyond the server, then you’re done on the server side.&lt;/p&gt; &lt;h4&gt;Enable Forwarding (optional)&lt;/h4&gt; &lt;p&gt;While this step is optional and could be viewed as a security risk  for the extremely paranoid, it is my opinion that not doing it defeats  the purpose of even having a VPN connection into your network.&lt;/p&gt; &lt;p&gt;By enabling forwarding we make the entire network available to us  when we connect and not just the VPN server itself. Doing so allows the  connecting client to “jump” through the VPN server, to all other devices  on the network.&lt;/p&gt; &lt;p&gt;To achieve this we will be flipping the switch on the “forwarding” parameter of the system.&lt;/p&gt; &lt;p&gt;Edit the “sysctl” file:&lt;/p&gt; &lt;blockquote style="color: rgb(0, 102, 0);"&gt;&lt;p&gt;&lt;code&gt;sudo vim /etc/sysctl.conf&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Find the “&lt;em&gt;net.ipv4.ip_forward”&lt;/em&gt; line and change the parameter from 0 (disabled) to 1 (enabled):&lt;/p&gt; &lt;blockquote style="color: rgb(0, 0, 153);"&gt;&lt;p&gt;&lt;code&gt;net.ipv4.ip_forward=1&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;You can either restart the system or issue this command for the setting to take affect:&lt;/p&gt; &lt;blockquote style="color: rgb(0, 102, 0);"&gt;&lt;p&gt;&lt;code&gt;sudo sysctl -p&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Add these rules to Firewall (IPTABLES):&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;iptables -A FORWARD -m state --state ESTABLISHED,RELATED,NEW -j ACCEPT&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;iptables -P OUTPUT ACCEPT&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;now all the server side settings are prepared.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Reference: &lt;a href="http://www.howtogeek.com/51237/setting-up-a-vpn-pptp-server-on-debian/"&gt;http://www.howtogeek.com/51237/setting-up-a-vpn-pptp-server-on-debian/&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-6255102790436632331?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/6255102790436632331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=6255102790436632331&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6255102790436632331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6255102790436632331'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/07/vpn-server-on-debian.html' title='VPN Server on Debian'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-6920561389806666389</id><published>2011-05-27T12:13:00.002+02:00</published><updated>2011-05-27T12:15:38.606+02:00</updated><title type='text'>Sendmail  gethostbyaddr Problem</title><content type='html'>&lt;pre&gt;The problem is that sendmail tries to resolve the ip of&lt;br /&gt;every interface  your have. &lt;br /&gt;&lt;br /&gt;Change this line in sendmail.cf:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;#O DontProbeInterfaces=False&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;to&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;O DontProbeInterfaces=True&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and restert the sendmail.&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-6920561389806666389?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/6920561389806666389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=6920561389806666389&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6920561389806666389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6920561389806666389'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/05/sendmail-gethostbyaddr-problem.html' title='Sendmail  gethostbyaddr Problem'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-8355102209577148092</id><published>2011-05-09T15:03:00.004+02:00</published><updated>2011-08-18T12:48:05.835+02:00</updated><title type='text'>Amzon EC2 - Changing Scale</title><content type='html'>&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;This script disables the Auto Scaling, because min-size and max-size are zero.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;ZONE="us-east-1d"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;LC_NAME="myscaling-lc"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;SG_NAME="dmcleaner-sg"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;as-update-auto-scaling-group &lt;span style="color: rgb(51, 51, 255);"&gt;$SG_NAM&lt;/span&gt;E --availability-zones &lt;span style="color: rgb(51, 51, 255);"&gt;$ZONE&lt;/span&gt; --launch-configuration &lt;span style="color: rgb(51, 51, 255);"&gt;$LC_NAME&lt;/span&gt; --min-size&lt;span style="color: rgb(255, 255, 0);"&gt; 0&lt;/span&gt; --max-size &lt;span style="color: rgb(255, 255, 0);"&gt;0&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-8355102209577148092?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/8355102209577148092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=8355102209577148092&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8355102209577148092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8355102209577148092'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/05/amzon-ec2-changing-scale.html' title='Amzon EC2 - Changing Scale'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-8162062663946267364</id><published>2011-05-09T14:46:00.016+02:00</published><updated>2011-08-11T12:49:53.238+02:00</updated><title type='text'>Amazon Auto Scaling</title><content type='html'>This script is enough for me :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;ZONE="us-east-1d"&lt;/span&gt;     &amp;lt;=== Availability Zone&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;SECURITY_GROUP="default"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;REGION="us-east-1"&lt;br /&gt;INSTANCE_SIZE="t1.micro"&lt;/span&gt;  &amp;lt;=== Instance Type (micro, small, Large, ...)&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;LB_NAME="myscaling-lb"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;LC_NAME="myscaling-lc"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;LC_IMAGE_ID="ami-xxxxxxxx"&lt;/span&gt; &amp;lt;=== Enter your AMI ID here&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;SG_NAME="dmcleaner-sg"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;# Set up load balancer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;elb-create-lb&lt;span style="color: rgb(51, 51, 255);"&gt; $LB_NAME&lt;/span&gt; --headers --listener "lb-port=80,instance-port=80,protocol=http" --availability-zones &lt;span style="color: rgb(51, 51, 255);"&gt;$ZONE &lt;span style="color: rgb(0, 102, 0);"&gt;--region&lt;/span&gt; $REGION&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;#Setup Load Balancer Health Check&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);font-size:85%;" &gt;&lt;span style="color: rgb(0, 102, 0);"&gt;elb-configure-healthcheck &lt;span style="color: rgb(51, 51, 255);"&gt; $LB_NAME&lt;/span&gt;  --headers --target "HTTP:80/&lt;span style="color: rgb(255, 255, 0);"&gt;index.php&lt;/span&gt;" --interval 5 --timeout 2 --unhealthy-threshold 2 --healthy-threshold 2  &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;--region&lt;/span&gt; $REGION&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);font-size:85%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;# Setup Auto Scaling&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;as-create-launch-config &lt;span style="color: rgb(51, 51, 255);"&gt;$LC_NAME&lt;/span&gt; --image-id &lt;span style="color: rgb(51, 51, 255);"&gt;$LC_IMAGE_ID&lt;/span&gt; --instance-type &lt;span style="color: rgb(51, 51, 255);"&gt;$INSTANCE_SIZE&lt;/span&gt; --group &lt;span style="color: rgb(51, 51, 255);"&gt;$SECURITY_GROUP &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;--region&lt;/span&gt; $REGION&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;#Setup Auto Scaling Group&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;as-create-auto-scaling-group &lt;span style="color: rgb(51, 51, 255);"&gt;$SG_NAME&lt;/span&gt; --availability-zones &lt;span style="color: rgb(51, 51, 255);"&gt;$ZONE&lt;/span&gt; --launch-configuration &lt;span style="color: rgb(51, 51, 255);"&gt;$LC_NAME&lt;/span&gt; --min-size &lt;span style="color: rgb(255, 255, 0);"&gt;1&lt;/span&gt; --max-size &lt;span style="color: rgb(255, 255, 0);"&gt;6&lt;/span&gt; --load-balancers &lt;span style="color: rgb(51, 51, 255);"&gt;$LB_NAME &lt;span style="color: rgb(0, 102, 0);"&gt;--health-check-type&lt;/span&gt; &lt;span style="color: rgb(255, 204, 0);"&gt;ELB&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;--grace-period &lt;/span&gt;&lt;span style="color: rgb(255, 204, 0);"&gt; 60&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;--region&lt;/span&gt; $REGION&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;# Setup Scaling Policies (to add instance)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;&lt;span style="color: rgb(204, 51, 204);"&gt;SCALE_UP_POLICY&lt;/span&gt;=`as-put-scaling-policy MyScaleUpPolicy1 --auto-scaling-group &lt;span style="color: rgb(51, 51, 255);"&gt;$SG_NAME&lt;/span&gt; --adjustment=&lt;span style="color: rgb(255, 255, 0);"&gt;1&lt;/span&gt; --type ChangeInCapacity --cooldown 300 &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;--region&lt;/span&gt; $REGION&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;`&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;#Setup Alarm (Add instance when CPU Load is more then 70%)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;mon-put-metric-alarm MyHighCPUAlarm1 &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;--region&lt;/span&gt; $REGION &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;--comparison-operator GreaterThanThreshold --evaluation-periods 1 --metric-name CPUUtilization --namespace "AWS/EC2" --period &lt;span style="color: rgb(255, 255, 0);"&gt;60&lt;/span&gt; --statistic Average --threshold &lt;span style="color: rgb(255, 255, 0);"&gt;70&lt;/span&gt; --alarm-actions &lt;span style="color: rgb(204, 51, 204);"&gt;$SCALE_UP_POLICY&lt;/span&gt; --dimensions "AutoScalingGroupName=&lt;span style="color: rgb(51, 51, 255);"&gt;$SG_NAME&lt;/span&gt;"&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;# Setup Scaling Policies (to reduce instance)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;span style="color: rgb(204, 51, 204);"&gt;SCALE_DOWN_POLICY&lt;/span&gt;=`as-put-scaling-policy MyScaleDownPolicy1 --auto-scaling-group &lt;span style="color: rgb(51, 51, 255);"&gt;$SG_NAME &lt;/span&gt;--adjustment=&lt;span style="color: rgb(255, 255, 0);"&gt;-1&lt;/span&gt; --type ChangeInCapacity --cooldown 300 &lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;--region&lt;/span&gt; $REGION&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;`&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;#Setup Alarm (Reduce instance when CPU Load is less then 30%)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;mon-put-metric-alarm MyLowCPUAlarm1 &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;--region&lt;/span&gt; $REGION &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;--comparison-operator LessThanThreshold --evaluation-periods 1 --metric-name CPUUtilization --namespace "AWS/EC2" --period &lt;span style="color: rgb(255, 255, 0);"&gt;60&lt;/span&gt; --statistic Average --threshold &lt;span style="color: rgb(255, 255, 0);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(255, 255, 0);"&gt;0&lt;/span&gt; --alarm-actions &lt;span style="color: rgb(204, 51, 204);"&gt;$SCALE_DOWN_POLICY &lt;/span&gt;--dimensions "AutoScalingGroupName=&lt;span style="color: rgb(51, 51, 255);"&gt;$SG_NAME&lt;/span&gt;"&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-8162062663946267364?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/8162062663946267364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=8162062663946267364&amp;isPopup=true' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8162062663946267364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8162062663946267364'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/05/amazon-auto-scaling.html' title='Amazon Auto Scaling'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-8442986518806280355</id><published>2011-03-30T10:23:00.003+02:00</published><updated>2011-03-30T10:26:38.360+02:00</updated><title type='text'>How can I log the client IP address on the backend in Varnish?</title><content type='html'>&lt;p&gt;All I see is the IP address of the varnish server.  How can I log the client IP address?&lt;/p&gt; &lt;p&gt;We will need to add the IP address to a header used for the backend  request, and configure the backend to log the content of this header  instead of the address of the connecting client (which is the varnish  server).&lt;/p&gt; &lt;p&gt;Varnish configuration:&lt;/p&gt; &lt;div style="color: rgb(255, 0, 0);" class="highlight-python"&gt;&lt;pre&gt;sub vcl_recv {&lt;br /&gt;    # Add a unique header containing the client address remove&lt;br /&gt;    req.http.X-Forwarded-For;&lt;br /&gt;    set    req.http.X-Forwarded-For = client.ip;&lt;br /&gt;    # [...] }&lt;/pre&gt; &lt;/div&gt; &lt;p&gt;For the apache configuration, we copy the “combined” log format to a  new one we call “varnishcombined”, for instance, and change the client  IP field to use the content of the variable we set in the varnish  configuration:&lt;/p&gt; &lt;div style="color: rgb(255, 0, 0);" class="highlight-python"&gt;&lt;pre&gt;LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %&amp;gt;s %b \"%{Referer}i\" \"%{User-Agent}i\"" varnishcombined&lt;/pre&gt; &lt;/div&gt; &lt;p&gt;And so, in our virtualhost, you need to specify this format instead of “combined” (or “common”, or whatever else you use):&lt;/p&gt; &lt;div style="color: rgb(255, 0, 0);" class="highlight-python"&gt;&lt;pre&gt;&lt;virtualhost 80=""&gt; ServerName www.example.com &lt;br /&gt;# [...] &lt;br /&gt;&lt;br /&gt; CustomLog /var/log/apache2/www.example.com/access.log varnishcombined&lt;br /&gt;&lt;br /&gt; # [...] &lt;/virtualhost&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Reference: &lt;/span&gt;&lt;a href="http://www.varnish-cache.org/docs/2.1/faq/http.html"&gt;Varnish Website&lt;/a&gt;&lt;br /&gt;&lt;/pre&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-8442986518806280355?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/8442986518806280355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=8442986518806280355&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8442986518806280355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8442986518806280355'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/03/how-can-i-log-client-ip-address-on.html' title='How can I log the client IP address on the backend in Varnish?'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-5878118389771196614</id><published>2011-03-30T10:05:00.004+02:00</published><updated>2011-04-19T11:59:09.005+02:00</updated><title type='text'>Installing Varnish on Debian</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;a href="http://www.varnish-cache.org/"&gt;Varnish&lt;/a&gt; is the key software that speeds up your web site. It is Open  Source, built on industry standards and requires very few resources.&lt;br /&gt;&lt;br /&gt;Install on Debian:&lt;/span&gt;&lt;br /&gt;&lt;pre class="brush: bash"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;curl http://repo.varnish-cache.org/debian/GPG-key.txt | apt-key add -&lt;br /&gt;echo "deb http://repo.varnish-cache.org/debian/ $(lsb_release -s -c) varnish-2.1" &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;apt-get update&lt;br /&gt;apt-get install varnish&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;Change the Apache's port in &lt;span style="color: rgb(0, 0, 153);"&gt;/etc/apache2/ports.conf&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;NameVirtualHost *:8000&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Listen 8000&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The configuration daemon for Varnish is located in &lt;span style="color: rgb(0, 0, 153);"&gt;/etc/default/varnish&lt;/span&gt;. Here you can pass the startup options:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: bash"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;DAEMON_OPTS=&lt;br /&gt;           "-a :80 \            &lt;br /&gt;            -T localhost:6082 \&lt;br /&gt;            -f /etc/varnish/default.vcl \&lt;br /&gt;            -S /etc/varnish/secret \&lt;br /&gt;            -s malloc,256M \    &lt;br /&gt;            -u www-data \&lt;br /&gt;            -g www-data"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now let's get to the configuration file (&lt;span style="color: rgb(0, 0, 153);"&gt;/etc/varnish/default.vcl&lt;/span&gt;). This is a very simple use of Varnish&lt;br /&gt;which strips the cookies of some static files, like jpg and png, allowing them to be cached. In my case&lt;br /&gt;this works best, and it also gives me a header information of what was cached and what not&lt;br /&gt;(if you check the headers with something like FireBug). Of course you can find even better configurations available.&lt;br /&gt;Having a specific configuration for your platform.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre class="brush: text"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;backend apache { &lt;br /&gt;     .host = "127.0.0.1";&lt;br /&gt;     .port = "8000"; }&lt;br /&gt;&lt;br /&gt;acl purge {&lt;br /&gt;      "localhost";&lt;br /&gt;      "127.0.0.1"; }&lt;br /&gt;&lt;br /&gt;sub vcl_recv {&lt;br /&gt;   // Strip cookies for static files:&lt;br /&gt;   if (req.url ~ "\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$") {&lt;br /&gt;      unset req.http.Cookie;&lt;br /&gt;      return(lookup); }&lt;br /&gt;&lt;br /&gt;   // Remove has_js and Google Analytics __* cookies.&lt;br /&gt;   set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(__[a-z]+|has_js)=[^;]*", "");&lt;br /&gt;&lt;br /&gt;   // Remove a ";" prefix, if present. &lt;br /&gt;   set req.http.Cookie = regsub(req.http.Cookie, "^;\s*", "");&lt;br /&gt;&lt;br /&gt;   // Remove empty cookies. &lt;br /&gt;   if (req.http.Cookie ~ "^\s*$") {&lt;br /&gt;         unset req.http.Cookie;  }   &lt;br /&gt;   if (req.request == "PURGE") {&lt;br /&gt;       if (!client.ip ~ purge) {&lt;br /&gt;              error 405 "Not allowed.";}&lt;br /&gt;       purge("req.url ~ " req.url " &amp;amp;&amp;amp; req.http.host == " req.http.host);&lt;br /&gt;       error 200 "Purged.";  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub vcl_hash {&lt;br /&gt;    if (req.http.Cookie) {&lt;br /&gt;         set req.hash += req.http.Cookie;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub vcl_fetch {&lt;br /&gt;   // Strip cookies for static files: &lt;br /&gt;   if (req.url ~ "\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$") {&lt;br /&gt;        unset beresp.http.set-cookie;  }&lt;br /&gt;&lt;br /&gt;   // Varnish determined the object was not cacheable &lt;br /&gt;   if (!beresp.cacheable) {&lt;br /&gt;       set beresp.http.X-Cacheable = "NO:Not Cacheable";  }&lt;br /&gt;   // You don't wish to cache content for logged in users&lt;br /&gt;   elsif(req.http.Cookie ~"(UserID|_session)") {&lt;br /&gt;        set beresp.http.X-Cacheable = "NO:Got Session";  &lt;br /&gt;        return(pass);  }&lt;br /&gt;   // You are respecting the Cache-Control=private header from the backend&lt;br /&gt;   elsif ( beresp.http.Cache-Control ~ "private") {&lt;br /&gt;         set beresp.http.X-Cacheable = "NO:Cache-Control=private";&lt;br /&gt;         return(pass);  } &lt;br /&gt;   // You are extending the lifetime of the object artificially&lt;br /&gt;   elsif ( beresp.ttl &amp;lt; 1s ) {&lt;br /&gt;       set beresp.ttl   = 300s;&lt;br /&gt;       set beresp.grace = 300s;  &lt;br /&gt;       set beresp.http.X-Cacheable = "YES:Forced";  }&lt;br /&gt;  // Varnish determined the object was cacheable&lt;br /&gt;  else {  &lt;br /&gt;      set beresp.http.X-Cacheable = "YES";  }&lt;br /&gt;return(deliver);&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;then Restart Apache2 and Varnish processes:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/etc/init.d/apache2 restart&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/etc/init.d/varnish restart&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-5878118389771196614?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/5878118389771196614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=5878118389771196614&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5878118389771196614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5878118389771196614'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2011/03/installing-varnish-on-debian.html' title='Installing Varnish on Debian'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-950414840137020071</id><published>2010-11-10T15:35:00.004+01:00</published><updated>2010-11-10T15:46:25.390+01:00</updated><title type='text'>Add new rule to SpamAssassin</title><content type='html'>&lt;pre&gt;Add this lines to &lt;span style="color: rgb(0, 0, 102);"&gt;/etc/mail/spamassassin/local.cf&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;body LOCAL_DEMONSTRATION_RULE   /test/&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;score LOCAL_DEMONSTRATION_RULE 0.1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;describe LOCAL_DEMONSTRATION_RULE       This is a simple test rule&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;then you must restart the &lt;span style="color: rgb(255, 0, 0);"&gt;SpamAssassin&lt;/span&gt; Process:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/etc/init.d/psa-spamassassin restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can also add rule to each user in &lt;span style="color: rgb(0, 0, 153);"&gt;~/.spamassassin/user_prefs&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;but remember that by default &lt;span style="color: rgb(255, 0, 0);"&gt;allow_user_rules&lt;/span&gt; is &lt;span style="color: rgb(255, 0, 0);"&gt;0&lt;/span&gt;, and you must change&lt;br /&gt;that to &lt;span style="color: rgb(255, 0, 0);"&gt;1&lt;/span&gt;. Add this line to:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;/etc/mail/spamassassin/local.cf&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;allow_user_rules 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Don't forget to restart the &lt;span style="color: rgb(255, 0, 0);"&gt;SpamAssassin&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-950414840137020071?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/950414840137020071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=950414840137020071&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/950414840137020071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/950414840137020071'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2010/11/add-new-rule-to-spamassassin.html' title='Add new rule to SpamAssassin'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-5355987862862876182</id><published>2010-10-28T17:22:00.001+02:00</published><updated>2010-10-28T17:23:47.856+02:00</updated><title type='text'>Migrate MySQL to Oracle</title><content type='html'>&lt;a href="http://www.oracle.com/technetwork/database/migration/mysqllauncher-086083.html"&gt;http://www.oracle.com/technetwork/database/migration/mysqllauncher-086083.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-5355987862862876182?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/5355987862862876182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=5355987862862876182&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5355987862862876182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5355987862862876182'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2010/10/migrate-mysql-to-oracle.html' title='Migrate MySQL to Oracle'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-2828144684024650164</id><published>2010-08-13T12:12:00.003+02:00</published><updated>2010-08-13T12:19:17.068+02:00</updated><title type='text'>Likewise-Open: Authenticate a Linux machine to an Active Directory domain</title><content type='html'>To install the &lt;span style="color: rgb(255, 0, 0);" class="application"&gt;&lt;strong&gt;likewise-open&lt;/strong&gt;&lt;/span&gt; package in Ubuntu, open a terminal prompt and enter:&lt;br /&gt;&lt;pre class="screen"&gt;&lt;span style="color: rgb(0, 102, 0);" class="command"&gt;&lt;strong&gt;sudo apt-get install likewise-open&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or you could download appropriate Script from &lt;a href="http://www.likewise.com/bits/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;       The main executable file of the &lt;span class="application"&gt;&lt;strong&gt;likewise-open&lt;/strong&gt;&lt;/span&gt; package is        &lt;code style="color: rgb(0, 102, 0);" class="filename"&gt;/usr/bin/domainjoin-cli&lt;/code&gt;, which is used to join your computer to the domain. Before you join        a domain you will need to make sure you have:       &lt;/p&gt;                 &lt;div class="itemizedlist"&gt;                   &lt;ul class="itemizedlist" type="disc"&gt;&lt;li class="listitem"&gt;                       &lt;p&gt;    Access to an Active Directory user with appropriate rights to join the domain.    &lt;/p&gt;                     &lt;/li&gt;&lt;li class="listitem"&gt;                       &lt;p&gt;    The &lt;span class="emphasis"&gt;&lt;em&gt;Fully Qualified Domain Name&lt;/em&gt;&lt;/span&gt; (FQDN) of the domain you want to join.  If your AD domain           does not match a valid domain such as &lt;span class="italic"&gt;example.com&lt;/span&gt;, it is likely that it has           the form of &lt;span class="emphasis"&gt;&lt;em&gt;domainname.local&lt;/em&gt;&lt;/span&gt;.      &lt;/p&gt;                     &lt;/li&gt;&lt;li class="listitem"&gt;                       &lt;p&gt;    DNS for the domain setup properly.  In a production AD environment this should be the case.  Proper Microsoft        DNS is needed so that client workstations can determine the Active Directory domain is available.    &lt;/p&gt;                       &lt;p&gt;&lt;br /&gt;&lt;/p&gt;                     &lt;/li&gt;&lt;/ul&gt;                 &lt;/div&gt;                 &lt;p&gt;       To join a domain, from a terminal prompt enter:       &lt;/p&gt;                 &lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;&lt;span class="command"&gt;&lt;strong&gt;sudo domainjoin-cli join example.com Administrator&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt; &lt;pre class="screen"&gt;&lt;br /&gt;See &lt;a href="https://help.ubuntu.com/10.04/serverguide/C/likewise-open.html"&gt;here&lt;/a&gt; for more details.&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-2828144684024650164?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/2828144684024650164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=2828144684024650164&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/2828144684024650164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/2828144684024650164'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2010/08/likewise-open-authenticate-linux.html' title='Likewise-Open: Authenticate a Linux machine to an Active Directory domain'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-2088098705961023582</id><published>2010-08-13T12:02:00.002+02:00</published><updated>2010-08-13T12:08:07.683+02:00</updated><title type='text'>Qmail &amp; SpamAssassin - Change Default Rules Score</title><content type='html'>Under this directory:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;/var/qmail/mailnames/&lt;span style="color: rgb(255, 0, 0);"&gt;DOMAIN-NAME&lt;/span&gt;/&lt;span style="color: rgb(255, 0, 0);"&gt;USERNAME&lt;/span&gt;/.spamassassin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;edit &lt;span style="color: rgb(0, 0, 153);"&gt;user_prefs&lt;/span&gt; and add the new Score for desire rule:&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;score RDNS_NONE 5.0&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;that overrides the defualt score.&lt;br /&gt;&lt;br /&gt;You can find all rules here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://wiki.apache.org/spamassassin/Rules/"&gt;http://wiki.apache.org/spamassassin/Rules/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-2088098705961023582?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/2088098705961023582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=2088098705961023582&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/2088098705961023582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/2088098705961023582'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2010/08/qmail-spamassassin-change-default-rules.html' title='Qmail &amp; SpamAssassin - Change Default Rules Score'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-7814483354759636648</id><published>2010-06-02T17:37:00.000+02:00</published><updated>2010-06-02T17:38:13.510+02:00</updated><title type='text'>Ubuntu - Convert jpg files to gif animator</title><content type='html'>Run this command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;convert -delay 10 -loop 0 *.jpg animation.gif&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-7814483354759636648?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/7814483354759636648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=7814483354759636648&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/7814483354759636648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/7814483354759636648'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2010/06/ubuntu-convert-jpg-files-to-gif.html' title='Ubuntu - Convert jpg files to gif animator'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-7734286844803356916</id><published>2010-05-10T11:31:00.003+02:00</published><updated>2010-05-10T11:38:14.733+02:00</updated><title type='text'>Chrooted SSH/SFTP</title><content type='html'>with these settings, works for me in Debian Lenny:&lt;br /&gt;&lt;br /&gt;Be sure that this line in&lt;span style="color: rgb(0, 0, 153);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;/etc/ssh/sshd_config&lt;/span&gt; exists:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Subsystem sftp internal-sftp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Chroot the user to his home:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;ChrootDirectory %h&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The owner of home must be root (&lt;span style="color: rgb(0, 0, 153);"&gt;mod 755&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;These lines are important, otherwise the root user could not login into system:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Match User root&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;    ChrootDirectory /&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Restart the ssh process:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/etc/init.d/ssh restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h1 id="title"&gt;&lt;br /&gt;&lt;/h1&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-7734286844803356916?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/7734286844803356916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=7734286844803356916&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/7734286844803356916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/7734286844803356916'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2010/05/chrooted-sshsftp.html' title='Chrooted SSH/SFTP'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-1772187001478356329</id><published>2010-04-08T14:33:00.002+02:00</published><updated>2010-04-08T14:35:31.615+02:00</updated><title type='text'>Colored output in bash</title><content type='html'>Use escape sequences:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;strong class="highlight"&gt;echo&lt;/strong&gt; -e '\E[color1;color2mYour &lt;strong class="highlight"&gt;Text&lt;/strong&gt;.'&lt;/span&gt;&lt;br /&gt;(color1 is the foreground, color2 the background &lt;strong class="highlight"&gt;color&lt;/strong&gt;)&lt;br /&gt; &lt;div class="codeblock"&gt;&lt;div class="spaced"&gt; &lt;div&gt;&lt;strong&gt;&lt;br /&gt;Shell Scripting Syntax&lt;/strong&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt; &lt;div class="ad_notxt"&gt; &lt;div id="code645246226_1"&gt;&lt;pre class="code"&gt;&lt;ol&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt; &lt;span class="kw3"&gt;&lt;strong class="highlight"&gt;echo&lt;/strong&gt;&lt;/span&gt; -e &lt;span class="st0"&gt;'&lt;span class="es0"&gt;\E&lt;/span&gt;[30m black &lt;span class="es0"&gt;\E&lt;/span&gt;[31mred &lt;span class="es0"&gt;\E&lt;/span&gt;[32mgreen &lt;span class="es0"&gt;\E&lt;/span&gt;[33myellow &lt;span class="es0"&gt;\E&lt;/span&gt;[34mblue &lt;span class="es0"&gt;\E&lt;/span&gt;[35mmagenta &lt;span class="es0"&gt;\E&lt;/span&gt;[36mcyan &lt;span class="es0"&gt;\E&lt;/span&gt;[37mwhite'&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt; &lt;span class="kw3"&gt;&lt;strong class="highlight"&gt;echo&lt;/strong&gt;&lt;/span&gt; -e &lt;span class="st0"&gt;'&lt;span class="es0"&gt;\E&lt;/span&gt;[30;41mblack on red'&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt; &lt;div id="code645246226_2" style="display: none;"&gt;&lt;textarea class="code" readonly="true" wrap="off" style="height: 50px;"&gt;&lt;strong class="highlight"&gt;echo&lt;/strong&gt; -e '\E[30m black \E[31mred \E[32mgreen \E[33myellow \E[34mblue \E[35mmagenta \E[36mcyan \E[37mwhite' &lt;strong class="highlight"&gt;echo&lt;/strong&gt; -e '\E[30;41mblack on red'&lt;/textarea&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt;   &lt;div class="spaced"&gt; &lt;div style="float: right; margin-right: 10px;"&gt; &lt;a href="http://www.daniweb.com/forums/misc-explaincode.html?TB_iframe=true&amp;amp;height=400&amp;amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank"&gt;&lt;br /&gt;&lt;/a&gt; &lt;/div&gt; &lt;div&gt;&lt;br /&gt;&lt;strong&gt;Shell Scripting Syntax&lt;/strong&gt;&lt;br /&gt;&lt;/div&gt; &lt;/div&gt;  &lt;div id="code772797513_1"&gt;&lt;pre class="code"&gt;&lt;ol&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;strong class="highlight"&gt;Color&lt;/strong&gt;:           Foreground:           Background:&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;---------------------------------------------------------&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;black             &lt;span class="nu0"&gt;30&lt;/span&gt;                       &lt;span class="nu0"&gt;40&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;&lt;span class="kw2"&gt;red&lt;/span&gt;               &lt;span class="nu0"&gt;31&lt;/span&gt;                       &lt;span class="nu0"&gt;41&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;green             &lt;span class="nu0"&gt;32&lt;/span&gt;                       &lt;span class="nu0"&gt;42&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;yellow            &lt;span class="nu0"&gt;33&lt;/span&gt;                       &lt;span class="nu0"&gt;43&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;blue              &lt;span class="nu0"&gt;34&lt;/span&gt;                       &lt;span class="nu0"&gt;44&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;magenta           &lt;span class="nu0"&gt;35&lt;/span&gt;                       &lt;span class="nu0"&gt;45&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li1"&gt;&lt;div class="de1"&gt;cyan              &lt;span class="nu0"&gt;36&lt;/span&gt;                       &lt;span class="nu0"&gt;46&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li class="li2"&gt;&lt;div class="de2"&gt;white             &lt;span class="nu0"&gt;37&lt;/span&gt;                       &lt;span class="nu0"&gt;47&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-1772187001478356329?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/1772187001478356329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=1772187001478356329&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1772187001478356329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1772187001478356329'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2010/04/colored-output-in-bash.html' title='Colored output in bash'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-8705586762419328550</id><published>2010-03-08T14:24:00.000+01:00</published><updated>2010-03-08T14:26:20.586+01:00</updated><title type='text'>Counting files number in a directory under Linux</title><content type='html'>One way is:&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;ls -1 &lt;span style="color: rgb(255, 0, 0);"&gt;/YOUR/DIRECTORY&lt;/span&gt; | grep -c ""&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-8705586762419328550?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/8705586762419328550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=8705586762419328550&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8705586762419328550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8705586762419328550'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2010/03/counting-files-number-in-directory.html' title='Counting files number in a directory under Linux'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-7862805193447283175</id><published>2010-03-02T17:08:00.001+01:00</published><updated>2010-03-02T17:11:08.744+01:00</updated><title type='text'>Ubuntu - If your desktop icons are disappeared, try this</title><content type='html'>Press &lt;span style="color: rgb(0, 0, 153);"&gt;Alt+F2&lt;/span&gt; and type &lt;span style="color: rgb(0, 102, 0);"&gt;gconf-editor&lt;/span&gt; in window.&lt;br /&gt;&lt;br /&gt;Then &lt;span style="color: rgb(255, 0, 0);"&gt;apps&lt;/span&gt; --&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;nautilus&lt;/span&gt; --&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;preferences&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Make sure "&lt;span style="color: rgb(0, 0, 153);"&gt;show_desktop&lt;/span&gt;" is checked.&lt;br /&gt;&lt;br /&gt;If it's checked then double click on it and hit ok.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-7862805193447283175?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/7862805193447283175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=7862805193447283175&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/7862805193447283175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/7862805193447283175'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2010/03/ubuntu-if-your-desktop-icons-are.html' title='Ubuntu - If your desktop icons are disappeared, try this'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-6917904182928717056</id><published>2010-02-24T11:48:00.001+01:00</published><updated>2010-02-24T11:49:31.158+01:00</updated><title type='text'>Send test mail from command line with Sendmail</title><content type='html'>In shell run this command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;( echo subject: test; echo ) | sendmail -v -oi &lt;span style="color: rgb(255, 0, 0);"&gt;YOUR-EMAIL@ADDRESS.COM&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-6917904182928717056?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/6917904182928717056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=6917904182928717056&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6917904182928717056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6917904182928717056'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2010/02/send-test-mail-from-command-line-with.html' title='Send test mail from command line with Sendmail'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-984491734490043049</id><published>2010-02-24T11:41:00.004+01:00</published><updated>2010-02-24T11:47:17.022+01:00</updated><title type='text'>MySQL - debian-sys-maint account</title><content type='html'>Find your &lt;span style="color: rgb(255, 0, 0);"&gt;debian-sys-maint&lt;/span&gt; password in /&lt;span style="color: rgb(0, 0, 153);"&gt;etc/mysql/debian.cnf&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Then use this command in Mysql shell:&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost'  &lt;/span&gt;\&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;IDENTIFIED BY &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;'&lt;password&gt;&lt;password&gt;PASSWORD' &lt;/password&gt;&lt;/password&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;WITH GRANT OPTION;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;  &lt;/div&gt;Replace &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;password&gt;&lt;/password&gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;password&gt;&lt;/password&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; PASSWORD&lt;/span&gt; with your &lt;span style="color: rgb(255, 0, 0);"&gt;debian-sys-maint&lt;/span&gt; password.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-984491734490043049?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/984491734490043049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=984491734490043049&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/984491734490043049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/984491734490043049'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2010/02/mysql-debian-sys-maint-account.html' title='MySQL - debian-sys-maint account'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-4867018415348345457</id><published>2010-02-24T11:35:00.002+01:00</published><updated>2010-02-24T11:38:38.741+01:00</updated><title type='text'>Backup and restore debian/ubuntu package selection</title><content type='html'>&lt;p&gt;If you are running Debian and have lost track of which packages you are running, it could be useful to get a backup of your currently installed packages. You can get a list by running:&lt;/p&gt; &lt;pre&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;dpkg --get-selections &gt; &lt;span style="color: rgb(255, 0, 0);"&gt;debianlist.txt&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;This will put the entire list in &lt;span style="color: rgb(255, 0, 0);"&gt;debianlist.txt&lt;/span&gt;. You could then install the same packages on a different computer with:&lt;/p&gt; &lt;pre&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;dpkg --set-selections &lt; &lt;span style="color: rgb(255, 0, 0);"&gt;debianlist.txt&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;You should bear in mind that you would also need to copy over configuration files from /etc when copying your system to a new computer.&lt;/p&gt; &lt;p&gt;To actually install the selections, use:&lt;/p&gt; &lt;pre&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get -u dselect-upgrade&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="display: block;" id="formatbar_Buttons"&gt;&lt;span class=" on down" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;Source: &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;a href="http://www.blogger.com/If%20you%20are%20running%20Debian%20and%20have%20lost%20track%20of%20which%20packages%20you%20are%20running,%20it%20could%20be%20useful%20to%20get%20a%20backup%20of%20your%20currently%20installed%20packages.%20You%20can%20get%20a%20list%20by%20running:%20%20dpkg%20--get-selections%20%3E%20debianlist.txt%20%20This%20will%20put%20the%20entire%20list%20in%20debianlist.txt.%20You%20could%20then%20install%20the%20same%20packages%20on%20a%20different%20computer%20with:%20%20dpkg%20--set-selections%20%3C%20debianlist.txt%20%20You%20should%20bear%20in%20mind%20that%20you%20would%20also%20need%20to%20copy%20over%20configuration%20files%20from%20/etc%20when%20copying%20your%20system%20to%20a%20new%20computer.%20%20To%20actually%20install%20the%20selections,%20use:%20%20apt-get%20-u%20dselect-upgrade%20%20%20source:%20http://www.tuxradar.com/content/linux-tips-every-geek-should-know"&gt;&lt;i&gt;http://www.tuxradar.com/content/linux-tips-every-geek-should-know&lt;/i&gt;&lt;/a&gt;&lt;/i&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-4867018415348345457?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/4867018415348345457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=4867018415348345457&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4867018415348345457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4867018415348345457'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2010/02/backup-and-restore-debianubuntu-package.html' title='Backup and restore debian/ubuntu package selection'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-6205729178702066753</id><published>2010-02-16T15:02:00.002+01:00</published><updated>2010-02-16T15:05:59.584+01:00</updated><title type='text'>Convert a ssh-keygen to putty format using puttygen</title><content type='html'>First install putty-tools:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get install putty-tools&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;then use this command to convert ssh-key:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;puttygen&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;YOUR-KEY&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;-o&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;OUTPUTFILE.PPK&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-6205729178702066753?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/6205729178702066753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=6205729178702066753&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6205729178702066753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6205729178702066753'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2010/02/convert-ssh-keygen-to-putty-format.html' title='Convert a ssh-keygen to putty format using puttygen'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-3176238004744882942</id><published>2010-01-25T16:30:00.002+01:00</published><updated>2010-01-25T16:35:17.858+01:00</updated><title type='text'>How-To: Find missing packages in Debian</title><content type='html'>&lt;strong style="font-weight: bold;"&gt;apt-file&lt;/strong&gt; is a command line tool for searching packages  in Debian/Ubuntu repositories.&lt;br /&gt;Unlike apt-cache search, &lt;strong&gt;apt-file&lt;/strong&gt; can find files in  uninstalled or can list the content of uninstalled packages.&lt;br /&gt;&lt;br /&gt;First, we will install the &lt;span style="font-weight: bold;"&gt;apt-file&lt;/span&gt; package:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get install apt-file&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;then we need to update database:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-file update&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;now we can query the database for myfile:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-file search&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;FILENAME&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-3176238004744882942?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/3176238004744882942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=3176238004744882942&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3176238004744882942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3176238004744882942'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2010/01/how-to-find-missing-packages-in-debian.html' title='How-To: Find missing packages in Debian'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-1569210766060708011</id><published>2009-12-10T16:40:00.001+01:00</published><updated>2009-12-10T16:41:47.296+01:00</updated><title type='text'>Find Windows LDAP Schema</title><content type='html'>Run this command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;adsiedit.msc&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Connect to your Server and expand the tree to see it!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-1569210766060708011?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/1569210766060708011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=1569210766060708011&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1569210766060708011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1569210766060708011'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/12/find-windows-ldap-schema.html' title='Find Windows LDAP Schema'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-4138627948085892728</id><published>2009-11-16T16:00:00.001+01:00</published><updated>2009-11-16T16:03:08.532+01:00</updated><title type='text'>Find mailbox size - Exchange Server 2007</title><content type='html'>in Exchange Console type:&lt;br /&gt;&lt;br /&gt;Get-Mailboxstatistics | ft DisplayName, TotalItemSize&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-4138627948085892728?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/4138627948085892728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=4138627948085892728&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4138627948085892728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4138627948085892728'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/11/find-mailbox-size-exchange-server-2007.html' title='Find mailbox size - Exchange Server 2007'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-6311703699602314839</id><published>2009-10-27T11:54:00.003+01:00</published><updated>2009-10-27T12:02:46.397+01:00</updated><title type='text'>View and change the Queue Lifetime in qmail</title><content type='html'>With this command you can see the Queue-Lifetime:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 102, 0);"&gt;/var/qmail/bin/qmail-showctl | grep life&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;this returns the Lifetime in seconds. (Default is 604800 seconds or 7 days)&lt;br /&gt;&lt;br /&gt;You can change this value by edit the &lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 0, 0);"&gt;queuelifetime&lt;/span&gt; file in &lt;span style="color: rgb(255, 0, 0);"&gt;/var/qmail/control&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 102, 0);"&gt;echo &lt;/span&gt;&lt;span style="font-style: italic; color: rgb(0, 102, 0);"&gt;86400&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 102, 0);"&gt; &gt; /var/qmail/control/queuelifetime&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and then restart the Qmail:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/etc/init.d/qmail restart&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-6311703699602314839?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/6311703699602314839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=6311703699602314839&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6311703699602314839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6311703699602314839'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/10/view-and-change-queue-lifetime-in-qmail.html' title='View and change the Queue Lifetime in qmail'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-3325267384017989209</id><published>2009-10-08T16:53:00.001+02:00</published><updated>2009-10-27T12:03:27.233+01:00</updated><title type='text'>Install Linux from Internet</title><content type='html'>Look this site:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://boot.kernel.org/"&gt;http://boot.kernel.org/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-3325267384017989209?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/3325267384017989209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=3325267384017989209&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3325267384017989209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3325267384017989209'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/10/install-linux-from-internet.html' title='Install Linux from Internet'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-4717467555034612923</id><published>2009-09-16T10:21:00.004+02:00</published><updated>2009-09-16T10:28:25.714+02:00</updated><title type='text'>Run windows command line from Ubuntu</title><content type='html'>Install &lt;span style="color: rgb(255, 0, 0);"&gt;wmi-client&lt;/span&gt; package.&lt;br /&gt;&lt;br /&gt;Download the package for Jaunty from &lt;a href="https://launchpad.net/ubuntu/jaunty/i386/wmi-client/1:0.1.12-1"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Run &lt;span style="color: rgb(255, 0, 0);"&gt;winexe&lt;/span&gt;. For example as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;winexe -U&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;DOMAIN&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;USERNAME&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;//&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;HOST-OR-IP&lt;/span&gt; &lt;span style="color: rgb(0, 0, 153);"&gt;"ipconfig /all"&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;See the Winexe Website &lt;a href="http://eol.ovh.org/winexe/"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-4717467555034612923?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/4717467555034612923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=4717467555034612923&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4717467555034612923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4717467555034612923'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/09/run-windows-command-line-from-ubuntu.html' title='Run windows command line from Ubuntu'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-7352560723679380369</id><published>2009-09-14T14:57:00.009+02:00</published><updated>2009-09-14T17:40:16.418+02:00</updated><title type='text'>Linux Security Checklist</title><content type='html'>&lt;span style="font-style: italic; font-weight: bold;"&gt;Disabling Unnecessary Services&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;ps –ax&lt;/span&gt;   &lt;span style="color: rgb(255, 0, 0);"&gt;:will list all currently running processes&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;ls –l /etc/rc.d/rc3.d/S* &lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;:will show all start-up scripts (if you boot into&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;         graphics mode, replace rc3.d with rc5.d)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;netstat –a&lt;/span&gt; &lt;/span&gt;  &lt;span style="color: rgb(255, 0, 0);"&gt;:will list all open ports&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Check for Security on Key Files&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;• &lt;span style="color: rgb(0, 0, 153);"&gt;/etc/fstab&lt;/span&gt;: make sure the owner &amp;amp; group are set to &lt;span style="color: rgb(255, 0, 0);"&gt;root:root&lt;/span&gt; and the&lt;br /&gt;permissions are set to 0644 (-rw-r--r--)&lt;br /&gt;• verify that &lt;span style="color: rgb(51, 51, 153);"&gt;/etc/passwd&lt;/span&gt;, &lt;span style="color: rgb(0, 0, 153);"&gt;/etc/shadow&lt;/span&gt; &amp;amp; &lt;span style="color: rgb(0, 0, 153);"&gt;/etc/group&lt;/span&gt; are all owned by '&lt;span style="color: rgb(255, 0, 0);"&gt;root&lt;/span&gt;'&lt;br /&gt;• verify that permissions on &lt;span style="color: rgb(0, 0, 153);"&gt;/etc/passwd&lt;/span&gt; &amp;amp; /&lt;span style="color: rgb(0, 0, 153);"&gt;etc/group&lt;/span&gt; are rw-r--r-- (644)&lt;br /&gt;• verify that permissions on &lt;span style="color: rgb(0, 0, 153);"&gt;/etc/shadow&lt;/span&gt; are r-------- (400)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Limit root access using &lt;span style="color: rgb(255, 0, 0);"&gt;SUDO&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;/etc/sudoers&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;Only allow root to access&lt;span style="color: rgb(255, 0, 0);"&gt; CRON&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                                                               To enhance security of the cron scheduler, you can establish the &lt;span style="color: rgb(0, 0, 153);"&gt;cron.deny&lt;/span&gt; and&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;cron.allow&lt;/span&gt; files to control use of the crontab. The following commands will&lt;br /&gt;establish root as the only user with permission to add cron jobs:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;cd /etc/bin/rm -f cron.deny at.deny&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;echo root &gt;cron.allow&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;echo root &gt;at.allow&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/bin/chown root:root cron.allow at.allow&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/bin/chmod 400 cron.allow at.allow&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Remote Access and SSH Basic Settings&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Telnet is not recommended for remote access. Secure Shell (SSH) provides&lt;br /&gt;encrypted telnet-like access and is considered a secure alternative to telnet.&lt;br /&gt;However, older versions of SSH have vulnerabilities and should not be used.&lt;br /&gt;To disable SSH version 1 and enhance the overall security of SSH, consider&lt;br /&gt;making the following changes to your &lt;span style="color: rgb(255, 0, 0);"&gt;sshd_config&lt;/span&gt; file:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Protocol 2&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;      PermitRootLogin yes&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;      PermitEmptyPasswords no&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;      Banner /etc/issue&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;      IgnoreRhosts yes&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;      RhostsAuthentication no&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;      RhostsRSAAuthentication no&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;      HostbasedAuthentication no&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;      LoginGraceTime 1m &lt;span style="color: rgb(255, 0, 0);"&gt;(or less – default is 2 minutes)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;      SyslogFacility AUTH &lt;span style="color: rgb(255, 0, 0);"&gt;(provides logging under syslog AUTH)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;      AllowUser &lt;span style="color: rgb(255, 0, 0);"&gt;[list of users allowed access]&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;      DenyUser &lt;span style="color: rgb(255, 0, 0);"&gt;[list of system accounts and others not allowed]&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;      MaxStartups 10 &lt;span style="color: rgb(255, 0, 0);"&gt;(or less – use 1/3 the total number of remote users)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note: &lt;span style="color: rgb(255, 0, 0);"&gt;MaxStartups&lt;/span&gt; refers to the max number of simultaneous&lt;br /&gt;unauthenticated connections. This setting can be helpful against a brute-&lt;br /&gt;force script that performs forking.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;Apache Security&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Verify that your apache subdirectories are all owned by &lt;span style="color: rgb(255, 0, 0);"&gt;root&lt;/span&gt; and have a&lt;br /&gt;mod of &lt;span style="color: rgb(255, 0, 0);"&gt;755&lt;/span&gt;:&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;br /&gt;ls -l /etc/apache2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;To prevent users from setting up&lt;span style="color: rgb(255, 0, 0);"&gt; .htaccess&lt;/span&gt; files that can override security&lt;br /&gt;features, change the server configuration file to include:&lt;br /&gt;&lt;directory&gt;&lt;br /&gt; &lt;span style="color: rgb(0, 0, 153);"&gt;AllowOverride None&lt;/span&gt;&lt;br /&gt;&lt;/directory&gt;&lt;br /&gt;To prevent users from accessing the entire filesystem (starting with the root&lt;br /&gt;directory), add the following to your server configuration file:&lt;br /&gt;&lt;directory&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Order Deny,Allow&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;       Deny from all&lt;/span&gt;&lt;br /&gt;&lt;/directory&gt;&lt;br /&gt;To provide access into individual directories, add the following:&lt;br /&gt;&lt;directory&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Order Deny,Allow&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;       Allow from all&lt;/span&gt;&lt;br /&gt;&lt;/directory&gt;&lt;br /&gt;&lt;directory&gt;&lt;/directory&gt;&lt;p style="font-style: italic;"&gt; &lt;span style="font-weight: bold;"&gt;Apache Configuration File&lt;/span&gt;&lt;/p&gt;   &lt;p&gt;In Apache, the ServerTokens   directive allow the system administrator to set different type of  Server HTTP response header:&lt;/p&gt;  &lt;span style="color: rgb(0, 0, 153);"&gt;ServerTokens Prod&lt;/span&gt;&lt;br /&gt;this is the most restrictive, in our example, apache will respond &lt;span style="color: rgb(255, 0, 0);"&gt;Server: Apache &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;ServerTokens Major&lt;/span&gt;&lt;br /&gt;responds -&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Server: Apache/2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;ServerTokens Minor&lt;/span&gt;&lt;br /&gt;responds -&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Server: Apache/2.0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;ServerTokens Min&lt;/span&gt;&lt;br /&gt;responds -&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Server: Apache/2.0.55 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;ServerTokens Os&lt;/span&gt;&lt;br /&gt;responds -&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; Server: Apache/2.0.55 (Ubuntu) &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;ServerTokens Full&lt;/span&gt;&lt;br /&gt;responds -&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;Server: Apache/2.0.55 (Ubuntu) PHP/5.1.4-1.dotdeb.2    mymod1/X.Y mymod2/W.Z &lt;/span&gt;   &lt;p&gt;By default, &lt;span style="color: rgb(0, 0, 153);"&gt;ServerTokens&lt;/span&gt; is set to  &lt;span style="color: rgb(0, 0, 153);"&gt;Full&lt;/span&gt;.   To change that value, edit &lt;span style="color: rgb(255, 0, 0);"&gt;/etc/apache2/apache2.conf&lt;/span&gt;   and look for the line containing &lt;span style="color: rgb(0, 0, 153);"&gt;ServerTokens&lt;/span&gt;.&lt;/p&gt;&lt;h2 style="font-weight: normal; font-style: italic; color: rgb(0, 0, 153);"&gt;&lt;span style="font-size:100%;"&gt;&lt;code&gt;ServerSignature Off&lt;/code&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 style="font-weight: bold; font-style: italic;"&gt;&lt;br /&gt;&lt;/h2&gt;&lt;h2 style="font-weight: bold; font-style: italic;"&gt;&lt;span style="font-size:100%;"&gt;Securing FTP&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt; If you really have to use FTP (without wrapping it with sslwrap or inside a SSL or SSH tunnel), you should chroot ftp into the ftp users' home directory, so that the user is unable to see anything else than their own directory. Otherwise they could traverse your root file system just like if they had a shell in it.  You can add the following line in your &lt;code style="color: rgb(255, 0, 0);"&gt;proftpd.conf&lt;/code&gt; in your global section to enable this chroot feature: &lt;/p&gt;  &lt;pre&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;     DefaultRoot ~&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt; Restart ProFTPd by &lt;samp style="color: rgb(0, 102, 0);"&gt;/etc/init.d/proftpd restart&lt;/samp&gt; and check whether you can escape from your homedir now. &lt;/p&gt;  &lt;p&gt; To prevent ProFTPd DoS attacks using &lt;span style="color: rgb(255, 0, 0);"&gt;../../..&lt;/span&gt;, add the following line in &lt;code&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;/etc/proftpd.conf&lt;/span&gt;&lt;/code&gt;: &lt;samp style="color: rgb(0, 0, 153);"&gt;DenyFilter \*.*/&lt;/samp&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-7352560723679380369?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/7352560723679380369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=7352560723679380369&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/7352560723679380369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/7352560723679380369'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/09/linux-security-checklist.html' title='Linux Security Checklist'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-1438444715692412048</id><published>2009-09-10T10:25:00.008+02:00</published><updated>2009-09-10T10:39:24.371+02:00</updated><title type='text'>iscsicli Examples</title><content type='html'>&lt;span name="intelliTxt" id="intelliTxt"&gt;&lt;pre&gt;The original Link is &lt;a href="http://windowsitpro.com/article/articleid/99196/q-how-can-i-use-the-command-line-to-configure-iscsi-connections.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Users\john&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;sc config msiscsi start= auto&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;The output was: &lt;/p&gt;&lt;pre style="color: rgb(255, 0, 0);"&gt;[SC] ChangeServiceConfig SUCCESS&lt;/pre&gt; &lt;p&gt;Then I entered: &lt;/p&gt;&lt;pre&gt;Users\john&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;net start msiscsi&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;The output was: &lt;/p&gt;&lt;pre style="color: rgb(255, 0, 0);"&gt;The Microsoft iSCSI Initiator Service service is starting.&lt;br /&gt;The Microsoft iSCSI Initiator Service service was started successfully. &lt;/pre&gt;&lt;p&gt;Then, you use the Iscsicli command-line interface to connect to an iSCSI Target and list the available targets. The command I entered was: &lt;/p&gt;&lt;pre&gt;Users\john&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;iscsicli QAddTargetPortal &lt;span style="color: rgb(0, 0, 153);"&gt;192.168.1.31&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;The output was: &lt;/p&gt;&lt;pre style="color: rgb(255, 0, 0);"&gt;Microsoft iSCSI Initiator Version 6.0 Build 6000&lt;br /&gt;The operation completed successfully.&lt;/pre&gt; &lt;p&gt;Next I entered: &lt;/p&gt;&lt;pre&gt;Users\john&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;iscsicli ListTargets&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;The output was: &lt;/p&gt;&lt;pre style="color: rgb(255, 0, 0);"&gt;Microsoft iSCSI Initiator Version 6.0 Build 6000 &lt;p&gt;Targets List:&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;quorum&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;data&lt;/span&gt;&lt;br /&gt;The operation completed successfully.&lt;/p&gt;&lt;/pre&gt; &lt;p&gt;You can then connect to a target using the following code as an example: &lt;/p&gt;&lt;pre&gt;Users\john&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;iscsicli qlogintarget &lt;span style="color: rgb(0, 0, 153);"&gt;data&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;The output was: &lt;/p&gt;&lt;pre style="color: rgb(255, 0, 0);"&gt;Microsoft iSCSI Initiator Version 6.0 Build 6000&lt;br /&gt;Session Id is 0xfffffa800626e018-0x4000013700000006&lt;br /&gt;Connection Id is 0xfffffa800626e018-0x5&lt;br /&gt;The operation completed successfully.&lt;/pre&gt; &lt;p&gt;The following code checked to make sure the operation was successful: &lt;/p&gt;&lt;pre&gt;Users\john&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;iscsicli reporttargetmappings&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;The output was: &lt;/p&gt;&lt;pre style="color: rgb(255, 0, 0);"&gt;Microsoft iSCSI Initiator Version 6.0 Build 6000 &lt;p&gt;Total of 1 mappings returned&lt;br /&gt;Session Id : fffffa800626e018-4000013700000006&lt;br /&gt;Target Name : data&lt;br /&gt;Initiator : Root\ISCSIPRT\0000_0&lt;br /&gt;Initiator Scsi Device : \\.\Scsi4:&lt;br /&gt;Initiator Bus : 0&lt;br /&gt;Initiator Target Id : 0&lt;br /&gt;Target Lun: 0x0 &lt;--&gt; OS Lun: 0x0 &lt;/p&gt;&lt;p&gt;The operation completed successfully. &lt;/p&gt;&lt;/pre&gt; &lt;p&gt;You log out by using the logouttarget switch with the session ID, as the following sample code shows: &lt;/p&gt;&lt;pre&gt;Users\john&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;iscsicli logouttarget &lt;span style="color: rgb(0, 0, 153);"&gt;fffffa800626e018-4000013700000006&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;The output was: &lt;/p&gt;&lt;pre style="color: rgb(255, 0, 0);"&gt;Microsoft iSCSI Initiator Version 6.0 Build 6000 &lt;p&gt;The operation completed successfully.&lt;/p&gt;&lt;/pre&gt; &lt;p&gt;To confirm the operation was successful, I entered the following code: &lt;/p&gt;&lt;pre&gt;Users\john&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;iscsicli reporttargetmappings&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;The output was: &lt;/p&gt;&lt;pre style="color: rgb(255, 0, 0);"&gt;Microsoft iSCSI Initiator Version 6.0 Build 6000 &lt;p&gt;No Mappings&lt;br /&gt;The operation completed successfully.&lt;/p&gt;&lt;/pre&gt; &lt;p&gt;The mappings obtained through the qlogintarget command aren’t persistent and will be lost at reboot. If you want a persistent connection, use the perssitenlogintarget switch, as the following code shows: &lt;/p&gt;&lt;pre&gt;Users\john&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;iscsicli persistentlogintarget &lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;              data&lt;/span&gt; T * * * * * * * * * * * * * * * 0&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;The output was: &lt;/p&gt;&lt;pre style="color: rgb(255, 0, 0);"&gt;Microsoft iSCSI Initiator Version 6.0 Build 6000 &lt;p&gt;The operation completed successfully.&lt;/p&gt;&lt;/pre&gt; &lt;p&gt;To confirm that the operation was successful, I entered: &lt;/p&gt;&lt;pre&gt;Users\john&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;iscsicli listpersistenttargets&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;The output was: &lt;/p&gt;&lt;pre style="color: rgb(255, 0, 0);"&gt;Microsoft iSCSI Initiator Version 6.0 Build 6000 &lt;p&gt;Total of 1 peristent targets&lt;br /&gt;Target Name : data&lt;br /&gt;Address and Socket : 192.168.1.31 3260&lt;br /&gt;Session Type : Data&lt;br /&gt;Initiator Name : Root\ISCSIPRT\0000_0&lt;br /&gt;Port Number :&lt;br /&gt;++Security Flags : 0x0&lt;br /&gt;++Version : 0&lt;br /&gt;++Information Specified: 0x20&lt;br /&gt;++Login Flags : 0x8&lt;br /&gt;++Username : &lt;/p&gt;&lt;p&gt;The operation completed successfully.&lt;/p&gt;&lt;/pre&gt; &lt;p&gt;Entering T * * * * * * * * * * * * * * * 0 specifies all the required switches. To remove a persistent target, apply the information obtained from the listpersistentargets command, using the following code as an example: &lt;/p&gt;&lt;pre&gt;Users\john&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;iscsicli removepersistenttarget Root\ISCSIPRT\0000_0 &lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;               data&lt;/span&gt; * &lt;span style="color: rgb(0, 0, 153);"&gt;192.168.1.31&lt;/span&gt; 3260&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;The output was: &lt;/p&gt;&lt;pre style="color: rgb(255, 0, 0);"&gt;Microsoft iSCSI Initiator Version 6.0 Build 6000 &lt;p&gt;The operation completed successfully. &lt;/p&gt;&lt;/pre&gt; &lt;p&gt;To confirm the success of the operation, I entered: &lt;/p&gt;&lt;pre&gt;Users\john&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;iscsicli listpersistenttargets&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;The output was: &lt;/p&gt;&lt;pre style="color: rgb(255, 0, 0);"&gt;Microsoft iSCSI Initiator Version 6.0 Build 6000&lt;br /&gt;Total of 0 peristent targets&lt;br /&gt;The operation completed successfully. &lt;/pre&gt;&lt;p&gt;You'll notice that I passed the initiator name first, then the target name&lt;span class="article"&gt;&lt;span name="intelliTxt" id="intelliTxt"&gt;, the port number (which is *), and last of all the iSCSI target server IP address and socket. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-1438444715692412048?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/1438444715692412048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=1438444715692412048&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1438444715692412048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1438444715692412048'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/09/iscsicli-examples.html' title='iscsicli Examples'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-5929870447776766702</id><published>2009-09-09T10:35:00.007+02:00</published><updated>2009-09-09T15:54:54.340+02:00</updated><title type='text'>Use Ubuntu ISCSI in Windows</title><content type='html'>Install the packages:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(0, 102, 0);"&gt;apt-get install libssl-dev&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get install iscsitarget&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Edit &lt;span style="color: rgb(255, 0, 0);"&gt;/etc/default/iscsitarget&lt;/span&gt; and set:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;ISCSITARGET_ENABLE=true&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Make a new Partition or new disk, for Example &lt;span style="color: rgb(255, 0, 0);"&gt;/dev/sda3&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Edit &lt;span style="color: rgb(0, 0, 153);"&gt;/etc/ietd.conf&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;change this line:&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Lun 0 Path=&lt;span style="color: rgb(255, 0, 0);"&gt;/dev/sda3&lt;/span&gt;,Type=fileio&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Restart the iscsitarget service:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/etc/init.d/iscsitarget restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Use iscsi:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Windows:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Run &lt;span style="color: rgb(255, 0, 0);"&gt;iscsi-initiator&lt;/span&gt;, add the Ubuntu machine IP  in &lt;span style="color: rgb(0, 0, 153);"&gt;Discovery&lt;/span&gt; tab, under &lt;span style="color: rgb(0, 0, 153);"&gt;Target Portals&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Connect to iscsi by pressing &lt;span style="color: rgb(0, 0, 153);"&gt; Log On&lt;/span&gt;, in &lt;span style="color: rgb(0, 0, 153);"&gt;Target&lt;/span&gt; tab. Close the  &lt;span style="color: rgb(255, 0, 0);"&gt;iscsi-initiator&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Add iscsi Partition in Windows Partitions same as a new partition.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;Linux:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;run this command:&lt;br /&gt;&lt;br /&gt;iscsiadm -m discovery -t st -p &lt;span style="color: rgb(255, 0, 0);"&gt;IP-FOR-ISCSI-TARGET&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The informations of nodes are saving in &lt;span style="color: rgb(0, 0, 153);"&gt;/etc/iscsi/nodes&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Then run this:&lt;br /&gt;&lt;br /&gt;iscsiadm -m node --targetname "&lt;span style="color: rgb(255, 0, 0);"&gt;UNIQUE-NAME-OF-TARGET&lt;/span&gt;" --portal "&lt;span style="color: rgb(255, 0, 0);"&gt;IP-FOR-ISCSI-TARGET&lt;/span&gt;:3260" --login&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can Mount the new device. See &lt;span style="color: rgb(0, 102, 0);"&gt;fdsik -l&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-5929870447776766702?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/5929870447776766702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=5929870447776766702&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5929870447776766702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5929870447776766702'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/09/use-ubuntu-iscsi-in-windows.html' title='Use Ubuntu ISCSI in Windows'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-1424529288634057438</id><published>2009-09-04T15:12:00.003+02:00</published><updated>2009-09-04T15:43:46.832+02:00</updated><title type='text'>Shutdown Computer Remotely</title><content type='html'>You can shut down from one Windows another Windows remotely:&lt;br /&gt;in command prompt type:&lt;br /&gt;&lt;br /&gt;c:/&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;shutdown -m \\&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;COMPUTERNAME&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;/s&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 153);"&gt;(/r for restart)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;From Linux:&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;net rpc shutdown -I&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;HOSTNAME&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;(OR IP)&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; -U&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;USERNAME&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;%&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;PASSWORD&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-1424529288634057438?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/1424529288634057438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=1424529288634057438&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1424529288634057438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1424529288634057438'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/09/shutdown-computer-remotely.html' title='Shutdown Computer Remotely'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-4094121304672634667</id><published>2009-07-31T16:03:00.001+02:00</published><updated>2009-07-31T16:04:58.917+02:00</updated><title type='text'>Pass Password to SSH Command</title><content type='html'>Install &lt;span style="color: rgb(0, 0, 153);"&gt;sshpass&lt;/span&gt; (Debian Package).&lt;br /&gt;&lt;br /&gt;run ssh command as follow:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;sshpass -p &lt;span style="color: rgb(255, 0, 0);"&gt;[yourpassword]&lt;/span&gt; ssh &lt;span style="color: rgb(255, 0, 0);"&gt;[yourusername]&lt;/span&gt;@&lt;span style="color: rgb(255, 0, 0);"&gt;[host]&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-4094121304672634667?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/4094121304672634667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=4094121304672634667&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4094121304672634667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4094121304672634667'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/07/pass-password-to-ssh-command.html' title='Pass Password to SSH Command'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-8895173377481507824</id><published>2009-07-23T14:33:00.003+02:00</published><updated>2009-07-23T14:38:52.866+02:00</updated><title type='text'>Find Windows XP Administrator Password</title><content type='html'>First reboot your windows with a Linux-Live CD such as ubuntu.&lt;br /&gt;&lt;br /&gt;Take two files &lt;span style="color: rgb(51, 51, 255);"&gt;SAM&lt;/span&gt; and &lt;span style="color: rgb(51, 51, 255);"&gt;SYSTEM&lt;/span&gt; under folder &lt;span style="color: rgb(51, 51, 255);"&gt;WINDOWS\SYSTEM32\CONFIG&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;With Rainbow Tables (for example &lt;span style="color: rgb(255, 0, 0);"&gt;OPHCRACK&lt;/span&gt;) you can find very fast the Password.&lt;br /&gt;&lt;br /&gt;This HOW-TO tells you how to install &lt;span style="color: rgb(255, 0, 0);"&gt;OPHCRACK&lt;/span&gt; in Ubuntu:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://darkc0de.com/tutorials/ophcrack_install.html"&gt;HOW-TO INSTALL OPHCRACK ON Ubuntu&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-8895173377481507824?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/8895173377481507824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=8895173377481507824&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8895173377481507824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8895173377481507824'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/07/find-windows-xp-administrator-password.html' title='Find Windows XP Administrator Password'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-1926343687321834443</id><published>2009-07-23T14:30:00.001+02:00</published><updated>2009-07-23T14:31:54.297+02:00</updated><title type='text'>Ubuntu - Install all dependecies for a package</title><content type='html'>&lt;pre&gt;&lt;span&gt;&lt;b&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;Run this command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get build-dep PACKAGE_NAME&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-1926343687321834443?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/1926343687321834443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=1926343687321834443&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1926343687321834443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1926343687321834443'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/07/ubuntu-install-all-dependecies-for.html' title='Ubuntu - Install all dependecies for a package'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-6544991906647055093</id><published>2009-07-15T11:29:00.001+02:00</published><updated>2009-07-15T11:29:57.704+02:00</updated><title type='text'>Search and Replace in bash</title><content type='html'>&lt;pre class="bbcodeblock" dir="ltr" style="margin: 0px -99999px 0px 0px; padding: 3px; border: 1px inset; width: 98%; height: 114px; text-align: left; overflow: auto;"&gt;#!/bin/bash&lt;br /&gt;origvar="This is the original string";&lt;br /&gt;replvar=${origvar//original/changed};&lt;br /&gt;replvar=${replvar//string/result.};&lt;br /&gt;echo "replvar==\"${replvar}\".";&lt;br /&gt;echo "this should now state \"This is the changed result.\".";&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-6544991906647055093?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/6544991906647055093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=6544991906647055093&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6544991906647055093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6544991906647055093'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/07/search-and-replace-in-bash.html' title='Search and Replace in bash'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-5900776787026768318</id><published>2009-07-15T10:59:00.005+02:00</published><updated>2009-07-15T11:08:23.202+02:00</updated><title type='text'>Import Domain from Plesk 7 to Plesk 9</title><content type='html'>run in Plesk 7 this command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;/usr/local/psa/bin/pleskbackup -v domains DOMAIN.NAME /tmp/FILENAME&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;copy FILENAME to plesk 9 (for example &lt;span style="color: rgb(255, 0, 0);"&gt;tmp&lt;/span&gt; directory).&lt;br /&gt;&lt;br /&gt;Add same Customer and domain in plesk 9.&lt;br /&gt;&lt;br /&gt;Convert the Backup:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;/usr/local/psa/bin/pre9-backup-convert -v convert -d /var/lib/psa/dumps/ /tmp/FILENAME &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;this command makes a XML file under &lt;span style="color: rgb(255, 0, 0);"&gt;/var/lib/psa/dumps/domains/DOMAIN.NAME&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;import the domain:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:85%;" &gt;/usr/local/psa/bin/pleskrestore --restore /var/lib/psa/dumps/domains/DOMAIN.NAME/converted_DOMAIN.NAME_info_xxxxxxxxxx.xml -level domains&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-5900776787026768318?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/5900776787026768318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=5900776787026768318&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5900776787026768318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5900776787026768318'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/07/import-domain-from-plesk-7-to-plesk-9.html' title='Import Domain from Plesk 7 to Plesk 9'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-526256132110463292</id><published>2009-07-08T12:55:00.002+02:00</published><updated>2009-07-08T13:00:09.889+02:00</updated><title type='text'>How to switch from Qmail to Postfix and vice versa?</title><content type='html'>&lt;span style="font-family:Comic Sans MS;"&gt;You may run the following  command to switch MTA to Postfix:&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;&lt;br /&gt;Code:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/usr/local/psa/admin/sbin/autoinstaller --select-release-current --install-component postfix&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;and for switching to Qmail:&lt;br /&gt;&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family:Comic Sans MS;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/usr/local/psa/admin/sbin/autoinstaller  --select-release-current --install-component qmail&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-526256132110463292?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/526256132110463292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=526256132110463292&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/526256132110463292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/526256132110463292'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/07/how-to-switch-from-qmail-to-postfix-and.html' title='How to switch from Qmail to Postfix and vice versa?'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-719506661355661433</id><published>2009-06-05T13:45:00.001+02:00</published><updated>2009-06-05T13:46:44.975+02:00</updated><title type='text'>Change Crontab Editor</title><content type='html'>In .bashrc  add this line:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;export EDITOR=/usr/bin/vim&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;or each editor you would have!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-719506661355661433?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/719506661355661433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=719506661355661433&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/719506661355661433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/719506661355661433'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/06/change-crontab-editor_05.html' title='Change Crontab Editor'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-4681294628622984268</id><published>2009-06-04T13:40:00.001+02:00</published><updated>2009-06-04T13:41:55.753+02:00</updated><title type='text'>Exmerge error: "Store 'MSPST MS' was not opened."</title><content type='html'>&lt;p&gt;I was running an Exchange Server in English and then tried to move the accounts using exmerge to one in German when I ran into this error. After much reading I came accross this website: &lt;a href="http://technet.microsoft.com/en-us/library/bb124178.aspx"&gt;http://technet.microsoft.com/en-us/library/bb124178.aspx&lt;/a&gt; which states: &lt;/p&gt; &lt;p&gt;"Store 'MSPST MS' was not opened Store 'MSEMS' was not opened &lt;/p&gt; &lt;div class="MTPS_CollapsibleSection" id="ctl00_rs1_mainContentContainer_cpe33874_c" style="overflow: visible; display: block; width: auto; height: auto;"&gt; &lt;div class="MTPS_CollapsibleSection" id="" style="border: medium none ; display: block;"&gt;&lt;a class="" name="sectionToggle3"&gt;&lt;/a&gt; &lt;p&gt;The Store 'MSPST MS' was not opened or Store 'MSEMS' was not opened errors might be seen in the ExMerge log file (ExMerge.log) after merging data from the recovery storage group has failed. These errors typically indicate a language localization mismatch problem. The errors can usually be resolved by entering the correct localized names for the MAPI services on which ExMerge depends. &lt;/p&gt; &lt;ol&gt;&lt;li&gt; &lt;p&gt;In the ExMerge.ini file that is bundled with the ExMerge tool, find the &lt;b&gt;LoggingLevel&lt;/b&gt; line and set its value to 3 instead of 0. This enables verbose logging of ExMerge errors.&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;Run ExMerge again to generate the error condition again. To reduce the output to the log file, select only a single mailbox to merge.&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;In the ExMerge.log file, find the lines that begin with "Checking service" and that are followed by a "was not opened" error. For example: &lt;/p&gt; &lt;div class="" id="ctl00_rs1_mainContentContainer_ctl13_other"&gt; &lt;div class="CodeSnippetTitleBar"&gt;  &lt;div class="CopyCodeButton"&gt;&lt;a class="copyCode"&gt;&lt;img src="http://i.technet.microsoft.com/platform/Controls/CodeSnippet/resources/copy_off.gif" alt="" align="middle" border="0" height="9" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre class="libCScode" id="ctl00_rs1_mainContentContainer_ctl13other"&gt;[15:02:19] Checking service 'Microsoft Exchange Message Store'&lt;br /&gt;[15:02:19] Checking service 'Personal Folders'&lt;br /&gt;[15:02:19] Store 'MSPST MS' was not opened.&lt;br /&gt;[15:02:19] Ending Routine: EDKRoutines::OpenStores)&lt;/pre&gt;&lt;/div&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;In the ExMerge.ini file, find &lt;b&gt;LocalisedExchangeServerServiceName&lt;/b&gt; and remove the semicolon (;) that precedes the line. Then set the value to the service name displayed in the ExMerge.log file. For example: &lt;/p&gt; &lt;div class="" id="ctl00_rs1_mainContentContainer_ctl14_other"&gt; &lt;div class="CodeSnippetTitleBar"&gt;  &lt;div class="CopyCodeButton"&gt;&lt;a class="copyCode"&gt;&lt;img src="http://i.technet.microsoft.com/platform/Controls/CodeSnippet/resources/copy_off.gif" alt="" align="middle" border="0" height="9" /&gt;&lt;/a&gt;LocalisedExchangeServerServiceName = Microsoft Exchange Message Store&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;In the ExMerge.ini file, find &lt;b&gt;LocalisedPersonalFoldersServiceName&lt;/b&gt; and remove the semicolon (;) that precedes the line. Then set the value to the service name displayed in the ExMerge.log file. For example: &lt;/p&gt; &lt;div class="" id="ctl00_rs1_mainContentContainer_ctl15_other"&gt; &lt;div class="CodeSnippetTitleBar"&gt;  &lt;div class="CopyCodeButton"&gt;&lt;a class="copyCode"&gt;&lt;img src="http://i.technet.microsoft.com/platform/Controls/CodeSnippet/resources/copy_off.gif" alt="" align="middle" border="0" height="9" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre class="libCScode" id="ctl00_rs1_mainContentContainer_ctl15other"&gt;LocalisedPersonalFoldersServiceName = Personal Folders&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;So, simply find the localised names and remove the ';' from the one you need to use. For example, in my case I needed spanish so I removed it from the Spanish one and here is what I ended up with:&lt;/p&gt; &lt;p&gt;; French&lt;br /&gt;;LocalisedPersonalFoldersServiceName=Dossiers personnels&lt;br /&gt;; Spanish&lt;br /&gt;LocalisedPersonalFoldersServiceName=Carpetas personales&lt;br /&gt;; German&lt;br /&gt;;LocalisedPersonalFoldersServiceName=Persönliche Ordner&lt;br /&gt;; Italian&lt;br /&gt;;LocalisedPersonalFoldersServiceName=Cartelle personali&lt;/p&gt; &lt;p&gt;From the looks of it, you will run into issues if you are using ExMerge for a French, Spanish, German or Italian system. Hope this helps!&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-4681294628622984268?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/4681294628622984268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=4681294628622984268&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4681294628622984268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4681294628622984268'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/06/exmerge-error-store-mspst-ms-was-not.html' title='Exmerge error: &quot;Store &apos;MSPST MS&apos; was not opened.&quot;'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-1808540741236418548</id><published>2009-05-27T13:03:00.002+02:00</published><updated>2009-05-27T13:05:16.329+02:00</updated><title type='text'>Reset VTIGER Admin password</title><content type='html'>&lt;p&gt;If you can get access to the database, try changing the user_password field value in vtiger_users table to:  &lt;/p&gt;&lt;p&gt;&lt;b&gt;adpexzg3FUZAk&lt;/b&gt; which makes the password as admin  &lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;mysql&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;update vtiger_users set user_password='adpexzg3FUZAk' where user_name='admin' ;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You will also need to set the crypt_type field of vtiger_users to blank (empty value) if you are on 5.0.4 and above.update&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;mysql&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;vtiger_users set crypt_type='' where user_name='admin' ;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Now the password for "admin" is "admin"!&lt;br /&gt; &lt;/p&gt;&lt;i&gt;NOTE: Once you login make sure to update the password to a secure one through 'My Preferences' link.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-1808540741236418548?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/1808540741236418548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=1808540741236418548&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1808540741236418548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1808540741236418548'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/05/reset-vtiger-admin-password.html' title='Reset VTIGER Admin password'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-5641320591325436628</id><published>2009-05-20T16:16:00.005+02:00</published><updated>2009-05-25T13:24:06.763+02:00</updated><title type='text'>Ubuntu Encrypted directory with EncFS</title><content type='html'>Install the ENCFS package:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get install encfs fuse-utils&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;br /&gt;modprobe fuse&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Make the directory where encrypted data will be stored:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;mkdir /encrypted&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Make a mount point:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;mkdir /temp-encr&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;use encfs with this directories:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;encfs /encrypted /temp-encr&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;enter your &lt;span style="color: rgb(255, 0, 0);"&gt;Password&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;for avoid the others to access the encrypted data, just unmount the folder:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;fusermount -u /encrypted /temp-encr&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In &lt;span style="color: rgb(255, 0, 0);"&gt;encrypted&lt;/span&gt; folder only &lt;span style="color: rgb(0, 0, 153);"&gt;"Encrypted Data"&lt;/span&gt; could be seen.&lt;br /&gt;&lt;br /&gt;If you want to encrypt a directory on your fileserver and have the decrypted mountpoint accessible by Linux or Windows clients via Samba, you need to modify your setup slightly to permit "other" access to the Fuse device.&lt;br /&gt;&lt;br /&gt;First, modify the &lt;span style="color: rgb(51, 51, 255);"&gt;/etc/fuse.conf&lt;/span&gt; file so that the last line "&lt;span style="color: rgb(255, 0, 0);"&gt;user_allow_other&lt;/span&gt;" does NOT have a leading hash. Save and exit.&lt;br /&gt;&lt;br /&gt;Next, add an option to your EncFS mount command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;encfs /encrypted /temp-encr -- -o allow_other&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-5641320591325436628?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/5641320591325436628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=5641320591325436628&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5641320591325436628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5641320591325436628'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/05/ubuntu-encrypted-directory-with-encfs.html' title='Ubuntu Encrypted directory with EncFS'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-1182085425507090389</id><published>2009-05-14T14:11:00.002+02:00</published><updated>2009-05-14T14:18:31.993+02:00</updated><title type='text'>Mysql - Change Root Password</title><content type='html'>First stop the Mysql:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/etc/init.d/mysql stop&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;run this command to start Mysql again:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;mysqld_safe –skip-grant-tables&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Go to  mysql:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;mysql -u root mysql&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and run this command in Mysql:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;mysql&gt;&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;UPDATE user SET Password=PASSWORD('&lt;span style="color: rgb(255, 0, 0);"&gt;newrootpassword&lt;/span&gt;') WHERE User='root';&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;then this command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;mysql&gt;&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;FLUSH PRIVILEGES;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;exit Mysql:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;mysql&gt;&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;exit ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Stop the mysqld service:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;killall mysqld&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and start that normally:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/etc/init.d/mysql start&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That's all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-1182085425507090389?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/1182085425507090389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=1182085425507090389&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1182085425507090389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1182085425507090389'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/05/mysql-change-root-password.html' title='Mysql - Change Root Password'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-4091548238396521729</id><published>2009-05-12T10:43:00.002+02:00</published><updated>2009-05-12T10:45:11.041+02:00</updated><title type='text'>Solaris Remote Console (XDMCP)</title><content type='html'>&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;br /&gt;vi /etc/default/login&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and comment this line with # symbole:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Console=/dev/console&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-4091548238396521729?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/4091548238396521729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=4091548238396521729&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4091548238396521729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4091548238396521729'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/05/solaris-remote-cobnsole-xdmcp.html' title='Solaris Remote Console (XDMCP)'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-7634191770415312442</id><published>2009-05-12T10:37:00.002+02:00</published><updated>2009-05-12T10:42:18.431+02:00</updated><title type='text'>Solaris Shell Profile</title><content type='html'>Type the following in terminal:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;su -&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; stty erase ^H&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; TERM=vt100&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; export TERM&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; exec tcsh -l&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; eval `/usr/openwin/bin/resize -c`&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, type in:&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;passwd -e &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;p&gt;as the new shell, type in “&lt;span style="color: rgb(255, 0, 0);"&gt;/bin/tcsh&lt;/span&gt;”. Your default shell has now been changed to the Tenex C-shell; it can do everything bash can.&lt;br /&gt;&lt;/p&gt; &lt;p&gt;Don’t modify root’s SHELL.&lt;/p&gt; &lt;p&gt;type in “&lt;span style="color: rgb(0, 102, 0);"&gt;exit&lt;/span&gt;”&lt;br /&gt;type in “&lt;span style="color: rgb(0, 102, 0);"&gt;exit&lt;/span&gt;” again, then log in.&lt;/p&gt; &lt;p&gt;Create and edit the following files with your preferred text editor:&lt;/p&gt; &lt;blockquote&gt;&lt;p style="color: rgb(0, 102, 0);"&gt;vi /.login&lt;/p&gt;&lt;p&gt;add this line:&lt;/p&gt;&lt;p style="color: rgb(51, 51, 255);"&gt; stty erase ^H&lt;/p&gt; &lt;p&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;vi /.cshrc&lt;/span&gt;&lt;/p&gt;&lt;p&gt;add these lines:&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="color: rgb(51, 51, 255);"&gt; set Resize="/usr/openwin/bin/resize"&lt;/p&gt; &lt;p style="color: rgb(51, 51, 255);"&gt;set autolist&lt;br /&gt;set notify&lt;br /&gt;set correct=cmd&lt;br /&gt;set prompt="[%B%n@%m%b][%B%~%b]&gt; "&lt;br /&gt;set savehist=7000&lt;/p&gt; &lt;p style="color: rgb(51, 51, 255);"&gt;eval "$Resize" -c&lt;/p&gt; &lt;p style="color: rgb(51, 51, 255);"&gt;setenv TERM vt100&lt;br /&gt;setenv PAGER ´less -s´&lt;/p&gt;&lt;/blockquote&gt;Anyways, now your cursor keys and the [BACKSPACE] will always work properly&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-7634191770415312442?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/7634191770415312442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=7634191770415312442&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/7634191770415312442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/7634191770415312442'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/05/solaris-shell-profile.html' title='Solaris Shell Profile'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-6664853416051411662</id><published>2009-05-07T10:38:00.001+02:00</published><updated>2009-05-07T10:40:09.245+02:00</updated><title type='text'>Debian Root-Mail Forwarding</title><content type='html'>In &lt;span style="color: rgb(51, 51, 255);"&gt;/root/.forward&lt;/span&gt; give your email address.&lt;br /&gt;&lt;br /&gt;For forwarding &lt;span style="color: rgb(255, 0, 0);"&gt;www-data&lt;/span&gt; emails to &lt;span style="color: rgb(255, 0, 0);"&gt;root&lt;/span&gt;, open the &lt;span style="color: rgb(51, 51, 255);"&gt;/etc/aliases&lt;/span&gt; and add this line:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;www-data: root&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-6664853416051411662?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/6664853416051411662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=6664853416051411662&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6664853416051411662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6664853416051411662'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/05/debian-root-mail-forwarding.html' title='Debian Root-Mail Forwarding'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-9120061829228698103</id><published>2009-03-25T13:52:00.001+01:00</published><updated>2009-03-25T13:54:23.593+01:00</updated><title type='text'>Debian Lenny Fonts</title><content type='html'>My Fonts in Debain desktop war not correct.&lt;br /&gt;I ran the following command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;dpkg-reconfigure fontconfig-config&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and answer all question with yes.&lt;br /&gt;&lt;br /&gt;Now everything is OK.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-9120061829228698103?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/9120061829228698103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=9120061829228698103&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/9120061829228698103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/9120061829228698103'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/03/debian-lenny-fonts.html' title='Debian Lenny Fonts'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-671839372063148468</id><published>2009-03-09T16:20:00.002+01:00</published><updated>2009-03-09T16:50:00.712+01:00</updated><title type='text'>Remove Permission from User on Public Folder in Exchange Server 2007</title><content type='html'>Run this command from &lt;span style="color: rgb(51, 51, 255);"&gt;ExchangeServerManagerShell&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;Add-PublicFolderClientPermission -Identity \&lt;span style="color: rgb(255, 0, 0);"&gt;FOLDERNAME&lt;/span&gt; -AccessRights  None -User &lt;span style="color: rgb(255, 0, 0);"&gt;USERNAME&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-671839372063148468?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/671839372063148468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=671839372063148468&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/671839372063148468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/671839372063148468'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/03/remove-permission-from-user-on-public.html' title='Remove Permission from User on Public Folder in Exchange Server 2007'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-795483826113897193</id><published>2009-03-05T12:09:00.003+01:00</published><updated>2009-03-05T12:15:42.487+01:00</updated><title type='text'>Let's the image flying</title><content type='html'>Open a web page by IE ( the page must have image) and then in address bar copy and paste this java script:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;:)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-795483826113897193?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/795483826113897193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=795483826113897193&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/795483826113897193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/795483826113897193'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/03/lets-image-flying.html' title='Let&apos;s the image flying'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-717079865614566893</id><published>2009-02-19T12:28:00.002+01:00</published><updated>2009-02-19T12:30:40.914+01:00</updated><title type='text'>Mysql - Minimize Master-Slave Traffic during replication</title><content type='html'>&lt;pre&gt;&lt;span style="font-family: arial;font-size:100%;" &gt;Put to the my.cnf:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: arial;font-size:100%;" &gt; slave_compressed_protocol=ON&lt;/span&gt;&lt;span style="font-family: arial;font-size:100%;" &gt;&lt;br /&gt;&lt;br /&gt;or you can change this value in the run time in mysql with:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255); font-family: arial;font-size:100%;" &gt; SET global slave_compressed_protocol=OFF;&lt;/span&gt;&lt;span style="font-family: arial;font-size:100%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-717079865614566893?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/717079865614566893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=717079865614566893&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/717079865614566893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/717079865614566893'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/02/mysql-minimize-master-slave-traffic.html' title='Mysql - Minimize Master-Slave Traffic during replication'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-8032609910750673485</id><published>2009-02-18T17:17:00.002+01:00</published><updated>2009-02-18T17:18:51.776+01:00</updated><title type='text'>Installing Windows 2000 on eee-PC</title><content type='html'>I have been reading a couple of posts saying how people got the blue screen of death while trying to install Win2k. &lt;br /&gt;&lt;br /&gt;If you don't have win2k sp4, the thing will crash.  I think sp4 has some files that support booting/installing from usb external devices.&lt;br /&gt;&lt;br /&gt;That's it! Please install win2k with sp4!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-8032609910750673485?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/8032609910750673485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=8032609910750673485&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8032609910750673485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8032609910750673485'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/02/installing-windows-2000-on-eee-pc.html' title='Installing Windows 2000 on eee-PC'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-3265081426990882240</id><published>2009-02-11T17:55:00.001+01:00</published><updated>2009-02-11T17:56:52.884+01:00</updated><title type='text'>Ramfs on Ubuntu</title><content type='html'>Make a new folder for mount, for example:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;mkdir /mnt/ramdisk&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;then run this command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;mount -t ramfs RAMDISK /mnt/ramdisk -o maxsize=1024000&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That's all!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-3265081426990882240?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/3265081426990882240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=3265081426990882240&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3265081426990882240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3265081426990882240'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/02/ramfs-on-ubuntu.html' title='Ramfs on Ubuntu'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-4999284323303813268</id><published>2009-02-10T17:50:00.000+01:00</published><updated>2009-02-10T17:52:12.807+01:00</updated><title type='text'>How to reset gnome-panel to default in Ubuntu/GNOME2</title><content type='html'>&lt;code&gt;&lt;/code&gt;Remove&lt;code&gt; &lt;span style="color: rgb(0, 0, 153);"&gt;~/.gconf/apps/panel&lt;/span&gt;&lt;/code&gt; or just move the folder elsewhere if you want to back it up.&lt;br /&gt;&lt;br /&gt;Log out of GNOME, then back in.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-4999284323303813268?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/4999284323303813268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=4999284323303813268&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4999284323303813268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4999284323303813268'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/02/how-to-reset-gnome-panel-to-default-in.html' title='How to reset gnome-panel to default in Ubuntu/GNOME2'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-4200391305120724301</id><published>2009-02-10T12:23:00.002+01:00</published><updated>2009-02-10T12:27:54.813+01:00</updated><title type='text'>MYSQL - Too many connections</title><content type='html'>You might have a user with SUPER privilege.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;grant Super, Processlist on *.* to admin identified by '&lt;span style="color: rgb(255, 0, 0);"&gt;PASSWORD&lt;/span&gt;' ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Connect with that user to Mysql and change the Max_connection variable Online:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;set Global max_connections=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;XXX&lt;/span&gt; &lt;span style="color: rgb(0, 153, 0);"&gt;;&lt;/span&gt; (XXX is a new Value)&lt;br /&gt;&lt;br /&gt;Or you can Kill the process(es) ;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;show processlist ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;Kill &lt;span style="color: rgb(255, 0, 0);"&gt;PROC_NO&lt;/span&gt; ;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-4200391305120724301?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/4200391305120724301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=4200391305120724301&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4200391305120724301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/4200391305120724301'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/02/mysql-too-many-connections.html' title='MYSQL - Too many connections'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-7330236885111768567</id><published>2009-02-05T10:14:00.000+01:00</published><updated>2009-02-05T10:15:42.887+01:00</updated><title type='text'>Activate SSH on VMware Server ESX 3i</title><content type='html'>Boot your ESXi server, wait for it to finish loading, and then do the following:&lt;br /&gt;&lt;p&gt; 1. ALT-F1 to change to the main console.&lt;br /&gt;&lt;/p&gt;&lt;p&gt; 2. Type '&lt;span style="color: rgb(0, 102, 0);"&gt;unsupported&lt;/span&gt;' (you will not be able to see what you're typing).&lt;br /&gt;&lt;/p&gt;&lt;p&gt; 3. When prompted, enter the root user's password.&lt;br /&gt;&lt;/p&gt;&lt;p&gt; 4. Type:  &lt;span style="color: rgb(0, 102, 0);"&gt;vi /etc/inetd.conf&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt; 5. Find the line that begins with #ssh&lt;br /&gt;&lt;/p&gt;&lt;p&gt; 6. Cursor over the first 's' and press the 'i' key (for insert mode)&lt;br /&gt;&lt;/p&gt;&lt;p&gt; 7. Press backspace&lt;br /&gt;&lt;/p&gt;&lt;p&gt; 8. Press ESC&lt;br /&gt;&lt;/p&gt;&lt;p&gt; 9. Type SHIFT+colon (:) and then 'wq!' to write and exit.&lt;br /&gt;&lt;/p&gt;&lt;p&gt; 10. Type '&lt;span style="color: rgb(0, 102, 0);"&gt;ps | grep inetd&lt;/span&gt;' to find the inetd process&lt;br /&gt;&lt;/p&gt;&lt;p&gt; 11. Send the hangup signal to the process ID output from step 10 with:&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;  kill -s HUP &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;pid&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt; 12. You can now SSH into your ESXi server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-7330236885111768567?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/7330236885111768567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=7330236885111768567&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/7330236885111768567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/7330236885111768567'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/02/activate-ssh-on-vmware-server-esx-3i.html' title='Activate SSH on VMware Server ESX 3i'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-526277968980856507</id><published>2009-01-28T12:20:00.002+01:00</published><updated>2009-01-28T12:23:53.314+01:00</updated><title type='text'>Ubuntu Number of Files</title><content type='html'>With help of this command you could find the number of open files by each program:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;lsof -n|grep -oE '^[a-z]+'|sort|uniq -c|sort -n&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This command shows the Resources limitaions and number of fails:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;cat  /proc/user_beancounters&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-526277968980856507?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/526277968980856507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=526277968980856507&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/526277968980856507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/526277968980856507'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/01/ubuntu-number-of-files.html' title='Ubuntu Number of Files'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-5779306773343508398</id><published>2009-01-14T17:54:00.002+01:00</published><updated>2009-01-14T18:04:18.036+01:00</updated><title type='text'>Winscp and ssh user with jail for Website</title><content type='html'>Look at this very useful page:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;http://www.fuschlberger.net/programs/ssh-scp-sftp-chroot-jail&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Download &lt;a style="color: rgb(255, 0, 0);" href="http://www.fuschlberger.net/programs/ssh-scp-sftp-chroot-jail/make_chroot_jail.sh"&gt;&lt;u&gt;make_chroot_jail.sh&lt;/u&gt;&lt;/a&gt; from there,&lt;br /&gt;&lt;br /&gt;and add in the line &lt;span style="color: rgb(0, 0, 153);"&gt;useradd ...&lt;/span&gt; the desired group (e.g.: &lt;span style="color: rgb(0, 0, 153);"&gt;-g www-data&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;Then run script as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:100%;" &gt;./make_chroot_jail.sh &lt;span style="color: rgb(255, 0, 0);"&gt;USERNAME&lt;/span&gt; &lt;span style="color: rgb(0, 0, 153);"&gt;/var/www/vhosts/&lt;span style="color: rgb(255, 0, 0);"&gt;YOURDOMAIN.COM&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;/&lt;/span&gt;.bashrc &lt;span style="color: rgb(0, 0, 153);"&gt;/var/www/vhosts/&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;YOURDOMAIN.COM&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Change the access rights for desired folder(s):&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;chown 775 /var/www/vhosts/&lt;span style="color: rgb(255, 0, 0);"&gt;YOURDOMAIN.COM&lt;/span&gt;/htdocs -R&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That's all!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-5779306773343508398?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/5779306773343508398/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=5779306773343508398&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5779306773343508398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5779306773343508398'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/01/winscp-and-ssh-user-with-jail-for.html' title='Winscp and ssh user with jail for Website'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-3151875748710889472</id><published>2009-01-14T12:50:00.002+01:00</published><updated>2009-01-14T12:58:53.315+01:00</updated><title type='text'>Webpage Password Protection (.htaccess)</title><content type='html'>Edit the &lt;span style="color: rgb(0, 0, 153);"&gt;.htaccess&lt;/span&gt; file and add these lines to it:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;AuthName "&lt;span style="color: rgb(0, 0, 153);"&gt;Member's Area Name&lt;/span&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;AuthUserFile &lt;span style="color: rgb(0, 0, 153);"&gt;/full/path/to/.htpasswd&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;AuthType Basic&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;require valid-user&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Change the file mode:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;chmod 755 .htaccess&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Go to this site &lt;span style="color: rgb(0, 0, 153);"&gt;http://www.kxs.net/support/htaccess_pw.html&lt;/span&gt; and generate your encrypted password.&lt;br /&gt;&lt;br /&gt;Copy and paste it to&lt;span style="color: rgb(0, 0, 153);"&gt; .htpasswd &lt;/span&gt;file (It's recommended that, you create this file in another directory).&lt;br /&gt;&lt;br /&gt;Go to web page, you must give your &lt;span style="color: rgb(255, 0, 0);"&gt;username&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;password&lt;/span&gt; to enter it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-3151875748710889472?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/3151875748710889472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=3151875748710889472&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3151875748710889472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3151875748710889472'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/01/webpage-password-protection-htaccess.html' title='Webpage Password Protection (.htaccess)'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-9123352970052028638</id><published>2009-01-14T12:04:00.007+01:00</published><updated>2009-01-14T16:12:05.104+01:00</updated><title type='text'>Mysql Performance Tuning - 1</title><content type='html'>Command: &lt;span style="color: rgb(0, 102, 0);"&gt;mysqladmin -u root -p extended&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The values making most sense to monitor are:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Slave_running&lt;/span&gt;: If the system is a slave replication server, this is an indication of the slave's health.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Threads_connected&lt;/span&gt;: The number of clients currrently connected. This should be less than some preset value (like 200), but you can also monitor that it is larger than some value to ensure that clients are active.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Threads_running&lt;/span&gt;: If the database is overloaded you'll get an increased number of queries running. That also should be less than some preset value (20?). It is OK to have values over the limit for very short times. Then you can monitor some other values, when the Threads_running was more than the preset value and when it did not fall back in 5 seconds.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Aborted_clients&lt;/span&gt;: The number of clients that were aborted (because they did not properly close the connection to the MySQL server). For some applications this can be OK, but for some other applications you might want to track the value, as aborted connects may indicate some sort of application failure.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Questions&lt;/span&gt;: Number of queries you get per second. Also, it's total queries, not number per second. To get number per second, you must divide Questions by Uptime.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Handler_*&lt;/span&gt;: If you want to monitor low-level database load, these are good values to track. If the value of &lt;span style="color: rgb(255, 0, 0);"&gt;Handler_read_rnd_next&lt;/span&gt; is abnormal relative to the value that you normally would expect, it may indicate some optimization or index problems. &lt;span style="color: rgb(255, 0, 0);"&gt;Handler_rollback&lt;/span&gt; will show the number of queries that have been rolled back. You might want to wish to investigate them.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Opened_tables&lt;/span&gt;: Number of table cache misses. If the value is large, you probably need to increase table_cache. Typically you would want this to be less than 1 or 2 opened tables per second.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Select_full_join&lt;/span&gt;: Joins performed without keys. This should be zero. This is a good way to catch development errors, as just a few such queries can degrease the system's performance.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Select_scan&lt;/span&gt;: Number of queries that performed a full table scan. In some cases these are OK but their ratio to all queries should be constant. if you have the value growing it can be a problem with the optimizer, lack of indexes or some other problem&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Slow_queries&lt;/span&gt;: Number of queries longer than --long-query-time or that are not using indexes. These should be a small fraction of all queries. If it grows, the system will have performance problems.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Threads_created&lt;/span&gt;: This should be low. Higher values may mean that you need to increase the value of thread_cache or you have the amount of connections increasing, which also indicates a potential problem.&lt;br /&gt;&lt;br /&gt;Command: &lt;span style="color: rgb(0, 102, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;mysqladmin -u root -p processlist&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;You can get the number of threads connected and running by using other statistics, but this is a good way to check how long queries that are running take. If there are some very long-running queries (e.g. due to being badly formulated) the admin should be informed. You might also want to check how many queries are in "Locked" state - these are not counted as running but are inactive, i.e. a user is waiting on the database to respond.&lt;br /&gt;&lt;br /&gt;Command: &lt;span style="color: rgb(0, 102, 0);"&gt;mysql -u root -p -e "SHOW INNODB STATUS"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This statement produces a great deal of information, from which you should extract the parts in which you are interested. The first thing you need to check is: "Per second averages calculated from the last xx seconds". InnoDB rounds stats each minute.&lt;p&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Pending normal aio reads&lt;/span&gt;: These are InnoDB IO request queue sizes. If they are bigger than 10-20 you might have some bottleneck.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;reads/s, avg bytes/read, writes/s, fsyncs/s&lt;/span&gt;: These are IO statistics. Large values for reads/writes means the IO subsystem is being loaded. Proper values for these depend on your system configuration.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Buffer pool hit rate&lt;/span&gt;: The hit rate also depends a lot on your application. Check your hit rate, when there are problems.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;inserts/s, updates/s, deletes/s, reads/s&lt;/span&gt;: These are low level row operations that InnoDB does. You might use these to check your load if it is in expected range.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You can examine the state of the cache from the mysql command line:&lt;/p&gt; &lt;div class="codeblock"&gt;&lt;code&gt;mysql&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;show status like 'qcache%';&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;+-------------------------+----------+&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;| Variable_name           | Value    |&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;+-------------------------+----------+&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;| Qcache_free_blocks      | 9990     |&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;| Qcache_free_memory      | &lt;span style="color: rgb(255, 0, 0);"&gt;34431360&lt;/span&gt; |&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;| Qcache_hits             | &lt;span style="color: rgb(255, 0, 0);"&gt;2165383&lt;/span&gt;  |&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;| Qcache_inserts          | 461500   |&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;| Qcache_lowmem_prunes    | &lt;span style="color: rgb(255, 0, 0);"&gt;113692&lt;/span&gt;   |&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;| Qcache_not_cached       | 1894     |&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;| Qcache_queries_in_cache | 28203    |&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;| Qcache_total_blocks     | 66628    |&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;+-------------------------+----------+&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;8 rows in set (0.00 sec)&lt;/span&gt;&lt;/code&gt;&lt;/div&gt; &lt;p&gt;Here we can see that there have been 2 million cache hits and that about half of the allocated cache is still available (free_memory). The cache has been flushed (lowmem_prunes), so it might be useful to increase the value of cache_size in my.cnf slightly.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-9123352970052028638?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/9123352970052028638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=9123352970052028638&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/9123352970052028638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/9123352970052028638'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/01/mysql-performance-tuning.html' title='Mysql Performance Tuning - 1'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-5288883385540073038</id><published>2009-01-13T15:43:00.001+01:00</published><updated>2009-01-13T15:44:50.282+01:00</updated><title type='text'>Change Crontab Editor</title><content type='html'>Temporary:&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;env EDITOR=vim crontab -e&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Permanently:&lt;br /&gt;&lt;br /&gt;add this line in &lt;span style="color: rgb(255, 0, 0);"&gt;~/.bashrc&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;export EDITOR=vim&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-5288883385540073038?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/5288883385540073038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=5288883385540073038&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5288883385540073038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5288883385540073038'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/01/change-crontab-editor.html' title='Change Crontab Editor'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-3278294976395731299</id><published>2009-01-13T10:07:00.017+01:00</published><updated>2009-01-14T16:28:57.286+01:00</updated><title type='text'>Apache Tuning</title><content type='html'>Links:&lt;br /&gt;&lt;br /&gt;(Apache)&lt;br /&gt;http://phplens.com/phpeverywhere/tuning-apache-php&lt;br /&gt;http://httpd.apache.org/docs/1.3/misc/perf-tuning.html&lt;br /&gt;http://perl.apache.org/docs/1.0/guide/performance.html#the_crashme_Script&lt;br /&gt;http://tldp.org/LDP/LGNET/123/vishnu.html&lt;br /&gt;http://www.perlcode.org/tutorials/apache/tuning.html&lt;br /&gt;http://drupal.org/node/215516&lt;br /&gt;&lt;br /&gt;(PHP)&lt;br /&gt;http://phplens.com/lens/php-book/optimizing-debugging-php.php&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;&lt;p&gt;Apache is configured using the httpd.conf file. The following parameters are    particularly important in configuring child processes: &lt;/p&gt; &lt;/span&gt;  &lt;table style="width: 458px; height: 1040px;" border="1" cellpadding="7" cellspacing="1"&gt;   &lt;tbody&gt;&lt;tr&gt;      &lt;td valign="top" width="21%"&gt; &lt;b&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;        &lt;/span&gt;&lt;/b&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;&lt;span style="font-size:100%;"&gt;Directive&lt;/span&gt;       &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="13%"&gt; &lt;b&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;/b&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;Default       &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="65%"&gt; &lt;b&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;/b&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;Description       &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;      &lt;td valign="top" width="21%"&gt; &lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;        &lt;/span&gt;&lt;p&gt;&lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;&lt;span style="font-size:100%;"&gt;MaxClients&lt;/span&gt;       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="13%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;256       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="65%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;The maximum number of child processes to create. The default means that          up to 256 HTTP requests can be handled concurrently. Any further connection          requests are queued.       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;      &lt;td valign="top" width="21%"&gt; &lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;        &lt;/span&gt;&lt;p&gt;&lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;&lt;span style="font-size:100%;"&gt;StartServers&lt;/span&gt;       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="13%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;5       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="65%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;The number of child processes to create on startup.       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;      &lt;td valign="top" width="21%"&gt; &lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;        &lt;/span&gt;&lt;p&gt;&lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;&lt;span style="font-size:100%;"&gt;MinSpareServers&lt;/span&gt;       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="13%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;5       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="65%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;The number of idle child processes that should be created. If the number          of idle child processes falls to less than this number, 1 child is created          initially, then 2 after another second, then 4 after another second, and          so forth till 32 children are created per second.       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;      &lt;td valign="top" width="21%"&gt; &lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;        &lt;/span&gt;&lt;p&gt;&lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;&lt;span style="font-size:100%;"&gt;MaxSpareServers&lt;/span&gt;       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="13%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;10       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="65%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;If more than this number of child processes are alive, then these extra          processes will be terminated.       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;      &lt;td valign="top" width="21%"&gt; &lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;        &lt;p&gt;&lt;span style="font-size:100%;"&gt;MaxRequestsPerChild &lt;/span&gt;&lt;/p&gt;       &lt;/span&gt;&lt;/td&gt;     &lt;td valign="top" width="13%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;0       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="65%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;Sets the number of HTTP requests a child can handle before terminating.          Setting to 0 means never terminate. Set this to a value to between 100          to 10000 if you suspect memory leaks are occurring, or to free under-utilized          resources.       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;   &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;span style="font-family:Courier New,Courier,Monaco;"&gt; &lt;p&gt;For large sites, values close to the following might be better:&lt;/p&gt; &lt;/span&gt;&lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;MinSpareServers 32 &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:100%;"&gt;MaxSpareServers 64&lt;/span&gt;&lt;/p&gt; &lt;/span&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt; &lt;p&gt;Apache on Windows behaves differently. Instead of using child processes, Apache uses threads. The above parameters are not used. Instead we have one parameter: &lt;i&gt;ThreadsPerChild&lt;/i&gt; which defaults to 50. This parameter sets the number of threads that can be spawned by Apache. As there is only one child process in the Windows version, the default setting of 50 means only 50 concurrent HTTP requests can be handled. For web servers experiencing higher traffic, increase this value to between 256 to 1024.&lt;/p&gt; &lt;p&gt;Other useful performance parameters you can change include:&lt;/p&gt;&lt;/span&gt; &lt;table style="width: 473px; height: 1715px;" border="1" cellpadding="7" cellspacing="1"&gt;   &lt;tbody&gt;&lt;tr&gt;      &lt;td valign="top" width="21%"&gt; &lt;b&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;        &lt;/span&gt;&lt;/b&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;&lt;span style="font-size:100%;"&gt;Directive&lt;/span&gt;       &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="14%"&gt; &lt;b&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;/b&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;Default       &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="65%"&gt; &lt;b&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;/b&gt;&lt;p&gt;&lt;b&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;Description       &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;      &lt;td valign="top" width="21%"&gt; &lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;        &lt;/span&gt;&lt;p&gt;&lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;&lt;span style="font-size:100%;"&gt;SendBufferSize&lt;/span&gt;       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="14%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;Set to OS default       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="65%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;Determines the size of the output buffer (in bytes) used in TCP/IP connections.          This is primarily useful for congested or slow networks when packets need          to be buffered; you then set this parameter close to the size of the largest          file normally downloaded. One TCP/IP buffer will be created per client          connection.       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;      &lt;td valign="top" width="21%"&gt; &lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;        &lt;p&gt;&lt;span style="font-size:100%;"&gt;KeepAlive [on|off]&lt;/span&gt;&lt;/p&gt;       &lt;/span&gt;&lt;/td&gt;     &lt;td valign="top" width="14%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;On       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="65%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;In the original HTTP specification, every HTTP request had to establish          a separate connection to the server. To reduce the overhead of frequent          connects, the keep-alive header was developed. Keep-alives tells the server          to reuse the same socket connection for multiple HTTP requests.&lt;/span&gt;&lt;/p&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;      &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;If a separate dedicated web server serves all images, you can disable          this option. This technique can substantially improve resource utilization.       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;      &lt;td valign="top" width="21%"&gt; &lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;        &lt;p&gt;&lt;span style="font-size:100%;"&gt;KeepAliveTimeout &lt;/span&gt;&lt;/p&gt;       &lt;/span&gt;&lt;/td&gt;     &lt;td valign="top" width="14%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;15       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="65%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;The number of seconds to keep the socket connection alive. This time          includes the generation of content by the server and acknowledgements          by the client. If the client does not respond in time, it must make a          new connection.&lt;/span&gt;&lt;/p&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;      &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;This value should be kept low as the socket will be idle for extended          periods otherwise.        &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;      &lt;td valign="top" width="21%"&gt; &lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;        &lt;p&gt;&lt;span style="font-size:100%;"&gt;MaxKeepAliveRequests &lt;/span&gt;&lt;/p&gt;       &lt;/span&gt;&lt;/td&gt;     &lt;td valign="top" width="14%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;100       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="65%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;p&gt;Socket connections will be terminated when the number of requests set          by MaxKeepAliveRequests is reached. Keep this to a high value below MaxClients          or ThreadsPerChild.&lt;/p&gt;       &lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;      &lt;td valign="top" width="21%"&gt; &lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;        &lt;p&gt;&lt;span style="font-size:100%;"&gt;TimeOut &lt;/span&gt;&lt;/p&gt;       &lt;/span&gt;&lt;/td&gt;     &lt;td valign="top" width="14%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;300       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="65%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;Disconnect when idle time exceeds this value. You can set this value          lower if your clients have low latencies.       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;      &lt;td valign="top" width="21%"&gt; &lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;        &lt;/span&gt;&lt;p&gt;&lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt;&lt;span style="font-size:100%;"&gt;LimitRequestBody &lt;/span&gt;       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="14%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;0       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;     &lt;td valign="top" width="65%"&gt; &lt;span style="font-family:Courier New,Courier,Monaco;"&gt;       &lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;Maximum size of a PUT or POST. O means there is no limit.       &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;   &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;span style="font-family:Courier New,Courier,Monaco;"&gt; &lt;p&gt;If you do not require DNS lookups and you are not using the htaccess file to configure Apache settings for individual directories you can set:&lt;/p&gt; &lt;/span&gt;&lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;# disable DNS lookups: PHP scripts only get the IP address&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;HostnameLookups &lt;b&gt;off &lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;# disable htaccess checks&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;directory&gt; &lt;/directory&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt; AllowOverride &lt;b&gt;none &lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;/span&gt;&lt;span style="font-family:Courier New,Courier,Monaco;"&gt;&lt;p&gt;If you are not worried about the directory security when accessing symbolic links, turn on FollowSymLinks and turn off SymLinksIfOwnerMatch to prevent additional lstat() system calls from being made: &lt;/p&gt; &lt;/span&gt;&lt;span style=";font-family:Courier New,Courier,Monaco;font-size:78%;"  &gt; &lt;p&gt; &lt;span style="font-size:85%;"&gt;Options FollowSymLinks &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt; #Options SymLinksIfOwnerMatch&lt;/span&gt;&lt;/p&gt; &lt;/span&gt;&lt;br /&gt;MaxClients:&lt;br /&gt;&lt;br /&gt;You can, and should, control the &lt;code&gt;MaxClients&lt;/code&gt;     setting so that your server does not spawn so many children it starts     swapping. The procedure for doing this is simple: determine the size of     your average Apache process, by looking at your process list via a tool     such as &lt;code&gt;top&lt;/code&gt;, and divide this into your total available     memory, leaving some room for other processes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;MaxRequestsPerChild:&lt;br /&gt;&lt;br /&gt;when using PHP's persistent database connections: don't set &lt;i&gt;MaxRequestsPerChild &lt;/i&gt;too high so idle resources are released quickly&lt;br /&gt;&lt;br /&gt;Tools:&lt;br /&gt;&lt;br /&gt;http://2bits.com/articles/tools-for-performance-tuning-and-optimization.html&lt;br /&gt;&lt;br /&gt;HTTPERF:&lt;br /&gt;ftp://ftp.hpl.hp.com/pub/httperf/&lt;br /&gt;&lt;br /&gt;ab (Apache Benchmark)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PHP:&lt;br /&gt;&lt;br /&gt;Enable the compression of HTML by putting in your php.ini: &lt;p&gt;   &lt;code&gt; output_handler = ob_gzhandler&lt;/code&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-3278294976395731299?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/3278294976395731299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=3278294976395731299&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3278294976395731299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3278294976395731299'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/01/apache-tuning.html' title='Apache Tuning'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-9189581255801007127</id><published>2009-01-06T16:00:00.003+01:00</published><updated>2009-01-07T10:24:20.493+01:00</updated><title type='text'>Mysql Multiple Instance</title><content type='html'>Add &lt;span style="color: rgb(204, 0, 0);"&gt;mysqld_admin&lt;/span&gt; part in &lt;span style="color: rgb(0, 0, 153);"&gt;/etc/mysql/my.cnf&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;[mysqld_multi]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;mysqld         = /usr/bin/mysqld_safe&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;mysqladmin = /usr/bin/mysqladmin&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;user             = multi_admin&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;password    = multi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Add new instance parameters:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;[mysqld3]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;socket          = /var/run/mysqld/mysql3.sock&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;port              = 3308&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;pid-file         = /var/run/mysqld/mysql3.pid&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;datadir        = /var/lib/mysql/data3&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;language     = /usr/share/mysql/english&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;server-id      = 5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Build new Data directory:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;mysql_install_db --user=mysql --ldata=&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/var/lib/mysql/data3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Restart mysql server:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/etc/init.d/mysql restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Start new instance:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;mysqld_multi start 3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Check that is runing:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;mysqld_multi report 3&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Set the root password for new instance:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;mysqladmin -uroot password "NEWPASSWORD" -S /var/run/mysqld/mysql3.sock&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Check new instance is available:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;mysql -uroot -p -S /var/run/mysqld/mysql3.sock&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-9189581255801007127?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/9189581255801007127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=9189581255801007127&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/9189581255801007127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/9189581255801007127'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2009/01/mysql-multiple-instance.html' title='Mysql Multiple Instance'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-2766233031277149596</id><published>2008-12-31T12:38:00.002+01:00</published><updated>2008-12-31T12:51:01.339+01:00</updated><title type='text'>Change RAMDISK size in Debian</title><content type='html'>Edit &lt;span style="color: rgb(0, 0, 153);"&gt;/boot/grub/menu.lst&lt;/span&gt; (or grub.conf or lilo.conf) and add ramdisk_size=512000 to this line:&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;kernel      /vmlinuz root=/dev/md1 ro  console=tty0 console=ttyS0,57600&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;kernel      /vmlinuz root=/dev/md1 ro &lt;span style="color: rgb(0, 0, 153);"&gt;ramdisk_size=512000&lt;/span&gt; console=tty0 console=ttyS0,57600&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;it defines 512 MB Ramdisk.&lt;br /&gt;&lt;br /&gt;Reboot system.&lt;br /&gt;&lt;br /&gt;To create an ext2fs file system, the following command is used :&lt;br /&gt;&lt;br /&gt;&lt;b style="color: rgb(0, 102, 0);"&gt;mke2fs -m 0 /dev/ram0&lt;/b&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;The -m 0 option keeps mke2fs from reserving any space on the file system for the root user. This makes the complete ramdisk space available to any regular user.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;To mount the ramdisk :&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;mkdir /mnt/RAMDISK&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;mount /dev/ram0 /mnt/RAMDISK&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Run mount to check whether the RAMDISK has been mounted.&lt;br /&gt;Now the RAMDISK can be used as a regular directory. You can read, write, delete and modify files on the RAMDISK as if you are working on a regular hard disk. Linux would handle it as if it were handling a regular directory on the disk. The difference between RAMDISK and normal DISK would be invisible to a regular user.&lt;br /&gt;&lt;br /&gt;The only problem is that if the system is either rebooted or crashes. In that case, all data in the RAMDISK is lost. You will need to recreate the RAMDISK and redo all that has been done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-2766233031277149596?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/2766233031277149596/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=2766233031277149596&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/2766233031277149596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/2766233031277149596'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/12/change-ramdisk-size-in-debian.html' title='Change RAMDISK size in Debian'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-1237729696766740871</id><published>2008-11-26T14:44:00.002+01:00</published><updated>2008-11-26T14:46:18.478+01:00</updated><title type='text'>Keyboard problem in VMware under Ubuntu 8.10</title><content type='html'>In VMWARE Server on my fresh install of &lt;span id="high_2" class="searchterm2"&gt;Ubuntu&lt;/span&gt; 8.10,after powering on a Windows XP vm, I realized that I could not use the some keys properly. On hitting the left arrow key, start menu was being displayed and other arrow keys had similar issues. Also, using &lt;span class="searchterm3"&gt;VMware&lt;/span&gt; player was completely impossible as ctrl-alt-del wasn’t working.&lt;p&gt;To fix this issue, you simply need to run the following command,&lt;/p&gt; &lt;p style="font-weight: bold; color: rgb(0, 102, 0);"&gt;&lt;code&gt;echo 'xkeymap.nokeycodeMap = true' &gt; /etc/&lt;span class="searchterm3"&gt;vmware&lt;/span&gt;/config&lt;/code&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-1237729696766740871?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/1237729696766740871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=1237729696766740871&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1237729696766740871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1237729696766740871'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/11/keyboard-problem-in-vmware-under-ubuntu.html' title='Keyboard problem in VMware under Ubuntu 8.10'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-135046825124855537</id><published>2008-11-13T15:27:00.014+01:00</published><updated>2009-01-14T10:35:19.993+01:00</updated><title type='text'>Install Mysql Activity Report on Ubuntu</title><content type='html'>Install these two packages:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get install librrd2-dev libmysqlclient15-dev&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Download the Mysql Report Activity:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;wget &lt;/span&gt;&lt;a style="color: rgb(0, 102, 0);" href="http://freshmeat.net/redir/mysqlard/48776/url_tgz/mysqlard-1.0.0.tar.gz" target="_blank"&gt;http://freshmeat.net/redir/mysqlard/...d-1.0.0.tar.gz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;tar -xvzf mysqlard-1.0.0.tar.gz&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;cd mysqlard-1.0.0       &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;./configure&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;make&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;make install&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Edit &lt;span style="color: rgb(255, 0, 0);"&gt;/usr/local/share/mysqlard/mysqlar.php&lt;/span&gt; and change &lt;span style="color: rgb(255, 0, 0);"&gt;username&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;password&lt;/span&gt; for your Mysql Database.&lt;br /&gt;&lt;br /&gt;Give access right to &lt;span style="color: rgb(255, 0, 0);"&gt;www-data&lt;/span&gt; user for vim&lt;span style="color: rgb(255, 0, 0);"&gt; /usr/local/share/mysqlard/&lt;/span&gt; :&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;chown www-data.www-data /usr/local/share/mysqlard/mysqlar.php&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Add the alias to apache config file ( I added a new conf file in&lt;span style="color: rgb(255, 0, 0);"&gt; /etc/apache2/conf.d/ &lt;/span&gt;):&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;vim /etc/apache2/conf.d/mysqlard.conf&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and add these lines to it:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Alias /mysqlard /usr/local/share/mysqlard&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;"Directory /usr/local/share/mysqlard"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;php_flag register_globals off&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;     Options Indexes FollowSymLinks&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;"IfModule mod_dir.c"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;            DirectoryIndex mysqlard.php&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;     "/IfModule"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;br /&gt;"/Directory"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(change "" with &lt;&gt;).&lt;br /&gt;&lt;br /&gt;Create a user in MYSQL:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;GRANT USAGE ON *.* TO mysqlar@localhost;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and then change the user in mysqlar.php.&lt;br /&gt;&lt;br /&gt;Check too all paths in these files:&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;mysqlard.server&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;mysqlard.cnf&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;mysqlard_graph &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Copy the following files in appropriate crontab folders:&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;mysqlar.daily&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;mysqlar.weekly&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;mysqlar.monthly&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You need to add a cron job to generate the graphs. For example : &lt;pre style="color: rgb(0, 0, 153);"&gt;&lt;span style="font-size:100%;"&gt;*/5 * * * * root hourly=1 daily=1 weekly=1 monthly=1\&lt;br /&gt;/usr/bin/mysqlar_graph &gt; /dev/null&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;Restart &lt;span style="color: rgb(255, 0, 0);"&gt;apache2 &lt;/span&gt;service:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;/etc/init.d/apache2 restart&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can access Mysql Activity Report with following url:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;http://localhost/mysqlard/mysqlar.php&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-135046825124855537?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/135046825124855537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=135046825124855537&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/135046825124855537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/135046825124855537'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/11/install-mysql-activity-report-on-ubuntu.html' title='Install Mysql Activity Report on Ubuntu'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-2554687447473960520</id><published>2008-11-13T13:10:00.007+01:00</published><updated>2008-11-13T13:20:23.534+01:00</updated><title type='text'>Apache Server Status</title><content type='html'>&lt;p&gt;The Status module allows a server administrator to find out     how well their server is performing. A HTML page is presented     that gives the current server statistics in an easily readable     form. If required this page can be made to automatically     refresh (given a compatible browser). Another page gives a     simple machine-readable list of the current server state.&lt;/p&gt;      &lt;p&gt;The details given are:&lt;/p&gt;      &lt;ul&gt;&lt;li&gt;The number of worker serving requests&lt;/li&gt;&lt;li&gt;The number of idle worker&lt;/li&gt;&lt;li&gt;The status of each worker, the number of requests that       worker has performed and the total number of bytes served by       the worker (*)&lt;/li&gt;&lt;li&gt;A total number of accesses and byte count served (*)&lt;/li&gt;&lt;li&gt;The time the server was started/restarted and the time it       has been running for&lt;/li&gt;&lt;li&gt;Averages giving the number of requests per second, the       number of bytes served per second and the average number of       bytes per request (*)&lt;/li&gt;&lt;li&gt;The current percentage CPU used by each worker and in       total by Apache (*)&lt;/li&gt;&lt;li&gt;The current hosts and requests being processed (*)&lt;/li&gt;&lt;/ul&gt;The lines marked "(*)" are only available if      &lt;code class="directive"&gt;&lt;a href="http://httpd.apache.org/docs/2.0/mod/mod_status.html#extendedstatus"&gt;ExtendedStatus&lt;/a&gt;&lt;/code&gt;      is &lt;code&gt;On&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;To enable status reports only for browsers from the&lt;span style="color: rgb(255, 0, 0);"&gt; foo.com&lt;/span&gt;     domain add this code to your &lt;span style="color: rgb(255, 0, 0);font-family:monospace;" &gt;/etc/apache2/apache2&lt;/span&gt;&lt;code style="color: rgb(255, 0, 0);"&gt;conf&lt;/code&gt;     configuration file:&lt;/p&gt; &lt;div class="example"&gt;&lt;p&gt;&lt;code&gt;"&lt;/code&gt;&lt;code style="color: rgb(0, 0, 153);"&gt;Location /server-status&lt;/code&gt;"&lt;br /&gt;&lt;code&gt;&lt;location&gt;     &lt;span style="color: rgb(0, 0, 153);"&gt;SetHandler server-status&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;     Order Deny,Allow&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;     Deny from all&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;     Allow from &lt;span style="color: rgb(255, 0, 0);"&gt;foo.com&lt;/span&gt;&lt;/span&gt;&lt;/location&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;location&gt;"&lt;/location&gt;&lt;/code&gt;&lt;code style="color: rgb(0, 0, 153);"&gt;/Location&lt;/code&gt;&lt;code&gt;&lt;location&gt;"&lt;br /&gt;&lt;/location&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;location&gt;   &lt;/location&gt;(change " with &lt;&gt;) &lt;/code&gt;&lt;/p&gt;&lt;p&gt;You can now access server statistics by using a Web browser     to access the page     &lt;code style="color: rgb(255, 0, 0);"&gt;http://your.server.name/server-status&lt;/code&gt;&lt;/p&gt;&lt;p&gt;You can get the status page to update itself automatically if     you have a browser that supports "refresh". Access the page     &lt;code&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;http://your.server.name/server-status?refresh=&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;N&lt;/span&gt;&lt;/code&gt; to     refresh the page every N seconds.&lt;/p&gt;&lt;p&gt;A machine-readable version of the status file is available by     accessing the page     &lt;code style="color: rgb(255, 0, 0);"&gt;http://your.server.name/server-status?auto&lt;/code&gt;. This     is useful when automatically run, see the Perl program in the     &lt;code style="color: rgb(51, 51, 255);"&gt;/support&lt;/code&gt; directory of Apache,&lt;span style="color: rgb(255, 0, 0);"&gt;     &lt;/span&gt;&lt;code style="color: rgb(255, 0, 0);"&gt;log_server_status&lt;/code&gt;.&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-2554687447473960520?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/2554687447473960520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=2554687447473960520&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/2554687447473960520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/2554687447473960520'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/11/apache-server-status.html' title='Apache Server Status'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-598666346411335366</id><published>2008-11-12T13:01:00.000+01:00</published><updated>2008-11-12T13:05:50.256+01:00</updated><title type='text'>Mount a remote folder in Ubuntu</title><content type='html'>&lt;b&gt;SSHFS&lt;/b&gt; (&lt;b&gt;Secure SHell FileSystem&lt;/b&gt;) is a file system &lt;span style="text-decoration: underline;"&gt;&lt;/span&gt; for &lt;span style="text-decoration: underline;"&gt;Linux&lt;/span&gt; capable of operating on files on a remote computer.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get install sshfs&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;(Remote host must run the ssh daemon)&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;span style="font-family: monospace;"&gt;&lt;br /&gt;&lt;/span&gt;sshfs&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;remoteuser&lt;span style="color: rgb(0, 0, 0);"&gt;@&lt;/span&gt;remotehost&lt;/span&gt;:&lt;span style="color: rgb(0, 0, 153);"&gt;/path/to/remote_dir&lt;/span&gt; &lt;span style="color: rgb(0, 0, 153);"&gt;local_mountpoint&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-598666346411335366?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/598666346411335366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=598666346411335366&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/598666346411335366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/598666346411335366'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/11/mount-remote-folder-in-ubuntu.html' title='Mount a remote folder in Ubuntu'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-5874105502343113096</id><published>2008-11-06T15:06:00.000+01:00</published><updated>2008-11-06T15:19:27.353+01:00</updated><title type='text'>Zoneminder in Ubuntu</title><content type='html'>In Ubuntu run:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get install zoneminder&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get -f install&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;modprobe -r zc0301&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;modprobe -r gspca&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;modprobe gspca&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;add this line to &lt;span style="color: rgb(0, 0, 153);"&gt;/etc/modprobe.d/blacklist&lt;/span&gt;:&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;blacklist zc0301&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Give access right to Video Devices:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;chmod 777 /dev/video(x)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-5874105502343113096?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/5874105502343113096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=5874105502343113096&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5874105502343113096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5874105502343113096'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/11/zoneminder-in-ubuntu.html' title='Zoneminder in Ubuntu'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-401909092623033976</id><published>2008-10-23T14:54:00.000+02:00</published><updated>2008-10-23T14:58:01.170+02:00</updated><title type='text'>MySQL Tuning</title><content type='html'>These are two perl scripts that help to tune the MySQL Database:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.day32.com/MySQL/tuning-primer.sh"&gt;tuning-primer.sh&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://tools.assembla.com/svn/mysqltuner/"&gt;mysql-tuner.pl&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-401909092623033976?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/401909092623033976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=401909092623033976&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/401909092623033976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/401909092623033976'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/10/mysql-tuning.html' title='MySQL Tuning'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-5772349451530947622</id><published>2008-10-17T13:37:00.000+02:00</published><updated>2008-10-17T13:41:02.824+02:00</updated><title type='text'>Enable SSH in VMware ESX 3.x</title><content type='html'>&lt;p class="style1"&gt;ESXi 3.5 does ship with the ability to run SSH, but this is disabled by default (and is not supported). If you just need to access the console of ESXi, then you only need to perform steps 1 - 3.&lt;/p&gt; &lt;p class="style1"&gt;1) At the console of the ESXi host, press ALT-F1 to access the console window.&lt;br /&gt;&lt;/p&gt;&lt;p class="style1"&gt;2) Enter &lt;strong style="font-weight: bold; color: rgb(0, 102, 0);"&gt;unsupported&lt;/strong&gt; in the console and then press &lt;span style="color: rgb(204, 0, 0);"&gt;Enter&lt;/span&gt;. You will not see the text you type in.&lt;br /&gt;&lt;/p&gt;&lt;p class="style1"&gt;3) If you typed in unsupported correctly, you will see the Tech Support Mode warning and a password prompt. Enter the password for the root login.&lt;br /&gt;  &lt;/p&gt;&lt;p class="style1"&gt;4) You should then see the prompt of ~ #.&lt;br /&gt;&lt;/p&gt;&lt;p class="style1"&gt;Edit the file &lt;span style="color: rgb(204, 0, 0);"&gt;inetd.conf &lt;/span&gt;(enter the command &lt;strong style="color: rgb(0, 102, 0);"&gt;vim /etc/inetd.conf&lt;/strong&gt;).&lt;br /&gt;&lt;/p&gt;&lt;p class="style1"&gt; 5) Find the line that begins with &lt;span style="color: rgb(0, 0, 153);"&gt;#ssh&lt;/span&gt; and remove the #. Then save the file.&lt;/p&gt;&lt;p class="style1"&gt; 6) Once you've closed the vi editor, run the command &lt;strong&gt;/sbin/services.sh restart&lt;/strong&gt; to restart the management services. You'll now be able to connect to the ESXi host with a SSH client.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-5772349451530947622?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/5772349451530947622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=5772349451530947622&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5772349451530947622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5772349451530947622'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/10/enable-ssh-in-vmware-esx-3x.html' title='Enable SSH in VMware ESX 3.x'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-6564278465979048676</id><published>2008-09-22T10:35:00.000+02:00</published><updated>2008-09-22T10:38:14.934+02:00</updated><title type='text'>Disable Beep in Ubuntu Hardy</title><content type='html'>&lt;p&gt;Open the file /etc/modprobe.d/blacklist as root in a text editor:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;code style="color: rgb(0, 102, 0);"&gt;vim /etc/modprobe.d/blacklist&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Add this line to the end of the file:&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;p style="color: rgb(51, 51, 255);"&gt;&lt;code&gt;blacklist pcspkr&lt;/code&gt;&lt;/p&gt; &lt;p&gt;The next time Ubuntu boots up pcspkr will be blocked from loading and you will no longer hear the beep. Peace and quiet at last! &lt;/p&gt; &lt;p&gt;But if you only need a temporary solution to disable the beep, just run this command (as root):&lt;br /&gt;&lt;code&gt;&lt;strike&gt;&lt;/strike&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; modprobe -r pcspkr&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-6564278465979048676?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/6564278465979048676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=6564278465979048676&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6564278465979048676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6564278465979048676'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/09/disable-beep-in-ubuntu-hardy.html' title='Disable Beep in Ubuntu Hardy'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-9195979106569147909</id><published>2008-09-18T17:38:00.000+02:00</published><updated>2008-09-18T17:40:51.896+02:00</updated><title type='text'>Make Hostname permanent in Strato - Debian</title><content type='html'>Chnage this line in file &lt;span style="color: rgb(255, 0, 0);"&gt;/etc/hostname.sh&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt; [ -f /etc/hostname ] &amp;amp;&amp;amp; HOSTNAME="$(cat /etc/hostname)"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to:&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt; [ -f /etc/hostname ] &amp;amp;&amp;amp; HOSTNAME="&lt;span style="color: rgb(255, 0, 0);"&gt;YOURHOSTNAME&lt;/span&gt;"&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-9195979106569147909?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/9195979106569147909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=9195979106569147909&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/9195979106569147909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/9195979106569147909'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/09/make-hostname-permanent-in-strato.html' title='Make Hostname permanent in Strato - Debian'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-2741312334133313492</id><published>2008-09-15T11:30:00.000+02:00</published><updated>2008-09-15T11:34:58.494+02:00</updated><title type='text'>Setting POP3 Connector &amp; email server</title><content type='html'>Download and install these two patches from Microsoft:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=7B1FF109-092E-4418-AA37-A53AF7B8F6FC&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyId=7B1FF109-092E-4418-AA37-A53AF7B8F6FC&amp;amp;displaylang=en&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=206e4e32-1e37-4836-b4f7-8d6a543a7c7f&amp;amp;DisplayLang=en"&gt;&lt;span style="font-family:Tahoma;font-size:85%;"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=206e4e32-1e37-4836-b4f7-8d6a543a7c7f&amp;amp;DisplayLang=en&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Follow this link:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.msexchange.org/tutorials/Configuring-Incoming-Outgoing-Email-Windows-Small-Business-Server-2003.html"&gt;http://www.msexchange.org/tutorials/Configuring-Incoming-Outgoing-Email-Windows-Small-Business-Server-2003.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-2741312334133313492?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/2741312334133313492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=2741312334133313492&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/2741312334133313492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/2741312334133313492'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/09/setting-pop3-connector-email-server.html' title='Setting POP3 Connector &amp; email server'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-3554891226202298394</id><published>2008-08-29T16:12:00.000+02:00</published><updated>2008-08-29T16:27:20.123+02:00</updated><title type='text'>Enable HTTPS in Debian</title><content type='html'>install this package:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;apt-get install libapache-mod-ssl&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Enable ssl mode in Apache:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;a2enmod ssl&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;add port 443 in /etc/apache2/ports.conf:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Listen 443&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Make certificate (after run this command you must answer some questions):&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;add these lines to&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;/etc/apache2/sites-available/YOURSERVER.COM.conf&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;virtualhost&gt;&lt;/virtualhost&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;VirtualHost *:443&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;. . . &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;    SSLEngine On&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;    SSLCertificateFile /etc/apache2/ssl/apache.pem&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;    . . . &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&gt;/VirtualHost&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;restart Apache2.&lt;br /&gt;&lt;br /&gt;To redirect HTTP to HTTPS add these lines to&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;/etc/apache2/sites-available/YOURSERVER.COM.conf&lt;/span&gt; under 443 options:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;    RewriteEngine   on&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;    RewriteCond     %{SERVER_PORT} ^80$&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;    RewriteRule     ^(.*)$ https://%{SERVER_NAME}$1 [L,R]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;    RewriteLog      "/var/log/apache2/rewrite.log"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;    RewriteLogLevel 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and restart Apache2 again!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-3554891226202298394?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/3554891226202298394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=3554891226202298394&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3554891226202298394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3554891226202298394'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/08/enable-https-in-debian.html' title='Enable HTTPS in Debian'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-1149309128238301804</id><published>2008-08-29T16:08:00.000+02:00</published><updated>2008-08-29T16:11:17.471+02:00</updated><title type='text'>ftp user in a jail</title><content type='html'>Edit vsftpd configuration file - &lt;span style="color: rgb(255, 0, 0);"&gt;/etc/vsftpd/vsftpd.conf &lt;/span&gt;and&lt;br /&gt;&lt;br /&gt;make sure following line exists (and uncommented):&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;chroot_local_user=YES&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;Save and close the file. Restart vsftpd.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-1149309128238301804?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/1149309128238301804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=1149309128238301804&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1149309128238301804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1149309128238301804'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/08/ftp-user-in-jail.html' title='ftp user in a jail'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-6571924210247445853</id><published>2008-08-19T11:27:00.000+02:00</published><updated>2008-08-19T11:32:04.846+02:00</updated><title type='text'>Windows Vista - Clear cache for dead offline files</title><content type='html'>&lt;h5&gt;Add the &lt;span style="color: rgb(255, 0, 0);"&gt;FormatDatabase&lt;/span&gt; (DBWD) registry entry to the following registry subkey:&lt;/h5&gt;(First add Parameters under Csc, if doesn't exist)&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Csc\Parameters&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;Then, set the &lt;span style="color: rgb(255, 0, 0);"&gt;FormatDatabase&lt;/span&gt; registry entry to 1.&lt;/h5&gt; &lt;h5&gt;The restart your computer.&lt;/h5&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-6571924210247445853?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/6571924210247445853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=6571924210247445853&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6571924210247445853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6571924210247445853'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/08/windows-vista-clear-cache-for-dead.html' title='Windows Vista - Clear cache for dead offline files'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-8626196313193360512</id><published>2008-08-18T13:16:00.001+02:00</published><updated>2008-08-18T13:46:39.314+02:00</updated><title type='text'>Bacula automatic startup</title><content type='html'>Create a &lt;span style="color: rgb(255, 0, 0);"&gt;bacula&lt;/span&gt; file in&lt;span style="color: rgb(255, 0, 0);"&gt; /etc/init.d/&lt;/span&gt; :&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;#!/bin/sh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;case "$1" in&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;'start')&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        /etc/bacula/bacula start&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        ;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;'stop')&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        /etc/bacula/bacula stop&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        ;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;*)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        echo "Usage: $0 { start | stop }"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;        ;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;esac&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;exit 0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;add these links as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;ln -s /etc/init.d/bacula /etc/rc2.d/S90bacula&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; ln -s /etc/init.d/bacula /etc/rc3.d/S90bacula&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; ln -s /etc/init.d/bacula /etc/rc4.d/S90bacula&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; ln -s /etc/init.d/bacula /etc/rc5.d/S90bacula&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; ln -s /etc/init.d/bacula /etc/rc0.d/K90bacula&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; ln -s /etc/init.d/bacula /etc/rc1.d/K90bacula&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; ln -s /etc/init.d/bacula /etc/rc6.d/K90bacula&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;or simply run:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;update-rc.d bacula defaults 90&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-8626196313193360512?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/8626196313193360512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=8626196313193360512&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8626196313193360512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8626196313193360512'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/08/bacula-automatic-startup.html' title='Bacula automatic startup'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-3284428488489499034</id><published>2008-08-15T17:25:00.000+02:00</published><updated>2008-08-18T12:26:05.176+02:00</updated><title type='text'>Heartbeat - DRBD - MYSQL - APACHE - TYPO3</title><content type='html'>With two ubuntu (8.04) machine: &lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-five&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-six&lt;/span&gt;.&lt;br /&gt;On both boxes exists two pure partitions:&lt;span style="color: rgb(255, 0, 0);"&gt; /dev/sdb&lt;/span&gt; and &lt;span style="color: rgb(255, 0, 0);"&gt;/dev/sdc&lt;/span&gt;&lt;br /&gt;Install these packages on both:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:78%;" &gt;apt-get install heartbeat-2 drbd8-utils stonith mysql-server apache2&lt;br /&gt;apt-get install typo3-base typo3-env&lt;br /&gt;apt-get install php5 php5-cgi php5-mysql typo3-site-installer&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Here is my &lt;span style="color: rgb(255, 0, 0);"&gt;/etc/drbd.conf&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:78%;" &gt;resource testing { # name of resources for mysql database&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:78%;" &gt;   protocol C;&lt;br /&gt;&lt;br /&gt;on ubuntu-five { # first server hostname&lt;br /&gt;device /dev/drbd0; # Name of DRBD device&lt;br /&gt;disk /dev/sdb1; # Partition to use, which was created using fdisk&lt;br /&gt;address 10.66.66.22:7788; # IP addres and port number used by drbd&lt;br /&gt;meta-disk internal; # where to store metadata meta-data&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;on ubuntu-six { # second server hostname&lt;br /&gt;device /dev/drbd0;&lt;br /&gt;disk /dev/sdb1;&lt;br /&gt;address 10.66.66.26:7788;&lt;br /&gt;meta-disk internal;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;disk {&lt;br /&gt;on-io-error detach;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;net {&lt;br /&gt;max-buffers 2048;&lt;br /&gt;ko-count 4;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;syncer {&lt;br /&gt;rate 10M;&lt;br /&gt;al-extents 257;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;startup {&lt;br /&gt;wfc-timeout 0;&lt;br /&gt;degr-wfc-timeout 120; # 2 minutos.&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;resource typo3 { # name of resources apache2 and typo3&lt;br /&gt;&lt;br /&gt;protocol C;&lt;br /&gt;&lt;br /&gt;on ubuntu-five { # first server hostname&lt;br /&gt;device /dev/drbd1; # Name of DRBD device&lt;br /&gt;disk /dev/sdc1; # Partition to use, which was created using fdisk&lt;br /&gt;address 10.66.66.22:7789; # IP addres and port number used by drbd&lt;br /&gt;meta-disk internal; # where to store metadata meta-data&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;on ubuntu-six { # second server hostname&lt;br /&gt;device /dev/drbd1;&lt;br /&gt;disk /dev/sdc1;&lt;br /&gt;address 10.66.66.26:7789;&lt;br /&gt;meta-disk internal;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;disk {&lt;br /&gt;on-io-error detach;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;net {&lt;br /&gt;max-buffers 2048;&lt;br /&gt;ko-count 4;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;syncer {&lt;br /&gt;rate 10M;&lt;br /&gt;al-extents 257;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;startup {&lt;br /&gt;wfc-timeout 0;&lt;br /&gt;degr-wfc-timeout 120; # 2 minutos.&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Here is my &lt;span style="color: rgb(255, 0, 0);"&gt;/etc/ha.d/ha.cf&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:78%;" &gt;logfile /var/log/ha-log&lt;br /&gt;keepalive 2&lt;br /&gt;deadtime 30&lt;br /&gt;udpport 695&lt;br /&gt;bcast eth0&lt;br /&gt;auto_failback off&lt;br /&gt;stonith_host ubuntu-five meatware ubuntu-six&lt;br /&gt;stonith_host ubuntu-six meatware ubuntu-five&lt;br /&gt;node ubuntu-six ubuntu-five&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;and the &lt;span style="color: rgb(255, 0, 0);"&gt;/etc/ha.d/haresources&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);font-size:78%;" &gt;ubuntu-five  IPaddr::10.66.66.74/24/eth0\&lt;br /&gt;drbddisk::testing Filesystem::/dev/drbd0::/var/lib/mysql::ext3\&lt;br /&gt;drbddisk::typo3 Filesystem::/dev/drbd1::/data::ext3 mysql apache2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;First make new Partitions on sdb and sdc on both boxes:&lt;br /&gt;fdsik /dev/sdb&lt;br /&gt;&gt; n&lt;br /&gt;&gt; p&lt;br /&gt;&gt; 1&lt;br /&gt;&gt; enter&lt;br /&gt;&gt; enter&lt;br /&gt;&gt; w&lt;br /&gt;&lt;br /&gt;fdsik /dev/sdc&lt;br /&gt;&gt; n&lt;br /&gt;&gt; p&lt;br /&gt;&gt; 1&lt;br /&gt;&gt; enter&lt;br /&gt;&gt; enter&lt;br /&gt;&gt; w&lt;br /&gt;&lt;br /&gt;make drbd with these commands on both boxes:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:78%;" &gt;drbdadm create-md testing&lt;br /&gt;#mkfs.ext3 /dev/drbd0&lt;br /&gt;&lt;br /&gt;drbdadm create-md typo3&lt;br /&gt;(#mkfs.ext3 /dev/drbd1)&lt;br /&gt;&lt;/span&gt;            &lt;br /&gt;On &lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-five&lt;/span&gt; run:&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:78%;" &gt;drbdadm -- --overwrite-data-of-peer primary all&lt;br /&gt;drbdadm connect all&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On&lt;span style="color: rgb(255, 0, 0);"&gt; ubuntu-six&lt;/span&gt; run:&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;drbdadm -- --overwrite-data-of-peer secondary all&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt; drbdadm connect all&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Wait until new DRBD drive to syncing.&lt;br /&gt;&lt;p&gt;Move the mysql data files and test mounting on &lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-five&lt;/span&gt;:&lt;br /&gt;&lt;/p&gt;&lt;p style="color: rgb(0, 102, 0);"&gt;&lt;span style="font-size:78%;"&gt;/etc/init.d/mysql stop&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;pre&gt;&lt;span style="color: rgb(0, 102, 0);font-size:78%;" &gt;mv /var/lib/mysql /var/lib/mysql.org&lt;br /&gt;mkdir /var/lib/mysql&lt;br /&gt;mount /dev/drbd0 /var/lib/mysql&lt;br /&gt;mv /var/lib/mysql.org/* /var/lib/mysql/&lt;br /&gt;chown -R mysql:mysql /var/lib/mysql&lt;br /&gt;&lt;br /&gt;/etc/init.d/mysql start&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;On &lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-six&lt;/span&gt; do:&lt;br /&gt;&lt;/pre&gt;&lt;p style="color: rgb(0, 102, 0);"&gt;&lt;span style="font-size:78%;"&gt;/etc/init.d/mysql stop&lt;/span&gt;&lt;/p&gt;&lt;p style="color: rgb(0, 102, 0);"&gt;&lt;span style="font-size:78%;"&gt;mv /var/lib/mysql /var/lib/mysql.org&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;Shutdown &lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-six&lt;/span&gt; and restart &lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-five&lt;/span&gt;.&lt;br /&gt;Now start &lt;span style="color: rgb(255, 0, 0);"&gt;ubutnu-six&lt;/span&gt; after the &lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-five&lt;/span&gt; completely came up.&lt;br /&gt;&lt;br /&gt;End :)&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-3284428488489499034?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/3284428488489499034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=3284428488489499034&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3284428488489499034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3284428488489499034'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/08/heartbeat-drbd-mysql-apache-typo3.html' title='Heartbeat - DRBD - MYSQL - APACHE - TYPO3'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-1317049554444287701</id><published>2008-08-14T10:41:00.000+02:00</published><updated>2008-08-14T10:52:02.393+02:00</updated><title type='text'>Cloning typo3 Site</title><content type='html'>Copy the apache folder (/var/www/... or /var/srv/... to destination).&lt;br /&gt;&lt;br /&gt;Make links for typo3 folders.&lt;br /&gt;&lt;br /&gt;Backup database in source:&lt;br /&gt;&lt;pre&gt;&lt;span style="color: rgb(0, 102, 0);font-size:78%;" &gt;mysqldump -u &lt;span style="color: rgb(255, 0, 0);"&gt;{user}&lt;/span&gt; -p &lt;span style="color: rgb(255, 0, 0);"&gt;{databasename}&lt;/span&gt; &gt; &lt;span style="color: rgb(255, 0, 0);"&gt;typo3_db.sql&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Copy the file &lt;span style="color: rgb(255, 0, 0);"&gt;typo3_db.sql&lt;/span&gt; to destination.&lt;br /&gt;&lt;br /&gt;Build new database in destination:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);font-size:78%;" &gt;mysql -u root -p&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);font-size:78%;" &gt;mysql&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);font-size:78%;" &gt;grant all privileges on &lt;span style="color: rgb(255, 0, 0);"&gt;{datenbankname}&lt;/span&gt;.* \&lt;br /&gt;      to &lt;span style="color: rgb(255, 0, 0);"&gt;{username}&lt;/span&gt;@localhost identified by '&lt;span style="color: rgb(255, 0, 0);"&gt;{passwort}&lt;/span&gt;';&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);font-size:78%;" &gt;mysql&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);font-size:78%;" &gt;quit ;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);font-size:78%;" &gt;mysql -u &lt;span style="color: rgb(255, 0, 0);"&gt;{username}&lt;/span&gt; -p&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);font-size:78%;" &gt;mysql&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);font-size:78%;" &gt;create database &lt;span style="color: rgb(255, 0, 0);"&gt;{databasename}&lt;/span&gt;;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);font-size:78%;" &gt;mysql&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);font-size:78%;" &gt;quit ;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);font-size:78%;" &gt;mysql -u &lt;span style="color: rgb(255, 0, 0);"&gt;{username}&lt;/span&gt; -p &lt;span style="color: rgb(255, 0, 0);"&gt;{databaseame}&lt;/span&gt; &lt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt; &lt;span style="color: rgb(0, 102, 0);"&gt;typo3_db.sql&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-1317049554444287701?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/1317049554444287701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=1317049554444287701&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1317049554444287701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1317049554444287701'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/08/cloning-typo3-site.html' title='Cloning typo3 Site'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-8088186226532652497</id><published>2008-08-11T16:52:00.001+02:00</published><updated>2011-12-13T21:59:02.505+01:00</updated><title type='text'>Ubuntu - Change eth0 to eth1</title><content type='html'>Edit this file:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;vim /etc/udev/rules.d/70-persistent-net.rules&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;# PCI device 0x1022:0x2000 (pcnet32)&lt;br /&gt;SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:bf:c8:1b", ATTR{type}=="1", KERNEL=="eth*", NAME="&lt;span style="color: rgb(255, 0, 0);"&gt;eth0&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;# PCI device 0x1022:0x2000 (pcnet32)&lt;br /&gt;SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:bf:c8:1b", ATTR{type}=="1", KERNEL=="eth*", NAME="&lt;span style="color: rgb(102, 51, 255);"&gt;eth1&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;delete &lt;span style="color: rgb(255, 0, 0);"&gt;eth0&lt;/span&gt; line, and change &lt;span style="color: rgb(102, 51, 255);"&gt;eth1&lt;/span&gt; line to &lt;span style="color: rgb(255, 0, 0);"&gt;eth0&lt;/span&gt;:&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-8088186226532652497?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/8088186226532652497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=8088186226532652497&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8088186226532652497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/8088186226532652497'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/08/ubuntu-change-eth0-to-eth1.html' title='Ubuntu - Change eth0 to eth1'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-7196872298126409709</id><published>2008-08-05T16:47:00.001+02:00</published><updated>2008-11-27T16:42:42.754+01:00</updated><title type='text'>MySQL Clustering - Master / Slave</title><content type='html'>We will need two Ubuntu Servers.&lt;br /&gt;&lt;br /&gt;for example:&lt;br /&gt;&lt;br /&gt;hostname: IP&lt;br /&gt;--------------------------------------&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-one: 10.66.66.36&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-two: 10.66.66.29&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;To begin with we'll install and configure MySQL for normal use on each of the boxes.&lt;/p&gt;  &lt;pre  style="color: rgb(0, 153, 0);font-family:arial;"&gt;&lt;span style="font-size:100%;"&gt;&lt;code class="bash"&gt;sudo apt-get install mysql-server --yes&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;  &lt;p&gt;Set a &lt;em&gt;strong&lt;/em&gt; MySQL root password and wait for the packages to download and install, then edit &lt;span style="color: rgb(255, 0, 0);font-size:78%;" &gt;&lt;code&gt;/etc/mysql/my.cnf&lt;/code&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; &lt;/span&gt;to make MySQL listen on all IP addresses.&lt;/p&gt;  &lt;pre style="color: rgb(255, 0, 0);"&gt;&lt;span style="font-size:100%;"&gt;&lt;code&gt;bind-address = 0.0.0.0&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;  &lt;p&gt;Now restart MySQL and fire up the MySQL command-line client to check all is good.&lt;/p&gt;  &lt;pre&gt;&lt;span style="font-size:100%;"&gt;&lt;code&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;sudo /etc/init.d/mysql restart&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;&lt;br /&gt;mysql -u root -p&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Enter password:&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;[enter the MySQL root password you chose earlier]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;mysql&gt;&lt;/span&gt; &lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;  &lt;p&gt;If you got the &lt;span style="font-size:78%;"&gt;&lt;code style="color: rgb(255, 0, 0);"&gt;mysql&gt;&lt;/code&gt;&lt;/span&gt; prompt then MySQL is running. Try connecting to the other node across the network to see if the firewall is opened and MySQL is listening on the network interface.&lt;/p&gt;&lt;p&gt;From ubuntu-one run:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style="font-size:100%;"&gt;&lt;code&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;mysql -h ubuntu-two -u root -p&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Enter password:&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;[enter the MySQL root password you chose earlier]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;ERROR 1130 (00000): Host 'db-01' is not allowed to connect to this MySQL server&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;If you got the above error then everything is working fine - MySQL connected and refused to authorise the client.&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: rgb(255, 0, 0); font-family: arial;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;The first thing we want to do is setup a simple master-slave&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;replication to see that it's possible to replicate data from one&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;database host to the other. This requires a binary log so tell MySQL on&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-one&lt;/span&gt; to keep one.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; Edit &lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;&lt;code&gt;/etc/mysql/my.cnf&lt;/code&gt;&lt;/span&gt; and set the following values under the replication section:&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: rgb(255, 0, 0);"&gt;&lt;span style="font-size:100%;"&gt;&lt;code&gt;server-id               = 1&lt;br /&gt;log_bin                 = /var/log/mysql/mysql-bin.log&lt;br /&gt;expire_logs_days        = 10&lt;br /&gt;max_binlog_size         = 100M&lt;br /&gt;binlog_do_db            = my_application&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;=== Database to replicate&lt;/span&gt;&lt;br /&gt;binlog_ignore_db        = mysql &lt;/code&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;code&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;=== Database to ignore&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;code&gt;binlog_ignore_db        = test &lt;/code&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;code&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;=== Database to ignore  &lt;/span&gt;&lt;/code&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;On &lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-one&lt;/span&gt; grant\&lt;br /&gt;                                   replication slave rights to &lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-two&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Change &lt;/span&gt;&lt;code style="color: rgb(255, 0, 0);"&gt;some_password&lt;/code&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; to a real, strong password.&lt;br /&gt;Afterwards, make sure you restart MySQL.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;mysql -u root -p&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Enter password:&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;[enter the MySQL root password you chose earlier]&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;mysql&gt; &lt;span style="color: rgb(0, 153, 0);"&gt;grant replication slave on *.* to 'replication'@'ubuntu-two' identified by '&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;some_password&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;';&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;sudo /etc/init.d/mysql restart&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;Jump on to &lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-two&lt;/span&gt; and set it up to replicate data from &lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-one&lt;/span&gt; by editing &lt;span style="font-size:100%;"&gt;&lt;code style="color: rgb(255, 0, 0);"&gt;/etc/mysql/my.cnf&lt;/code&gt;&lt;/span&gt;, again replacing the hostname, username and password with the values for &lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-one&lt;/span&gt;.&lt;/p&gt;  &lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt;&lt;code&gt;server-id                 = 2&lt;br /&gt;master-host               = ubuntu-one&lt;br /&gt;master-user               = replication&lt;br /&gt;master-password           = &lt;span style="color: rgb(0, 153, 0);"&gt;some_password&lt;/span&gt;&lt;br /&gt;master-port               = 3306&lt;/code&gt;&lt;/span&gt;&lt;pre style="color: rgb(0, 0, 0); font-family: arial;"&gt;&lt;span style="font-size:100%;"&gt;One way replication should now be setup. Restart MySQL and check the&lt;br /&gt;status of the slave on &lt;span style="color: rgb(255, 0, 0);"&gt;ubuntu-two&lt;/span&gt;. If the Slave_IO_State is "Waiting for&lt;br /&gt;master to send event" then you've been successful.&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;span style="font-size:78%;"&gt;# Run this on ubuntu-two only&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);font-size:78%;" &gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;sudo /etc/init.d/mysql restart&lt;br /&gt;mysql -u root -p&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Enter password:&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;[enter the MySQL root password you chose earlier]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;mysql&gt;&lt;/span&gt; &lt;span style="color: rgb(0, 153, 0);"&gt;show slave status ;&lt;/span&gt;&lt;br /&gt;*************************** 1. row ***************************&lt;br /&gt;          Slave_IO_State: Waiting for master to send event&lt;br /&gt;             Master_Host: 193.219.108.241&lt;br /&gt;             Master_User: replication&lt;br /&gt;             Master_Port: 3306&lt;br /&gt;           Connect_Retry: 60&lt;br /&gt;         Master_Log_File: mysql-bin.000005&lt;br /&gt;     Read_Master_Log_Pos: 98&lt;br /&gt;          Relay_Log_File: mysqld-relay-bin.000004&lt;br /&gt;           Relay_Log_Pos: 235&lt;br /&gt;   Relay_Master_Log_File: mysql-bin.000005&lt;br /&gt;        Slave_IO_Running: Yes&lt;br /&gt;       Slave_SQL_Running: Yes&lt;br /&gt;         Replicate_Do_DB:&lt;br /&gt;     Replicate_Ignore_DB:&lt;br /&gt;      Replicate_Do_Table:&lt;br /&gt;  Replicate_Ignore_Table:&lt;br /&gt; Replicate_Wild_Do_Table:&lt;br /&gt;Replicate_Wild_Ignore_Table:&lt;br /&gt;              Last_Errno: 0&lt;br /&gt;              Last_Error:&lt;br /&gt;            Skip_Counter: 0&lt;br /&gt;     Exec_Master_Log_Pos: 98&lt;br /&gt;         Relay_Log_Space: 235&lt;br /&gt;         Until_Condition: None&lt;br /&gt;          Until_Log_File:&lt;br /&gt;           Until_Log_Pos: 0&lt;br /&gt;      Master_SSL_Allowed: No&lt;br /&gt;      Master_SSL_CA_File:&lt;br /&gt;      Master_SSL_CA_Path:&lt;br /&gt;         Master_SSL_Cert:&lt;br /&gt;       Master_SSL_Cipher:&lt;br /&gt;          Master_SSL_Key:&lt;br /&gt;   Seconds_Behind_Master: 0&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-7196872298126409709?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/7196872298126409709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=7196872298126409709&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/7196872298126409709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/7196872298126409709'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/08/mysql-clustering-master-slave.html' title='MySQL Clustering - Master / Slave'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-5761293871940104702</id><published>2008-07-21T17:15:00.000+02:00</published><updated>2008-07-21T17:20:36.852+02:00</updated><title type='text'>Change IP in SUSE</title><content type='html'>Change the content of this file:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;/etc/sysconfig/network/ifcfg-&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;(yourdevicename)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;BOOTPROTO='static'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;BROADCAST=''&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;IPADDR='192.168.1.65'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;MTU=''&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;NAME='Intel PRO/1000 T Server Adapter'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;NETMASK='255.255.255.0'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;NETWORK=''&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;REMOTE_IPADDR=''&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;STARTMODE='auto'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;UNIQUE='JNkJ.yxXKhRPGaBB'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;USERCONTROL='no'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;_nm_name='bus-pci-0000:00:09.0'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;PREFIXLEN=''&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;See this file for more descriptions:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt; /etc/sysconfig/network/ifcfg.template&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-5761293871940104702?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/5761293871940104702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=5761293871940104702&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5761293871940104702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/5761293871940104702'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/07/change-ip-in-suse.html' title='Change IP in SUSE'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-1651771585189915595</id><published>2008-07-18T14:43:00.000+02:00</published><updated>2008-07-18T14:44:47.913+02:00</updated><title type='text'>Connect Outlook to Exchange over the Internet</title><content type='html'>&lt;strong&gt;Click Start, and then click Control Panel. &lt;/strong&gt;      &lt;ul class="list"&gt;&lt;li&gt;If you are viewing Control Panel in the default Category view, switch to Classic view, and then double-click Mail. &lt;/li&gt;&lt;li&gt;If you are viewing Control Panel in Classic view, double-click Mail.&lt;/li&gt;&lt;/ul&gt;      &lt;br /&gt;    &lt;strong&gt;Click on Show Profiles.&lt;/strong&gt;      &lt;ul class="list"&gt;&lt;li&gt;&lt;strong&gt;If you already have a profile:&lt;/strong&gt;        &lt;ol&gt;&lt;li&gt;Highlight the profile you wish to use and click Properties.&lt;/li&gt;&lt;li&gt;Click on E-mail Accounts.&lt;/li&gt;&lt;li&gt;Make sure that the E-mail tab is selected, click New.&lt;/li&gt;&lt;li&gt;Choose Microsoft Exchange, POP3, IMAP, or HTTP and click Next.&lt;/li&gt;&lt;/ol&gt;       &lt;/li&gt;&lt;li&gt;&lt;strong&gt;If you do not have a profile&lt;/strong&gt;:        &lt;ol&gt;&lt;li&gt;You will be prompted to create a profile, name it anything you would like.&lt;/li&gt;&lt;/ol&gt;       &lt;/li&gt;&lt;li&gt;Click Manually configure server settings or additiona server types.&lt;/li&gt;&lt;li&gt;In the Microsoft Exchange Server box, type the local name of the Exchange server:        &lt;br /&gt;&lt;strong&gt;be01.hosting01.fpweb.net&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;In the User Name box, type the full email address of the user. Do not click Check Name. &lt;/li&gt;&lt;li&gt;In the Exchange Server settings page, click More Settings. &lt;/li&gt;&lt;ol&gt;&lt;li&gt;You may get an error message that the name could not be found.  Ignore the error and continue.&lt;/li&gt;&lt;li&gt;Click Cancel in the next window.&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;On the Connection tab, under Exchange over the Internet, select Connect to my Exchange mailbox using HTTP, and then click Exchange Proxy Settings. The Exchange Proxy Settings dialog box appears. &lt;/li&gt;&lt;li&gt;Under Use this URL to connect to my proxy server for Exchange, type the following URL:&lt;br /&gt;&lt;strong&gt;webmail.hosting01.fpweb.net&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;Select Connect using SSL only.        &lt;/li&gt;&lt;li&gt;Select On fast networks, connect using HTTP first, then connect using TCP/IP. Make sure On slow networks, connect using HTTP first, then connect using TCP/IP is selected.&lt;/li&gt;&lt;li&gt;Under Proxy authentication settings, select Basic Authentication. &lt;/li&gt;&lt;li&gt;Click &lt;strong&gt;OK&lt;/strong&gt;, and then click &lt;strong&gt;OK&lt;/strong&gt; again. Click &lt;strong&gt;Next&lt;/strong&gt;, and then click &lt;strong&gt;Finish&lt;/strong&gt;.&lt;/li&gt;&lt;/ul&gt;      &lt;strong&gt;Open Outlook and type your full email address when prompted. You can now work with your Outlook mailbox. &lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-1651771585189915595?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/1651771585189915595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=1651771585189915595&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1651771585189915595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/1651771585189915595'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/07/connect-outlook-to-exchange-over.html' title='Connect Outlook to Exchange over the Internet'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-6485346710283561401</id><published>2008-07-11T10:58:00.000+02:00</published><updated>2008-07-11T11:01:13.152+02:00</updated><title type='text'>VmWare Server not starting after boot on my Ubuntu</title><content type='html'>&lt;div style="text-align: justify;"&gt; I actually found out that this failure was actually due to an older installation of &lt;strong&gt;vmware-player&lt;/strong&gt;. Even though I removed it at the time, vmware-player left /etc/init.d/vmware-player to start on boot up :s.... and as a result, messed everything up.&lt;br /&gt;&lt;/div&gt; To sort this out, you need to remove &lt;strong&gt;vmware-player&lt;/strong&gt; service simply run:  &lt;p class="shell"&gt; &lt;span style="color: rgb(0, 153, 0);"&gt;sudo update-rc.d -f vmware-player remove &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="text-align: justify;" class="shell"&gt;Don't forget to remove &lt;span style="color: rgb(255, 0, 0);"&gt;/etc/vmware/not_configured&lt;/span&gt;, if it is still there, before you reboot.&lt;/p&gt;&lt;p class="shell"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-6485346710283561401?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/6485346710283561401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=6485346710283561401&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6485346710283561401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6485346710283561401'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/07/vmware-server-not-starting-after-boot.html' title='VmWare Server not starting after boot on my Ubuntu'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-850145763442200193</id><published>2008-07-04T15:19:00.000+02:00</published><updated>2008-07-04T15:21:20.419+02:00</updated><title type='text'>Find UUID in Ubuntu</title><content type='html'>Just simple! run this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;"&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;blkid&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt; or&lt;br /&gt;&lt;br /&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left; color: rgb(0, 153, 0);"&gt;ls /dev/disk/by-uuid&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-850145763442200193?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/850145763442200193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=850145763442200193&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/850145763442200193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/850145763442200193'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/07/find-uuid-in-ubuntu.html' title='Find UUID in Ubuntu'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-3696721085579160651</id><published>2008-06-26T15:49:00.000+02:00</published><updated>2008-06-26T15:50:34.471+02:00</updated><title type='text'>Check Public IP from Command Line</title><content type='html'>run this command:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/&lt;.*$//'&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;that's all!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-3696721085579160651?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/3696721085579160651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=3696721085579160651&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3696721085579160651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3696721085579160651'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/06/check-public-ip-from-command-line.html' title='Check Public IP from Command Line'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-3374572653704045802</id><published>2008-06-25T14:16:00.000+02:00</published><updated>2008-06-25T14:18:46.092+02:00</updated><title type='text'>Remember Password for Map Network Drive</title><content type='html'>Create a Batch file with this line:&lt;br /&gt;&lt;br /&gt;net use &lt;span style="color: rgb(255, 0, 0);"&gt;DRIVE&lt;/span&gt;: \\&lt;span style="color: rgb(255, 0, 0);"&gt;SERVERNAME&lt;/span&gt;\&lt;span style="color: rgb(255, 0, 0);"&gt;FOLDERNAME&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;PASSWORD &lt;/span&gt;/user:&lt;span style="color: rgb(255, 0, 0);"&gt;USERNAME&lt;/span&gt; /persistent:yes&lt;br /&gt;&lt;br /&gt;then put this file into startup!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-3374572653704045802?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/3374572653704045802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=3374572653704045802&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3374572653704045802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/3374572653704045802'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/06/remember-password-for-map-network-drive.html' title='Remember Password for Map Network Drive'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2344356294223010471.post-6617139815498551414</id><published>2008-06-18T13:22:00.000+02:00</published><updated>2008-06-18T13:25:45.296+02:00</updated><title type='text'>Enable M Drive in Exchange Server</title><content type='html'>You need to add a &lt;strong&gt;string&lt;/strong&gt; value called &lt;strong&gt;DriveLetter&lt;/strong&gt;, with a value of &lt;strong&gt;M&lt;/strong&gt;, into the following location:  &lt;p&gt;&lt;em&gt;HKLM\System\CurrentControlSet\Services\ExIFS\Parameters&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;and change the Value of EnableMDLReads to 1.&lt;br /&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Obviously, the value M means that drive M: will be used. You can change this to be a different value if you desire.&lt;/p&gt;  &lt;p&gt;If you do re-enable the ExIFS drive letter, be careful out there!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2344356294223010471-6617139815498551414?l=mtehrani30.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mtehrani30.blogspot.com/feeds/6617139815498551414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2344356294223010471&amp;postID=6617139815498551414&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6617139815498551414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2344356294223010471/posts/default/6617139815498551414'/><link rel='alternate' type='text/html' href='http://mtehrani30.blogspot.com/2008/06/enable-m-drive-in-exchange-server.html' title='Enable M Drive in Exchange Server'/><author><name>Tehrani</name><uri>http://www.blogger.com/profile/01679148143953185957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
