Archive for August, 2008
Create List of Installed Packages
Getting a list of packages in Ubuntu is very easy. You’ll just need to run the following command:
sudo dpkg --get-selections > package_list
Obviously, you’ll need to run it as a user with permission to sudo. The command will list the selections from dpkg and place them into a text file called “package_list” in your current directory.
Additionally, you can install the list of packages on a different system using the opposite of the dpkg command and dselect:
dpkg --set-selections < package_list
dselect
Filed under How-Tos / Tips : Comments (0) : Aug 15th, 2008
Clear DNS Cache OS X
DNS requests are cached in the local machines for all modern operating systems to allow for faster network performance so if a hostname is requested more than once within a certain amount of time (while the TTL is still good), the machine doesn’t have to make a new DNS request. From time to time, DNS caches can become corrupt, or TTL is too high and a change is needed immediately. For these reasons, we need have the ability to flush the cache. The command is different to flush the cache on Leopard than on older versions of OS X. On Leopard, jump to a terminal by launching it from your Dock, browsing to it in the /Applications/Utilities directory in Finder and launching it, or you can bring up spotlight and search for Terminal. Once the Terminal window comes up, you can type the following command on Leopard:
dscacheutil -flushcache
Or on Tiger or older (10.4 or less) you can run:
lookupd -flushcache
Filed under How-Tos / Tips : Comments (0) : Aug 14th, 2008
End of Linspire, Freespire Moving to Debian Base
Xandros announced late last week the end of the Linspire distribution. This announcement comes just months after the aquisition of Linspire by Xandros. Linspire originally went by the name of Lindows and has bragged itself up for being the first Linux to be sold at a large US retailer, namely Wal-Mart. Xandros already maintains two other pay-for Linux distributions: Xandros Desktop Professional and Freespire. Xandros has also announced that Freespire will be shifting back to a Debian base rather than the Ubuntu base of late. Xandros CEO Andreas Typaldos says the moves are to reduce the amount of code bases the company needs to support and to bring an emphasis to stability and consistency from the Debian core. Typaldos says also to expect the CNR package management software seen in Linspire to appear in the Xandros and Freespire distributions.
According to the website, you can currently purchase computers with Linspire pre-installed from a large amount of major retailers including Wal-Mart, Buy.com, and Amazon. Although the timing is interesting since the acquisition happened such a short time ago, the changes should allow Xandros to focus more on doing one (or two) thing[s] well rather than having to maintain three different distributions. Xandros seems to be learning a lesson from Novell and Red Hat, using Freespire as its community-based testing and proving grounds for its pay-for, supported Linux distribution.
Filed under Uncategorized : Comments (0) : Aug 12th, 2008
Oversimplified NFS Server How-To
This how-to assumes that both systems are running Ubuntu, although it can be easily ported to work with other distributions. For our example, we will use two systems: ServerA and ServerB. ServerA will be the NFS “server” which will be used to store the actual data files and ServerB will connect to ServerA to use the files as though they are mounted locally. For our example, we will also assume that both servers are on the same private LAN with ServerA at IP address 10.10.0.2 and ServerB at 10.10.0.3.
NFS Server Installation
On the server side (ServerA) you’ll need three core pieces of software. To install, as a user who has permission to sudo, run:
sudo apt-get install nfs-kernel-server nfs-common portmap
After the install finishes, it will start the portmap and nfs services. You can restart each by using the following commands respectively:
sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-kernel-server restart
What’s commonly referred to as shares in Windows is referred to an export in NFS. The key file to edit to setup your exports is going to be /etc/exports. Open up your exports file with your favorite text editor (replacing vim with the text editor of your choice if you like):
sudo vim /etc/exports
To allow ServerB to access /srv/data with read-write privileges, add the following line to the end of your /etc/exports file:
/srv/data 10.10.0.3 (no_subtree_check,rw)
You can allow the whole 10.10.0.x subnet by replacing 10.10.0.0/24 with the IP in the above line. Also, change the “rw” to “ro” to make the export read-only. Once you are done, export your newly exported filesystems:
exportfs -ra
Now we’re ready to go to the “client” (ServerB).
NFS Client Installation
On your client end, you’ll need to install the same software with the exception of the NFS server software:
sudo apt-get install nfs-common portmap
Once the software installs, portmap will start up and you’re ready to go. For our example, we’re going to assume you want to mount the export on the remote server to /home/shared. Now you can mount your export:
sudo mount 10.10.0.2:/srv/data /home/shared
Now your system ServerB has mounted a share on ServerA and can access data in the exported directory. Keep in mind that NFS bases permissions on the UID’s on both end. A user with the same UID on each end will be required to read-write if you have the permissions set for write only to the owner. You can change permissions on ServerA using chmod.
Setting To Mount on Boot
In order for your NFS export to mount on boot, you’ll want to add the NFS server in your /etc/fstab file. At the end of the file, for our example, you’ll add a line like this:
10.10.0.2:/srv/data /home/shared nfs defaults 0 0
Be sure to do a test reboot before assuming this setup is ready for production!
Filed under How-Tos / Tips : Comments (0) : Aug 11th, 2008
SugarCRM CEO on Success of Open Source
One of my coworkers ran across this podcast of John Roberts, CEO of SugarCRM talking on the success of open source software. John talks about the strengths of using open source applications in the enterprise. Definitely worth a listen!
Filed under Uncategorized : Comments (0) : Aug 11th, 2008