Thursday, March 1, 2012

install mtr without gtk

I recently switched from MacPorts to Homebrew. I can't say there was anything wrong with MacPorts, I think I just wanted to try something different, and maybe it'll be a little faster.

Installing ports is generally quite easy, but the one that I always have to re-lookup is how to use mtr without the stupid gui interface. Seriously, I don't know anyone who uses it. Also, on OS X, it has to kick up X-Windows which is even more annoying.

Anyway, the command line way to install mtr without all the X stuff is the following:

brew install mtr --no-gtk

Friday, February 10, 2012

Installing netatalk on Centos5

Installing netatalk on Centos 5 is actually fairly easy, once you figure out the packages that need to be installed. Here's the basic steps:

1) in /etc/yum.repos.d/CentOS-Base.repo, under the [centosplus] section, make sure you have the following line:
enabled=1

2) Run the following commands:


yum update
yum install netatalk netatalk-devel


3) reboot in order for any kernel modules and all that to get into there.

Now, you'll need to configure netatalk. The configuration files are all in:

/etc/atalk


There are only 2 files to really be concerned about.

1) AppleVolumes.default
at the bottom of the file, if you want to enable home directories, have, on a single line, the following:

~

If you want to create a shared directory, have something like the following:

/path/to/directory "Name of the Volume" options:tm


2) afpd.conf

At the bottom of the file, have a line similar to this:

"Name of Volume" -transall -uamlist uams_guest.so,uams_clrtxt.so,uams_dhx.so -nosavepassword

Then, just use the /etc/init.d/netatalk script to start up everything.

You should now be able to connect up to the Appletalk server using the ip address.

The next part is if you want the server to show up normally under the Appletalk network.

1) install the avahi software:

yum install avahi avahi-devel

2) modify /etc/avahi/services/afpd.services to have something like the following:
 <?xml version="1.0" standalone='no'?>  
 <!DOCTYPE service-group SYSTEM "avahi-service.dtd">  
 <service-group>  
  <name replace-wildcards="yes">[Your Volume Name]</name>  
  <service>  
   <type>_afpovertcp._tcp</type>  
   <port>548</port>  
  </service>  
  <service>  
   <type>_device-info._tcp</type>  
   <port>0</port>  
   <txt-record>model=Xserve</txt-record>  
  </service>  
 </service-group>  

3) Finally, restart the messagebus and the avahi service, in that order:

/etc/init.d/messagebus restart
/etc/init.d/avahi restart

Wednesday, January 25, 2012

Creating a .pem file from GoDaddy SSL cert.

If using an SSL accelerator like Pound, you need to create a .pem file with your private key, the .crt file from GoDaddy, and their intermediate cert file.

Let's say you have a domain name of foo.com. You'll first need to generate the the .csr file for GoDaddy with the following command:


openssl req -new -newkey rsa:2048 -nodes -keyout foo.com.key -out foo.com.csr

This gives you 2 files:
foo.com.key - This is the private key
foo.com.csr - This is the Certificate Signing Request

You'll give the foo.com.csr file to the SSL signing authority. In the case of GoDaddy, they'll give you back a .zip file with the following 2 files:

foo.com.crt - This is your cert
gd_bundle.crt - This is the GoDaddy Certificate Chain

With all these files, you need to generate the .pem file. This is actually pretty easy. Assuming that you created the private key (foo.com.key) without a password, you can just do the following in order to create your .pem file:


cat foo.com.crt foo.com.key gd_bundle.crt > foo.com.pem