Posted: February 16th, 2009 | Author: Jerod | Filed under: Debian | Tags: apt-get, aptitude | View Comments
If you need some convincing to start using aptitude for all your Debian/Ubuntu software management needs, Aaron Toponce’s article will do the job. It’s a few years old (at the time of this post) but still relevant.
Don’t take my word for it. Read it for yourself.
Posted: February 15th, 2009 | Author: Jerod | Filed under: Debian | Tags: upgrades | View Comments
Its been almost 2 years since Debian 4.0 (Etch) was first released. Debian release cycles are so long (because of their commitment to stable releases, amongst other reasons) that they often fly off my radar.
I was completely surprised by this release, and almost every software package in my favorite server operating system has been upgraded!
Check out the Release announcement. The list of new packages. And the Debian Administration post which includes instructions on how to upgrade
Posted: September 17th, 2008 | Author: Jerod | Filed under: Debian | Tags: vmware | View Comments
If you copy and move a VMware virtual machine that runs Debian, you’ll find that the network adapter is no longer available, which sucks.
I implemented a simple fix using Ruby. Just make it start at boot by adding it to your /etc/rc.local and it should be all good.
NOTICE: automatically reboots machine
# 2>&1 redirects stderr to stdout so we can capture it
if_status = `ifconfig eth0 2>&1`
config_file = "/etc/udev/rules.d/z25_persistent-net.rules"
if if_status =~ /Device not found/
config_text = Array.new
File.open(config_file,"r") { |file| config_text = file.readlines }
relevant_text = config_text.select { |line| line =~ /^SUBSYSTEM==/ }
output = relevant_text.last.gsub(/ethd/,"eth0")
File.open(config_file,"w"){ |file| file.puts output }
system("reboot")
end
Download and use it if you’d like.
Posted: September 3rd, 2008 | Author: Jerod | Filed under: Debian | Tags: asterisk | View Comments
Here’s a quickie. You just compiled Asterisk on your Debian server and you want to make sure it starts when you reboot. Here’s how:
Look in the /contrib/init.d folder of your Asterisk source directory. You’ll see a file called rc.debian.asterisk. If you installed Asterisk to the default location, don’t worry about editing this file. If you installed to a different location (eg – /usr/local), change the following line in the file:
DAEMON=/usr/sbin/asterisk
Point this at your Asterisk binary. Not sure where it is? Just type which asterisk from the command line and it will show you the full path.
Next, copy the file into the /etc/init.d/ directory like so:
cp rc.debian.asterisk /etc/init.d/asterisk
(NOTE: I am renaming the file on purpose)
Now you can control Asterisk by executing this script. Make sure it starts and stops before continuing:
/etc/init.d/asterisk start
Starting Asterisk PBX: asterisk.
/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk.
Finally, make the system run this script during the boot process:
update-rc.d asterisk defaults
Done and done. Reboot and check the process list just to be sure!
Posted: August 27th, 2008 | Author: Jerod | Filed under: Debian | Tags: ntp | View Comments
Ok, this bugs the crap out of me. I set up a shiny new Debian 4.0 base install and go on my merry way, meanwhile the system time is off by a long shot! I only notice when it starts to hurt…
Here’s how to synchronize your Debian system’s time with network time servers, in a few simple steps (use sudo as needed):
1) Install the necessary packages:
apt-get install ntp ntpdate
2) Stop the NTP daemon for now (apt-get will start the service upon successful installation):
3) Manually synchronize the system clock to the NTP server pool:
3.5) An explanation: the NTP server daemon will fail to sync with the NTP servers if the system time is too far from the NTP servers time so its best to manually synchronize once to get your system time close enough.
4) Restart the NTP daemon:
5) (Optionally) Verify that the NTP daemon is synchronized by checking the syslog:
grep ntpd /var/log/syslog | tail
ntpd[6348]: synchronized to 74.53.198.146, stratum 2
ntpd[6348]: kernel time sync enabled 0001
ntpd[6348]: synchronized to 128.10.19.24, stratum 1
Your output may vary, but it should look similar to mine.
That’s all for now!