GimmeSoda
The Blog of a Programmer
The Blog of a Programmer
Mar 11th
Create an admin user:
https://panel.dreamhost.com/index.cgi?tree=vserver.adminusers&
Login to SSH using that admin, then run:
sudo apt-get install memcached
That’ll do it!
Mar 10th
Opened a ticket on StatusNet: http://status.net/trac/ticket/2226
There was a recent need to automate the installation of StatusNet, so I went ahead and modified the install.php to allow for a command line interface to the install process, including a version which can be used to run the install from a script. I’m not a fan of the install.php at all, but it does the job – so rather then a rewrite I expanded it – at least until I have more time.
The modified file can be found here:
http://files.gimmesoda.com/dreamhost/software_patches/statusnet/install.php
The patch file is here:
http://files.gimmesoda.com/dreamhost/software_patches/statusnet/install.php.patch
So to handle the install process automatically:
php install.php dbhost sqltype dbname dbuser dbpass “Site Name Goes Here” siteurl fancyurl
The following might need explaining:
sqltype = mysql (it can also be pgsql)
Site name should be quoted, some characters like ! should be escaped.
siteurl = domain.com (not using http:// and no ending slash)
fancyurl is either true or false and if true the htaccess.sample should be renamed to .htaccess
So for the site I tested on:
php install.php mysql.gimmesoda.com mysql database dbuser dbpass “It’s Just Testing\!” testing.gimmesoda.com true
There is also an interactive command line install which is fun, try it out!
php install.php install
Nov 10th
*Updating Again*
Now updated for Magento 1.4.1.0
*Another Update*
I’ve gotten a few requests to get this updated for the new version of Magento. This is now done – the same instructions apply with slightly different download locations for the new version of Magento.
*One quick update*
Thanks to Ashley for mentioning that I didn’t add the prefix option as an argument. Added it to the script and updated the content below to show how to use it.
-JJ
There has apparently been quite a few people having trouble with the Magento install on DreamHost. I was among them, so I took the advice of fellow co-workers and used the command line method for installation. It worked, but I figured it could be easier so I threw together a bash script for that purpose. You can grab a copy from the following url and save it to the folder you want magento installed in.
http://www.gimmesoda.com/install_magento.sh
You can also run these commands from the folder you will be installing it to.
wget http://www.gimmesoda.com/install_magento.sh;
wget http://www.magentocommerce.com/downloads/assets/1.4.1.0/magento-1.4.1.0.tar.gz;
chmod +x install_magento.sh;
To make it easier you don’t need to hard code any of your variables, rather you just enter them through arguments for the script:
./install_magento.sh
In order to install Magento all the following are required.
-h: MySQL Database Hostname
-d: MySQL Database Name
-u: MySQL Database User
-p: MySQL Database Password
-x: Database Prefix
-a: Magento Shop Address (Example: http://shop.example.com/)
-f: Magento Admin First Name
-l: Magento Admin Last Name
-e: Magento Admin Email Address
-r: Magento Admin Login
-s: Magento Admin Pass (Must have letters and numbers.)
Which ends up looking like this:
./install_magento.sh -h mysql.example.com -d database -u dbuser -p dbpass -x prefix -a http://store.example.com/ -f First -l Last -e admin@example.com -r admin -s adminpass1
If everything worked as expected (running this on DreamHost it should) you’ll be prompted with something similar to this:
SUCCESS: 88dd17d566d65128b6bb9357773d269b
Which is the Magento encryption key and is rather important, so the keep a copy of that key. I’ll be adding a cleanup argument to this script which will remove all files from the install directory, which is useful in the case of errors. If you have any questions just let me know!
Nov 2nd
I really need to do some work with my CJ affiliate earnings. I’ve done basically nothing in the last three months and I wouldn’t mind boosting my earnings. WTH should help out with that, once it’s finished. :(
Jun 29th
You HIMYM fans will recognize this. Some of the songs have been cut to decrease any potential for loss in tremors of psychitude.
1) You Give Love a Bad Name – Bon Jovi
2) The Humpty Dance – Digital Underground
3) Come Sail Away – Styx
4) Don’t Stop Believin’ – Journey
5) The Transformers Theme – Vince DiCola
6) You’re The Best Around – Joe Esposito
7) High Enough – Damn Yankees
8) Jessie’s Girl – Rick Springfield
9) Rock You Like A Hurricane – Scorpions
10) Hip Hop Hooray – Naughty By Nature
11) Change Of Heart – Tom Petty
12) Run Runaway – Slade
I’m worried now – we NEED more songs. Working on it….
Songs to add in:
I Wanna Rock – Twisted Sister ???
Paradise City – Guns N’ Roses *fist bump*
Lick It Up – KISS
Talk Dirty To Me – Poison
May 9th
—-Update—-
I custom compiled PHP in order to get the daemons running. Apparently PHP5 has the “pcntl” functions disabled by default and I had to compile with –enable-pcntl, with those functions enabled the daemons ran without error.
Also, I modified the script for compiling PHP5 from the DreamHost wiki, normally found here:
http://wiki.dreamhost.com/Installing_PHP5
I’ve modified it so that it will compile a few PECL extensions into the binary statically and I didn’t have to go through the hassle of build a phpize that would work with the non-root user allowed me on the DreamHost environment. So I added memcache and mailparse to the binary and they are both working smoothly.
As mentioned earlier I was trying to get memcache to work on the PS and I am glad to report that I have gotten it working. Currently it’s setup to use a max of 512MB worth of memory and seems to be running nicely.
CPU MEM% COMMAND
0.0 1.4 0:00.11 ./memcached -d -m 512 -l 66.33.199.189 -p 11211
All in all – http://www.theserandomwords.com/ is coming along smoothly.
—-End Update—-
So apparently laconica fails to remote subscribe on various hosts – not sure if it is happening everywhere (I doubt it) but in any case DreamHost and BlueHost installs seem to be affected on version 0.7.3. Not so much fun!
http://laconi.ca/trac/ticket/1408
I’m investing some time into getting this fixed mostly because this type of problem (an issue on a core feature) really really bugs me. I think I’ve gotten close but no luck yet – any devs reading? Wanna get your hands dirty!? I’m pretty sure the issue is related to the actions/remotesubscribe.php and/or the extlib/OAuth.php files.
Beyond that I have some good news! Since I’m on a DreamHost PS I was able to spend some time in getting two things setup for use with my laconica installs.
Sphinx and the OpenFire XMPP Server are both working smoothly and integrated into Laconica. Memcache is next on my list and maybe a plugin that will allow users to register OpenFire accounts when they signup with the laconica instance! Nice, no?
Finally, I really am not enjoying the current installer – I think I’ll streamline my current class and convert it to a much simpler/cleaner version and submit it as a replacement, with any luck we’ll be getting clean web-based installs soon, one way or another!
Anyhow I need some sleep. Night… or ummm Morning!
JJ
Apr 27th
I finally got around to posting a rather bare-bones version of my own “Installing Laconica” page. I’ll add to it when I get more time but I couldn’t sleep so I figured I’d get it live.
Apr 23rd
Just finished testing the updated installer for laconica version 0.7.3 codenamed “You Are The Everything“. I’ve gone ahead and cleared out the old laconica install at http://laconica.gimmesoda.com and tested the installer there with no problems. Also, there was a bug which allowed the installer to continue running even after failing to select the database. This has been fixed as well.
The installer can be downloaded from the usual location:
http://www.gimmesoda.com/laconica_installer.zip
One last thing, you have to call the install script from gimme_install.php instead of install.php (laconica now has it’s own installer at that location).
If people still need help with this I do offer an install service, just contact me.
Apr 21st
So I work with the NextGEN Gallery plugin pretty often for various websites and one of the things we constantly find ourselves doing is downloading zip files of content, then uploading them to the system in order to import them. From time to time I would run into a max upload size problem which meant uploading outside the usual interface or doing things in portions.
I decided I needed to get around this problem so I went ahead and made what turned out to be a pretty simple modification of the NextGEN Gallery plugin. Here’s what I did:
The first modification is easiest, I just took the code from the import_zipfile function and modified it so that rather then expecting the file from the $_FILES variable I used curl to grab the zip file from the URL, save it to the /tmp directory with a random name, then followed the process from the original function. Easy!
The only other modification that was needed was the admin form for adding a gallery. The file that handles that is admin/addgallery.php and after taking a look at it I found it really wasn’t a complex form at all. I did the following:
Test it out, as long as PHP was compiled with cURL this should work pretty smoothly. You can grab a copy of the files I modified from here:
http://files.gimmesoda.com/nextgen/nextgen_gallery_mod.zip
Let me know if you have any questions!
Recent Comments