Tag Archives: Ghostscript

HowTo: Install Ghostscript on MediaTemple

This is a repost of my original writeup over on Shamus Writes.

I thought I’d go ahead and describe the process for installing Ghostscript on a MediaTemple (dv) server, especially since I’ve already got one reader who would like to see it.

Use your favorite shell client to log on to your (mt) account as root. I use PuTTY Portable from the “portableapps.com”:http://portableapps.com website. At the command line typ:

cd /usr

Type:

wget http://ghostscript.com/releases/ghostscript-8.63.tar.gz

Once the file is done downloading, type:

tar -xvf ghostscript-8.63.tar.gz

Once _that’s_ done, type:

cd ghostscript-8.63

Type:

./configure

which will run for a moment and display a long list of output. Once you have the command line back, type:

make

which will take a bit longer to run than the configure command. Again, once you have the command line back, type:

make install

which will actually install Ghostscript on your server. Provided everything went well and no error messages showed up at any step along the way, you should now have Ghostscript installed. The default location for Ghostscript is:

/usr/local/bin/gs

Typing:

which gs

in the command line will confirm this. If you want to do cleanup, just move back up a directory to

/usr

and type :

rm ghostscript-8.63.tar.gz
rm -vrf ghostscript-8.63

From there, just configure whatever script you want to run with ImageMagick and Ghostscript according to said script’s specifications and have fun!

HowTo: Install Ghostscript on MediaTemple

I thought I’d go ahead and describe the process for installing Ghostscript on a MediaTemple (dv) server, especially since I’ve already got one reader who would like to see it.

Use your favorite shell client to log on to your (mt) account as root. I use PuTTY Portable from the “portableapps.com”:http://portableapps.com website. At the command line typ:

cd /usr

Type:

wget http://ghostscript.com/releases/ghostscript-8.63.tar.gz

Once the file is done downloading, type:

tar -xvf ghostscript-8.63.tar.gz

Once _that’s_ done, type:

cd ghostscript-8.63

Type:

./configure

which will run for a moment and display a long list of output. Once you have the command line back, type:

make

which will take a bit longer to run than the configure command. Again, once you have the command line back, type:

make install

which will actually install Ghostscript on your server. Provided everything went well and no error messages showed up at any step along the way, you should now have Ghostscript installed. The default location for Ghostscript is:

/usr/local/bin/gs

Typing:

which gs

in the command line will confirm this. If you want to do cleanup, just move back up a directory to

/usr

and type :

rm ghostscript-8.63.tar.gz
rm -vrf ghostscript-8.63

From there, just configure whatever script you want to run with ImageMagick and Ghostscript according to said script’s specifications and have fun!

Now with LaTeX! (Again)

One of the things I have really enjoyed about having my website on a MediaTemple server is the fact that I now have full root access (via SSH), which means I have more control over my own setup. The downside of this is that I’m still learning a lot of the basics of how to manage a server in this manner. This results in quite a few headaches from time to time, as I have to learn how to do ‘new’ things by doing them wrong about 100 times first. Don’t worry – I haven’t managed to actually break anything yet.

One of the features of Shamus Writes that I lost when I transferred from Bluehost to MediaTemple was the ability to insert LaTeX code into my blog posts. On Bluehost, I’d had to cobble together a ‘dirty’ solution, since they didn’t allow us root access on the shared servers to install software and weren’t willing to work with those of us who wanted it to install it for us. When I switched over to MediaTemple, I was more concerned with getting everything set up and learning how everything is put together here than I was with trying to figure out why LaTeX no longer worked.

Now, five months after the transfer, I was ready to tackle the issue again. In order to run to LaTeX on a server, though, you need four things installed: 1) LaTeX (duh); 2) ImageMagick, for managing the image files; 3) dvipng, for converting LaTeX’s dvi files into a usable PNG format; and, 4) Ghostscript. MediaTemple has ImageMagick, LaTeX, and dvipng installed on the server right out of the box. What puzzles me, though, is why they neglect to install Ghostscript (GS), when that is an essential part of any LaTeX installation.

Since GS clearly _wasn’t_ installed, however, I decided it was time to venture into the dark waters of installing the application on my server. The trouble I kept running into, though, was in getting the GS install package uploaded to the server in the first place. I knew it needed to be on the root somewhere, and my first approach was to try uploading the package via FTP – but nearly every location I tried refused the upload outright and the two or three directories that _would_ allow me to upload would then refuse me permission to run the configuration command. I tossed a couple of queries at MediaTemple’s (mt) tech guys trying to find out, first, if Ghostscript was installed (it wasn’t) and then, how I would go about installing it for myself. I’d already read through the Ghostscript documentation and found the installation instructions less than adequate, given my paltry knowledge of working in Unix. Unfortunately, the (mt) support guy wasn’t much more help, referring me back to the Ghostscript website to check their documentation.

It basically took me two days to finally find “a blog”:http://nicksergeant.com/blog/django/tutorial-installing-django-mt-media-temple-dv-35-server-modpython that described the process to install a completely _different_ application on an (mt) server. The article dropped the clue of going into the directory to which you would like to install and then downloading the install package directly to that directory. That was the piece I was missing, and from there it was pretty straightforward to run through the process of configuring and building GS and then installing the program.

I definitely learned a few things, both about using shell on an (mt) server and on installing applications on said server. And I have LaTeX working again, which is a nice bonus.