Aspell
From DreamHost
How to install the latest version of Aspell and Spellerpages.
It is possible to copy and paste the two sections of these instructions into separate files and then execute them via a shell script, but for a better understanding please execute each line individually.
Check with Aspell and verify you have most recent version. If you notice that there's a new version, please change the instructions for others.
wget ftp://ftp.gnu.org/gnu/aspell/aspell-0.60.6.tar.gz wget ftp://ftp.gnu.org/gnu/aspell/dict/en/aspell6-en-6.0-0.tar.bz2 tar -xvzf aspell-0.60.6.tar.gz tar -xvjf aspell6-en-6.0-0.tar.bz2 mkdir usr cd aspell-0.60.6 ./configure --prefix=$HOME/usr make make install make clean cd ..
Alright, if you've gotten this far without errors, you'll need to update your "path" now. We'll be using your favorite text editor from ssh to accomplish this. From your home directory, type:
nano .bash_profile
And add the following to the end of the file - something like the the 3rd line
PATH=$HOME/usr/bin/:$HOME/usr/share/:$PATH export PATH
Next, press ctrl and O to write out the file, press enter to keep the same file name, and then press ctrl and X to exit nano. Here's the second half of the install script:
You will have to logout and log back in to enable the new path from the .bash_profile. If not, the following script won't work correctly (it will try to install the dictionary in the system directories, because it finds the system aspell first). Then continue here:
cd aspell6-en-6.0-0 ./configure make make install make clean cd ..
DONE! At this point you should be able to run aspell properly from the command line (assuming there were no errors). Then "aspell -v" should tell you that you have the new version 6.0.x and not 3.x that DH has as default.
Optionally you may now install speller pages, it can be downloaded from: here. Simply decompress and upload the speller directory into your web-accessible area. If you don't have a program installed on your computer that can decompress the tar.gz just download it to your computer, then FTP it into your home directory. Run: tar -xvzf spellerpages-0.5.1.tar.gz Next cd into the new directory you just unpacked and type: mv speller/ /home/UserName/Domain.com/path/to/some/dir Obviously updating the destination with the correct details...
Now you need to edit the spellchecker.php file in the speller/server-scripts/ directory. On the 8th line it sets the language to use with aspell, but for some reason they think they still need to force utf 8 unicoding on it. Change that line to look like this:
$aspell_opts = "-a --lang=$lang";
You can now make sure everything is working by going to www.yourdomain.com/path/to/speller/ and typing in some incorrectly spelled words and run the spell check.
Now all you have left to do is to integrate this with your CMS in whatever manner you see fit. See the Main Page of Speller Pages for tips on integration.