Showing posts with label Howto. Show all posts
Showing posts with label Howto. Show all posts

Friday, December 19, 2008

Subversion Authorization

This is probably obvious to others, but took some figuring out for me...

We're using subversion with the svn+ssh protocol, and we need to setup a new repository which only certain users will have access to.

After reading through the manual, it seemed that I needed to configure the conf/svnserve.conf file to use a users file, and then setup the allowed users there.

Well, finally it turns out that because we're tunneling our svn, it's really just controlled by the file permissions. Since our server's hosted on linux, I:
  • Created a new group [sudo addgroup restricted]
  • Added the appropriate users to that new group
  • Set the owner on the svn repository directory [sudo chown -R svn.restricted /path/to/repository]
  • Set the file permissions on the svn repository directory [sudo chmod -R o-rwx /path/to/repository]
All good!

Monday, August 11, 2008

Setting up Subversion in a VM

I need to get a pretty basic subversion setup, so I figured I'd give it a go. (There's one pretty basic VMWare appliance available from http://www.ytechie.com/svn-vm, but it's really old (Ubuntu 6.06, older version of subversion, etc...)

So, here's what I'm after:
  • Up-to-date Ubuntu
  • NTP (to keep time synch'd)
  • Subversion 1.4 (latest stable), at least with svn+ssh access, but even better with https access
  • WebSVN
  • Webmin (so I don't have to get to the box to do stuff)
Lesson #1: Uninstall stuff you don't want before applying patches. This way, you don't wait for things like Open Office, Evolution, various games etc..., to all get updated, none of which are desired.

During setup, I noticed a common problem I (and others!) seem to always run into with linux in a VM...crazy key repeating. This post (on the linuxquestions.org) ends up with reconfiguring X. However, it seemed for me that just going to System -> Preferences -> Keyboard, and changing from "US 105 (Intl)" to "US 104" did the trick.

For setting up subversion, I'm referring to a post on the Ubuntu Help pages.

When it came time to install the certificate for Apache, another Ubuntu page came in handy.

Notes:
  • This procedure winds up creating a self-signed certificate, which may not be sufficient in all cases.
  • When you access svn, you'll be notified with an error message that starts off with, "Error validating server certificate for 'https://svn-server:443'". Go ahead and accept the certificate permanently.
Installing WebSVN: I noted above that I installed webSVN, but that was a mistake. I completely purged it, and then re-installed it. This time, the configuration was a bit better, asking me if I wanted to configure apache and where my svn repositories were. Now, when I hit https://svn-server/websvn, it works!

I did find another article at Howtoforge that gave some hints on configuring websvn. No matter what I did, though, trying to enable use of enscript doesn't want to work. Oh well, got bigger fish to fry.


Email Notifications: I installed svnmailer (from the Ubuntu repositories). The docs there pretty much tell you what to do... Testing this will have to wait until I'm in the office and the smtp server can be reached to do its thing... However, it appears that svnmailer has a bug, which causes practically unreadable diffs to be produced. Luckily, the debian bugs list suggests a work-around.

UFW: For security, I enabled ufw, and then set it to only allow ports 22 (ssh) and 443 (https).

SendMail: Well, turns out I needed to install sendmail locally. Just apt-get install, and all is good...gotta love it!

FogBugz Integration: The instructions for configuring the integration are here.


Late Breaking: Here's another site that has instructions for getting things going:Howtoforge.

Wednesday, July 23, 2008

Installing trixbox

I grabbed the ISO from trixbox.org, and fired up the box I'm going to use as my server, a Dell Optiplex GX280 with 2 - 160GB SATA drives and 4GB RAM.

Using the Quick Install Guide (QIG), I pop in the CD, hit "Enter" to start the installation at 10:43pm... The installer asks for some very basic information and goes on its merry way... The box reboots itself at 10:53pm. There's some strange looking, uh, error? messages during the boot process, but it starts up & I log in.

Since I have my own DNS/DHCP server (using dnsmasq running in a VMWare image), I configured it to always assign the same IP address to this box. Although the box comes up with a host name of "trixbox1.localdomain", I'm not yet brave enough to change that...

I'm now logged in to the web interface. As per the QIG, I log in as "maint". I'd like to change the password, but don't know how and can't find a link to do so. I'm also a bit lost, as the QIG says to click on "Asterisk > FreePBX", but I can't find that anywhere. So, I just started clicking around :-) Finally found what I'm looking for: "PBX -> PBX Settings" from the top level menu.

(Hey! Look! A warning that I'm using the default password! Click on that hoping to be prompted to enter a new password, but no luck...just get an expanded version of the error message...)

Now, on the right, click "Module Admin". Well, I see a bunch of modules, but no where do I see any that I can add, so we'll leave that alone for now... (The important thing, I think, is that "Ring Groups" is marked as "Enabled".)

Continuing with the deviation from QIG, I clicked on "Extensions" on the right-hand menu. On the new screen, I left the default option (Generic SIP Device) and clicked Submit. OK, a rather long form here...
  • Extension: 200
  • Display Name: "Jay"
  • Under "Device Options", set a secret
  • Voice Mail: Change to "Enabled" and set a password and email address.
I left the rest of the options alone, although things like "VmX Locator" sounds possibly interesting...

So now, according to the QIG, I have an extension setup. On to the phone setup...

I went to the admin web page of my Grandstream 2000. I don't want to lose or mess with the setup I have (it works!!!), so I just disabled Account 1, and went into Account 2 settings. Unfortunately, it doesn't seem to register :-(

Digging around, sureteq has a setup guide. Let's see... Hey! Here's how we change the passwords...have to do it from the trixbox's command line:
* Update maint password by typing ‘passwd-maint’ at the command line. Enter the password twice.
* Update AMP password by typing 'passwd-amp' at the command line. Enter the password twice.
* Update meetme password by typing 'passwd-meetme' at the command line. Enter the password twice.
In my attempt to follow directions, I switched to trying to configure an X-Lite softphone on my laptop.

The next thing I learned, is that simply hitting "Submit" isn't enough! You see the orange bar at the top (missed that, didn't ya?!). You have to click that to actually load all the changes... Whew... now my soft phone registers!

Continue on, now with the Grandstream (kinda nice the guy at sureteq also has one!). I'm nervous about changing the "Firmware Upgrade and Provisioning" so I skip that part. I configure the rest, and reboot the phone, but it doesn't register. Well, there's more steps, so before changing the firmware provisioning, I'm going to continue...

After running the setup-grandstream command, I rebooted my phone. It still doesn't register. Going into the extension manager (PBX -> Endpoint Manager from the top menu), I hit 'GO' and sure enough, my phone is found! However, after associating it with the extension and rebooting it again, still not registering.

OK... I'm going to give up, bite the bullet, and change the provisioning... I'm quite nervous, but the pohne does reboot. Uh oh...it's downloading firmware... I'm really nervous now... this is what I didn't want... Well, let's hope it isn't bricked when this is done...

Phone has now rebooted a few times, and appears to be running, but still not registered...

I went through the rest of the setup steps. I think the only thing that tripped me up was the fact that I need to connect to my VOIP provider, which is different than the examples. I discovered that SIP register string in the Trunk configuration is of the form: user_name:password@server. Once I got that right, going to the PBX -> PBX Status shows that I'm registered!

Well, gonna have to work on the Grandstream more later...

Tuesday, July 22, 2008

VOIP Setup on e90

Whoa...took freakin’ FOR EVER to figure this out... Thanks to Nokia E90 Communicator Blog and the use of X-Lite 3.0 Softphone.

Here's how it goes:
  1. Install & Setup X-Lite. Don't bother with the Linux version...it didn't seem to capture the right information :-(
  2. In X-Lite, turn on all the diagnostics logging.
  3. Make a call from X-Lite. Doesn't matter where to, or even if the party answers. In fact, given the volumes of data in the log file
  4. Dig through the log file. You're looking for "username=..." and "realm=..."
  5. Now, setup the e90:
    • Profile name: (whatever name you want)
    • Service Profile: IETF
    • Default Access Point: (whatever wi-fi you want to use)
    • Public user name: "sip:phonenumber@sip_server" (where 'phonenumber' is of the form abbbcccdddd, and 'sip_server' is the fully-qualified server name or IP address of the server.
    • Use compression: No
    • Registration: Always on
    • Use security: no
    • Proxy Server:
      • Proxy server address: sip:sip_server (same as above)
      • Realm: (what you got from x-lite)
      • User name: (your phone number, same as above)
      • Allow loose routing: Yes
      • Transport type: UDP
      • Port: 5060
    • Registrar Server:
      • Registrar server address: sip:sip_server (same as above)
      • Realm: (what you got from x-lite)
      • User name: (your phone number, same as above)
      • Password: (well, I can't tell you that :-)
      • Transport type: UDP
      • Port: 5060
That's it! Of course, there's still the issue (at least for me) that my VOIP provider only allows a single phone to register at any one time... But, that's why I'm investigating trixbox...