Archive | Tips & Tricks RSS feed for this section

SSH To Your Server From Your iPhone/iPod touch

IMG_0004

There’s a neat application on the iPhone App Store called TouchTerm which allows you to SSH in to your servers while on the go! I’ve personally found that this application has come in handy multiple times when a client needs a quick edit on one of their websites or if there’s a configuration error that needs a quick fix. I’ve also found it handy when the MySQL service or any of the services for that matter needs to be restarted. For 99 cents you really can’t go wrong!

The normal version of the application allows you to create server profiles so you can just tap them to connect rather then needing to input connection details every time you wish to connect to a server. I find this to be a really great time-saving feature. A new recent and much appreciated feature is the ability to use the application in landscape mode. This allows for the keyboard to be a bit bigger over the portrait mode.

The application support VT100 Terminal Emulation so that means you can run anything from top, to screen — really any console application!

There is a Pro version of this application includes all the same features as the normal version but also includes:

  • Extensive Configurability: Customize almost any aspect of the TT Pro interface, and manage configuration profiles to provide different settings for different servers.
  • Configuration Import/Export (Version 1.1): Import and export configuration settings, saved configurations, and keypads. This makes it easy to install “add-ons”, backup configuration data, share / download TT Pro ideas with the user community, and manually setup complicated or repetitive configurations using a text editor.
  • Command Library: You can “re-program” the interface functionality to suit your needs by referring to actions you do frequently. Nearly every user-accessible action is available in TT Pro as a custom command. This includes sending characters or commands to the remote host, changing font size and color, launching interface elements, and sending e-mails. Over 50 commands in all! These commands (individually, or in sequence) can easily be associated with gestures, custom keypads, and even application events. This provides you with complete control over the TT Pro interface!
  • Gesture Engine: TT Pro currently supports 94 different touch gestures, with more on the way. Each gesture can be customized to perform any of the available interface actions using the command library. Gesture Feedback also gives you instant, graphical feedback when a gesture is recognized, and “Practice Mode” allows you to quickly acclimate to the Gesture Engine. Finally, all aspects of the Gesture Engine are configurable. So you can now tailor settings for things like double-tap speed, swipe straightness, corner size, etc., in the way that is most comfortable for your usage in a particular context.
  • Copy and Paste: Easily place and adjust selection markers by dragging them within the terminal view. Popup zoom windows around the cursor make character-by-character adjustments easy, even when using a tiny font.
  • Auto-Completion: TT Pro includes the ability to index and remember everything you have typed or seen as output, and provide a popup list of available completions. Auto-Completion can be configured to launch whenever completions are available, or only when explicitly requested.
  • Graphical Filesystem Navigation: Never type “cd” on your iPhone again! FS Navigation Mode presents a graphical, table-based interface for quickly navigating directories with a single tap.
  • E-mail Integration: Mail the contents of the clipboard, the current terminal screen, or even the entire buffered contents.
  • Custom Keypads: Create and use any number of custom keypads. These keypads can be overlaid on the terminal view and used in conjunction with, or instead of, the standard iPhone keyboard. You have complete control over all the labels and actions associated with these keypads.
  • Integrated Help: TT Pro is a complex program, with powerful configuration tools and hundreds of ways to customize the interface just for your needs. To assist you along the way, integrated help is available through all stages of the customization process. Our online (iPhone-accessible!) guides and tutorials also help you quickly become familiarized with TT Pro.
  • Advanced Features: TT Pro includes several advanced features and options, such as control over SSH compression and encryption settings, and the ability to import private DSA/RSA authentication keys.

I haven’t got the Pro version myself, but I am thinking about getting it just for the ability to use the private DSA/RSA keys, and the graphical filesystem navigation abilities.

Check out the TouchTerm home page here and check out the normal and Pro versions of the applications on iTunes!

Read full storyComments { 1 }

Installing ‘unrar’ on Mac OS X Server

I’ve been having a lot of trouble unraring several larger (5+GB) files with TheUnarchiver and RARExpander GUI applications so I generally always just moved the rar’d files over to my Linux machine and run unrar on there and then move it back over, obviously one step to many!

Fortunately you can easily install the unrar application on your server or even just normal OS X client. Visit the RARLab website and go into their downloads section. There is one download which is Command Line Only and made for Mac OS X. Download that and then uncompress it. You should have a new folder called ‘rar’. While in command line navigate into that folder and run:

sudo install -c -o yourusername unrar /bin

This will install the binaries needed into the correct places. Now since my normal everyday account isn’t an account with administrator privileges I first had switch to one that was and then ran that command. Once completed (the install should take a few seconds if that) you can test it out by running:

unrar

If you’re shown a list of options then it worked!

I’m not really sure as to why GUI applications have trouble unraring large sized files, but unrar seems to be able to handle them just fine!

Read full storyComments { 0 }

Restore a Subversion Dump

Here’s a quick and easy way to restore a Subversion backup you may have made. Quickly, this is how you make the dump:

sudo svnadmin dump /path/to/reponame > /tmp/reponame.dump

if you want to restore that backup, type in:

sudo svnadmin load /path/to/reponame < /tmp/repo1.dump

Source.

Read full storyComments { 0 }

Removing an OpenFire Install

After playing with OpenFire for some time, I decided to go back to the default jabberd install on OS X Leopard
Server. Unfortunately, the application doesn’t seem to come with an un-installer nor are there directions in the documentation.

A quick search on the Ignite Software forums turned up these directions for removing OpenFire from your system:

sudo rm -rf /usr/local/openfire
sudo rm -rf /Library/PreferencePanes/Openfire.prefPane
sudo rm -rf /Library/LaunchDaemons/org.jivesoftware.openfire.plist
sudo rm -rf /Library/Receipts/Openfire.pkg

Thanks Todd Getz!

Read full storyComments { 1 }

MySQL Binary Logging

Last week one of our database servers notified me that the main OS drive had less then 5% storage space. I loaded up one of my favorite tools, Grand Perspective to see what was taking up so much space. Sure enough, I had about 5-6GBs of space left, and there were about 20-25 files each 1-2GBs in-size. Each file was a log file for MySQL. These were each binary log files.

Following the same article on the MySQL website, I found out that it was possible to delete the log files without screwing anything up. Running the PURGE BINARY LOGS did so. Now it is possible to set log sizes, but since I really have no use for them I just stopped the logging all together.

You can do this by editing the following file:

/etc/my.cnf

Locate the following lines and then comment it out.

# Replication Master Server (default)
# binary logging is required for replication
#log-bin=mysql-bin

Read full storyComments { 0 }

OS X Leopard Server Forwarding DNS to OpenDNS.com

Just recently I had a consulting appointment with a school that needed to use a proxy server in order to block students from inappropriate websites. Previous to my visit they were using a tangerine iBook with OS9 and some piece of software that did the proxy work. After some thought we came up with the idea of using OS X Server (since they also were running that) as the proxy server. It was much more up to date and it seemed like it would be pretty easy to transfer the list from the iBook’s proxy software to OS X Server. Unfortunately, I have a feeling the list was so huge that it kept crashing the Web service, so it was back to the drawing board.

We finally decided to use OpenDNS and after some initial testing it all seemed to work fine. We assigned all the student computers static IPs and setup the DNS using the OS X Leopards IP and then OpenDNS. We included the the servers IP first because it allowed the clients to find the server for network home directory use and then I assumed it would use OpenDNS second (for all other queries).

Unfortunately, while we could login to the network home directories, OpenDNS and blocking in-appropriate websites failed to work. Puzzled, I searched for a way to allow us to use the server for initial DNS, but anything else had to pass through OpenDNS. A quick search through the knowledge base turned up this article. Basically you just had to add a few lines into one of the DNS configuration files. Really simple. When I restarted the DNS service, nothing worked. I believe that is because the article linked above is for OS X Server Tiger and previous versions. After looking around in the DNS service settings (via the Server Admin tool) I found a box called, ‘DNS Forwarding’. I simply plugged in the OpenDNS IP addresses and removed all but the servers IP from the client DNS servers.

Restarted the DNS service and rebooted the client machine for good luck and attempted to login to the network home directory. It worked! Next I tried loading a site on my OpenDNS blacklist and it too was blocked. It worked just as I had wanted it too.

DNS Forwarding in my understanding works like so:

  1. The client machine use the server’s IP for it’s main DNS server.
  2. In my case the server contains one DNS entry (well two if you count the reverse DNS record). The one record is of itself. That way the clients know of the server.
  3. Anything that isn’t in the servers DNS list gets sent to the entries in your DNS Forward records. In this case it was OpenDNS so pretty much every request except one’s for the server were forwarded to OpenDNS.

Hopefully this article can help people out who use in-house DNS and are also looking for a way to send other DNS queries to other outside services such as their ISPs DNS servers or even OpenDNS.

Read full storyComments { 1 }

Quick Tip: On Using Server Assistant

Server Assistant is a wonderful tool that allows OS X Server administrators to install and configure their
server(s) remotely. I personally have used the tool multiple times in setting up servers, but not to install OS X Server to a machine.

Finally this past week I got the chance to do it. Despite being incredibly easy to do, there was one drawback that will definitely make me think twice about using it in that fashion again.

It will not allow you to choose which packages to install and which to leave out. Because of this I had to install all 11.4GBs instead of the 5-6GBs that I usually do. I tend to leave out the languages, printer drivers and fonts.

If there’s one thing I hope Apple fixes, it’s being able to select which packages to install and which not to when using Server Assistant to do a remote server install.

Just a heads up for people interested in doing remote OS X Server installs, keep in mind you won’t be able to choose the software that gets installed and make sure you can afford to spend ~11GBs of drive space!

Read full storyComments { 0 }