Wednesday, November 18, 2009

Changing the Hostname on a Linux Box

I recently had need to change a server name due to a change in our server naming scheme (local ski resorts to breweries). For the simple comedy of the naming scheme switch, here's how it currently looks (without server prefixes for security purposes of course). If you just want the solution, skip down a paragraph.

Our current environment is mostly virtualized. The hosts are named after breweries and their virtual guests are named after the beers that each brewery produces. Clever, yeah? I can already feel my morale rising.

Now, to the solution...
Changing the hostname on a Linux machine is a bit more complicated than it is in windows.




First off, open up a terminal window













Then type sudo nano /etc/hostname










The file that comes up should contain nothing but a hostname. In my case this is hal8000 (yes, laugh all you want). Change this to whatever hostname you want. Once you have input this, press Ctrl + x. From there press y and Enter. (Ctrl + x closes the file, y says to save the file before closing, Enter saves the file under the original filename).





Once you've done this, all you need to do is restart your computer and you should be golden.



***NOTE***
While the method I just described will change the actual hostname of the computer, its IP address will no longer resolve to its hostname.

Here's how we fix the aforementioned issue.

If you've closed your terminal for the restart, open it up again.
Type sudo nano /etc/hosts



At the top you should see 127.0.0.1, 127.0.1.1 and their associated 'hostnames'. The one to the right of 127.0.1.1 should show your old hostname. Change that to the new hostname and save the file (Press Ctrl + x -> y -> Enter). Now your computer's IP address should resolve to its new hostname.


Enjoy!

Now for a cup of joe...

Thursday, November 12, 2009

Blog Resurrection

Hello all,

A few months back I moved jobs. At my last job (as you all well know from this blog), I was a server administrator and .Net programmer on the side. At the new job, I was hired primarily as a web developer (PHP, JavaScript, Joomla dev, etc.). Naturally, because of the position change, I was no longer doing server administration and consequentially had nothing new to post on this blog.

That has changed now. The company I now work for didn't have much of a server infrastructure (a non-server edition mac that stored files), so they asked me to design and build a new one.

All that being said, I now have new content to post here. You Linux users will be happy to hear that I am now using Linux for some of our servers (virtual host and file server). To you Windows users, I will be building an Exchange server, terminal server, and a backup server (this might be done on Linux though). Most likely things in that list will be shifted around a bit in the next two or so weeks so please bare with me.

Some of the technologies I will be using in the upcoming posts will be
Windows Small Business Server 2008 (x64)
Ubuntu Server 9.10
VMWare Server 2
Microsoft Outlook Exchange
TightVNC
SSH

On one final note, I would like to put out a shameless plug for my other blog, Musings of a Web Developer. It covers the issues and fixes I have found throughout my adventures of coding websites. Essentially, it's the same thing as this blog but for web development rather than server administration.

I look forward to the upcoming comments about how depressing IT work can be *AHEM*... I, uh, I mean the joys of IT work. Who's kidding though. Everyone knows that we IT people love our jobs, especially the Dilbert comics that document our endeavors.

:P

Friday, July 31, 2009

TFS 2008 : Permissions for Creating Team Projects

I recently finished my Team Foundation build and am quite pleased with it. With Team Foundation Server being new to me, I ran into a few issues with permissions.

The Team Foundation server I built will be managing my team's code as well as two other teams once everyone has moved over.

That being said, I need to give out permissions for the managers of each group so they can create team projects for their teams.





Let's get started

Permissions for this are somewhat complicated in that they have to be given in three different locations for the user(s) to be able to create Team Projects and all of the other services associated with one.




We'll start off with the TFS permissions.

By default, the service account has permissions to perform these actions so you should be logged in as that account.

Head to your Team Explorer in Visual Studio and connect to your Team Foundation Server. Right-click your server name, go to Team Foundation Server Settings, and select Group Membership. From within here you should see a group titled Team Foundation Administrators. Double-click this group and add your user/group to it and you're done with the TFS part.


*NOTE* To keep the Administrators group from becoming cluttered with usernames and group names, I created a TFS group for Administrators ( for instance) and simply added that group to Team Foundation Administrators.




Next up we'll tackle SQL Reporting Services permissions.

For this one you want to go to your SQL Reporting Services page (mine was http://servername/Reports ).

Once there, click the Properties tab. Click New Role Assignment on the page that loads. From here, enter the active directory username or group name you want to have permissions to create team projects in TFS and assign them at least the Content Manager role. Once you're done, click OK and you're done with the permissions for SQL Reporting Services.




Finally, Windows SharePoint Services permissions.

Head to your central administration site (Start -> Administrative Tools -> SharePoint 3.0 Central Administration). Once there, click the Operations tab at the top left. On that page, select Update farm administrators's group (it's under the Security Configuration group). From here, click New to add a new user (the button also has a drop down function so if you get that, click Add User). On the AddUser: Central Administration page, type in the username or groupname and add them to the Farm Administrators [Full Control] group.



There you have it. You should now be good to add as many Team Projects as you desire.


A closing thought: I would recommend that the majority of this be done through active directory groups. It makes usermanagement much easier. If someone quits or it let go, all you have to do is remove their account from the group in active directory and it takes care of everything in Sharepoint, TFS, and SQL Reporting services instead of having to manually go in and remove the person from every location.


On a side note, I'm going to get some lunch...

Thursday, July 30, 2009

Upgrading TFS 2008 Workgroup to TFS 2008 Standard

About a month ago I was assigned the task of learning how to build and maintain a team foundation server. To avoid the costs of purchasing licenses for a software we were only testing for a production environment, we decided to use our MSDNAA copy for our test. Incidentally, the version MSDNAA distributes to schools is the workgroup edition.
After the build was completed, I decided that Microsoft's Visual Studio Team Foundation Server would do everything (and more) that we needed. Due to legal restrictions, I couldn't/shouldn't use the MSDNAA license for a production environment. Additionally, the workgroup license for TFS only supports five users, hardly enough for my team's purposes.
Naturally I wanted to avoid have to reinstall Team Foundation Server since simply inserting the new license key would be the easiest thing to do, if the software supported it. I searched around the web for a bit and found a Microsoft article on upgrading from workgroup to standard, but it was for TFS 2005. None-the-less, it was worth a shot. Coicidentally, it was not too far off. Here's how I upgraded my copy and a problem I ran into in the process.


This method DIDN'T work (Microsoft's suggestion)

If you go into your Programs and Features (if you're using Server 2003 go to Add or Remove Programs) on your server that TFS is isntalled on, double click the uninstaller for Microsoft Visual Studio 2008 Team Foundation Server - ENU(assuming your copy is English). On the window that comes up you should see an option at the bottom to upgrade to Team Foundation Server. Check that radio button and enter the new license key you have and click Next. You should see a window that says upgrade was successful.

The problem I had with this method was that when I checked the radio button, the license key text boxes remained greyed out. When I clicked Next, hoping to see a place to input the new license key, I was met with a screen that said my upgrade was successful, though it wasn't.


This method DID work

Insert/mount your Team Foundation Server disk/image and run the installer. It should give you options to repair, uninstall, or upgrade. In my case, the upgrade option automatically showed the license key for my disk. I selected that option, clicked Next, and my edition was upgraded to TFS standard.

Tada!

Tuesday, July 28, 2009

Installing Visual Studio 2008 Service Pack 1

Recently, I realized that a few of our developement servers were running Visual Studio 2008 with the beta of SP1. One would assume that the installation of a service pack wouldn't be too difficult but since they already had the beta of service pack 1 installed, the installation of SP1 became a bit more complicated.

If you download the service pack installation file from Microsoft and run it, you get an error saying that you need to run the Service Pack Preparation Tool before being able to install. Head to the Microsoft website and download the removal tool.
In my case, I ran the SP prep tool and received yet another error. It said that it need some files on the installation disk for Visual Studio 2008 Shell (integrated mode) - ENU. The ticket here is that we don't have a disk for that and to my knowledge, there isn't one. Microsoft has a download for it but it's an executable that doesn't extract an iso. I searched around for a solution to the problem and found a site that said to simply uninstall VS 2008 Shell (listed in Programs and Features as Microsoft Visual Studio 2008 Shell...). I performed said action and the prep tool ran fine with no errors.
After running the prep tool, I stimply ran the installer for the service pack with yet again no errors.
The install did, however, take about two hours (ugh).

There you have it.