All posts in the Tutorials category

Installing the PHP SSH module in Centos/Redhat for WordPress

If you’re running a WordPress blog in 2012 and you have any sort of server access to make configuration changes there’s really no excuse to still be using FTP to perform updates, install plugins, etc, when enabling SSH support in PHP is two steps away at most.

Most of the guides around the net were written for Centos 5 or earlier systems, when installing the PHP SSH module meant grabbing gcc, make, a bunch of deps, and then doing the install with pecl.

Thankfully this isn’t the case anymore. Now you can install the PHP SSH module on CentOS/RedHat in less time than it would take someone to steal your FTP password during a transfer. So about a minute all said and done.

1.) Have the EPEL Repository Enabled

You don’t have the Fedora EPEL repo on your CentOS server? Failure. Install it like so:

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm

2.) yum install away!

Now that you have EPEL installed the PHP SSH module is a quick yum away:

yum install php-pecl-ssh2

3.) Reload Apache

I decided to put this in as an after-though, It really shouldn’t count as a step.

/sbin/service httpd reload

Boom, you’re done. Now when you log in/refresh your wp-admin section you should see an SSH2 radio button next to FTP and FTPS on any update/install form.

I for one welcome our new SSH overlords.

GTK2 Themes in Slackware

If you’re a Slackware user chances are you aren’t using gnome, and if you’re anything like me you might even be using a minimal window manager like Fluxbox. If the above assumptions are correct you’ve probably realized just how awful all of your GTK2 apps look ( think pidgin, claws-mail, libre-office, thunderbird, firefox, etc ).

Once upon a time I handled this problem by setting environmental variables to GTK theme files but I knew there had to be a better way.

The Better Way

The better way comes in the form of a small app called gtk-chtheme, which can be installed via slackbuild.

First go grab both the source and the slackbuild archive over at the Slackbuilds page.

Then we’ll build and install like any other Slackbuild:

tar -xvf gtk-chtheme.tar.gz
mv gtk-chtheme-* gtk-chtheme
cd gtk-chtheme
./gtk-chtheme.Slackbuild
installpkg /tmp/gtk-chtheme-*.tgz

Once installed you can run the command from the terminal to see a listing of current themes, most of which are XFCE related. I personally was looking for more choice in dark themes so I jumped over to GNOME Art and picked a few that I liked. After downloading a theme just untar it and move it over to /usr/share/themes/ and it will automatically show up in gtk-chtheme.

Spotify on Slackware 13.37 Linux

I’m a big Spotify fan, I have a paid account over there and enjoy the service. One minor annoyance however has been running the client on my machine. I did run it in wine for a small period of time but eventually switched entirely to using it on Android. This morning I got fed up with that and decided to get the native beta working on my Slackware 13.37 laptop.

The Install

First we’re going to jump over onto the repo and grab the .deb binary for the beta:

wget http://repository.spotify.com/pool/non-free/s/spotify/spotify-client-qt_0.6.2.291.gcccc1f5.116-1_i386.deb

Now we’ll extract the files from that deb with the ar command:

ar vx spotify-client-qt_0.6.2.291.gcccc1f5.116-1_i386.deb

Now you should see a file named data.tar.gz, this contains everything we’re interested in, lets extract that:

tar -xzvf data.tar.gz

Now all we need to do is move the binary and theme files to the correct locations on the system:

cp bin/spotify /usr/bin/ cp -R share/spotify /usr/share

Yes we could just copy the entire directory to /usr, but we don’t need everything in there, this keeps it more clean.

That’s it, really, now just run the spotify command:

spotify

You’re good to go. You’ll probably notice a couple of dependency errors on the execution of the command but nothing that will stop it from launching. Enjoy.