<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;D0YARX8-eSp7ImA9WhRaFE8.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549</id><updated>2012-02-17T02:15:44.151+05:30</updated><category term="PHP Fatal error:  Call to undefined function user_login_destination()" /><category term="DOS Printing" /><category term="drush" /><category term="Plesk qmail SMTP port 26" /><category term="backup mysql automatically" /><category term="CASifying Alfresco" /><category term="backup your website automatically" /><title>GEO'S VIEWS</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://pcgeo.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>316</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/rBMw" /><feedburner:info uri="blogspot/rbmw" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>blogspot/rBMw</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;C08DQHo9cCp7ImA9WhRWFEU.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-3510843815303153144</id><published>2011-12-27T11:51:00.001+05:30</published><updated>2012-01-02T10:54:31.468+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-02T10:54:31.468+05:30</app:edited><title>Alfresco (catalina.sh) Not starting at startup in Linux Server.</title><content type="html">Our company using Alfresco and it has been installed through SVN. We are using the command catalina.sh start to start the alfresco. Our alfresco server is CentOS release 5.5 . &lt;br /&gt;
&lt;br /&gt;
We need to manually start the alfresco on every reboot and it is very tedious.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;To fix this issue we need to place the command (/opt/apache-tomcat-6.0.20/bin/catalina.sh start ) and the environment variables in system startup file (/etc/rc.d/rc.local) .&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In our case we follow these steps:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;vi /root/alfrescostart.sh&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Copy and paste the below lines:&lt;br /&gt;
####################################################################################&lt;br /&gt;
&lt;br /&gt;
export JAVA_OPTS="-Xmx1024M -XX:MaxPermSize=512M -Dcom.sun.management.jmxremote -Dalfresco.home=."&lt;br /&gt;
export JAVA_HOME=/usr/java/jdk1.6.0_29&lt;br /&gt;
export MVN_HOME=/opt/apache-maven-2.2.1&lt;br /&gt;
export ANT_HOME=/opt/apache-ant-1.8.2&lt;br /&gt;
export CATALINA_HOME=/opt/apache-tomcat-6.0.20&lt;br /&gt;
export TOMCAT_HOME=$CATALINA_HOME&lt;br /&gt;
export APP_TOMCAT_HOME=$CATALINA_HOME&lt;br /&gt;
export PATH=$JAVA_HOME/bin:$CATALINA_HOME/bin:$MVN_HOME/bin:$ANT_HOME/bin:$PATH&lt;br /&gt;
#Command to Start the catalina at startup&lt;br /&gt;
/opt/apache-tomcat-6.0.20/bin/catalina.sh start&lt;br /&gt;
&lt;br /&gt;
####################################################################################&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;chmod +x /root/alfrescostart.sh&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
Add the line “/root/alfrescostart.sh” line in /etc/rc.d/rc.local&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Thats all!....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-3510843815303153144?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/u9iPMD8umqIWNLdC0MvmvXSQX7k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/u9iPMD8umqIWNLdC0MvmvXSQX7k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/u9iPMD8umqIWNLdC0MvmvXSQX7k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/u9iPMD8umqIWNLdC0MvmvXSQX7k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/P_-WqdC9mpE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/3510843815303153144/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/12/alfresco-catalinash-not-starting-at.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/3510843815303153144?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/3510843815303153144?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/P_-WqdC9mpE/alfresco-catalinash-not-starting-at.html" title="Alfresco (catalina.sh) Not starting at startup in Linux Server." /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/12/alfresco-catalinash-not-starting-at.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08ESHcyfip7ImA9WhRQGU4.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-3853109456938472611</id><published>2011-12-15T12:11:00.001+05:30</published><updated>2011-12-15T12:20:09.996+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-15T12:20:09.996+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PHP Fatal error:  Call to undefined function user_login_destination()" /><title>Drupal Integration with CAS for SSO</title><content type="html">&lt;b&gt;Drupal Integration with CAS for SSO&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 1:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Requirements&lt;br /&gt;
============&lt;br /&gt;
PHP 5 with the following modules:&lt;br /&gt;
curl, openssl, dom, zlib, and xml&lt;br /&gt;
&lt;br /&gt;
Download phpCAS from https://wiki.jasig.org/display/CASC/phpCAS&lt;br /&gt;
phpCAS version 1.0.0 or later.&lt;br /&gt;
&lt;br /&gt;
There are several locations you can install the phpCAS library.&lt;br /&gt;
&lt;br /&gt;
1. Module directory installation. This means installing the library folder&lt;br /&gt;
under the moduels directory, so that the file&lt;br /&gt;
sites/&lt;site&gt;/modules/cas/CAS/CAS.php exists.&lt;br /&gt;
&lt;br /&gt;
2. System wide installation. See the phpCAS installation guide, currently at&lt;br /&gt;
https://wiki.jasig.org/display/CASC/phpCAS+installation+guide&lt;br /&gt;
&lt;br /&gt;
3. Libraries API installation. Install and enable the Libraries API module,&lt;br /&gt;
available at http://drupal.org/project/libraries. Then extract phpCAS so&lt;br /&gt;
that sites/&lt;site&gt;/libraries/CAS/CAS.php exists. For example:&lt;br /&gt;
$ cd sites/all/libraries&lt;br /&gt;
$ curl http://downloads.jasig.org/cas-clients/php/current.tgz | tar xz&lt;br /&gt;
$ mv CAS-* CAS&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 2: &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Download respective CAS Module from the link: http://drupal.org/project/cas&lt;br /&gt;
&lt;br /&gt;
Place the cas folder in your Drupal modules directory.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 3:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Configuring CAS&lt;br /&gt;
&lt;br /&gt;
Navigate to the CAS module configuration page at&lt;br /&gt;
Admin &gt;&gt; Users &gt;&gt; CAS Settings (D6)&lt;br /&gt;
Admin &gt;&gt; Configuration &gt;&gt; People &gt;&gt; CAS settings (D7)&lt;br /&gt;
Library (phpCAS)&lt;br /&gt;
&lt;br /&gt;
If phpCAS has been successfully installed, the version number of phpCAS will be displayed. Otherwise information is provided to help you install and configure phpCAS.&lt;br /&gt;
CAS Server&lt;br /&gt;
&lt;br /&gt;
Enter in the CAS server location. For example, if the CAS server is at https://www.example.com/cas, enter&lt;br /&gt;
Hostname or IP Address: www.example.com&lt;br /&gt;
Port: 443&lt;br /&gt;
URI: /cas&lt;br /&gt;
&lt;br /&gt;
For extra security, you may also provide the PEM Certificate of the Certificate Authority which issued the certificate of the CAS server.&lt;br /&gt;
Login Form&lt;br /&gt;
&lt;br /&gt;
These settings control how users may log into CAS using the user login form, either as displayed in a block or at user/login. Many installations will choose "Add link to login forms" or "Make CAS login default on login forms."&lt;br /&gt;
&lt;br /&gt;
Additionally, the phrases used on the login forms may be customized for your particular brand.&lt;br /&gt;
User Accounts&lt;br /&gt;
&lt;br /&gt;
Each CAS user must have a Drupal account before they can log in. By default, the administrator must create the account and then assign the CAS username to the account.&lt;br /&gt;
&lt;br /&gt;
Selecting "Automatically create Drupal accounts" allows the administrator to skip pre-creating Drupal accounts and instead have Drupal accounts automatically be created when a CAS user first logs in.&lt;br /&gt;
&lt;br /&gt;
By default, the Drupal account will be created with a bare minimum of information:&lt;br /&gt;
Name: CAS username&lt;br /&gt;
E-mail: empty&lt;br /&gt;
Roles: authenticated user&lt;br /&gt;
Password: A random string which is not displayed to the user&lt;br /&gt;
&lt;br /&gt;
The e-mail address field may be populated if the e-mail addresses follow a predictable pattern based upon the CAS username — for example username@example.com.&lt;br /&gt;
&lt;br /&gt;
Additional roles may also be assigned to all CAS users. These roles will be reassigned every time a CAS user logs in. Deselecting an option will not take away that role from any existing user.&lt;br /&gt;
&lt;br /&gt;
The "Users cannot change email address" and "Users cannot change password" options control the user edit form when a user has logged in with CAS.&lt;br /&gt;
Redirection&lt;br /&gt;
&lt;br /&gt;
The "Check with the CAS server to see if the user is already logged in?" option implements the Gateway feature of the CAS protocol. When a user visit the site, they will be redirected to the CAS Server with the parameter gateway=true. If the user is already authenticated with the CAS server, they will be automatically logged in. If not, they will be silently redirected back to the Drupal site without being prompted for their password. This check is performed only once for users with cookies enabled. Beware: there might be some negative interactions with this feature and various caching configurations.&lt;br /&gt;
&lt;br /&gt;
The "Require CAS login for" options prompt for CAS authentication for anonymous users when visiting the specified pages. Users already authenticated with Drupal, even if they did not log in with CAS, will not be redirected to the CAS login server.&lt;br /&gt;
&lt;br /&gt;
For example, when configuring CAS with OpenScholar, one could add site/register to the list of pages to require CAS login for.&lt;br /&gt;
Login/Logout Destinations&lt;br /&gt;
&lt;br /&gt;
You may configure a special page for users to be redirected to the first time they log in to the CAS site. For example, you may wish to write an introductory page which all users should be required to see once. Or as above you may wish for users to be redirected to site/register in an OpenScholar installation.&lt;br /&gt;
&lt;br /&gt;
A logout destination may be provided if you want your users to be directed to a certain page when they log out of CAS. This is not the CAS server's URL, but rather a page on your site you would like the users to be directed to by the CAS server.&lt;br /&gt;
&lt;br /&gt;
Users are redirected to the "Change password URL," if provided, when they visit user/password ("Request a new password").&lt;br /&gt;
&lt;br /&gt;
Users are redirected to the "Registration URL," if provided, when they visit user/register ("Create a new account").&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note:&lt;br /&gt;
&lt;br /&gt;
In Drupal 6.16 or Version below 6.22. CAS will not work properly. You will get an error in server error log as follows:&lt;br /&gt;
&lt;br /&gt;
PHP Fatal error:  Call to undefined function user_login_destination() in ../modules/cas/cas.module&lt;br /&gt;
&lt;br /&gt;
To fix this error: &lt;br /&gt;
&lt;br /&gt;
Add a customized form module in ../sites/all/modules/&lt;br /&gt;
For eg: ../sites/all/modules/sample_forms.module&lt;br /&gt;
&lt;br /&gt;
Now paste the below lines in sample_forms.module&lt;br /&gt;
#######################################################&lt;br /&gt;
function user_login_destination() {&lt;br /&gt;
$destination = drupal_get_destination();&lt;br /&gt;
return $destination == 'destination=user%2Flogin' ? 'destination=user' : $destination;&lt;br /&gt;
}&lt;br /&gt;
#######################################################&lt;br /&gt;
&lt;br /&gt;
&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-3853109456938472611?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NwcbzwZFzI_5am5DPKhBtNML6v4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NwcbzwZFzI_5am5DPKhBtNML6v4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NwcbzwZFzI_5am5DPKhBtNML6v4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NwcbzwZFzI_5am5DPKhBtNML6v4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/lOTn3rYQsWM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/3853109456938472611/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/12/drupal-integration-with-cas-for-sso.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/3853109456938472611?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/3853109456938472611?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/lOTn3rYQsWM/drupal-integration-with-cas-for-sso.html" title="Drupal Integration with CAS for SSO" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/12/drupal-integration-with-cas-for-sso.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0IEQH8-eip7ImA9WhRQEUo.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-4976495544144201152</id><published>2011-11-23T17:27:00.001+05:30</published><updated>2011-12-06T17:08:21.152+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-06T17:08:21.152+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="backup mysql automatically" /><title>MySQL Replication cluster</title><content type="html">&lt;b&gt;MySQL Replication cluster&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This guide is designed to help do the initial setup on a MySQL cluster in which multiple MySQL servers all serve the same content through the use of the replication function. We have successfully deployed this solution for multiple clients and it is a very good option for those needing a more powerful mysql solution. &lt;br /&gt;
&lt;br /&gt;
Be sure your mysql servers are running the same version before starting this guide, yes, is possible to have a few combinations of master-slave versions, for more information about this you can check:&lt;br /&gt;
&lt;br /&gt;
http://dev.mysql.com/doc/refman/4.1/en/replication-compatibility.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1 - Write down which is the setup you are going to do, which server is master and which server/s will be slave.&lt;br /&gt;
&lt;br /&gt;
2 - Select your username/password for replications accounts. You can have one per server if you want, or one for all the mysql network.&lt;br /&gt;
&lt;br /&gt;
3 - mysql&gt; GRANT REPLICATION SLAVE ON *.*&lt;br /&gt;
&lt;br /&gt;
TO 'USERNAME'@'IPFROMTHESLAVE' IDENTIFIED BY 'PASSWORD';&lt;br /&gt;
&lt;br /&gt;
Username: mysql username&lt;br /&gt;
IPfromtheslave: ip from the mysql server that will be the one replicating the master db.&lt;br /&gt;
PASSWORD: the password for the replicator account.&lt;br /&gt;
&lt;br /&gt;
Just a few side notes.&lt;br /&gt;
&lt;br /&gt;
a) None of the passwords need to be root passwords.&lt;br /&gt;
b) Is not recomend to use only 1 user for replication in all the network.&lt;br /&gt;
&lt;br /&gt;
4) In the master server you need to Flush all the tables, this will prevent clients from writing the db so it will keep without change while we copy over.&lt;br /&gt;
&lt;br /&gt;
mysql&gt; FLUSH TABLES WITH READ LOCK;&lt;br /&gt;
&lt;br /&gt;
5) Make sure that the [mysqld] section of the my.cnf file on the master host includes a log-bin option. The section should also have a server-id=master_id option, where master_id must be a positive integer value from 1 to 232 – 1. For example:&lt;br /&gt;
&lt;br /&gt;
[mysqld]&lt;br /&gt;
&lt;br /&gt;
log-bin=mysql-bin&lt;br /&gt;
&lt;br /&gt;
server-id=1&lt;br /&gt;
&lt;br /&gt;
6) Login using another ssh client to the master server and lets create a snapshot.&lt;br /&gt;
&lt;br /&gt;
mkdir /home/slave_db&lt;br /&gt;
rsync -vrplogDtH /var/lib/mysql /home/slave_db&lt;br /&gt;
&lt;br /&gt;
You may not want to replicate the mysql  database if the slave server has a different set of user accounts from those that exist on the master. In this case, you should exclude it from the archive. When the rsync is finish, just login inside mysql and type:&lt;br /&gt;
&lt;br /&gt;
SHOW MASTER STATUS;&lt;br /&gt;
&lt;br /&gt;
Save this info in a txt file inside the slave_db folder that we will use them laster.  After you finish doing this, you can reenable the activity on the master: UNLOCK TABLES;&lt;br /&gt;
&lt;br /&gt;
7)  Stop the server that is to be used as a slave server and add the following to its my.cnf file:&lt;br /&gt;
&lt;br /&gt;
[mysqld]&lt;br /&gt;
&lt;br /&gt;
server-id=slave_id&lt;br /&gt;
&lt;br /&gt;
The slave_id value, like the master_id value, must be a positive integer value from 1 to 232 – 1. In addition, it is very important that the ID of the slave be different from the ID of the master. For example:&lt;br /&gt;
&lt;br /&gt;
[mysqld]&lt;br /&gt;
&lt;br /&gt;
server-id=2&lt;br /&gt;
&lt;br /&gt;
Remember that server-id must be unique in all the mysql network. &lt;br /&gt;
&lt;br /&gt;
8) Copy the files over from the slave_db folder to the remote location. You can do this doing the following command:&lt;br /&gt;
&lt;br /&gt;
rsync -e ssh -avz /home/slave_db/ root@REMOTESERVER:/var/lib/mysql&lt;br /&gt;
&lt;br /&gt;
Check that all the permitions and correctly in the /var/lib/mysql folder.Remember files must be own by mysql:mysql&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9) Start Mysql and enter to it, write the following changing the values that are needed: &lt;br /&gt;
&lt;br /&gt;
mysql&gt; CHANGE MASTER TO&lt;br /&gt;
&lt;br /&gt;
-&gt;     MASTER_HOST='master_host_name',&lt;br /&gt;
&lt;br /&gt;
-&gt;     MASTER_USER='replication_user_name',&lt;br /&gt;
&lt;br /&gt;
-&gt;     MASTER_PASSWORD='replication_password',&lt;br /&gt;
&lt;br /&gt;
-&gt;     MASTER_LOG_FILE='recorded_log_file_name',&lt;br /&gt;
&lt;br /&gt;
-&gt;     MASTER_LOG_POS=recorded_log_position;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10) type: START SLAVE;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-4976495544144201152?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZubFlT-F-T32s7cIcBWpqEBfSpM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZubFlT-F-T32s7cIcBWpqEBfSpM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ZubFlT-F-T32s7cIcBWpqEBfSpM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZubFlT-F-T32s7cIcBWpqEBfSpM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/VmhZ_QrZ4eg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/4976495544144201152/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/11/mysql-replication-cluster.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/4976495544144201152?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/4976495544144201152?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/VmhZ_QrZ4eg/mysql-replication-cluster.html" title="MySQL Replication cluster" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/11/mysql-replication-cluster.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YHQ3g4fSp7ImA9WhRREEk.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-5067938275595486389</id><published>2011-11-23T17:22:00.000+05:30</published><updated>2011-11-23T17:22:12.635+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-23T17:22:12.635+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="backup your website automatically" /><title>Mirror Your Web Site With rsync</title><content type="html">This tutorial shows how you can mirror your web site from your main web server to a backup server that can take over if the main server fails. We use the tool rsync for this, and we make it run through a cron job that checks every x minutes if there is something to update on the mirror. Thus your backup server should usually be up to date if it has to take over.&lt;br /&gt;
&lt;br /&gt;
rsync updates only files that have changed, so you do not need to transfer 5 GB of data whenever you run rsync. It only mirrors new/changed files, and it can also delete files from the mirror that have been deleted on the main server. In addition to that it can preserve permissions and ownerships of mirrored files and directories; to preserve the ownerships, we need to run rsync as root which is what we do here. If permissions and/or ownerships change on the main server, rsync will also change them on the backup server.&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will tunnel rsync through SSH which is more secure; it also means you do not have to open another port in your firewall for rsync - it is enough if port 22 (SSH) is open. The problem is that SSH requires a password for logging in which is not good if you want to run rsync as a cron job. The need for a password requires human interaction which is not what we want.&lt;br /&gt;
&lt;br /&gt;
But fortunately there is a solution: the use of public keys. We create a pair of keys (on our backup server mirror.example.com), one of which is saved in a file on the remote system (server1.example.com). Afterwards we will not be prompted for a password anymore when we run rsync. This also includes cron jobs which is exactly what we want.&lt;br /&gt;
&lt;br /&gt;
As you might have guessed already from what I have written so far, the concept is that we initiate the mirroring of server1.example.com directly from mirror.example.com; server1.example.com does not have to do anything to get mirrored.&lt;br /&gt;
&lt;br /&gt;
I will use the following setup here:&lt;br /&gt;
&lt;br /&gt;
    * Main server: server1.example.com (server1) - IP address: 192.168.0.100&lt;br /&gt;
    * Mirror/backup server: mirror.example.com (mirror) - IP address: 192.168.0.175&lt;br /&gt;
    * The web site that is to be mirrored is in /var/www on server1.example.com.&lt;br /&gt;
&lt;br /&gt;
rsync is for mirroring files and directories only; if you want to mirror your MySQL database, please take a look at these tutorials:&lt;br /&gt;
&lt;br /&gt;
    * How To Set Up Database Replication In MySQL&lt;br /&gt;
    * How To Set Up A Load-Balanced MySQL Cluster&lt;br /&gt;
&lt;br /&gt;
I want to say first that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!&lt;br /&gt;
&lt;br /&gt;
1 Install rsync&lt;br /&gt;
&lt;br /&gt;
First we have to install rsync on both server1.example.com and mirror.example.com. For Debian systems, this looks like this:&lt;br /&gt;
&lt;br /&gt;
server1/mirror:&lt;br /&gt;
&lt;br /&gt;
(We do this as root!)&lt;br /&gt;
&lt;br /&gt;
apt-get install rsync&lt;br /&gt;
&lt;br /&gt;
On other Linux distributions you would use yum (Fedora/CentOS) or yast (SuSE) to install rsync.&lt;br /&gt;
&lt;br /&gt;
2 Create An Unprivileged User On server1.example.com&lt;br /&gt;
&lt;br /&gt;
Now we create an unprivileged user called someuser on server1.example.com that will be used by rsync on mirror.example.com to mirror the directory /var/www (of course, someuser must have read permissions on /var/www on server1.example.com).&lt;br /&gt;
&lt;br /&gt;
server1:&lt;br /&gt;
&lt;br /&gt;
(We do this as root!)&lt;br /&gt;
&lt;br /&gt;
useradd -d /home/someuser -m -s /bin/bash someuser&lt;br /&gt;
&lt;br /&gt;
This will create the user someuser with the home directory /home/someuser and the login shell /bin/bash (it is important that someuser has a valid login shell - something like /bin/false does not work!). Now give someuser a password:&lt;br /&gt;
&lt;br /&gt;
passwd someuser&lt;br /&gt;
&lt;br /&gt;
3 Test rsync&lt;br /&gt;
&lt;br /&gt;
Next we test rsync on mirror.example.com. As root we do this:&lt;br /&gt;
&lt;br /&gt;
mirror:&lt;br /&gt;
&lt;br /&gt;
rsync -avz -e ssh someuser@server1.example.com:/var/www/ /var/www/&lt;br /&gt;
&lt;br /&gt;
You should see something like this. Answer with yes:&lt;br /&gt;
&lt;br /&gt;
The authenticity of host 'server1.example.com (192.168.0.100)' can't be established.&lt;br /&gt;
RSA key fingerprint is 32:e5:79:8e:5f:5a:25:a9:f1:0d:ef:be:5b:a6:a6:23.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)?&lt;br /&gt;
&lt;br /&gt;
&lt;-- yes

Then enter someuser's password, and you should see that server1.example.com's /var/www directory is mirrored to /var/www on mirror.example.com.

You can check that like this on both servers:

server1/mirror:

ls -la /var/www

You should see that all files and directories have been mirrored to mirror.example.com, and the files and directories should have the same permissions/ownerships as on server1.example.com.

4 Create The Keys On mirror.example.com

Now we create the private/public key pair on mirror.example.com:

mirror:

(We do this as root!)

mkdir /root/rsync
ssh-keygen -t dsa -b 2048 -f /root/rsync/mirror-rsync-key

You will see something like this:

Generating public/private dsa key pair.
Enter passphrase (empty for no passphrase): [press enter here]
Enter same passphrase again: [press enter here]
Your identification has been saved in /root/cron/mirror-rsync-key.
Your public key has been saved in /root/cron/mirror-rsync-key.pub.
The key fingerprint is:
68:95:35:44:91:f1:45:a4:af:3f:69:2a:ea:c5:4e:d7 root@mirror

It is important that you do not enter a passphrase otherwise the mirroring will not work without human interaction so simply hit enter!

Next, we copy our public key to server1.example.com:

mirror:

(Still, we do this as root.)

scp /root/rsync/mirror-rsync-key.pub someuser@server1.example.com:/home/someuser/

The public key mirror-rsync-key.pub should now be available in /home/someuser on server1.example.com. 

5 Configure server1.example.com

Now log in through SSH on server1.example.com as someuser (not root!) and do this:

server1:

(Please do this as someuser!)

mkdir ~/.ssh
chmod 700 ~/.ssh
mv ~/mirror-rsync-key.pub ~/.ssh/
cd ~/.ssh
touch authorized_keys
chmod 600 authorized_keys
cat mirror-rsync-key.pub &gt;&gt; authorized_keys&lt;br /&gt;
&lt;br /&gt;
By doing this, we have appended the contents of mirror-rsync-key.pub to the file /home/someuser/.ssh/authorized_keys. /home/someuser/.ssh/authorized_keys should look similar to this:&lt;br /&gt;
&lt;br /&gt;
server1:&lt;br /&gt;
&lt;br /&gt;
(Still as someuser!)&lt;br /&gt;
&lt;br /&gt;
vi /home/someuser/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
ssh-dss AAAAB3NzaC1kc3MAAA[...]lSUom root@&lt;br /&gt;
mirror&lt;br /&gt;
&lt;br /&gt;
Now we want to allow connections only from mirror.example.com, and the connecting user should be allowed to use only rsync, so we add&lt;br /&gt;
&lt;br /&gt;
command="/home/someuser/rsync/checkrsync",from="mirror.example.com",no-port-forwarding,no-X11-forwarding,no-pty&lt;br /&gt;
&lt;br /&gt;
right at the beginning of /home/someuser/.ssh/authorized_keys:&lt;br /&gt;
&lt;br /&gt;
server1:&lt;br /&gt;
&lt;br /&gt;
(Still as someuser!)&lt;br /&gt;
&lt;br /&gt;
vi /home/someuser/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
command="/home/someuser/rsync/checkrsync",from="mirror.example.com",no-port-forwarding,no-X11-forwarding,no-pty ssh-dss AAAAB3NzaC1kc3MAAA[...]lSUom root@&lt;br /&gt;
mirror&lt;br /&gt;
&lt;br /&gt;
It is important that you use a FQDN like mirror.example.com instead of an IP address after from=, otherwise the automated mirroring will not work!&lt;br /&gt;
&lt;br /&gt;
Now we create the script /home/someuser/rsync/checkrsync that rejects all commands except rsync.&lt;br /&gt;
&lt;br /&gt;
server1:&lt;br /&gt;
&lt;br /&gt;
(We still do this as someuser!)&lt;br /&gt;
&lt;br /&gt;
mkdir ~/rsync&lt;br /&gt;
vi ~/rsync/checkrsync&lt;br /&gt;
&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
case "$SSH_ORIGINAL_COMMAND" in&lt;br /&gt;
        *\&amp;*)&lt;br /&gt;
                echo "Rejected"&lt;br /&gt;
                ;;&lt;br /&gt;
        *\(*)&lt;br /&gt;
                echo "Rejected"&lt;br /&gt;
                ;;&lt;br /&gt;
        *\{*)&lt;br /&gt;
                echo "Rejected"&lt;br /&gt;
                ;;&lt;br /&gt;
        *\;*)&lt;br /&gt;
                echo "Rejected"&lt;br /&gt;
                ;;&lt;br /&gt;
        *\&lt;*)&lt;br /&gt;
                echo "Rejected"&lt;br /&gt;
                ;;&lt;br /&gt;
        *\`*)&lt;br /&gt;
                echo "Rejected"&lt;br /&gt;
                ;;&lt;br /&gt;
        rsync\ --server*)&lt;br /&gt;
                $SSH_ORIGINAL_COMMAND&lt;br /&gt;
                ;;&lt;br /&gt;
        *)&lt;br /&gt;
                echo "Rejected"&lt;br /&gt;
                ;;&lt;br /&gt;
esac&lt;br /&gt;
&lt;br /&gt;
chmod 700 ~/rsync/checkrsync&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6 Test rsync On mirror.example.com&lt;br /&gt;
&lt;br /&gt;
Now we must test on mirror.example.com if we can mirror server1.example.com without being prompted for someuser's password. We do this:&lt;br /&gt;
&lt;br /&gt;
mirror:&lt;br /&gt;
&lt;br /&gt;
(We do this as root!)&lt;br /&gt;
&lt;br /&gt;
rsync -avz --delete --exclude=**/stats --exclude=**/error --exclude=**/files/pictures -e "ssh -i /root/rsync/mirror-rsync-key" someuser@server1.example.com:/var/www/ /var/www/&lt;br /&gt;
&lt;br /&gt;
(The --delete option means that files that have been deleted on server1.example.com should also be deleted on mirror.example.com. The --exclude option means that these files/directories should not be mirrored; e.g. --exclude=**/error means "do not mirror /var/www/error". You can use multiple --exclude options. I have listed these options as examples; you can adjust the command to your needs. Have a look at &lt;br /&gt;
man rsync&lt;br /&gt;
&lt;br /&gt;
for more information.)&lt;br /&gt;
&lt;br /&gt;
You should now see that the mirroring takes place:&lt;br /&gt;
&lt;br /&gt;
receiving file list ... done&lt;br /&gt;
&lt;br /&gt;
sent 71 bytes  received 643 bytes  476.00 bytes/sec&lt;br /&gt;
total size is 64657  speedup is 90.56&lt;br /&gt;
&lt;br /&gt;
without being prompted for a password! This is what we wanted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
7 Create A Cron Job&lt;br /&gt;
&lt;br /&gt;
We want to automate the mirroring, that is why we create a cron job for it on mirror.example.com. Run crontab -e as root:&lt;br /&gt;
&lt;br /&gt;
mirror:&lt;br /&gt;
&lt;br /&gt;
(We do this as root!)&lt;br /&gt;
&lt;br /&gt;
crontab -e&lt;br /&gt;
&lt;br /&gt;
and create a cron job like this:&lt;br /&gt;
&lt;br /&gt;
*/5 * * * * /usr/bin/rsync -azq --delete --exclude=**/stats --exclude=**/error --exclude=**/files/pictures -e "ssh -i /root/rsync/mirror-rsync-key" someuser@server1.example.com:/var/www/ /var/www/ &lt;br /&gt;
&lt;br /&gt;
This would run rsync every 5 minutes; adjust it to your needs (see&lt;br /&gt;
&lt;br /&gt;
man 5 crontab&lt;br /&gt;
&lt;br /&gt;
). I use the full path to rsync here (/usr/bin/rsync) just to go sure that cron knows where to find rsync. Your rsync location might differ. Run&lt;br /&gt;
&lt;br /&gt;
mirror:&lt;br /&gt;
&lt;br /&gt;
(We do this as root!)&lt;br /&gt;
&lt;br /&gt;
which rsync&lt;br /&gt;
&lt;br /&gt;
to find out where yours is.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
8 Links&lt;br /&gt;
&lt;br /&gt;
    * rsync: http://samba.anu.edu.au/rsync&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-5067938275595486389?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/10-NMWr2TVLVGXwEHZCaGsNr-hI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/10-NMWr2TVLVGXwEHZCaGsNr-hI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/10-NMWr2TVLVGXwEHZCaGsNr-hI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/10-NMWr2TVLVGXwEHZCaGsNr-hI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/BBN6MTzJ0jg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/5067938275595486389/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/11/mirror-your-web-site-with-rsync.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/5067938275595486389?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/5067938275595486389?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/BBN6MTzJ0jg/mirror-your-web-site-with-rsync.html" title="Mirror Your Web Site With rsync" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/11/mirror-your-web-site-with-rsync.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIGQnk6fSp7ImA9WhRREEk.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-291756101116497735</id><published>2011-11-23T17:12:00.000+05:30</published><updated>2011-11-23T17:12:03.715+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-23T17:12:03.715+05:30</app:edited><title>Logout root automatically when inactive</title><content type="html">&lt;b&gt;Logout root automatically when inactive&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Generraly, administrators will stay login as “root” or forget to logout after finishing their work and leave their terminals unattended.&lt;br /&gt;
&lt;br /&gt;
The answer to solve this problem is to make the bash shell automatically logout after not being used for a period of time. For that, you must set the special variable named “TMOUT” to the time in seconds of no input before logout.&lt;br /&gt;
&lt;br /&gt;
Edit your profile file (vi /etc/profile) and add the following line somewhere after the line that read “HISTSIZE=” on this file:&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;TMOUT=7200&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The value we enter for the variable “TMOUT=” is in seconds and represents 2 hours (60 * 60 = 3600 * 2 = 7200 seconds). It is important to note that if you decide to put the above line in your /etc/profile file, then the automatic logout after two hours of inactivity will apply for all users on the system. So, instead, if your prefer to control which users will be automatically logged out and which ones are not, you can set this variable in their individual .bashrc file.&lt;br /&gt;
&lt;br /&gt;
After this parameter has been set on your system, you must logout and login again (as root) for the change to take effect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-291756101116497735?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dQCfp8MQadlzGX_8GqOE-Y0G2c4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dQCfp8MQadlzGX_8GqOE-Y0G2c4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/dQCfp8MQadlzGX_8GqOE-Y0G2c4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dQCfp8MQadlzGX_8GqOE-Y0G2c4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/kPermqILvy8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/291756101116497735/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/11/logout-root-automatically-when-inactive.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/291756101116497735?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/291756101116497735?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/kPermqILvy8/logout-root-automatically-when-inactive.html" title="Logout root automatically when inactive" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/11/logout-root-automatically-when-inactive.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMGQHY-cCp7ImA9WhRREEk.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-7739803749150092893</id><published>2011-11-23T17:10:00.000+05:30</published><updated>2011-11-23T17:10:21.858+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-23T17:10:21.858+05:30</app:edited><title>Linux Shell Script to reboot DSL or ADSL router.</title><content type="html">&lt;b&gt;Linux Shell Script to reboot DSL or ADSL router&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If you need to reboot the router then you need to use web interface or telnet interface. Both methods take time, especially if you are playing with ACL, NAT or router firewall or you just wanna reboot the router from your Linux desktop. I have created simple script using expect tool to reboot router. Make sure you have expect command installed. Use rpm or apt-get command to install expect tool.&lt;br /&gt;
Shell script&lt;br /&gt;
&lt;br /&gt;
Create a script as follows (tested on Beetel ADSL 220x router):&lt;br /&gt;
&lt;br /&gt;
#!/usr/bin/expect -f&lt;br /&gt;
 &lt;br /&gt;
set timeout 20&lt;br /&gt;
 &lt;br /&gt;
# router user name&lt;br /&gt;
set name "admin"&lt;br /&gt;
 &lt;br /&gt;
# router password&lt;br /&gt;
set pass "PASSWORD"&lt;br /&gt;
 &lt;br /&gt;
# router IP address&lt;br /&gt;
set routerip "192.168.1.254"&lt;br /&gt;
 &lt;br /&gt;
# Read command as arg to this script&lt;br /&gt;
set routercmd [lindex $argv 0]&lt;br /&gt;
 &lt;br /&gt;
# start telnet&lt;br /&gt;
spawn telnet $routerip&lt;br /&gt;
 &lt;br /&gt;
# send username &amp;amp; password&lt;br /&gt;
expect "Login:"&lt;br /&gt;
send -- "$name\r"&lt;br /&gt;
expect "Password:"&lt;br /&gt;
send -- "$pass\r"&lt;br /&gt;
 &lt;br /&gt;
# get out of ISP's  Stupid menu program, go to shell&lt;br /&gt;
expect " -&amp;gt; "&lt;br /&gt;
send --  "sh\r"&lt;br /&gt;
 &lt;br /&gt;
# execute command&lt;br /&gt;
expect "# "&lt;br /&gt;
send -- "$routercmd\r"&lt;br /&gt;
# exit&lt;br /&gt;
send -- "^D"&lt;br /&gt;
&lt;br /&gt;
Save script and setup executable permission on it:&lt;br /&gt;
$ chmod +x router.exp&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
How do I run this script?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You need to pass command to script to execute on a router. For example to display router uptime, interface information and to reboot router you need to type command as follows:&lt;br /&gt;
$ ./router.exp uptime&lt;br /&gt;
$ ./router.exp ifconfig&lt;br /&gt;
$ ./router.exp reboot&lt;br /&gt;
&lt;br /&gt;
Since my ISP router offers menu as soon as login above script may not work on generic router such as Cisco or linksys router. Therefore, you may need to modify above script to work with your router. If you are a new to expect then use autoexpect command to generate script. It watches you interacting with another program and creates an Expect script that reproduces your interactions For straightline scripts, autoexpect saves substantial time over writing scripts by hand. Even if you are an Expect expert, you will find it convenient to use autoexpect to automate the more mindless parts of interactions. It is much easier to cut/paste hunks of autoexpect scripts together than to write them from scratch. Moreover, if you are a beginner, you may be able to get away with learning nothing more about Expect than how to call autoexpect. Just type autoexecpt:&lt;br /&gt;
$ autoexpectautoexpect started, file is script.exp&lt;br /&gt;
&lt;br /&gt;
Next type telnet command (telnet to the router):&lt;br /&gt;
$ telnet 192.168.1.254&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
Login: USER&lt;br /&gt;
Password: Password&lt;br /&gt;
&lt;br /&gt;
Now type commands on the router:&lt;br /&gt;
$ ifconfig&lt;br /&gt;
$ exit&lt;br /&gt;
You are done, type exit to stop autoexepct command:&lt;br /&gt;
$ exit&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
autoexpect done, file is script.exp&lt;br /&gt;
&lt;br /&gt;
Just type ./script.exp to run ifconfig command:&lt;br /&gt;
$ ./script.exp&lt;br /&gt;
&lt;br /&gt;
You can now modify script.exp to reboot or to run other commands. It is a real lifesaver.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-7739803749150092893?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6oTZp-VlpxxEiCVkbISz1dmbEeA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6oTZp-VlpxxEiCVkbISz1dmbEeA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6oTZp-VlpxxEiCVkbISz1dmbEeA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6oTZp-VlpxxEiCVkbISz1dmbEeA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/Km96rPN0rtQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/7739803749150092893/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/11/linux-shell-script-to-reboot-dsl-or.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/7739803749150092893?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/7739803749150092893?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/Km96rPN0rtQ/linux-shell-script-to-reboot-dsl-or.html" title="Linux Shell Script to reboot DSL or ADSL router." /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/11/linux-shell-script-to-reboot-dsl-or.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUGRn49eyp7ImA9WhRREEk.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-2088791125928634668</id><published>2011-11-23T17:07:00.000+05:30</published><updated>2011-11-23T17:07:07.063+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-23T17:07:07.063+05:30</app:edited><title>How to Prevent DDoS Attack</title><content type="html">&lt;b&gt;How to Prevent DDoS Attack&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
All web servers been connected to the Internet subjected to DoS (Denial of Service) or DDoS (Distrubuted Denial of Service) attacks in some kind or another, where hackers or attackers launch large amount connections consistently and persistently to the server, and in advanced stage, distributed from multiple IP addresses or sources, in the hope to bring down the server or use up all network bandwidth and system resources to deny web pages serving or website not responding to legitimate visitors.&lt;br /&gt;
&lt;br /&gt;
You can detect the ddos using the following command&lt;br /&gt;
&lt;br /&gt;
netstat -anp|grep tcp|awk '{print $5}'| cut -d : -f1|sort|uniq -c|sort -n&lt;br /&gt;
&lt;br /&gt;
It will shows the number of connections from all IPs to the server.&lt;br /&gt;
&lt;br /&gt;
There are plenty of ways to prevent, stop, fight and kill off DDoS attack, such as using firewall. A low cost, and probably free method is by using software based firewall or filtering service. (D)DoS-Deflate is a free open source Unix/Linux script by MediaLayer that automatically mitigate (D)DoS attacks. It claims to be the best, free, open source solution to protect servers against some of the most excruciating DDoS attacks.&lt;br /&gt;
&lt;br /&gt;
(D)DoS-Deflate script basically monitors and tracks the IP addresses are sending and establishing large amount of TCP network connections such as mass emailing, DoS pings, HTTP requests) by using netstat command, which is the symptom of a denial of service attack. When it detects number of connections from a single node that exceeds certain preset limit, the script will automatically uses APF or IPTABLES to ban and block the IPs. Depending on the configuration, the banned IP addresses would be unbanned using APF or IPTABLES (only works on APF v 0.96 or better).&lt;br /&gt;
&lt;br /&gt;
Installation and setup of (D)DOS-Deflate on the server is extremely easy. Simply login as root by open SSH secure shell access to the server, and run the the following commands one by one:&lt;br /&gt;
&lt;br /&gt;
wget http://www.inetbase.com/scripts/ddos/install.sh&lt;br /&gt;
chmod 0700 install.sh&lt;br /&gt;
./install.sh&lt;br /&gt;
&lt;br /&gt;
To uninstall the (D)DOS-Deflate, run the following commands one by one instead:&lt;br /&gt;
&lt;br /&gt;
wget http://www.inetbase.com/scripts/ddos/uninstall.ddos&lt;br /&gt;
chmod 0700 uninstall.ddos&lt;br /&gt;
./uninstall.ddos&lt;br /&gt;
&lt;br /&gt;
The configuration file for (D)DOS-Deflate is ddos.conf, and by default it will have the following values:&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
FREQ=1&lt;br /&gt;
NO_OF_CONNECTIONS=50&lt;br /&gt;
APF_BAN=1&lt;br /&gt;
KILL=1&lt;br /&gt;
EMAIL_TO=”root”&lt;br /&gt;
BAN_PERIOD=600&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Users can change any of these settings to suit the different need or usage pattern of different servers. It’s also possible to whitelist and permanently unblock (never ban) IP addresses by listing them in /usr/local/ddos/ignore.ip.list file. If you plan to execute and run the script interactively, users can set KILL=0 so that any bad IPs detected are not banned.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-2088791125928634668?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5db5FI3SAYe4dLKOcV0of-uwBNs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5db5FI3SAYe4dLKOcV0of-uwBNs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5db5FI3SAYe4dLKOcV0of-uwBNs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5db5FI3SAYe4dLKOcV0of-uwBNs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/445r8PXAfJs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/2088791125928634668/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/11/how-to-prevent-ddos-attack.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/2088791125928634668?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/2088791125928634668?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/445r8PXAfJs/how-to-prevent-ddos-attack.html" title="How to Prevent DDoS Attack" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/11/how-to-prevent-ddos-attack.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcBQ386eCp7ImA9WhRREEk.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-2122359109956441497</id><published>2011-11-23T17:04:00.001+05:30</published><updated>2011-11-23T17:04:12.110+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-23T17:04:12.110+05:30</app:edited><title>How to increase the memory limit of php</title><content type="html">&lt;b&gt;How to increase the memory limit of php&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If you have seen an error like “Fatal Error: PHP Allowed Memory Size Exhausted” in apache logs or in your browser, this means that PHP has exhausted the maximum memory limit. This post will show 3 different ways on how you can increase the php memory limit and also explain when you should use them.&lt;br /&gt;
&lt;br /&gt;
First, let’s see where is this limit coming from. Normally you will see from the error message what is the actual limit, as this will look like:&lt;br /&gt;
&lt;br /&gt;
"PHP Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y) in whatever.php"&lt;br /&gt;
&lt;br /&gt;
The default value might differ depending on what php version and linux distribution you are running, but normally this will be set to either 8M or 16M. For example on my debian etch, running on php 5.2 this is set by default at 16M.&lt;br /&gt;
&lt;br /&gt;
In order to identify the current value on your system, look inside your php.ini and search for memory_limit:&lt;br /&gt;
memory_limit = 16M ; Maximum amount of memory a script may consume (16MB)&lt;br /&gt;
&lt;br /&gt;
There are three ways to change this value, the obvious way - changing the global value from php.ini, but also an individual method to change it just for a script, or folder.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. Changing memory_limit globally from php.ini&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This is the simplest and most obvious method. You just edit your php.ini and change the memory_limit to whatever you need. For ex:&lt;br /&gt;
&lt;br /&gt;
memory_limit = 32M&lt;br /&gt;
&lt;br /&gt;
You will require access to make changes to php.ini on the system. This change is global and will be used by all php scripts running on the system. Once you change this value, you will need to restart the web server in order for it to become active.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that this limit has its logic and don’t increase it artificially, as poorly written php scripts might overkill your system without proper limits.&lt;br /&gt;
Note: if you know what you are doing and want to remove the memory limit, you would set this value to -1.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
2. Changing memory_limit using .htaccess for a single folder/vhost&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Changing the global memory_limit might not be a good idea, and you might be better changing this only inside one folder (normally one application or virtual host) that needs this value changed for its functionality. To do this you have to add to the respective location .htaccess something like:&lt;br /&gt;
&lt;br /&gt;
php_value memory_limit 64M&lt;br /&gt;
&lt;br /&gt;
This change will be local only, and can be useful for webmasters that don’t have control on the system php.ini. This change would not require a reload and will become active immediately.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3. Changing memory_limit inside a single php script.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
For even more control you can set this directive inside a single php script. To do so you would use in your code:&lt;br /&gt;
&lt;br /&gt;
ini_set('memory_limit', '64M');&lt;br /&gt;
&lt;br /&gt;
The advantage of this method is that you have more control and set this value just where you know it is really needed. Also it can be done without having access to the system php.ini, and will become active immediately.&lt;br /&gt;
&lt;br /&gt;
Note: in order to be able to use these PHP resource limits, your PHP version must have been compiled with the –enable-memory-limit configure option. Normally most packed versions will have this, but just in case if this doesn't work for you as expected, check on how php was compiled first.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-2122359109956441497?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DLz1Hjx11PogF3e2o6AhEhoMhRk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DLz1Hjx11PogF3e2o6AhEhoMhRk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DLz1Hjx11PogF3e2o6AhEhoMhRk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DLz1Hjx11PogF3e2o6AhEhoMhRk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/SdLzINN_zpY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/2122359109956441497/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/11/how-to-increase-memory-limit-of-php.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/2122359109956441497?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/2122359109956441497?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/SdLzINN_zpY/how-to-increase-memory-limit-of-php.html" title="How to increase the memory limit of php" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/11/how-to-increase-memory-limit-of-php.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8CSXg8eip7ImA9WhRREEk.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-7455830469915629413</id><published>2011-11-23T17:01:00.002+05:30</published><updated>2011-11-23T17:01:08.672+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-23T17:01:08.672+05:30</app:edited><title>Deny users and groups in Openssh</title><content type="html">OpenSSH has two directives for allowing and denying ssh user access.&lt;br /&gt;
&lt;br /&gt;
DenyUsers user1 user2 user3&lt;br /&gt;
&lt;br /&gt;
Use to block user login. You can use wild cards as well as user1@somedomain.com (user1 is not allowed to login from somedomain.com host) pattern.&lt;br /&gt;
&lt;br /&gt;
DenyGroups group1 group2&lt;br /&gt;
A list of group names, if user is part of primary of supplementary group login access is denied. You can use wildcards.&lt;br /&gt;
&lt;br /&gt;
Please note that you cannot use a numeric group or username ID. If these directives are not used, default is to allow everyone.&lt;br /&gt;
&lt;br /&gt;
AllowUsers user1 user2&lt;br /&gt;
This directive is opposite of DenyUsers directive.&lt;br /&gt;
&lt;br /&gt;
AllowGroups group1 group2&lt;br /&gt;
This directive is opposite of DenyGroups directive.&lt;br /&gt;
&lt;br /&gt;
You should always block access to root user/group:&lt;br /&gt;
Open /etc/ssh/sshd_config file:&lt;br /&gt;
&lt;br /&gt;
# vi /etc/ssh/sshd_config&lt;br /&gt;
&lt;br /&gt;
Append following names (directives):&lt;br /&gt;
&lt;br /&gt;
DenyUsers root finadmin&lt;br /&gt;
DenyGroups root finadmin&lt;br /&gt;
&lt;br /&gt;
Make sure at least one user is allowed to use 'su -' command.&lt;br /&gt;
&lt;br /&gt;
Save the file and restart the sshd.&lt;br /&gt;
&lt;br /&gt;
This is a secure setup and you are restricting the users allowed to access the system via SSH with four above directives.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-7455830469915629413?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/hWYglSffZGJwNKuI867SV1e3uzQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hWYglSffZGJwNKuI867SV1e3uzQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/hWYglSffZGJwNKuI867SV1e3uzQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hWYglSffZGJwNKuI867SV1e3uzQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/MRVuhglFtxg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/7455830469915629413/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/11/deny-users-and-groups-in-openssh.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/7455830469915629413?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/7455830469915629413?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/MRVuhglFtxg/deny-users-and-groups-in-openssh.html" title="Deny users and groups in Openssh" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/11/deny-users-and-groups-in-openssh.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUAARXc5cCp7ImA9WhRREEk.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-4031914218036986811</id><published>2011-11-23T16:59:00.000+05:30</published><updated>2011-11-23T16:59:04.928+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-23T16:59:04.928+05:30</app:edited><title>Automatic Login using expect tool and ssh</title><content type="html">&lt;b&gt;Automatic Login using expect tool and ssh&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
In order to save time it is possible to save the login information to a file and then use the expect tool to login to a server.&lt;br /&gt;
&lt;br /&gt;
Before you proceed with this,make sure that expect tool is installed.&lt;br /&gt;
&lt;br /&gt;
else install expect tool&lt;br /&gt;
&lt;br /&gt;
#yum install expect&lt;br /&gt;
&lt;br /&gt;
Now save the login information to a file. Take a look at the below example.&lt;br /&gt;
&lt;br /&gt;
vi server1&lt;br /&gt;
&lt;br /&gt;
#!/usr/bin/expect -f&lt;br /&gt;
spawn ssh root@192.168.0.254&lt;br /&gt;
expect "password:"&lt;br /&gt;
send "password\r"&lt;br /&gt;
expect "#"&lt;br /&gt;
interact&lt;br /&gt;
&lt;br /&gt;
save the file and exit. Make sure you replace the password in send "password\r" with the real password leaving \r alone. Else you will have to press enter to login to the server&lt;br /&gt;
&lt;br /&gt;
Now use the command to login to the server 192.168.0.254&lt;br /&gt;
&lt;br /&gt;
expect server1&lt;br /&gt;
&lt;br /&gt;
Thats it you have logged in. No password nothing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-4031914218036986811?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/hIZ6J16cHd4_Gih-3tm7upJqApM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hIZ6J16cHd4_Gih-3tm7upJqApM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/hIZ6J16cHd4_Gih-3tm7upJqApM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hIZ6J16cHd4_Gih-3tm7upJqApM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/3shHVJt7wiU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/4031914218036986811/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/11/automatic-login-using-expect-tool-and.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/4031914218036986811?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/4031914218036986811?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/3shHVJt7wiU/automatic-login-using-expect-tool-and.html" title="Automatic Login using expect tool and ssh" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/11/automatic-login-using-expect-tool-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8AQH09eSp7ImA9WhRREE4.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-2645629769099858393</id><published>2011-11-23T14:13:00.001+05:30</published><updated>2011-11-23T14:14:01.361+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-23T14:14:01.361+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="CASifying Alfresco" /><title>SSO of Alfresco with CAS</title><content type="html">Notes for &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Installation and configuration of Alfresco&lt;br /&gt;
Installation of CAS&lt;br /&gt;
Integration of Alfresco Explorer and Share with CAS&lt;br /&gt;
SSO&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You can mail me on pcgeopc@gmail.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-2645629769099858393?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/q_Ksjyg3YrLfLNkFjpQZZRzNN_g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/q_Ksjyg3YrLfLNkFjpQZZRzNN_g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/q_Ksjyg3YrLfLNkFjpQZZRzNN_g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/q_Ksjyg3YrLfLNkFjpQZZRzNN_g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/qEfTJLFLJ3U" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/2645629769099858393/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/11/sso-of-alfresco-with-cas.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/2645629769099858393?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/2645629769099858393?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/qEfTJLFLJ3U/sso-of-alfresco-with-cas.html" title="SSO of Alfresco with CAS" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/11/sso-of-alfresco-with-cas.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A08FQX08fCp7ImA9WhRSGU4.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-8189485043354350570</id><published>2011-11-22T10:50:00.001+05:30</published><updated>2011-11-22T11:00:10.374+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-22T11:00:10.374+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="drush" /><title>Drush</title><content type="html">“&lt;b&gt;drush&lt;/b&gt;” is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt. In general&lt;br /&gt;
• drush is a command line shell and scripting interface for Drupal. &lt;br /&gt;
• drush is not a module&lt;br /&gt;
• It is valid to use the latest '7.x' (or master) no matter what your version of Drupal is. Drush is independent of Drupal version&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
Installation:&lt;/b&gt;&lt;br /&gt;
1. Untar the tarball into a folder outside of your web site (/path/to/drush)&lt;br /&gt;
2. Make the 'drush' command executable:&lt;br /&gt;
$ chmod u+x /path/to/drush/drush&lt;br /&gt;
3. (Optional, but recommended:) To ease the use of drush,&lt;br /&gt;
- create a link to drush in a directory that is in your PATH, e.g.:&lt;br /&gt;
$ ln -s /path/to/drush/drush /usr/local/bin/drush&lt;br /&gt;
&lt;b&gt;NOTE ON PHP.INI FILES&lt;/b&gt;&lt;br /&gt;
Usually, php is configured to use separate php.ini files for the web server and the command line.  To see which php.ini file drush is using, run:&lt;br /&gt;
$ drush status&lt;br /&gt;
Compare the php.ini that drush is using with the php.ini that the webserver is using.  Make sure that drush's php.ini is given as much memory to work with asthe web server is; otherwise, Drupal might run out of memory when drush bootstraps it.&lt;br /&gt;
Drush requires a fairly unrestricted php environment to run in.  In particular, you should insure that safe_mode, open_basedir, disable_functions and disable_classes are empty.&lt;br /&gt;
If drush is using the same php.ini file as the web server, you can create a php.ini file exclusively for drush by copying your web server's php.ini file to the folder $HOME/.drush or the folder /etc/drush.  Then you may edit this file and change the settings described above without affecting the php enviornment of your web server.&lt;br /&gt;
&lt;br /&gt;
4. Start using drush by running "drush" from your Drupal root directory.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Drush Commands:&lt;/b&gt;&lt;br /&gt;
You can find the drush commands from the url: http://drush.ws/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-8189485043354350570?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kkdvlbjA5bSuuT8EZqJvzIA8PkA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kkdvlbjA5bSuuT8EZqJvzIA8PkA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kkdvlbjA5bSuuT8EZqJvzIA8PkA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kkdvlbjA5bSuuT8EZqJvzIA8PkA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/A_l3r9o0vb8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/8189485043354350570/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/11/drush.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/8189485043354350570?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/8189485043354350570?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/A_l3r9o0vb8/drush.html" title="Drush" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/11/drush.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUAQ3cyeyp7ImA9WhRXGEo.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-7078610261562641955</id><published>2011-09-12T14:27:00.001+05:30</published><updated>2011-12-26T10:57:22.993+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-26T10:57:22.993+05:30</app:edited><title>Puppet script for installing Apache, Mysql &amp; PHP (LAMP) for all Linux operating systems.</title><content type="html">Click he&lt;a href="https://github.com/geopcgeo/LAMP"&gt;&lt;/a&gt;re for the link to have a generalized puppet script for installing Apache, Mysql and PHP on any Linux Operating Systems.&lt;br /&gt;
&lt;br /&gt;
For git hub url click &lt;a href="https://github.com/geopcgeo/LAMP"&gt;here&lt;/a&gt; or git@github.com:geopcgeo/LAMP.git&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-7078610261562641955?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6gSuS6n65x9YmeHUoIlWO5I1R-8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6gSuS6n65x9YmeHUoIlWO5I1R-8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6gSuS6n65x9YmeHUoIlWO5I1R-8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6gSuS6n65x9YmeHUoIlWO5I1R-8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/G_qDqsjxbA0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/7078610261562641955/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/09/puppet-script-for-installing-apache.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/7078610261562641955?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/7078610261562641955?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/G_qDqsjxbA0/puppet-script-for-installing-apache.html" title="Puppet script for installing Apache, Mysql &amp; PHP (LAMP) for all Linux operating systems." /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/09/puppet-script-for-installing-apache.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04HRXcycCp7ImA9WhdXEkk.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-507794037026584241</id><published>2011-08-25T10:55:00.001+05:30</published><updated>2011-08-25T10:55:34.998+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-25T10:55:34.998+05:30</app:edited><title>Optimizing Mysql</title><content type="html">Optimizing MySQL&lt;br /&gt;
mysql_fix_privilege_tables&lt;br /&gt;
mysqlcheck -o –all-databases&lt;br /&gt;
&lt;br /&gt;
Open /etc/my.cnf&lt;br /&gt;
[mysqld]&lt;br /&gt;
max_connections=500&lt;br /&gt;
safe-show-database&lt;br /&gt;
query_cache_limit=1M&lt;br /&gt;
query_cache_size=32M&lt;br /&gt;
query_cache_type=1&lt;br /&gt;
key_buffer_size=256M&lt;br /&gt;
table_cache=150&lt;br /&gt;
thread_cache_size=200&lt;br /&gt;
datadir = /var/lib/mysql&lt;br /&gt;
socket = /var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;br /&gt;
[mysql.server]&lt;br /&gt;
user = mysql&lt;br /&gt;
basedir = /var/lib&lt;br /&gt;
&lt;br /&gt;
[safe_mysqld]&lt;br /&gt;
err-log = /var/log/mysqld.log&lt;br /&gt;
pid-file = /var/run/mysqld/mysqld.pid&lt;br /&gt;
&lt;br /&gt;
Below are notes on some of the important variables, I took down while tuning the config file.&lt;br /&gt;
&lt;br /&gt;
1. QUERY CACHE&lt;br /&gt;
query_cache_size:&lt;br /&gt;
* MySQL 4 provides one feature that can prove very handy - a query cache. In a situation where the database has&lt;br /&gt;
to repeatedly run the same queries on the same data set, returning the same results each time, MySQL can cache the result&lt;br /&gt;
set, avoiding the overhead of running through the data over and over and is extremely helpful on busy servers.&lt;br /&gt;
&lt;br /&gt;
query_cache_limit : a total size of memory that server utilizes for caching results of queries&lt;br /&gt;
&lt;br /&gt;
query_cache_type : 0 - Off&lt;br /&gt;
1 - Cache all query results except for those that begin with SELECT SQL_NO_CACHE&lt;br /&gt;
2 - Cache results only for queries that begin with SELECT SQL_CACHE.&lt;br /&gt;
&lt;br /&gt;
2. key_buffer_size:&lt;br /&gt;
* The value of key_buffer_size is the size of the buffer used with indexes. The larger the buffer, the faster&lt;br /&gt;
the SQL command will finish and a result will be returned. Ideally, it will be large enough to contain&lt;br /&gt;
all the indexes (the total size of all .MYI files on the server).&lt;br /&gt;
Using a value that is 25% of total memory on a machine that mainly runs MySQL is quite common.&lt;br /&gt;
&lt;br /&gt;
The Key_reads/Key_read_requests ratio &lt; 0.01&lt;br /&gt;
The Key_writes/Key_write_requests ratio ~ 1&lt;br /&gt;
&lt;br /&gt;
SHOW STATUS;&lt;br /&gt;
&lt;br /&gt;
3. LOG&lt;br /&gt;
log : Whether logging of all statements to the general query log is enabled. See Section 5.3.2, “The General Query Log”.&lt;br /&gt;
log_error : The location of the error log. This variable was added in MySQL 4.0.10.&lt;br /&gt;
log_slow_queries : Whether slow queries should be logged. “Slow” is determined by the value of the long_query_time&lt;br /&gt;
variable.&lt;br /&gt;
&lt;br /&gt;
4. table_cache:&lt;br /&gt;
* The default is 64. Each time MySQL accesses a table, it places it in the cache. If the system accesses many&lt;br /&gt;
tables, it is faster to have these in the cache. MySQL, being multi-threaded, may be running many queries on the table at&lt;br /&gt;
one time, and each of these will open a table. Examine the value of open_tables at peak times. If you find it stays at the&lt;br /&gt;
same value as your table_cache value, and then the number of opened_tables starts rapidly increasing, you should increase&lt;br /&gt;
the table_cache if you have enough memory.&lt;br /&gt;
&lt;br /&gt;
check for Open_tables&lt;br /&gt;
SHOW STATUS;&lt;br /&gt;
&lt;br /&gt;
5. sort_buffer_size: Each thread that needs to do a sort allocates a buffer of this size. Increase this value for faster&lt;br /&gt;
ORDER BY or GROUP BY operations.&lt;br /&gt;
&lt;br /&gt;
6. read_rnd_buffer_size:&lt;br /&gt;
* The read_rnd_buffer_size is used after a sort, when reading rows in sorted order. If you use many queries with&lt;br /&gt;
ORDER BY, upping this can improve performance. Remember that, unlike key_buffer_size and table_cache, this buffer is&lt;br /&gt;
allocated for each thread. This variable was renamed from record_rnd_buffer in MySQL 4.0.3. It defaults to the same size as&lt;br /&gt;
the read_buffer_size. A rule-of-thumb is to allocate 1KB for each 1MB of memory on the server, for example 1MB on a machine&lt;br /&gt;
with 1GB memory.&lt;br /&gt;
&lt;br /&gt;
7. thread_cache_size:&lt;br /&gt;
* If you have a busy server that’s getting a lot of quick connections, set your thread cache high enough that the&lt;br /&gt;
Threads_created value in SHOW STATUS stops increasing. This should take some of the load off of the CPU.&lt;br /&gt;
&lt;br /&gt;
8. tmp_table_size:&lt;br /&gt;
* “Created_tmp_disk_tables” are the number of implicit temporary tables on disk created while executing statements&lt;br /&gt;
and “created_tmp_tables” are memory-based. Obviously it is bad if you have to go to disk instead of memory all the time.&lt;br /&gt;
&lt;br /&gt;
Increase the value of tmp_table_size if you do many advanced GROUP BY queries and you have lots of memory.&lt;br /&gt;
This variable does not apply to user-created MEMORY tables.&lt;br /&gt;
&lt;br /&gt;
9. innodb_buffer_pool_size&lt;br /&gt;
While the key_buffer_size is the variable to target for MyISAM tables, for InnoDB tables, it is innodb_buffer_pool_size.&lt;br /&gt;
Again, you want this as high as possible to minimize slow disk usage. On a dedicated MySQL server running InnoDB tables,&lt;br /&gt;
you can set this up to 80% of the total available memory.&lt;br /&gt;
&lt;br /&gt;
10. innodb_additional_mem_pool_size&lt;br /&gt;
This variable stores the internal data structure. Make sure it is big enough to store data about all your InnoDB tables&lt;br /&gt;
(you will see warnings in the error log if the server is using OS memory instead).&lt;br /&gt;
&lt;br /&gt;
11. max_connections&lt;br /&gt;
&lt;br /&gt;
12. wait_timeout=500&lt;br /&gt;
This variable determines the timeout in seconds before mysql will dump a connection. If set to low&lt;br /&gt;
you will likely receive mySQL server has gone away errors in your log, which in vBulletins case is quite common.&lt;br /&gt;
&lt;br /&gt;
13. max_allowed_packet&lt;br /&gt;
The maximum size of one packet or any generated/intermediate string.&lt;br /&gt;
Again if set to low (the default is 8M) users will likely experience errors. 16M has always&lt;br /&gt;
worked fine for my production environments.&lt;br /&gt;
&lt;br /&gt;
You can grab a mySQL performance script from the guys at hackmysql.com( http://hackmysql.com/mysqlreport ). I use it to&lt;br /&gt;
tell me how the database is performing under load. You can run this from any shell when you are loaded with traffic.&lt;br /&gt;
Nothing fancy but should give you an idea.&lt;br /&gt;
&lt;br /&gt;
==================================&lt;br /&gt;
http://dev.mysql.com/doc/refman/4.1/en/server-system-variables.html&lt;br /&gt;
http://dev.mysql.com/doc/refman/4.1/en/server-status-variables.html&lt;br /&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-507794037026584241?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xhZkj-4pfWT1BqTt7CjBOYa0D6A/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xhZkj-4pfWT1BqTt7CjBOYa0D6A/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xhZkj-4pfWT1BqTt7CjBOYa0D6A/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xhZkj-4pfWT1BqTt7CjBOYa0D6A/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/V9wAhGwJTjs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/507794037026584241/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/08/optimizing-mysql.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/507794037026584241?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/507794037026584241?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/V9wAhGwJTjs/optimizing-mysql.html" title="Optimizing Mysql" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/08/optimizing-mysql.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YAQHY4cCp7ImA9WhdXEEU.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-2543204063756512992</id><published>2011-08-23T12:02:00.000+05:30</published><updated>2011-08-23T12:02:21.838+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-23T12:02:21.838+05:30</app:edited><title>Installing Puppet</title><content type="html">&lt;b&gt;Installing Facter From Source&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The facter library is a prerequisite for Puppet. Like Puppet, there are packages available for most platforms, though you may want to use the tarball if you would like to try a newer version or are using a platform without an OS package:&lt;br /&gt;
&lt;br /&gt;
Get the latest tarball:&lt;br /&gt;
&lt;br /&gt;
$ wget http://puppetlabs.com/downloads/facter/facter-1.6.0.tar.gz&lt;br /&gt;
&lt;br /&gt;
Untar and install facter:&lt;br /&gt;
&lt;br /&gt;
$ gzip -d -c facter-latest.tgz | tar xf -&lt;br /&gt;
$ cd facter-*&lt;br /&gt;
$ sudo ruby install.rb # or become root and run install.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Installing Puppet From Source&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Using the same mechanism as Facter, install the puppet libraries and executables:&lt;br /&gt;
&lt;br /&gt;
# get the latest tarball&lt;br /&gt;
$ wget http://puppetlabs.com/downloads/puppet/puppet-latest.tgz&lt;br /&gt;
# untar and install it&lt;br /&gt;
$ gzip -d -c puppet-latest.tgz | tar xf -&lt;br /&gt;
$ cd puppet-*&lt;br /&gt;
$ sudo ruby install.rb # or become root and run install.rb&lt;br /&gt;
&lt;br /&gt;
You can also check the source out from the git repo:&lt;br /&gt;
&lt;br /&gt;
$ mkdir -p ~/git &amp;&amp; cd ~/git&lt;br /&gt;
$ git clone git://github.com/puppetlabs/puppet&lt;br /&gt;
$ cd puppet&lt;br /&gt;
$ sudo ruby ./install.rb&lt;br /&gt;
&lt;br /&gt;
To install into a different location you can use:&lt;br /&gt;
&lt;br /&gt;
$ sudo ruby install.rb --bindir=/usr/bin --sbindir=/usr/sbin&lt;br /&gt;
&lt;br /&gt;
Alternative Install Method: Using Ruby Gems&lt;br /&gt;
&lt;br /&gt;
You can also install Facter and Puppet via gems:&lt;br /&gt;
&lt;br /&gt;
  $ wget http://puppetlabs.com/downloads/gems/facter-1.5.7.gem&lt;br /&gt;
  $ sudo gem install facter-1.5.7.gem&lt;br /&gt;
  $ wget http://puppetlabs.com/downloads/gems/puppet-0.25.1.gem&lt;br /&gt;
  $ sudo gem install puppet-0.25.1.gem&lt;br /&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/7224500646953226549-2543204063756512992?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/cxm6d-v2eBl4gzVoePbWtM-PXIY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cxm6d-v2eBl4gzVoePbWtM-PXIY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/cxm6d-v2eBl4gzVoePbWtM-PXIY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cxm6d-v2eBl4gzVoePbWtM-PXIY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/KiBYrm3KvYM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/2543204063756512992/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/08/installing-puppet.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/2543204063756512992?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/2543204063756512992?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/KiBYrm3KvYM/installing-puppet.html" title="Installing Puppet" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/08/installing-puppet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0ECQX05eSp7ImA9WhdXEEw.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-7475175522701156114</id><published>2011-08-22T17:49:00.000+05:30</published><updated>2011-08-22T17:51:00.321+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-22T17:51:00.321+05:30</app:edited><title>Puppet</title><content type="html">Why Puppet.&lt;br /&gt;
&lt;br /&gt;
As system administrators acquire more and more systems to manage, automation of mundane tasks is increasingly important. Rather than develop in-house scripts, it is desirable to share a system that everyone can use, and invest in tools that can be used regardless of one’s employer. Certainly doing things manually doesn’t scale.&lt;br /&gt;
&lt;br /&gt;
Puppet has been developed to help the sysadmin community move to building and sharing mature tools that avoid the duplication of everyone solving the same problem. It does so in two ways:&lt;br /&gt;
&lt;br /&gt;
It provides a powerful framework to simplify the majority of the technical tasks that sysadmins need to perform&lt;br /&gt;
The sysadmin work is written as code in Puppet’s custom language which is shareable just like any other code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below are few links for Studying Puppet: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://bitfieldconsulting.com/puppet-tutorial&lt;br /&gt;
http://bitfieldconsulting.com/puppet-tutorial-2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://projects.puppetlabs.com/projects/1/wiki/Using_Stored_Configuration&lt;br /&gt;
&lt;br /&gt;
http://www.agileweboperations.com/configuration-management-introduction-to-puppet&lt;br /&gt;
&lt;br /&gt;
http://bitfieldconsulting.com/puppet-and-mysql-create-databases-and-users&lt;br /&gt;
&lt;br /&gt;
http://www.how2centos.com/installing-puppet-dashboard-on-centos-5-5/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://docs.puppetlabs.com/&lt;br /&gt;
&lt;br /&gt;
http://docs.puppetlabs.com/guides/installation.html&lt;br /&gt;
http://docs.puppetlabs.com/guides/configuring.html&lt;br /&gt;
http://docs.puppetlabs.com/guides/language_guide.html&lt;br /&gt;
http://docs.puppetlabs.com/guides/tools.html&lt;br /&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/7224500646953226549-7475175522701156114?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0Mumh2nVhMEEnT29HMBJukTW4vo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0Mumh2nVhMEEnT29HMBJukTW4vo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0Mumh2nVhMEEnT29HMBJukTW4vo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0Mumh2nVhMEEnT29HMBJukTW4vo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/mj3aGDUH4oA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/7475175522701156114/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/08/puppet.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/7475175522701156114?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/7475175522701156114?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/mj3aGDUH4oA/puppet.html" title="Puppet" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/08/puppet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0IBQnk_eyp7ImA9WhdRGEs.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-4335422759101527206</id><published>2011-08-09T11:13:00.000+05:30</published><updated>2011-08-09T11:29:13.743+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-09T11:29:13.743+05:30</app:edited><title>Linux using my RAM</title><content type="html">Q. How do I find out what process are eating up all my memory. Is it possible to find out how long that memory has been allocated to particular process? How do I kill that process to free up memory?&lt;br /&gt;
&lt;br /&gt;
A. You need to use the top command which provides a dynamic real-time view of a running system. It can display system summary information as well as a list of tasks currently being managed by the Linux kernel.&lt;br /&gt;
Simply type top command:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# top&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
top command will tell you the percentage of physical memory a particular process is using at any given time. As far as I know, there is no easy way that can tell how long that memory has been allocated.&lt;br /&gt;
You can also use ps command to get more information about process.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;# ps aux | less&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
To kill process uses kill command &lt;br /&gt;
&lt;br /&gt;
'free' and /proc &lt;br /&gt;
The 'free' command shows the memory on a machine, in certain categories. &lt;br /&gt;
[need explanation of categories here...'man free' doesn't explain the numbers] &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ free&lt;/b&gt;&lt;br /&gt;
total       used       free     shared    buffers     cached&lt;br /&gt;
Mem:        507564     481560      26004          0      68888     185220&lt;br /&gt;
-/+ buffers/cache:     227452     280112&lt;br /&gt;
Swap:      2136604     105168    2031436&lt;br /&gt;
&lt;br /&gt;
This information is obtained from /proc/meminfo, which has additional details not shown by the 'free' command. &lt;br /&gt;
The following is on my machine with 512 Mb RAM, running Linux 2.6.3: &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;$ cat /proc/meminfo&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
MemTotal:       507564 kB&lt;br /&gt;
MemFree:         26004 kB&lt;br /&gt;
Buffers:         68888 kB&lt;br /&gt;
Cached:         185220 kB&lt;br /&gt;
SwapCached:      29348 kB&lt;br /&gt;
Active:         342488 kB&lt;br /&gt;
Inactive:        32092 kB&lt;br /&gt;
HighTotal:           0 kB&lt;br /&gt;
HighFree:            0 kB&lt;br /&gt;
LowTotal:       507564 kB&lt;br /&gt;
LowFree:         26004 kB&lt;br /&gt;
SwapTotal:     2136604 kB&lt;br /&gt;
SwapFree:      2031436 kB&lt;br /&gt;
Dirty:              88 kB&lt;br /&gt;
Writeback:           0 kB&lt;br /&gt;
Mapped:         165648 kB&lt;br /&gt;
Slab:            73212 kB&lt;br /&gt;
Committed_AS:   343172 kB&lt;br /&gt;
PageTables:       2644 kB&lt;br /&gt;
VmallocTotal:   524212 kB&lt;br /&gt;
VmallocUsed:      7692 kB&lt;br /&gt;
VmallocChunk:   516328 kB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;meminfo:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Provides information about distribution and utilization of memory.  This&lt;br /&gt;
varies by architecture and compile options.  The following is from a&lt;br /&gt;
16GB PIII, which has highmem enabled.  You may not have all of these fields.&lt;br /&gt;
&lt;br /&gt;
&gt; cat /proc/meminfo&lt;br /&gt;
&lt;br /&gt;
MemTotal:     16344972 kB&lt;br /&gt;
MemFree:      13634064 kB&lt;br /&gt;
Buffers:          3656 kB&lt;br /&gt;
Cached:        1195708 kB&lt;br /&gt;
SwapCached:          0 kB&lt;br /&gt;
Active:         891636 kB&lt;br /&gt;
Inactive:      1077224 kB&lt;br /&gt;
HighTotal:    15597528 kB&lt;br /&gt;
HighFree:     13629632 kB&lt;br /&gt;
LowTotal:       747444 kB&lt;br /&gt;
LowFree:          4432 kB&lt;br /&gt;
SwapTotal:           0 kB&lt;br /&gt;
SwapFree:            0 kB&lt;br /&gt;
Dirty:             968 kB&lt;br /&gt;
Writeback:           0 kB&lt;br /&gt;
Mapped:         280372 kB&lt;br /&gt;
Slab:           684068 kB&lt;br /&gt;
Committed_AS:  1576424 kB&lt;br /&gt;
PageTables:      24448 kB&lt;br /&gt;
ReverseMaps:   1080904&lt;br /&gt;
VmallocTotal:   112216 kB&lt;br /&gt;
VmallocUsed:       428 kB&lt;br /&gt;
VmallocChunk:   111088 kB&lt;br /&gt;
&lt;br /&gt;
MemTotal: Total usable ram (i.e. physical ram minus a few reserved&lt;br /&gt;
bits and the kernel binary code)&lt;br /&gt;
MemFree: The sum of LowFree+HighFree&lt;br /&gt;
Buffers: Relatively temporary storage for raw disk blocks&lt;br /&gt;
shouldn't get tremendously large (20MB or so)&lt;br /&gt;
Cached: in-memory cache for files read from the disk (the&lt;br /&gt;
pagecache).  Doesn't include SwapCached&lt;br /&gt;
SwapCached: Memory that once was swapped out, is swapped back in but&lt;br /&gt;
still also is in the swapfile (if memory is needed it&lt;br /&gt;
doesn't need to be swapped out AGAIN because it is already&lt;br /&gt;
in the swapfile. This saves I/O)&lt;br /&gt;
Active: Memory that has been used more recently and usually not&lt;br /&gt;
reclaimed unless absolutely necessary.&lt;br /&gt;
Inactive: Memory which has been less recently used.  It is more&lt;br /&gt;
eligible to be reclaimed for other purposes&lt;br /&gt;
HighTotal:&lt;br /&gt;
HighFree: Highmem is all memory above ~860MB of physical memory&lt;br /&gt;
Highmem areas are for use by userspace programs, or&lt;br /&gt;
for the pagecache.  The kernel must use tricks to access&lt;br /&gt;
this memory, making it slower to access than lowmem.&lt;br /&gt;
LowTotal:&lt;br /&gt;
LowFree: Lowmem is memory which can be used for everything that&lt;br /&gt;
highmem can be used for, but it is also availble for the&lt;br /&gt;
kernel's use for its own data structures.  Among many&lt;br /&gt;
other things, it is where everything from the Slab is&lt;br /&gt;
allocated.  Bad things happen when you're out of lowmem.&lt;br /&gt;
SwapTotal: total amount of swap space available&lt;br /&gt;
SwapFree: Memory which has been evicted from RAM, and is temporarily&lt;br /&gt;
on the disk&lt;br /&gt;
Dirty: Memory which is waiting to get written back to the disk&lt;br /&gt;
Writeback: Memory which is actively being written back to the disk&lt;br /&gt;
Mapped: files which have been mmaped, such as libraries&lt;br /&gt;
Slab: in-kernel data structures cache&lt;br /&gt;
Committed_AS: An estimate of how much RAM you would need to make a&lt;br /&gt;
99.99% guarantee that there never is OOM (out of memory)&lt;br /&gt;
for this workload. Normally the kernel will overcommit&lt;br /&gt;
memory. That means, say you do a 1GB malloc, nothing&lt;br /&gt;
happens, really. Only when you start USING that malloc&lt;br /&gt;
memory you will get real memory on demand, and just as&lt;br /&gt;
much as you use. So you sort of take a mortgage and hope&lt;br /&gt;
the bank doesn't go bust. Other cases might include when&lt;br /&gt;
you mmap a file that's shared only when you write to it&lt;br /&gt;
and you get a private copy of that data. While it normally&lt;br /&gt;
is shared between processes. The Committed_AS is a&lt;br /&gt;
guesstimate of how much RAM/swap you would need&lt;br /&gt;
worst-case.&lt;br /&gt;
PageTables: amount of memory dedicated to the lowest level of page&lt;br /&gt;
tables.&lt;br /&gt;
ReverseMaps: number of reverse mappings performed&lt;br /&gt;
VmallocTotal: total size of vmalloc memory area&lt;br /&gt;
VmallocUsed: amount of vmalloc area which is used&lt;br /&gt;
VmallocChunk: largest contigious block of vmalloc area which is free&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;This command will list all of your processes sorted by memory usage:&lt;br /&gt;
&lt;br /&gt;
ps -eo pmem,pcpu,rss,vsize,args | sort -k 1 -r | more&lt;br /&gt;
&lt;br /&gt;
The first column shows the percentage of memory used by the process. You can use this information to find out which process is using the most.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;ps -A --sort -rss -o comm,pmem | head -n 11&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;ps -A --sort -rss -o pid,comm,pmem,rss&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This will give you the 10 processes using the most ram&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;lsb_release -a &amp;&amp; free -m&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
From this command you get information of version of linux , ram,and memory status information. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use a tool called &lt;b&gt;pmap&lt;/b&gt;. It reports the memory map of a process or processes.&lt;br /&gt;
pmap examples&lt;br /&gt;
&lt;br /&gt;
To display process mappings, type&lt;br /&gt;
$ pmap pid&lt;br /&gt;
$ pmap 3724&lt;br /&gt;
Output:&lt;br /&gt;
3724:   /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf&lt;br /&gt;
0000000000400000    164K r-x--  /usr/sbin/lighttpd&lt;br /&gt;
0000000000629000     12K rw---  /usr/sbin/lighttpd&lt;br /&gt;
000000000bb6b000   4240K rw---    [ anon ]&lt;br /&gt;
00000035ee600000    104K r-x--  /lib64/ld-2.5.so&lt;br /&gt;
00000035ee819000      4K r----  /lib64/ld-2.5.so&lt;br /&gt;
00000035ee81a000      4K rw---  /lib64/ld-2.5.so&lt;br /&gt;
00000035eea00000   1304K r-x--  /lib64/libc-2.5.so&lt;br /&gt;
00000035eeb46000   2048K -----  /lib64/libc-2.5.so&lt;br /&gt;
00000035eed46000     16K r----  /lib64/libc-2.5.so&lt;br /&gt;
00000035eed4a000      4K rw---  /lib64/libc-2.5.so&lt;br /&gt;
00000035eed4b000     20K rw---    [ anon ]&lt;br /&gt;
00000035eee00000      8K r-x--  /lib64/libdl-2.5.so&lt;br /&gt;
00000035eee02000   2048K -----  /lib64/libdl-2.5.so&lt;br /&gt;
.....&lt;br /&gt;
....&lt;br /&gt;
00002aaaac51e000      4K r----  /lib64/libnss_files-2.5.so&lt;br /&gt;
00002aaaac51f000      4K rw---  /lib64/libnss_files-2.5.so&lt;br /&gt;
00007fff7143b000     84K rw---    [ stack ]&lt;br /&gt;
ffffffffff600000   8192K -----    [ anon ]&lt;br /&gt;
total            75180K&lt;br /&gt;
The -x option can be used to provide information about the memory allocation and mapping types per mapping. The amount of resident, non-shared anonymous, and locked memory is shown for each mapping:&lt;br /&gt;
pmap -x 3526&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Clearing the disk cache&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
For experimentation, it's very convenient to be able to drop the disk cache. For this, we can use the special file /proc/sys/vm/drop_caches. By writing 3 to it, we can clear most of the disk cache: &lt;br /&gt;
$ free -m&lt;br /&gt;
total       used       free     shared    buffers     cached&lt;br /&gt;
Mem:          1504       1471         33          0         36        801&lt;br /&gt;
-/+ buffers/cache:        633        871&lt;br /&gt;
Swap:         2047          6       2041&lt;br /&gt;
&lt;br /&gt;
$ echo 3 | sudo tee /proc/sys/vm/drop_caches &lt;br /&gt;
3&lt;br /&gt;
&lt;br /&gt;
$ free -m&lt;br /&gt;
total       used       free     shared    buffers     cached&lt;br /&gt;
Mem:          1504        763        741          0          0        134&lt;br /&gt;
-/+ buffers/cache:        629        875&lt;br /&gt;
Swap:         2047          6       2041&lt;br /&gt;
&lt;br /&gt;
Notice how "buffers" and "cached" went down, free mem went up, and free+buffers/cache stayed the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can refer this &lt;a href="http://www.linuxatemyram.com/"&gt;link&lt;/a&gt; for additional information.&lt;br /&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-4335422759101527206?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KWdJ3Qo0F4wQ87duk5cRY9KQNnk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KWdJ3Qo0F4wQ87duk5cRY9KQNnk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KWdJ3Qo0F4wQ87duk5cRY9KQNnk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KWdJ3Qo0F4wQ87duk5cRY9KQNnk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/krsuU-2HqiY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/4335422759101527206/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/08/linux-using-my-ram.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/4335422759101527206?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/4335422759101527206?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/krsuU-2HqiY/linux-using-my-ram.html" title="Linux using my RAM" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/08/linux-using-my-ram.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUDQH87fSp7ImA9WhdTEUw.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-5321721908723587811</id><published>2011-07-08T13:01:00.000+05:30</published><updated>2011-07-08T13:01:11.105+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-08T13:01:11.105+05:30</app:edited><title>disable initial configuration tasks and server manager pop up when an admin logs</title><content type="html">Launch MMC.exe and select File -&gt; Add/Remove Snap-in, choose Group Policy and local computer and click ok.&lt;br /&gt;
&lt;br /&gt;
Or gpedit.msc&lt;br /&gt;
&lt;br /&gt;
From the Group policy snap-in, navigate to&lt;br /&gt;
&lt;br /&gt;
    Computer Configuration -&gt; Administrative Templates -&gt; System -&gt; Server Manager.&lt;br /&gt;
&lt;br /&gt;
There you will find 3 settings for Server Manager, one of it is the auto launch of Server Manager.  Enable the setting. The auto launch of ICT is also available here as well.&lt;br /&gt;
&lt;br /&gt;
For further click &lt;a href="http://social.technet.microsoft.com/Forums/en-US/windowsserver2008r2management/thread/bab9bb91-99fb-47eb-a306-4ba21962bda6"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-5321721908723587811?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NOc71yzPT7F93F3PumH_mjPJ6_s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NOc71yzPT7F93F3PumH_mjPJ6_s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NOc71yzPT7F93F3PumH_mjPJ6_s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NOc71yzPT7F93F3PumH_mjPJ6_s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/wTEf3KOTNWs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/5321721908723587811/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/07/disable-initial-configuration-tasks-and.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/5321721908723587811?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/5321721908723587811?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/wTEf3KOTNWs/disable-initial-configuration-tasks-and.html" title="disable initial configuration tasks and server manager pop up when an admin logs" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/07/disable-initial-configuration-tasks-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4DR34yfyp7ImA9WhZbEk0.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-6523149020307254929</id><published>2011-06-16T12:52:00.000+05:30</published><updated>2011-06-16T12:52:56.097+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-16T12:52:56.097+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="DOS Printing" /><title>Printers On Thin Client</title><content type="html">Suppose we have a WIndows 2008 Server and a thin client with IP as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Server IP: 192.168.0.1&lt;br /&gt;
Thin Client IP: 192.168.0.10&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Adding printer:&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
First we need to make sure that in thin client printer has been properly connected and printer (or some times prining) has been enabled in thin client.&lt;br /&gt;
&lt;br /&gt;
Now from Server (192.168.0.1), you need to add the printer.&lt;br /&gt;
&lt;br /&gt;
While adding the printer, select only the "Local printer attached to this computer option."&lt;br /&gt;
&lt;br /&gt;
Leave the other two boxes unchecked and click Next.&lt;br /&gt;
 &lt;br /&gt;
Check the "Create a new port" box and use the drop-down to select "Standard TCP/IP Port." &lt;br /&gt;
&lt;br /&gt;
On the following screen, you need to furnish the IP address of the printer ( ie IP Address of Thin Client). &lt;br /&gt;
&lt;br /&gt;
After that, select your printer and continue until completion.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;DOS Printing Or DOS apps to print from the printer&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Go to Printers and Faxes and right click the printer. Select Sharing and then enable sharing, and provide a name for the shared printer or accept the default name (remember what you named it -- you'll need it in the next step. Also provide the name which is less than 8 character).&lt;br /&gt;
&lt;br /&gt;
Open a command prompt (a "DOS" window) and type:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;net use lpt1: \\servername\printersharedname /persistent:yes&lt;br /&gt;
Or&lt;br /&gt;
net use lpt1: \\192.168.0.1\printersharedname /persistent:yes&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
That command captures the print jobs sent to LPT1 by your DOS app, and redirects it to the printer. The "persistent" switch means that the command will load automatically everytime your PC starts.&lt;br /&gt;
&lt;br /&gt;
To "undo" the command, at a command prompt just type:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;net use lpt1: /delete&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-6523149020307254929?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4AcV6LauyamJOiApdsXnPrP_qh8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4AcV6LauyamJOiApdsXnPrP_qh8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4AcV6LauyamJOiApdsXnPrP_qh8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4AcV6LauyamJOiApdsXnPrP_qh8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/acGTtONH7Uk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/6523149020307254929/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/06/printers-on-thin-client.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/6523149020307254929?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/6523149020307254929?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/acGTtONH7Uk/printers-on-thin-client.html" title="Printers On Thin Client" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/06/printers-on-thin-client.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYAQH08eSp7ImA9WhZQGEU.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-4450911026750856687</id><published>2011-04-27T11:15:00.001+05:30</published><updated>2011-04-27T11:15:41.371+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-27T11:15:41.371+05:30</app:edited><title>Active Directory Install Password Error in WIndows 2008 R2</title><content type="html">When installing active directory on a Windows 2008 R2 server the error message:&lt;br /&gt;
&lt;br /&gt;
—————————&lt;br /&gt;
Active Directory Domain Services Installation Wizard&lt;br /&gt;
—————————&lt;br /&gt;
The local Administrator account becomes the domain Administrator account when you create a new domain. The new domain cannot be created because the local Administrator account password does not meet requirements.&lt;br /&gt;
&lt;br /&gt;
Currently, a password is not required for the local Administrator account. We recommend that you use the net user command-line tool with the /passwordreq:yes option to require a password for this account before you create the new domain; otherwise, a password will not be required for the domain Administrator account.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;At a command prompt run:&lt;br /&gt;
&lt;br /&gt;
net user administrator /passwordreq:yes&lt;br /&gt;
&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-4450911026750856687?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/VX2uzFvtImZpOwDKqE6Viz2Fmns/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VX2uzFvtImZpOwDKqE6Viz2Fmns/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/VX2uzFvtImZpOwDKqE6Viz2Fmns/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VX2uzFvtImZpOwDKqE6Viz2Fmns/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/WLI-CsjFPqE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/4450911026750856687/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/04/active-directory-install-password-error.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/4450911026750856687?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/4450911026750856687?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/WLI-CsjFPqE/active-directory-install-password-error.html" title="Active Directory Install Password Error in WIndows 2008 R2" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/04/active-directory-install-password-error.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04DRH45cCp7ImA9Wx9UGU4.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-7156332998107049397</id><published>2011-02-17T16:22:00.000+05:30</published><updated>2011-02-17T16:22:55.028+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-17T16:22:55.028+05:30</app:edited><title>Comparison of Linux distributions</title><content type="html">Click &lt;a href="http://en.wikipedia.org/wiki/Comparison_of_Linux_distributions"&gt;here&lt;/a&gt; for the entire comparisons of Linux distributions&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-7156332998107049397?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/jhT4Mk_13l1Jh31DDv-aMzw24YI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jhT4Mk_13l1Jh31DDv-aMzw24YI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/jhT4Mk_13l1Jh31DDv-aMzw24YI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jhT4Mk_13l1Jh31DDv-aMzw24YI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/Gk6L8ZKbun0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/7156332998107049397/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/02/comparison-of-linux-distributions.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/7156332998107049397?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/7156332998107049397?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/Gk6L8ZKbun0/comparison-of-linux-distributions.html" title="Comparison of Linux distributions" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/02/comparison-of-linux-distributions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIMRHg5eyp7ImA9Wx9VGEw.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-7799344131301825485</id><published>2011-02-04T14:38:00.000+05:30</published><updated>2011-02-04T14:39:45.623+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-04T14:39:45.623+05:30</app:edited><title>Preventing deletion of desktop icons</title><content type="html">How to prevent deleting desktop icons&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Log in to client pc with the domain administrators account.&lt;br /&gt;
&lt;br /&gt;
Navigate to the user's profile folder, and open it.&lt;br /&gt;
&lt;br /&gt;
Take ownership of the desktop folder, and de-select the inherit permissions check box. &lt;br /&gt;
&lt;br /&gt;
Remove the user from the permissions access list. Then re-add him. The users permissions now should be read, execute, and and list.&lt;br /&gt;
&lt;br /&gt;
Then copy the shortcuts to desktop of domain users.&lt;br /&gt;
&lt;br /&gt;
Note: &lt;br /&gt;
&lt;br /&gt;
Make sure that you should logon to client pc at least one time to have the user’s profiles like Desktop.&lt;br /&gt;
&lt;br /&gt;
Can be implemented in domain and in work group too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-7799344131301825485?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/cli88lLY4lxBN6EnU_-g5VhMWiw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cli88lLY4lxBN6EnU_-g5VhMWiw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/cli88lLY4lxBN6EnU_-g5VhMWiw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cli88lLY4lxBN6EnU_-g5VhMWiw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/Q2ub1hfcFu0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/7799344131301825485/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/02/preventing-deletion-of-desktop-icons.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/7799344131301825485?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/7799344131301825485?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/Q2ub1hfcFu0/preventing-deletion-of-desktop-icons.html" title="Preventing deletion of desktop icons" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/02/preventing-deletion-of-desktop-icons.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUHSHs-fyp7ImA9Wx9VGEw.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-8671842750343146599</id><published>2011-02-04T14:32:00.001+05:30</published><updated>2011-02-04T14:33:59.557+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-04T14:33:59.557+05:30</app:edited><title>To enable domain users to login to Server locally and through RDP</title><content type="html">&lt;b&gt;&lt;br /&gt;
To enable domain users to login to Server locally and through RDP&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Please see the below image for more details:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_7BovJYsyw2A/TUvAqTYhJXI/AAAAAAAAAKs/hgqmnFGSx8U/s1600/login%2Blocally.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="240" width="320" src="http://4.bp.blogspot.com/_7BovJYsyw2A/TUvAqTYhJXI/AAAAAAAAAKs/hgqmnFGSx8U/s320/login%2Blocally.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-8671842750343146599?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4bSkEwpULw-qzkJpAzQfFINJ-VI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4bSkEwpULw-qzkJpAzQfFINJ-VI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4bSkEwpULw-qzkJpAzQfFINJ-VI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4bSkEwpULw-qzkJpAzQfFINJ-VI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/1cC2YPW7u9w" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/8671842750343146599/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/02/to-enable-domain-users-to-login-to.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/8671842750343146599?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/8671842750343146599?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/1cC2YPW7u9w/to-enable-domain-users-to-login-to.html" title="To enable domain users to login to Server locally and through RDP" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_7BovJYsyw2A/TUvAqTYhJXI/AAAAAAAAAKs/hgqmnFGSx8U/s72-c/login%2Blocally.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/02/to-enable-domain-users-to-login-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04DSX8zcSp7ImA9Wx9VGE0.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-7717415523460458398</id><published>2011-02-04T14:29:00.000+05:30</published><updated>2011-02-04T14:29:38.189+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-04T14:29:38.189+05:30</app:edited><title>Enable shutdown/restart permission for domain users</title><content type="html">&lt;b&gt;To enable shutdown/restart permission for domain users.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to edit the Group Policy and the GP is located here:&lt;br /&gt;
Start  Administrative Tools  Group Policy Management&lt;br /&gt;
Under Group Policy Management  Forest  Domain  Domain Name  Domain Controllers  Default Domain Controller Policy&lt;br /&gt;
Right Click on Default Domain Controller Policy and took “Edit” so that we will get &lt;br /&gt;
“Group Policy Management Editor” In that&lt;br /&gt;
&lt;br /&gt;
User Configuration&gt;Administrative Templates\Start Menu and Taskbar &lt;br /&gt;
Disable “Remove and prevent access to the Shut Down, Restart, and other options”&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_7BovJYsyw2A/TUu_0HSLKaI/AAAAAAAAAKk/52GrNMPRuc8/s1600/Image1.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="240" width="320" src="http://1.bp.blogspot.com/_7BovJYsyw2A/TUu_0HSLKaI/AAAAAAAAAKk/52GrNMPRuc8/s320/Image1.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-7717415523460458398?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/XfP4rl9M0I4xsllJmKo9dwB03EY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XfP4rl9M0I4xsllJmKo9dwB03EY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/XfP4rl9M0I4xsllJmKo9dwB03EY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XfP4rl9M0I4xsllJmKo9dwB03EY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/xeXohpdbktI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/7717415523460458398/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/02/to-enable-shutdownrestart-permission.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/7717415523460458398?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/7717415523460458398?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/xeXohpdbktI/to-enable-shutdownrestart-permission.html" title="Enable shutdown/restart permission for domain users" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_7BovJYsyw2A/TUu_0HSLKaI/AAAAAAAAAKk/52GrNMPRuc8/s72-c/Image1.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/02/to-enable-shutdownrestart-permission.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUQDQnYyfSp7ImA9Wx9VEk8.&quot;"><id>tag:blogger.com,1999:blog-7224500646953226549.post-6525074827684108642</id><published>2011-01-28T19:32:00.000+05:30</published><updated>2011-01-28T19:32:53.895+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-28T19:32:53.895+05:30</app:edited><title>To disable auto login network share folders</title><content type="html">/ comment is that everytime when we accesses network machines for eg: 192.168.1.2, it automatically opens. The first time, there was a prompt for the username and password. Now it never does that.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;cmd-&gt; net use \\IPorDOMAIN /del&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Eg: cmd-&gt; net use \\192.168.1.2 /del&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now windows can store login information for network locations and websites as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;start--&gt;run--&gt; rundll32.exe keymgr.dll, KRShowKeyMgr&lt;br /&gt;
&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7224500646953226549-6525074827684108642?l=pcgeo.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/sJ0Q3QzAYUR7XxHfEOFnkV5GwgU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sJ0Q3QzAYUR7XxHfEOFnkV5GwgU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/sJ0Q3QzAYUR7XxHfEOFnkV5GwgU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/sJ0Q3QzAYUR7XxHfEOFnkV5GwgU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/rBMw/~4/UcWmecpZcas" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://pcgeo.blogspot.com/feeds/6525074827684108642/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://pcgeo.blogspot.com/2011/01/to-disable-auto-login-network-share.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/6525074827684108642?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7224500646953226549/posts/default/6525074827684108642?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/rBMw/~3/UcWmecpZcas/to-disable-auto-login-network-share.html" title="To disable auto login network share folders" /><author><name>Geo P.C.</name><uri>http://www.blogger.com/profile/03206269473832448232</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="31" height="18" src="http://3.bp.blogspot.com/-REOicMi0Z5M/TjJiZzU3DGI/AAAAAAAAALw/NI1JQV3tt5Q/s220/Geo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://pcgeo.blogspot.com/2011/01/to-disable-auto-login-network-share.html</feedburner:origLink></entry></feed>

