Archive for the ‘operating systems’ Category

Things to remember when disabling SELinux

Perhaps SELinux was provided by default from your linux distribution of choice, or maybe it has been determined that it is not needed anymore for whatever applications the server is currently performing. Disabling SELinux is a matter of changing a line in your selinux config. The normal location would be to look in /etc/selinux/config and change the value of the SELINUX line.


# SELinux turned off
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled

However, we’re not done yet! Before you reboot your system you need to make sure that your
kernel boot line isn’t expecting SELinux to be active. We can set it to be specifically deactivated as
follows:

with Grub:

edit your /boot/grub/menu.lst


title  Ubuntu 9.04, kernel 2.6.28-11-generic
uuid   28cd3d96-e22c-4230-a63d-f7a73ec323e3
kernel  /boot/vmlinuz-2.6.28-11-generic root=/dev/sda3 ro rootdelay=10 quiet splash selinux=0
initrd  /boot/initrd.img-2.6.28-11-generic
quiet

Note: you may also need to add enforcing=0 to your kernel line, depending on your setup.

 

Low Cost Open Source Back Office For Small Businesses

I love to save money. Who doesn’t, right? I have often found that a little bit of research and persistence can save huge amounts of money in Information Technology. This brief article is about the low cost back office setup that I have created for my business. I started Morroni Technologies in 2000. At the time I was strictly a Microsoft Guy. I had owned Apple in the past and worked with Unix/Linux but at that time, everything I worked on was Windows. I went along like this for a couple of years. As the business grew, I found a need to get some office space. Along with office space, came the need for some sort of file server. I priced out Windows Server…woah! I was in no position to be dropping $700+ on anything at that time. I went on using my desktop for everything until a year or so later when I was ready to upgrade. I was trying to figure out what to do with my old machine when I decided to install Ubuntu Server on it and see if I could make it work as a fileserver. I threw a second drive in and setup Ubuntu with software raid on the hard drives. My original server went through several iterations until it became what it is today.

Ubuntu 8.10 Server

AMD Athlon 2800+

1GB RAM

Dual 200GB hard drives

So without spending more than the cost of one 200GB hard drive, I had myself a fully functional server that acted as a file server(samba and nfs), a source control server(svn), a staging web development server, a local maven repository, and a squeezebox server!

A few months later, a friend of mine’s company was getting rid of some old hardware. I scored a “broken” 1U UPS device and two 1U DL360 G2’s. At the time, I was looking to upgrade my office phone system so I took one of the 360’s and made it an Asterisk server. I used the Trixbox build. The installation and configuration were relatively painless. I signed up for Vitelity SIP phone service and voila, my phone bill went from $50/month to less than $15/month. In addition to a lower monthly cost, I had a huge number of added features from the Asterisk system. My phone system now does cool stuff like emailing voicemail attachments, providing an intro phone menu, providing a web interface for managing voicemails, forwarding to my cell, out of office messages, and click to dial phone numbers from my desktop which allows me to make phones calls with my physical phone by clicking numbers on my desktop.

My next task at hand was to upgrade the existing Verizon FIOS Router to a more robust routing solution. We wanted to have something that allowed a high degree of flexibility with Quality of Service and port forwarding. Amazingly, the Actiontec router that was provided by Verizon had a clunky interface and was having issues handling our 5 static IPs. After some reaearching, I settled on the Vyatta open source project for routing. I found a very old and FREE IBM NetVista. Several friends recommended them for the router because of how well they were built and the relaibility of the power supplies and motherboard. I bought 3 1GB NICs for the NetVista at $25 a piece and installed Vyatta. There was a slight learning curve with Vyatta but most of it was due to the fact that Verizon had several wires crossed back at our local hub. We were the first or second customer to setup FIOS in our borough and so we dealt with some of their initial issues. Once those issues were tackled, things settled down and the management of the Vyatta router really became very simple. The whole configuration is nothing more than one single text file. I really like the Vyatta project.

The most recent upgrade was the file server. The original file server was running Ubuntu with software drive RAID. The software RAID proved to be a poor decision. Upgrading from Ubuntu 8.10 to 9.04 corrupted the filesystem and instead of playing around and trying to fix this, I decided to redo the system. I did some asking around and one of my clients sold me a Dell Poweredge 1850(Dual 2.8Ghz Xeon 2GB RAM 73 GB SCSI RAID 1) for $150! A great price indeed. I installed Ubuntu 9.04 and the process was super smooth. Fortunately, the latest Ubuntu had full support for the Dell’s Perc 3i drive array. No more software RAID needed. I restored my entire file system and all system configurations in about a day.

Another client gave us a full 42U rack that they no longer had use for. It’s a monster but I like free and I needed a more suitable home for my growing back office. This completed my low cost open source back office. In summary, here’s what I now have:

FILE SERVER

Dell Power Edge 1850

Hardware: Dual 2.8GHZ Xeon processors, 2 GB RAM, Dual 73GB RAID drives

Operating System: Ubuntu 9.04

Software Essentials:

Samba - Provides Windows File/Print Sharing

NFS Server - File sharing for our Macs/Linux desktops

Apache Web Server/MySQL Database Server

Subversion Source Control

Nexus Repository Manager - Maven Repository Manager

Proftpd - Reliable/Secure FTP Server

ccTiddly - This is a PHP App based on the popular TiddlyWiki. We use it as our intranet where we have useful links but more importantly, notes on everything under the sun. This is the spot where we record our thoughts after solving a problem that took us awhile and will likely arise again.

COST: $150

ASTERISK SERVER

HP DL360 G2

Hardware: Nothing Special

Operating System: Linux Trixbox Community Edition

Features: Emailing voicemail attachments, providing an intro phone menu, providing a web interface for managing voicemails, forwarding to my cell, out of office messages, and click to dial phone numbers from my desktop which allows me to make phones calls with my physical phone by clicking numbers on my desktop.

COST: FREE + $75 for three 1GB NICs + $100 per SIP Phone(Aastra 9133i)

ROUTER

IBM NETVISTA

Hardware: Primordial

Operating System: Vyatta Community Edition

Features: Full flexibility and power of a commercial routing solution like Cisco with the open source bonus.

COST: FREE

NETGEAR 48Port 1GB SWITCH

COST: $200 (This is the only item I had to buy new)

UPS

I just opened up the UPS and plugged in the battery and it was no longer “broken”

COST: FREE

42 U RACK

COST: FREE

TOTAL HARDWARE/SOFTWARE COST: $425 + $100 PER SIP DESK PHONE

TOTAL TIME: SIGNIFICANT BUT REWARDING :)

I wrote this article so others could see the benefits of leveraging open source technologies for their offices. If you are building an office network fro

m scratch then I would strongly encourage you to consider using some of the components I have listed here. This low cost open source back office solution is awesome!

 

Migration from Windows to Ubuntu to OS X Complete

What a long road. Back in October of 2006 I decided to ditch Windows for Ubuntu as my primary desktop environment. I migrated a file server and two desktops in our office to Ubuntu 6.10 Edgy. I also migrated a home laptop and home desktop. The goal was to remove as much dependence on Windows as possible. There were a wide variety of reasons for the switch to Ubuntu. They included:

  • Vista did not look promising. All of my experiences with Vista were negative ones. It appeared to me that Microsoft was losing focus and that the OS was suffering.
  • I missed my shell. I used Unix a lot as a Computer Science major at Penn State. It really felt like my use of Windows was taking a lot of fun away from the computing experience. So I felt like I needed to get back to my roots.
  • We stopped developing applications using Microsoft Technologies. We are a small business and the license fees that come with Windows Servers and Development packages can become very cost prohibitive. Because of that, I started using open source development tools almost exclusively. I quickly realized that most of the open source development environments were actually just as good if not better than anything Microsoft was producing. Most of our sites now are developed in either simple HTML, PHP, or J2EE. Because we no longer had a dependence on the Windows development environment, we could break away from Windows as a desktop pretty easily.
  • Supporting open source software seemed like the right thing to do from a moral perspective. I have always had an interest in community-based projects. I felt like I was contributing to a good cause.
  • In Ubuntu it seemed like Linux finally had a desktop environment that was ready for prime time.

So off we went. We started installing Ubuntu on everything we had. It was absolutely amazing to see how easy it was to install Ubuntu. The install process was almost definitely one of the most impressive aspects of the entire project. Over the next week or so, I setup my environment with as many open source equivalents as I could find out there. A lot of them fit the bill and a lot of them did not. I was so blinded by my passion to become totally Ubuntu-centric that I looked past a lot of the shortcomings of many of the dekstop apps. This eventually came back to haunt me. I’ll put this together in a simple list. Here’s what I liked the most about Ubuntu.

The Good Things About Ubuntu

  • The power of the shell. I love having a shell to do a wide variety of tasks in. It felt great to have it right on my desktop.
  • SSHFS. How cool it was to mount drives at various outside locations via sshfs. This took the place of any high overhead VPN that I needed in a windows domain.
  • The predictable release schedule was great. It was really nice to have a company behind the builds doing some level of quality assurance.
  • Compiz. I like eye candy and Ubuntu had plenty of it. Compiz was a lot of fun to tweak.
  • Huge and easily accessible software library. I was blown away at how quickly I could find and download applications that I needed via apt-get. There are so many cool apps out there that did so many cool things.
  • The server was easy to install and had a great build system. I was able to get tomcat, apache, potgresql, mysql and a variety of other server projects installed with ease.
  • It is FREE! Ubuntu didn’t need really high costing hardware and the software was free so there were some significant savings happening for both home and work. However, these savings were clearly being wiped out by the amount of time it took me to configure items. More on that below.

The Bad Things About Ubuntu

Let me preface this by saying that a lot of these issues are not issues that are all related to just Ubuntu. A lot of this stuff falls in the realm of general Linux architecture issues(I think).

  • The audio system. Wow, this was a biggy. I’m a total audiophile and I just could not believe how buggy the sound system was. I tried ALSA and I tried the Open source one and I tried whatever I could but all of them failed in some capacity or another. The biggest complaint was that I could never seem to have two applications playing audio at the same time. So if I was playing something in rhythmbox and then went to a website to watch a movie, I got no audio. The only way to get the audio was to stop rhythmbox, restart firefox and go back to the page. This happened A LOT.
  • Mainstream software support. I love Photoshop. I need Quickbooks. I sat down so many times and tried to use Gimp instead of Photoshop. I took the time. I invested several nights trying to master it. It just never worked out. Gimp is powerful but it just doesn’t cut the mustard. I literally had a headache after using it sometimes. For Quickbooks, the options were wine or just running a virtual machine. I opted for a virtual machine. This was not a huge deal and by no means was it the biggest drawback.
  • General User Interface issues. A lot of people comment on the lack of refinement with open source user interfaces. Ubuntu put a lot of work into this area but they are still kind of ham stringed by whatever the Gnome projects decides to do. One example of a UI issue that drove me bonkers was the icons on the quick launch bar. I could never do any sort of auto-organize. I had to manually spread them out. It was really silly. I tried using some other alternative that was suppose to mimic OS X but it really kind of flailed at it. It was biggy and it did not support a notification area. It was a common theme. These great ideas that just can’t make it the final 10 yards to become great software. There was always just one small shortcoming that made the software really annoying to use.
  • Java/Flash support. Linux seems like Sun’s ugly stepchild. The JDK and JRE never seemed to be really stable. I had a slew of issues with Java. I tried to settle on a few Java sound apps to no avail. The Java sound system was more problematic then ALSA. I also never seemed to really be able to gt the firefox Java plugin working perfectly. It always seemed to crash randomly. Same went for the Flash plugin. My daughter would try to play webkinz and the whole browser would crash. It was unbelievable.
  • Integration and cross-application communications. I lost sight of the fact that computers were suppose to make tasks easier. While using Ubuntu, I often felt like I had to hack the system to make different apps communicate with one another properly. I can’t provide specifics because this blog entry would go on forever. There is just a general feeling that you are hobbling together a hundred different packages in Linux while with other platforms, everyone is talking to one another and things “just work”. I began realizing that I was working harder at getting my environment fine tuned then on the work I had on my plate.
  • Sleep mode. The home laptop would never ever sleep properly. I tried a lot of stuff. A LOT of stuff but to no avail. I reproduced these issues with multiple laptops. Sleeping and hibernating with laptops is an absolute headache and almost never worked properly for me.

So all of these things started adding up until one day I realized tht I hated working ion Ubuntu. I felt like I was working inside a jar of mollasses. My response time for tasks and different projects was lagging because I would often get sidetracked trying to fine tune some kind of setting that would finally once and for all make my desktop environment “perfect”. It seemed like that for 2 years I was searching for the killer desktop in Ubuntu and I never even really got close. So needless to say, I was ripe for a change of platform for my work and office computing. Then one day I was out on my roof and I crushed my Palm Treo 755P. This is the same Palm Treo that it would sometime take me 15 minutes to synch with my desktop because of all the weird nuances of JPilot. I called Sprint to ask how much it would cost ot replace it. They said it was $590. I couldn’t believe it. What a ripoff! The palm i seriously antiquated and here they wanted $590. I promptly cancelled my service agreement and switched to AT&T where I could get the iPhone 3G. I never expected that I would love the iPhone as much as I do. I never expected that I would be typing a large part of this blog entry from the software keyboard on an iPhone. I am not one to embrace mainstream technologies. I usually do whatever I can to avoid them. That is part of what led me to ubuntu in the first place. There is simply no denying the groundbreaking features of the iPhone. I was taken aback from the outset. I was so pleased with what Apple had did that I took a fresh look at OS X. What looked so appealing to me was the fact that I had the ease and comfort of a fully integrated system while keeping the powerful aspects of the shell.  So I decided to jump in with both feet and start drinking the Apple Kool Aid.  I picked up a Power Mac for the office and my iMac is coming for home tomorrow.  The irony here is that my first computer was an Apple II+ back in the early eighties.  I then moved onto the Apple IIGS.  After that I was lost to the world of Windows and most recently, Linux.  It feels good to have a Mac again and I am looking forward to having a more prodcutive computing experience.  I’ll try to post my thoughts on OS X as I proceed through the process of migrating my entire platform over to it.  So far, so good.  More interopibility, less needless hours spent tweaking.  All this and I still have my beloved *nix shell!  Good times ahead!