Finishing up Environment Clean Up

All three of my environments now match completely. The Module Filter module helped me get them on the same page. So did the terminal command for listing the Centos patch level,

rpm -q centos-release

I also gave my VMs static addresses. and made host references so i can browse them by name. I have such a small network in my VO that I don’t need a dedicated DNS server. Ole Hosts is fine.

Procedure – Upgrade Drupal Core from 7.18 to 7.19

Please note that this procedure has been written for my specific situation. I believe that it is applicable to others and may provide insight to your situation but it will most likely not match what you have exactly so please be cautious. Back things up and test in a dev/qual environment first! I have just finished it in Quality and it works fine.

  1. Back up everything
  2. Download the new core file
  3. Put site into maintenance mode
  4. Place it on the server and extract all the contents to /var/www/719/drupal-7.19
  5. In the newly extracted files delete the sites directory and all its subs.This is done because the upgrade is not going to replace anything in this directory
  6. Rrom a terminal window type:          yes | cp -r /var/www/719/drupal-7.19/* /var/www/html
  7. Note that the destination folder of html is my doc root and all the drupal folders/files are located right underneath this. the yes | cp…. prefix is to let the system know to overwrite everything in the destination. since sites is the only directory that we want to keep and we have removed it from the source, this will be fine.
  8. Run update.php by navigating to http://…yourdrupalsitename/update.php
  9. Follow the instructions for this closely
  10. navigate to reports, available updates and check the version of your core
  11. take the site off of maintenance mode
  12. check different things on the site to ensure a smooth upgrade has occurred.
  13. that should just about do it.

Drupal core upgrade to 7.19

Today I’m going to upgrade core. qual first then prod. i don’t really think there is a compelling reason but i haven’t done a core update yet and i want to have it documented. plus, i want to get rid of the notice about a security update being available. it’s persistent. which is good.

here is a good link: http://drupal.org/node/1494290

since i have a great quality env (VMware) I am using sync toy to back up all the vmdk and related files from the windows host where the centos qual files live. i’ll then follow the instructions on how to upgrade core. should be fine but this way i don’t have to install in sand first. plus, i need to back up the vm files for qual; it hasn’t been done in 8 days.

i have two machines at home. a new windows 7 laptop which i like a lot and an old dell running xp which i honestly love. i have 2.5 gb of mem in the 3.0 ghz cpu and it runs everything i need. i have an external usb connected to that and i keep everything of value in the my docs folder. i use synctoy to sync the desk and laptop my docs and then backup the desk my docs to the external 1tb drive. the only hole in this approach is fire. i’m not worried about theft (for other reasons). i should think about some sort of off site storage. but if this place burns down i’ll have much bigger troubles.

my prod host is with Blackmesh.com hosting. a very excellent hosting company.

the laptop runs the VMs. i have them all on the same network so it is pretty easy to access files from the desk to a vm host. layer 1 is wireless. all in all a nice setup.

so sync toy is moving my vm to the desk from the laptop right now. will be about 30 more minutes.

SSL on Production

I was able to install the SSL cert on prod in less than 5 minutes. that is the advantage of setting up a quality environment that truly matches prod; you can make the prod changes so easily and help keep your prod environment pristine.

now back to the multilingual stuff. i hate to get distracted but i really hate creds in clear text. ssl had to be done.

Getting all the environments ready.

So, I have all three environments up and running. I have the prod site out of DC hosted by blackmesh.com, the best drupal hosting company there is. The quality site, which mimics the prod site perfectly past the virtualization level, from the drupal core level, the OS and patch installs and even the modules and themes installed on drupal. file structure. user accounts. access methods (although prod uses sftp and qual uses ftp) and os components like apache and mysql. very nice.

i had to reenable clean urls on the q and d boxes. which was OK. i used most of the proc that i uploaded earlier today with a few differences that are not in the instructions. but google and drupal.org were very helpful and I really didn’t have much trouble. just be aware that linux permissions seem to be trickier than perms on a windows server.

getting late, and write more tomorrow. but i am excited because i am finally going to be able to get to work on the site itself and not have to worry so much about all the infrastructure crap. i did  get a few issues with file transfer worked out too. but i have a question: is there any other way to use drupals install module gui to use a protocol other than ftp? that’s the only choice in the drop down. i can ssh files to the server and i’m sure that i could install/enable the modules via the command line, but from the web admin gui running remotely, i don’t see how you could. i’ll pcik that back up more tomorrow maybe.

Enabling Clean URLs

I though that i had posted this proc months ago until i went looking for it and couldn’t find it. so here is the proc that i used to enable clean urls on drupal 7.17 on ubuntu desktop 12.04

Procedure – Enable clean URLs for Drupal 7 on Ubuntu Desktop 12_04 rev_1.doc

Date: 11/13/2012

Author: PJ McGhee

Email: PJMcGhee@hotmail.com

Procedure: New

Replace Existing

Intended Audience: Drupal admins

Purpose: To explain the steps needed to enable clean URLs in Drupal by enabling the rewrite_module component and changing the httpd.conf file of Apache2 to

Web References:

http://drupal.org/getting-started/clean-urls

http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

Procedure:

  1. Navigate to the Configuration, Search and Metadata section of Drupal.
  2. Click Clean URLs.
  3. In Drupal 7 the test will be run automatically and will give the result right away.
  4. When the test fails take a good look at the links above for background on the issue.
  5. Then, on this particular install, since you are running a dedicated server, you can do this first.
  6. At the command line, type apache2ctl –M and hit enter.
  7. Look for rewrite_module (shared) you should not see it (that’s to be expected)
  8. Type a2enmod rewrite and hit enter.
  9. Type apachectl –M again, hit enter. Now you should see the module listed there.
  10. Go to \etc\apache2 and edit the httpd.conf file which should be empty.
  11. Add the lines:

<Directory /var/www/drupal/>
   RewriteEngine on
   RewriteBase /drupal
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>

  1. In this scenario, the directory structure shown is correct, but it should reflect where you actually have Drupal installed.
  2. Then type sudo /etc/init.d/force-reload and hit enter.
  3. Then type sudo /etc/init.d/apache2 restart and hit enter.
  4. Then test clean URLs in Drupal.
  5. You should now see a check box that will allow you to enable this feature.

Prod and Dev

I have everything set up the way that I want it. i set up ftp on my dev server and  did a little configuring to get the permissions setup so that I could get to the /var/… dir tree. that wasn’t too much of a stretch. since it is dev, i just opened it up. plus, it is on a vm on my laptop so it isn’t a big deal.

so i can open the dev site with ftp, the prod site from ssh and open the same file from each side. the have the same name and the same dir location. so, i test the code on dev and then copy and paste it to the prod server. works pretty well.