Permalink
Browse files

add images to github, update links on posts

  • Loading branch information...
1 parent d435006 commit 34a5b80979fb88a759bc560883a3ad52ec5a0878 @gerold gerold committed Jun 23, 2012
Showing with 368 additions and 35 deletions.
  1. BIN images/2008/12/graph_imagephp-150x150.png
  2. BIN images/2008/12/graph_imagephp-300x124.png
  3. BIN images/2008/12/graph_imagephp.png
  4. BIN images/2008/12/network_traffic_improvement-150x150.png
  5. BIN images/2008/12/network_traffic_improvement-300x124.png
  6. BIN images/2008/12/network_traffic_improvement.png
  7. BIN images/2009/02/cloud-computing-chart-150x150.jpg
  8. BIN images/2009/02/cloud-computing-chart-300x235.jpg
  9. BIN images/2009/02/cloud-computing-chart.jpg
  10. BIN images/2009/03/virus-150x150.gif
  11. BIN images/2009/03/virus-220x300.gif
  12. BIN images/2009/03/virus.gif
  13. BIN images/2009/03/virus1-150x150.gif
  14. BIN images/2009/03/virus1-220x300.gif
  15. BIN images/2009/03/virus1.gif
  16. BIN images/2009/03/virus2-150x150.gif
  17. BIN images/2009/03/virus2-220x300.gif
  18. BIN images/2009/03/virus2.gif
  19. BIN images/2009/04/array_temps-150x150.png
  20. BIN images/2009/04/array_temps-300x138.png
  21. BIN images/2009/04/array_temps.png
  22. +83 −0 images/2009/04/copy_drupal_with_civicrm.sh
  23. +83 −0 images/2009/04/copy_drupal_with_civicrm1.sh
  24. +73 −0 images/2009/04/copy_drupal_without_civicrm.sh
  25. BIN images/2009/04/toohot-150x150.jpg
  26. BIN images/2009/04/toohot-300x300.jpg
  27. BIN images/2009/04/toohot.jpg
  28. BIN images/2009/05/7years_4-150x98.png
  29. BIN images/2009/05/7years_4-300x51.png
  30. BIN images/2009/05/7years_4.png
  31. BIN images/2009/05/audio16bit-150x150.jpg
  32. BIN images/2009/05/audio16bit-300x199.jpg
  33. BIN images/2009/05/audio16bit.jpg
  34. BIN images/2009/05/ddwrt-150x150.png
  35. BIN images/2009/05/ddwrt-300x143.png
  36. BIN images/2009/05/ddwrt.png
  37. BIN images/2009/05/dvcamera-150x150.jpg
  38. BIN images/2009/05/dvcamera-300x199.jpg
  39. BIN images/2009/05/dvcamera.jpg
  40. BIN images/2009/05/install.jpg
  41. BIN images/2009/05/installed-150x150.jpg
  42. BIN images/2009/05/installed-300x274.jpg
  43. BIN images/2009/05/installed.jpg
  44. BIN images/2009/05/mh-150x150.jpg
  45. BIN images/2009/05/mh-300x185.jpg
  46. BIN images/2009/05/mh.jpg
  47. BIN images/2009/05/vlcopen-150x150.png
  48. BIN images/2009/05/vlcopen-300x293.png
  49. BIN images/2009/05/vlcopen.png
  50. BIN images/2009/05/vlcwindow-150x150.png
  51. BIN images/2009/05/vlcwindow-300x257.png
  52. BIN images/2009/05/vlcwindow.png
  53. BIN images/2009/05/vlcwindow1-150x150.png
  54. BIN images/2009/05/vlcwindow1-300x257.png
  55. BIN images/2009/05/vlcwindow1.png
  56. BIN images/2009/07/LinuxSystemAdmin-gets-love-from-ladies-150x150.jpg
  57. BIN images/2009/07/LinuxSystemAdmin-gets-love-from-ladies-300x225.jpg
  58. BIN images/2009/07/LinuxSystemAdmin-gets-love-from-ladies.jpg
  59. +94 −0 images/2009/07/mountebs
  60. BIN images/2009/09/gmail_bites_it-150x150.png
  61. BIN images/2009/09/gmail_bites_it-300x187.png
  62. BIN images/2009/09/gmail_bites_it.png
  63. BIN images/2009/09/gmail_bites_it1-150x150.png
  64. BIN images/2009/09/gmail_bites_it1-300x187.png
  65. BIN images/2009/09/gmail_bites_it1.png
  66. BIN images/2009/09/gmail_bites_it2-150x150.png
  67. BIN images/2009/09/gmail_bites_it2-300x187.png
  68. BIN images/2009/09/gmail_bites_it2.png
  69. BIN images/2009/10/linux-blog-analytics-operating-system-stats-150x150.png
  70. BIN images/2009/10/linux-blog-analytics-operating-system-stats-300x149.png
  71. BIN images/2009/10/linux-blog-analytics-operating-system-stats.png
  72. BIN images/2009/11/2008-08-17-terminator-1024x640.png
  73. BIN images/2009/11/2008-08-17-terminator-150x150.png
  74. BIN images/2009/11/2008-08-17-terminator-300x187.png
  75. BIN images/2009/11/2008-08-17-terminator.png
  76. BIN images/2009/11/2008-08-25_1737obama-150x150.png
  77. BIN images/2009/11/2008-08-25_1737obama-300x227.png
  78. BIN images/2009/11/2008-08-25_1737obama.png
  79. BIN images/2009/11/2008-09-23_0754-plaxoerror-150x150.png
  80. BIN images/2009/11/2008-09-23_0754-plaxoerror-300x90.png
  81. BIN images/2009/11/2008-09-23_0754-plaxoerror.png
  82. BIN images/2009/11/2009-05-08_1607-150x150.png
  83. BIN images/2009/11/2009-05-08_1607-300x131.png
  84. BIN images/2009/11/2009-05-08_1607.png
  85. BIN images/2009/11/2009-05-13_1612-150x150.png
  86. BIN images/2009/11/2009-05-13_1612-300x185.png
  87. BIN images/2009/11/2009-05-13_1612.png
  88. BIN images/2009/11/2009-08-25_1356-150x150.png
  89. BIN images/2009/11/2009-08-25_1356-300x149.png
  90. BIN images/2009/11/2009-08-25_1356.png
  91. BIN images/2009/11/2009-10-02_1610-150x150.png
  92. BIN images/2009/11/2009-10-02_1610-300x164.png
  93. BIN images/2009/11/2009-10-02_1610.png
  94. BIN images/2009/11/becool-youtube-150x150.jpg
  95. BIN images/2009/11/becool-youtube-300x184.jpg
  96. BIN images/2009/11/becool-youtube.JPG
  97. BIN images/2009/11/facebook-150x150.png
  98. BIN images/2009/11/facebook-300x123.png
  99. BIN images/2009/11/facebook.png
  100. BIN images/2009/11/google-150x150.png
  101. BIN images/2009/11/google-300x85.png
  102. BIN images/2009/11/google.png
  103. BIN images/2009/11/logo_mysql_sun-150x68.gif
  104. BIN images/2009/11/logo_mysql_sun.gif
  105. BIN images/2009/11/stubmleupon.bmp
  106. BIN images/2009/11/technocrati-150x150.png
  107. BIN images/2009/11/technocrati-300x128.png
  108. BIN images/2009/11/technocrati.png
  109. BIN images/2009/11/terminator-mad-1024x576.png
  110. BIN images/2009/11/terminator-mad-150x150.png
  111. BIN images/2009/11/terminator-mad-300x168.png
  112. BIN images/2009/11/terminator-mad.png
  113. BIN images/2009/11/twitter-overcapacity-150x150.png
  114. BIN images/2009/11/twitter-overcapacity-300x238.png
  115. BIN images/2009/11/twitter-overcapacity.png
  116. BIN images/2009/11/webmistress-150x150.png
  117. BIN images/2009/11/webmistress-300x100.png
  118. BIN images/2009/11/webmistress.png
  119. BIN images/2010/02/Drupal.org-MakingDrupalFaster.v4.pdf
  120. BIN images/2010/04/chart-150x150.png
  121. BIN images/2010/04/chart-300x60.png
  122. BIN images/2010/04/chart.png
  123. BIN images/2010/05/geotrust-150x150.gif
  124. BIN images/2010/05/geotrust-300x150.gif
  125. BIN images/2010/05/geotrust.gif
  126. BIN images/2011/04/gmail_shortcut-1024x600.png
  127. BIN images/2011/04/gmail_shortcut-150x150.png
  128. BIN images/2011/04/gmail_shortcut-300x175.png
  129. BIN images/2011/04/gmail_shortcut.png
  130. +1 −1 source/_posts/2008-12-10-mysql-query-optimization-for-network-throughput.markdown
  131. +1 −1 source/_posts/2009-02-19-cloud-computing-chart.markdown
  132. +1 −1 source/_posts/2009-03-22-heurtrojanscriptiframe.markdown
  133. +2 −2 source/_posts/2009-04-03-drupal-howto-duplicate-copy-drupal-site.markdown
  134. +2 −2 source/_posts/2009-04-21-hawaii-comes-to-our-datecenter.markdown
  135. +4 −4 source/_posts/2009-05-06-dv-camera-computer-vlan-dvgrab-cheap-video-surveillance.markdown
  136. +1 −1 source/_posts/2009-05-12-install-imagemagick-and-imagick-on-cpanel-server.markdown
  137. +1 −1 source/_posts/2009-05-22-hidden-wordpress-spam.markdown
  138. +1 −1 source/_posts/2009-05-26-red-hat-enterprise-linux-48-released.markdown
  139. +1 −1 source/_posts/2009-07-29-task-on-amazon-ebs-on-centos-ami.markdown
  140. +1 −1 source/_posts/2009-07-30-july-31st-system-admin-day.markdown
  141. +1 −1 source/_posts/2009-09-01-google-webmail-bites-it.markdown
  142. +1 −1 .../2009-10-21-apple-sold-3-1-million-macs-in-the-last-three-months-17-more-than-a-year-ago.markdown
  143. +2 −2 source/_posts/2009-11-09-sysadmin-tool-of-the-week-terminator.markdown
  144. +1 −1 source/_posts/2009-11-10-mysql-sale-to-oracle-blocked-by-eu.markdown
  145. +10 −10 ...posts/2009-11-25-black-friday-404-site-not-available-and-others-from-your-favorite-sites.markdown
  146. +1 −1 source/_posts/2010-02-02-drupal-performance-improvement-for-the-layment-presentation.markdown
  147. +1 −1 ...-will-use-site-performance-and-page-load-speed-in-serp-ranking-sysadmin-seo-here-we-come.markdown
  148. +1 −1 source/_posts/2010-05-19-ssl-certificates-registration-now-includes-www-subdomain.markdown
  149. +1 −1 source/_posts/2011-04-01-gmail-shorcuts.markdown
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,83 @@
+#!/bin/bash
+# PURPOSE : copy drupal installation to new cpanel account
+# PARAMS : cp_usename cp_dbname cp_dbname2 cp_dbuser cp_dbpass cp_domain
+# WEBSITE : Promethost.com
+# NOTES : Initial version, no strict filters/validations on parameters
+# Applicable and tested on CPANEL servers. You can adjust the paths if you need to use on PLESK servers
+# This script includes CiviCRM module installed in a separate database
+
+# Test number of cli arguments
+if [ $# != 6 ]; then
+ echo "ERROR: param count does not match"
+ exit 0
+fi
+
+# Check home directory of given or destination cp_username if it exist
+if [ ! -d "/home/$1" ]; then
+ echo "ERROR: Environment does not exist for $1"
+ exit 0
+fi
+
+# Assign parameters to variables. You can just use the $1 $2 if you want less line of codes.
+DESTINATION_cp_usename=$1
+DESTINATION_cp_dbname=$2
+DESTINATION_cp_dbname2=$3
+DESTINATION_cp_dbuser=$4
+DESTINATION_cp_dbpass=$5
+DESTINATION_cp_domain=$6
+
+# Supply the info of the SOURCE Drupal installation
+drupal_username=SOURCE_CPANEL_USERNAME
+drupal_dbname=SOURCE_DRUPAL_DB_NAME
+drupal_dbname2=SOURCE_CIVICRM_DB_NAME
+# database user below should have access/privilege to the databases above
+drupal_dbuser=SOURCE_DB_USER
+drupal_dbpass=SOURCE_DB_PASS
+# full domain or subdomain of SOURCE drupal installation
+drupal_domain=DOMAIN.TLD
+TIME_STAMP=`date +%Y%m%d%H%M%S`
+# Email address to receive logs, separate address with comma
+MAIL_LIST="admin@domain.com"
+BACKUP_DIR="/full/path/to/backups"
+LOG_FILE=${BACKUP_DIR}/copydrupal-${DESTINATION_cp_usename}.${TIME_STAMP}.log
+
+# add details to log file
+echo "********** S T A R T O F R U N - (`date +%Y%m%d%H%M%S`) ************" >> $LOG_FILE
+echo " SCRIPT : copy_drupal.sh " >> $LOG_FILE
+echo " SITENAME : ${DESTINATION_cp_usename}" >> $LOG_FILE
+echo " LOG FILE : $LOG_FILE" >> $LOG_FILE
+echo " DATE : ${TIME_STAMP}" >> $LOG_FILE
+cat ${LOG_FILE}
+
+# copy files from drupal installs to new account, update owner/group
+cp -vpr /home/${drupal_username}/public_html/* /home/${DESTINATION_cp_usename}/public_html/ >> $LOG_FILE
+cp -vp /home/${drupal_username}/public_html/.htaccess /home/${DESTINATION_cp_usename}/public_html/ >> $LOG_FILE
+chown -R ${DESTINATION_cp_usename}:${DESTINATION_cp_usename} /home/${DESTINATION_cp_usename}/public_html/* >> $LOG_FILE
+chmod 777 /home/${DESTINATION_cp_usename}/public_html/sites/default/files >> $LOG_FILE
+
+# create sql dump of source Drupal install
+mysqldump -Q -u${drupal_dbuser} -p${drupal_dbpass} ${drupal_dbname} > ${BACKUP_DIR}/${drupal_dbname}.${TIME_STAMP}.sql
+# update referrences to domain name
+perl -pi -e "s/${drupal_domain}/${DESTINATION_cp_domain}/g" ${BACKUP_DIR}/${drupal_dbname}.${TIME_STAMP}.sql
+# update referrences to path and cpanel username
+perl -pi -e "s/${drupal_username}/${DESTINATION_cp_usename}/g" ${BACKUP_DIR}/${drupal_dbname}.${TIME_STAMP}.sql
+# import updated sql dump to new cpanel account
+mysql -u${DESTINATION_cp_dbuser} -p${DESTINATION_cp_dbpass} ${DESTINATION_cp_dbname} < ${BACKUP_DIR}/${drupal_dbname}.${TIME_STAMP}.sql
+
+# create sql dump of CiviCRM install
+mysqldump -Q -u${drupal_dbuser} -p${drupal_dbpass} ${drupal_dbname2} > ${BACKUP_DIR}/${drupal_dbname2}.${TIME_STAMP}.sql
+# import updated sql dump to new cpanel account
+mysql -u${DESTINATION_cp_dbuser} -p${DESTINATION_cp_dbpass} ${DESTINATION_cp_dbname2} < ${BACKUP_DIR}/${drupal_dbname2}.${TIME_STAMP}.sql
+
+# update configs and other files with referrence to source Drupal account
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_domain}/${DESTINATION_cp_domain}/g" {} \;
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_dbpass}/${DESTINATION_cp_dbpass}/g" {} \;
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_dbuser}/${DESTINATION_cp_dbuser}/g" {} \;
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_dbname}/${DESTINATION_cp_dbname}/g" {} \;
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_dbname2}/${DESTINATION_cp_dbname2}/g" {} \;
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_username}/${DESTINATION_cp_usename}/g" {} \;
+
+# send process logs to sysadmins
+echo "*********** E N D O F R U N - (`date +%Y%m%d%H%M%S`) ***************" >> $LOG_FILE
+cat $LOG_FILE | mail -s "Copy Drupal Site: ${drupal_domain} -> ${DESTINATION_cp_domain}" ${MAIL_LIST}
+echo "PROCESS COMPLETED."
@@ -0,0 +1,83 @@
+#!/bin/bash
+# PURPOSE : copy drupal installation to new cpanel account
+# PARAMS : cp_usename cp_dbname cp_dbname2 cp_dbuser cp_dbpass cp_domain
+# WEBSITE : Promethost.com
+# NOTES : Initial version, no strict filters/validations on parameters
+# Applicable and tested on CPANEL servers. You can adjust the paths if you need to use on PLESK servers
+# This script includes CiviCRM module installed in a separate database
+
+# Test number of cli arguments
+if [ $# != 6 ]; then
+ echo "ERROR: param count does not match"
+ exit 0
+fi
+
+# Check home directory of given or destination cp_username if it exist
+if [ ! -d "/home/$1" ]; then
+ echo "ERROR: Environment does not exist for $1"
+ exit 0
+fi
+
+# Assign parameters to variables. You can just use the $1 $2 if you want less line of codes.
+DESTINATION_cp_usename=$1
+DESTINATION_cp_dbname=$2
+DESTINATION_cp_dbname2=$3
+DESTINATION_cp_dbuser=$4
+DESTINATION_cp_dbpass=$5
+DESTINATION_cp_domain=$6
+
+# Supply the info of the SOURCE Drupal installation
+drupal_username=SOURCE_CPANEL_USERNAME
+drupal_dbname=SOURCE_DRUPAL_DB_NAME
+drupal_dbname2=SOURCE_CIVICRM_DB_NAME
+# database user below should have access/privilege to the databases above
+drupal_dbuser=SOURCE_DB_USER
+drupal_dbpass=SOURCE_DB_PASS
+# full domain or subdomain of SOURCE drupal installation
+drupal_domain=DOMAIN.TLD
+TIME_STAMP=`date +%Y%m%d%H%M%S`
+# Email address to receive logs, separate address with comma
+MAIL_LIST="admin@domain.com"
+BACKUP_DIR="/full/path/to/backups"
+LOG_FILE=${BACKUP_DIR}/copydrupal-${DESTINATION_cp_usename}.${TIME_STAMP}.log
+
+# add details to log file
+echo "********** S T A R T O F R U N - (`date +%Y%m%d%H%M%S`) ************" >> $LOG_FILE
+echo " SCRIPT : copy_drupal.sh " >> $LOG_FILE
+echo " SITENAME : ${DESTINATION_cp_usename}" >> $LOG_FILE
+echo " LOG FILE : $LOG_FILE" >> $LOG_FILE
+echo " DATE : ${TIME_STAMP}" >> $LOG_FILE
+cat ${LOG_FILE}
+
+# copy files from drupal installs to new account, update owner/group
+cp -vpr /home/${drupal_username}/public_html/* /home/${DESTINATION_cp_usename}/public_html/ >> $LOG_FILE
+cp -vp /home/${drupal_username}/public_html/.htaccess /home/${DESTINATION_cp_usename}/public_html/ >> $LOG_FILE
+chown -R ${DESTINATION_cp_usename}:${DESTINATION_cp_usename} /home/${DESTINATION_cp_usename}/public_html/* >> $LOG_FILE
+chmod 777 /home/${DESTINATION_cp_usename}/public_html/sites/default/files >> $LOG_FILE
+
+# create sql dump of source Drupal install
+mysqldump -Q -u${drupal_dbuser} -p${drupal_dbpass} ${drupal_dbname} > ${BACKUP_DIR}/${drupal_dbname}.${TIME_STAMP}.sql
+# update referrences to domain name
+perl -pi -e "s/${drupal_domain}/${DESTINATION_cp_domain}/g" ${BACKUP_DIR}/${drupal_dbname}.${TIME_STAMP}.sql
+# update referrences to path and cpanel username
+perl -pi -e "s/${drupal_username}/${DESTINATION_cp_usename}/g" ${BACKUP_DIR}/${drupal_dbname}.${TIME_STAMP}.sql
+# import updated sql dump to new cpanel account
+mysql -u${DESTINATION_cp_dbuser} -p${DESTINATION_cp_dbpass} ${DESTINATION_cp_dbname} < ${BACKUP_DIR}/${drupal_dbname}.${TIME_STAMP}.sql
+
+# create sql dump of CiviCRM install
+mysqldump -Q -u${drupal_dbuser} -p${drupal_dbpass} ${drupal_dbname2} > ${BACKUP_DIR}/${drupal_dbname2}.${TIME_STAMP}.sql
+# import updated sql dump to new cpanel account
+mysql -u${DESTINATION_cp_dbuser} -p${DESTINATION_cp_dbpass} ${DESTINATION_cp_dbname2} < ${BACKUP_DIR}/${drupal_dbname2}.${TIME_STAMP}.sql
+
+# update configs and other files with referrence to source Drupal account
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_domain}/${DESTINATION_cp_domain}/g" {} \;
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_dbpass}/${DESTINATION_cp_dbpass}/g" {} \;
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_dbuser}/${DESTINATION_cp_dbuser}/g" {} \;
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_dbname}/${DESTINATION_cp_dbname}/g" {} \;
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_dbname2}/${DESTINATION_cp_dbname2}/g" {} \;
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_username}/${DESTINATION_cp_usename}/g" {} \;
+
+# send process logs to sysadmins
+echo "*********** E N D O F R U N - (`date +%Y%m%d%H%M%S`) ***************" >> $LOG_FILE
+cat $LOG_FILE | mail -s "Copy Drupal Site: ${drupal_domain} -> ${DESTINATION_cp_domain}" ${MAIL_LIST}
+echo "PROCESS COMPLETED."
@@ -0,0 +1,73 @@
+#!/bin/bash
+# PURPOSE : copy drupal installation to new cpanel account
+# PARAMS : cp_usename cp_dbname cp_dbuser cp_dbpass cp_domain
+# WEBSITE : Promethost.com
+# NOTES : Initial version, no strict filters/validations on parameters
+# Applicable and tested on CPANEL servers. You can adjust the paths if you need to use on PLESK servers
+
+# Test number of cli arguments
+if [ $# != 5 ]; then
+ echo "ERROR: param count does not match"
+ exit 0
+fi
+
+# Check home directory of given or destination cp_username if it exist
+if [ ! -d "/home/$1" ]; then
+ echo "ERROR: Environment does not exist for $1"
+ exit 0
+fi
+
+# Assign parameters to variables. You can just use the $1 $2 if you want less line of codes.
+DESTINATION_cp_usename=$1
+DESTINATION_cp_dbname=$2
+DESTINATION_cp_dbuser=$3
+DESTINATION_cp_dbpass=$4
+DESTINATION_cp_domain=$5
+
+# Supply the info of the SOURCE Drupal installation
+drupal_username=SOURCE_CPANEL_USERNAME
+drupal_dbname=SOURCE_DRUPAL_DB_NAME
+drupal_dbuser=SOURCE_DB_USER
+drupal_dbpass=SOURCE_DB_PASS
+# full domain or subdomain of SOURCE drupal installation
+drupal_domain=DOMAIN.TLD
+TIME_STAMP=`date +%Y%m%d%H%M%S`
+# Email address to receive logs, separate address with comma
+MAIL_LIST="admin@domain.com"
+BACKUP_DIR="/full/path/to/backups"
+LOG_FILE=${BACKUP_DIR}/copydrupal-${DESTINATION_cp_usename}.${TIME_STAMP}.log
+
+# add details to log file
+echo "********** S T A R T O F R U N - (`date +%Y%m%d%H%M%S`) ************" >> $LOG_FILE
+echo " SCRIPT : copy_drupal.sh " >> $LOG_FILE
+echo " SITENAME : ${DESTINATION_cp_usename}" >> $LOG_FILE
+echo " LOG FILE : $LOG_FILE" >> $LOG_FILE
+echo " DATE : ${TIME_STAMP}" >> $LOG_FILE
+cat ${LOG_FILE}
+
+# copy files from drupal installs to new account, update owner/group
+cp -vpr /home/${drupal_username}/public_html/* /home/${DESTINATION_cp_usename}/public_html/ >> $LOG_FILE
+cp -vp /home/${drupal_username}/public_html/.htaccess /home/${DESTINATION_cp_usename}/public_html/ >> $LOG_FILE
+chown -R ${DESTINATION_cp_usename}:${DESTINATION_cp_usename} /home/${DESTINATION_cp_usename}/public_html/* >> $LOG_FILE
+chmod 777 /home/${DESTINATION_cp_usename}/public_html/sites/default/files >> $LOG_FILE
+
+# create sql dump of source Drupal install
+mysqldump -Q -u${drupal_dbuser} -p${drupal_dbpass} ${drupal_dbname} > ${BACKUP_DIR}/${drupal_dbname}.${TIME_STAMP}.sql
+# update referrences to domain name
+perl -pi -e "s/${drupal_domain}/${DESTINATION_cp_domain}/g" ${BACKUP_DIR}/${drupal_dbname}.${TIME_STAMP}.sql
+# update referrences to path and cpanel username
+perl -pi -e "s/${drupal_username}/${DESTINATION_cp_usename}/g" ${BACKUP_DIR}/${drupal_dbname}.${TIME_STAMP}.sql
+# import updated sql dump to new cpanel account
+mysql -u${DESTINATION_cp_dbuser} -p${DESTINATION_cp_dbpass} ${DESTINATION_cp_dbname} < ${BACKUP_DIR}/${drupal_dbname}.${TIME_STAMP}.sql
+
+# update configs and other files with referrence to source Drupal account
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_domain}/${DESTINATION_cp_domain}/g" {} \;
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_dbpass}/${DESTINATION_cp_dbpass}/g" {} \;
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_dbuser}/${DESTINATION_cp_dbuser}/g" {} \;
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_dbname}/${DESTINATION_cp_dbname}/g" {} \;
+find /home/${DESTINATION_cp_usename}/public_html -type f -exec perl -pi -e "s/${drupal_username}/${DESTINATION_cp_usename}/g" {} \;
+
+# send process logs to sysadmins
+echo "*********** E N D O F R U N - (`date +%Y%m%d%H%M%S`) ***************" >> $LOG_FILE
+cat $LOG_FILE | mail -s "Copy Drupal Site: ${drupal_domain} -> ${DESTINATION_cp_domain}" ${MAIL_LIST}
+echo "PROCESS COMPLETED."
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
View
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
@@ -0,0 +1,94 @@
+#! /bin/bash
+#=======================================================================
+# chkconfig: 2345 86 16
+# description: assigns ebs volume to a device and mounts the device and start mysql
+#
+# Procedure to add a normal startup script in CentOS
+# - add two comments on the script:
+# chkconfig: 2345 86 16
+# description: mountebs etc..
+# NOTE: chkconfig: 2345 (runlevels for the service), 86 (sequence when the service is started - ref: /etc/rc3.d), 16 (sequence when the service is stopped - /etc/rc0.d)
+# - put script into /etc/init.d, chmod to 755
+# - add to chkconfig: chkconfig --add mountebs
+#
+#=======================================================================
+# Here I added variables to make sure I have the correct paths
+export EC2_HOME="/root/.ec2"
+export PATH=$PATH:$EC2_HOME/bin
+# You need to the certificate and private key of your AWS account here
+export EC2_PRIVATE_KEY=$EC2_HOME/pk-xxxx.pem
+export EC2_CERT=$EC2_HOME/cert-xxxx.pem
+export JAVA_HOME=/usr/java/default
+export PATH=/root/.ec2/bin:$PATH
+
+VOL="vol-xxxxxx"
+DEV="/dev/sdh"
+MOUNT_POINT="/ebs"
+MAX_TRIES=60
+
+prog=$(basename $0)
+logger="logger -t $prog"
+curl="curl --retry 3 --silent --show-error --fail"
+
+# start/stop functions for OS
+
+case "$1" in
+
+start)
+ ISMOUNTED=$(df | grep $DEV | wc -l)
+ if [ $ISMOUNTED -eq 1 ]
+ then
+ /bin/echo "Volume already mounted. Exiting.."
+ exit 1
+ fi
+
+ perl -MIO::Socket::INET -e '
+ until(new IO::Socket::INET("169.254.169.254:80")){print"Waiting for network...\n";sleep 1}
+ ' | $logger
+
+ INSTANCE=$($curl http://169.254.169.254/latest/meta-data/instance-id)
+
+ CTR=0
+ /bin/echo "Mounting Elastic Block Store Volumes."
+ /root/.ec2/bin/ec2-attach-volume $VOL -i $INSTANCE -d $DEV 2>/dev/null
+ #/bin/echo "ec2-attach-volume $VOL -i $INSTANCE -d $DEV 2>/dev/null"
+
+ while [ ! -e "$DEV" ]; do
+ /bin/sleep 1
+ CTR=`expr $CTR + 1`
+ if [ $CTR -eq $MAX_TRIES ]
+ then
+ /bin/echo "WARNING: Cannot attach volume $VOL to $DEV -- Giving up after $MAX_TRIES attempts"
+ exit 1
+ fi
+ done
+
+ if [ ! -d $MOUNT_POINT ]; then
+ mkdir $MOUNT_POINT
+ fi
+
+ # mount using ext3
+ /bin/mount -t xfs $DEV $MOUNT_POINT
+ /etc/init.d/mysqld start
+ ;;
+
+stop)
+ /bin/echo "Unmounting Elastic Block Store Volumes."
+ # only detach if umount is successful.
+ /etc/init.d/mysqld stop
+ /bin/umount $MOUNT_POINT && ec2-detach-volume $VOL 2>/dev/null
+ rmdir $MOUNT_POINT
+
+ ;;
+restart)
+ stop
+ sleep 5
+ start
+ ;;
+*)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+ ;;
+esac
+
+exit 0
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
@@ -32,4 +32,4 @@ In and by them selves these queries look pretty harmless. 2000 rows is not that
We rewrote query and pushed to production on that same day. Yes, I know that a previous blog post tells us not to do that but in this case I'm glad we did. Network traffic dropped below 10Mb/s and the web site was flying. Below is the Cacti graph that shows that difference. Shortly after 15:00 we implemented the optimization and traffic dropped dramatically.
-[caption id="attachment_162" align="alignnone" width="500" caption="Network traffic decrease after query optimization"][![](http://linuxsysadminblog.com/wp-content/uploads/2008/12/network_traffic_improvement.png)](http://linuxsysadminblog.com/wp-content/uploads/2008/12/network_traffic_improvement.png)[/caption]
+[caption id="attachment_162" align="alignnone" width="500" caption="Network traffic decrease after query optimization"][![](http://linuxsysadminblog.com/images/2008/12/network_traffic_improvement.png)](http://linuxsysadminblog.com/images/2008/12/network_traffic_improvement.png)[/caption]
@@ -18,6 +18,6 @@ tags:
Here is a great chart from _James Maguire_ article ["Five Companies Shaping Cloud Computing: Who Wins?"](http://itmanagement.earthweb.com/entdev/article.php/11070_3798591_6/Five-Companies-Shaping-Cloud-Computing-Who-Wins.htm), that provides an overall comparative look at the current vendors in cloud computing:
-![cloud-computing-chart](http://linuxsysadminblog.com/wp-content/uploads/2009/02/cloud-computing-chart.jpg)
+![cloud-computing-chart](http://linuxsysadminblog.com/images/2009/02/cloud-computing-chart.jpg)
While you are here you go ahead and read his [article](http://itmanagement.earthweb.com/entdev/article.php/11070_3798591_1/Five-Companies-Shaping-Cloud-Computing-Who-Wins.htm) also as it has some good information on the future of the “big five” in cloud computing.
@@ -16,7 +16,7 @@ tags:
One of my friend asked for help about virus appearing on his sites (mostly WordPress sites).  I checked it out and my Kaspersky Internet Security blocked the pages from loading, so i downloaded the files manually and scanned html with Kaspersky to determine affected files.
-![virus2](http://linuxsysadminblog.com/wp-content/uploads/2009/03/virus2-220x300.gif)
+![virus2](http://linuxsysadminblog.com/images/2009/03/virus2-220x300.gif)
@@ -36,12 +36,12 @@ This post cover the steps to copy, transfer, or duplicate a Drupal site to new d
**Shell / Bash Scripts:**
-1.)  Copy Drupal Site with CiviCRM.  [**Download here!**](http://linuxsysadminblog.com/wp-content/uploads/2009/04/copy_drupal_with_civicrm.sh)
+1.)  Copy Drupal Site with CiviCRM.  [**Download here!**](http://linuxsysadminblog.com/images/2009/04/copy_drupal_with_civicrm.sh)
-2.)  Copy Drupal Site without CiviCRM.  [**Download here!**](http://linuxsysadminblog.com/wp-content/uploads/2009/04/copy_drupal_without_civicrm.sh)
+2.)  Copy Drupal Site without CiviCRM.  [**Download here!**](http://linuxsysadminblog.com/images/2009/04/copy_drupal_without_civicrm.sh)
Oops, something went wrong.

0 comments on commit 34a5b80

Please sign in to comment.