Posts Tagged install

Having a non-executable /tmp (noexec) wreaks havoc with apt-get

For performance reasons I choose tmpfs as the filesystem of choice for /tmp and for security reasons I always make sure that /tmp has a noexec flag attached to it.  I’ve been admining webservers for 10 years now and by far the single greatest system wide breach of security happens with a script being placed in /tmp and being executed.  8 times out of 10 I would say.  So of course we can make sure that /tmp doesnt’ allow anything to be executed from inside of it however when it comes time to use apt-get and a program needs to be preconfigured you are going to run into a little problem, that being that nothing works and the program won’t install, spewing out the following:

Preconfiguring packages …
Can’t exec “/tmp/ssl-cert.config.16841″: Permission denied at /usr/share/perl/5.10/IPC/Open3.pm line 168.
open2: exec of /tmp/ssl-cert.config.16841 configure failed at /usr/share/perl5/Debconf/ConfModule.pm line 59
ssl-cert failed to preconfigure, with exit status 255
dpkg: unrecoverable fatal error, aborting:
syntax error: unknown group ‘Debian-exim’ in statoverride file
E: Sub-process /usr/bin/dpkg returned an error code (2)

So to get around that the boys over at Debian-Administration we’re kind enough to post the following solution:

Add the following to the file /etc/apt/apt.conf:

DPkg::Pre-Invoke{"mount -o remount,exec /tmp";};
DPkg::Post-Invoke {"mount -o remount /tmp";};
This contains two lines, one running before any packing installation and one afterwards. They merely execute the commands required to add and remove the execute permissions on the /tmp

 

Tags: , , , , , , ,

Can’t install rsync on new Debian 6 server setup

Just incase you’ve setup a new Debian server and are unable to install rsync because of the following error: E: Package ‘rsync’ has no installation candidate

it means that you’re missing a repo in your sources.list file.  So head over there and edit /etc/apt/sources.list and add the following:

deb http://http.us.debian.org/debian/ squeeze contrib non-free main

and you’re good to go!

 

 

 

Tags: , , , , ,

Openx Hell – Upgrading to 2.8.7

So I was finally forced to upgraded to 2.8.7 when my previous install was hacked thanks to a security vulnerability in 2.8.2.  I knew there was a reason I was holding off on this because when I cleaned out the hack and upgraded I was greeted with an infinite look between admin/index.php and admin/install.php.   Solving this was silly enough, I just went in and made sure that the permissions in the openx directory were as they were supposed to be according to the install file and then I created a directory called ‘UPGRADE’ in openx/var then tried to log in.. No loop this time, instead I was told that my openx was already upgraded and I needed to remove the UPGRADE dir and then click continue..  I removed the dir, clicked continue and then was able to log in.. Phew.. Unfortunately after that my plugins were all messed and just when I was about to light my hair on fire I stumbled across the following tutorial here:  http://forum.openx.org/index.php?showtopic=503492171

 

1) Download 2.8.7 – http://www.openx.org/products/source-download

2) Back up your database and openx files

3) Copy your /var/www.example.com.conf.php and images directories over per step 5 here http://www.openx.org/docs/upgrading-openx

4) Disable maintenance

5) Remove your openx folder, and put the fresh install in its place (see notes below). You’ll have to do this anyway if you have an install in the root rather than a directory.

6) Go to your openx root http://www.example.com/openx and follow the upgrade instructions.

6.1) This point is moot for my install instructions but I’ll include it for completeness. When it asks you to enter the path for your *previous* openx installation (http://www.openx.org/files/docs_28/admin_guide/install_configuration-previous.png), ENTER THE NEW PATH. I mention this because many people (like myself) were trying (as the docs told us) to install into a openx_new folder. If you do this and enter the previous path as asked, you will *not* be able to proceed in the installation as it will throw all kinds of errors at you. The only way to proceed if you are using the openx_new method is to enter the NEW path.

6.2) The upgrade wizard should progress smoothly, all plugins will fail but it will let you proceed.

7) Go here and verify you are on 2.8.7 – /www/admin/updates-product.php

8) Ignore the advice here (http://forum.openx.org/index.php?showtopic=503426422) and instead get the 2.8.7 plugins from here https://svn.openx.org/openx/tags/2.8/openx-….7/etc/plugins/ – download all of these and save them into a folder

9) Now the fun begins… open two windows….

First window: /www/admin/plugin-index.php
Second window: /www/admin/maintenance-plugins.php?action=rep

9.1) Ok now go to the second window and run the plugin report. You’ll see lots of errors. Your end goal is for all these to show “No Errors”.

9.2) Go to the first window and click browse, and select one of the zip files. It will install, throw lots of errors. Starting at the top, work your way down through the list. You should see that at least a few of the plugs now have “Disable” next to them instead of “Install”. This is good.

9.3) Repeat step 9.2 over and over again until all the plugins have “Disable” next to them. I think that as you go on, you don’t need to run through the whole list each time, and can focus just on choosing plugins that haven’t installed yet. There appears to be a very complicated sequence of dependencies, I have no idea what the “shortest path” is. When all the plugins look installed, it’s time to proceed to 9.4..

9.4) Go to the second window and run a plugin report. You may see that some of the plugs still show they have errors. For those plugins, go back to the first window and reinstall them (even though they look like they’ve installed). There seems to be a second layer of dependencies that don’t show up on this screen and can be verified only with the second window.

9.5) Go back to the second window and check the status of the plugins. Repeat step 9.4 until all plugins show “No Errors”

10) Clean everything up by going to /www/admin/maintenance-plugins.php and running ALL the rebuild commands on the page.

11) You’re done! If this has helped you, I would love to hear it.

Tags: , , , , ,

Me, Myself and Drupal – Chapter 4 & 5: File Manager fun and tweaking Storm

Alright, what is this, day 10 since I started up the Drupal install, although really only day 5 since I’ve gotten serious with this beast.  The love affair has certainly been rocky but there might be an end in sight.  Today is the first day that I’ve gotten enough of the underlying systems in place that I am able to actually use one of them to help manage my team.   That’s right, I’ve officially crossed the line from setting up drupal 100% to using it.  It’s about a 80/20 split now between setup and usage, but still a start!

Day  4 was spent mostly trying to get a File Manager to work.  In the end I really settled on IMCE as it just had a shit ton more functionality to it with a lot of supporting modules made.  Oh, just so you know the two main choices are:

IMCE: http://drupal.org/project/imce

WebFM: http://drupal.org/project/webfm

Again, the reason I chose to go with IMCE, although WebFM had some promise is that IMCE just looked more robust with a lot more features.  In the end however it didn’t matter as IMCE didn’t work at all.  I was able to browse the file system with it, but uploading wasn’t going to happen.  The module installed fine, but the upload button, while clickable, didn’t do anything.  I also installed the IMCE_swfupload module that allows multiple uploads but that two didn’t work.  There was a fair bit of research done all over the place both in IMCE and with swfupload that led to no solution whatsoever and after 6-8 hours I called it quits on this module.

On the bright side WebFM does allow me to upload, however it is limited to single file uploads which really does make the module fairly useless as I may as well just attach them to notes,pages, books or whatever I am working on.

Now in regards to that 20% work I was able to do with Drupal it involved inputting some tasks into Storm.  Although this only came after a fair bit of wrestling.  Mostly because I stumbled across the Storm Conrib Module which adds a lot of functionality to Storm as well as the Storm Dashboard (which is so useful that I am scrapping the Rites of Spring theme all together in favour of a non-fixed width theme).  The problem was that a whole shwack load of modules needed to be added in order for these to work properly.  Notably the mysterious ‘Content’ module, which is notoriously hard to track down.  Trying doing a search for ‘Content’ under the modules section and see how many results come up.  I’ll save you some time and tell you that when you see a module that requires ‘Content’ it is actually referring to CCK or the ‘Content Construction Kit‘ .  Once I figured that out things started to slide a little smoother.  Actually a lot of modules will need CCK so you’re well off just to install it by default.  The ‘Date‘ module was also needed and so I plopped that into my drupal as well.  Lastly for my Project Management it is critical that my team members are notified when they are assigned new tasks or their current tasks are updated.  This one was a little harder to track down as it isn’t an official module yet but if you scroll down here: http://drupal.org/node/637852 you’ll be able to find it.

The vast majority of my work was trying to wrangle with IMCE and WebFM, which in the end was frutiless and I’ve decided to just go down the incredibly more complicated route and install a full SVN on my server.  Of course I’ll need to then teach my team how an SVN works(after, of course, I tech myself how an SVN works).  On the bright side there is a Drupal SVN so I’m keen to see how it integrates into Drupal.  My first order of business after the SVN is setup and running on it’s own is to watch this video: http://gotdrupal.com/videos/drupal-cvs-svn-setup .

More fun awaits!

http://drupal.org/project/date

Tags: , , , , , , ,

Me, myself and Drupal Chapter 3.5 : == ”’Wiki Hell”’ ==

Alright, the nightmare of getting a fully integrated Wiki into Drupal is finally over.  Hopefully some lucky soul finds this and saves themselves the literal days I spent getting this up and running.  At the end of my last post I mentioned a few links and articles here and there and I’m happy to report that none of them did the trick.  That being said I think it is still a good idea to go through them and even follow the instructions, whether or not they work, so that you can learn from them.  They teach a lot of stuff relating to input types that is crucial for using Drupal and will be crucial if you want to successfully implement a Wiki system.

First of all, forget about using any media wiki modules, they are all shit.  In fact mediawiki_api is so bad right now that at one point it actually came close to melting my server down.  The entire server, every one of the dozens of websites I run on it came crashing down to a crawl until I totally shut down apache and mysqld in order to manually remove the mediawiki_api module.  There is another Mediawiki filter module that also doesn’t work, again to flaunt how much they don’t work just implementing them and then trying to create content with an input type involving these filters causes whatever you write as content to just show up as a totally blank page.  Actually that mainly applies for the mediawiki_api module, the standard MediaWiki module with preloaded mediawiki filters goes one step further and causes any wiki content created with this filter to spit out an nginx error as it fucks with apache to the point of apache not even knowing what to do with the page.

So what did I do?  Well in the end the solution was really damn simple, it was just a matter of widdling away all of the non-functioning crap that shows up at the top of all the module lists and google searches for ‘drupal + wiki’ .  First off you are going to have to kiss your media wiki syntax good-bye. Well you don’t have to entirely as you can create your own filter sets by hand but to make filters takes time and patience that I was running out of, although I probably will go ahead now and make them anyways on top of what I have.  If you want some instructions on how to do this go here: http://drupal.org/node/217177

In the end the syntax I am using is from PmWiki because the module I am using comes from the kind sir over at  www.interestingto.me.uk.  For a complete rundown of the pmwiki syntax head over to:  http://www.pmwiki.org/wiki/PmWiki/TextFormattingRules.  So the first module you want to install can be found here: http://www.interestingto.me.uk/DrupalWikiModule .  Why this isn’t in the drupal module repository I don’t know, it damn well should be.  This is a fairly simple install with instructions on the page.  This is the main one, it actually allows you to use a wiki syntax and produce results that don’t destroy your server.

The other module you are going to want is this one: http://drupal.org/project/freelinking which basically implements filter for the easier creation of HTML links to other pages in the site.  So you can have nice [links] going straight to other wiki articles.  You’ll need to do a bit of reading to see how you properly link to other pages.

The Table of contents is the major reason I love Wiki’s and so you will need to get the Table of Contents module found here: http://drupal.org/project/tableofcontents .  It’s a snap to install and all you need to do after that is add it into your input type and insert a [toc] at the top of your post or alternatively you can go into your input type menu, click on your new wiki filter and then go to ‘configure’ to configure the TOC module to auto-insert a TOC when you exceed X number of headers.

The only thing else I can imagine is a module that allows inline images to be placed like in a wiki, but I’ll tackle that later I think after I wrap my head around how Drupal handles it’s images currently

So that’s that.  The wiki is up and running finally and I can breath a sigh of relief as I thought I was going to have to start from scratch here and reinstall drupal at one point.  I haven’t been able to get any of the wiki importers to work properly so it looks like I’ll just be copying and pasting that stuff into Drupal by hand.. Ah, and that makes me realized I am going to have to manually input the media wiki syntax into my filter because all of my other wiki’s are in media wiki format.. No rest for the wicked it would seem!

Here are some other related links of interest:

http://drupal.org/node/356583

http://drupal.org/node/217177

http://drupal-wiki.com/en/applications

http://openconcept.ca/blog/ethan/creating_a_drupal_6_wiki

http://www.starbowconsulting.com/node/111

http://groups.drupal.org/node/7072

http://groups.drupal.org/node/54688

Hope that helps, onto Chapter 4!!

Tags: , , , , , , , ,

Me and Drupal : Chapter 1 (There could be sparks here)

Up until this point I have been managing remote teams with a smattering of very useful tools.  phpBB3 or YaBB for message boards, Dotproject for project management, MediaWiki for internal documents, TeamSpeak for our voice conferences.  My toolbox was built up our of trial and error and sometimes following the path of least resistance.  But today there is a package that has the potential wrap all of my tools up with a nice pretty bow, add on SVN /  git functionality and much more.  The only problem is that the learning curve is a bit steep to go head into a complicated multi-module drupal setup as I have tried before and was deterred after a few fruitless days. However this day I approach it with new vigor and over the next month I will not quit until I have this system functioning exactly as I want it because i know once I have learned what I need to learn and set it up the way it needs to be setup I will be left with a system of unrivaled efficiency, functionality and usability for me and my teams.

So I shall document my journey’s, making sure to note all the struggles along the way as there will be many in hopes that others will be able to save some of the blood, sweat and tears .

Today my first problem was the installation.  I got to the screen to enter my database name, mysql username and all of that good stuff and then when entered correctly it would just refresh that page, clearing all of the text boxes I just filled out.  Now if I entered anything in incorrectly it would tell me there was an error with this or that but when it was all kosher itwould just blank out the text fields and refresh the page.   Quite strange, and so after researching I found out that if you move the ./sites/default/default.settings.php files to .sites/default/settings.php as it asks you to it does what I just described.  It would seem that it needs that default.settings.php file AND a settings.php files in that directory to function properly.  So word to the wise, do a cp command instead of a mv command and save yourself the trouble

Tags: , , , , ,

Page optimized by WP Minify WordPress Plugin