Archive for the ‘Linux’ Category
How to install Darwin Streaming Server 6.0.3 on Ubuntu 8.04.2 Hardy
I couldn’t find any good tutorial on how to install Darwing Streaming Server on Ubuntu Hardy.
So let’s get started with a fresh install of 8.04.2 with all the updates.
- sudo apt-get update && sudo apt-get upgrade
- sudo apt-get install build-essential
- sudo addgroup –system qtss
sudo adduser –system –no-create-home –ingroup qtss qtss - cd /usr/local/src/
- Download the latest version at http://github.com/lstoll/dss/tree/master
- tar -xvf lstoll-dss-984a1365251f36ebf3f60f0d0175fa895a30b9a9.tar
- cd lstoll-dss-984a1365251f36ebf3f60f0d0175fa895a30b9a9/
- ./Buildit install
- cd DarwinStreamingSrvr6.0.3-Linux
- ./Install
- If you see Setup Complete! message, you are good to go. Logon to http://servername:1220/ using your browser. Username and password is the ones you entered at step 10.
Ok, now you have Darwin Streaming Server installed on your Ubuntu Hardy box.
Here’s a sample init file for DSS:
#!/bin/sh
#
# chkconfig: 35 92 12
# description: Quicktime Streaming Media Server
#
# Slight tweak of file create by Larry Underhill 05/20/02
#
# init script to start up the quicktime (Darwin) streaming server
# tested on Redhat 7.2, Fedora Core 4 and CentOS-4.3
# source function library
#. /etc/rc.d/init.d/functions
case "$1" in
start)
if test -r /var/lock/dssd
then
echo "Lockfile /var/lock/dssd exists. Server not started."
failure
else
echo "Starting Darwin Streaming Server: "
/usr/local/sbin/DarwinStreamingServer && touch /var/lock/dssd
echo "Starting DSS Admin Console: "
/usr/local/sbin/streamingadminserver.pl
echo "DSS and DSS Admin Console started..."
fi
;;
stop)
echo "Stopping Darwin Streaming Server: "
[ -f /var/lock/dssd ] || exit 0
echo "stopping..."
killall DarwinStreamingServer && killall streamingadminserver.pl
#ps ax | awk '{print $1" " $5}' | awk '/DarwinStreamingServer/ {print $1}' | xargs -r kill -9 && success || failure
#echo "Stopping DSS Admin Console: "
#ps ax | awk '/streamingadminserver.pl/ {print $1}' | xargs -r kill -9 && success || failure
rm -f /var/lock/dssd
echo
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 [start|stop|restart]"
exit 1
esac
exit 0
Save this file in /etc/init.d/dss
Make it executable chmod +x /etc/init.d/dss and make it auto start when booting:
update-rc.d dss defaults
Adding system startup for /etc/init.d/dss …
/etc/rc0.d/K20dss -> ../init.d/dss
/etc/rc1.d/K20dss -> ../init.d/dss
/etc/rc6.d/K20dss -> ../init.d/dss
/etc/rc2.d/S20dss -> ../init.d/dss
/etc/rc3.d/S20dss -> ../init.d/dss
/etc/rc4.d/S20dss -> ../init.d/dss
/etc/rc5.d/S20dss -> ../init.d/dss
Now that we have already installed DSS on Ubuntu Hardy box, next thing is how to broadcast mp3 and video through it. Well, that’s a next post coming up.
Enjoy!

DSS Admin Console
How to access Linux ssh servers password-less in Linux
If you happened to run Linux and have multiple linux servers, here’s a short how to access them password-less.
- First we need to generate some keys:
ssh-keygen -t dsa - Then we copy them over to the remote server:
scp .ssh/id_dsa.pub user@someserver:/somepath - Then we copy the key to the authorized_keys file:
cat id_dsa.pub >> .ssh/authorized_keys - Then as a security measure we chmod it:
chmod 644 .ssh/authorized_keys - Logout and try login in again. Hurra!
Important note:
Please set a password for your keychain. It’s a very insecure if you set no password for it. Somebody can eventually get your public key and access your servers without passwords. If you set password it will ask only at first time and keep in the session.
Password-less ssh logins are done via keychain. Here’s a small excerpt from the Gentoo Wiki:
Many of us use the excellent OpenSSH as a secure, encrypted replacement for the venerable telnet and rsh commands. One of OpenSSH’s (and the commercial SSH2’s) intriguing features is its ability to authenticate users using the RSA and DSA authentication protocols, which are based upon a pair of complementary numerical “keys”. And one of the main appeals of RSA and DSA authentication is the promise of being able to establish connections to remote systems without supplying a password. The keychain script makes handling RSA and DSA keys both convenient and secure. It acts as a front-end to ssh-agent, allowing you to easily have one long-running ssh-agent process per system, rather than per login session. This dramatically reduces the number of times you need to enter your passphrase from once per new login session to once every time your local machine is rebooted.
Amazon EC2, Cloud Computing Getting Started
Amazon has this services where you can use virtual servers, either your custom or prebuilt publicly shared server images. The key point here is that Amazon has a lot of servers that can be used at any time.
So let’s get started. The first thing to do is sign up at Amazon EC2. I’ll be using Ubuntu on this.
You need Java JRE, do:
apt-get install sun-java5-jre
vim .bashrc
# Amazon Ec2
export EC2_HOME=~/.ec2
export PATH=$PATH:$EC2_HOME/bin
export EC2_PRIVATE_KEY=~/.ec2/pk-VGKIRWAKVSIEXEPVFQ2NSVQ4APUMYAC3.pem
export EC2_CERT=~/.ec2/cert-VGKIRWAKVSIEXEPVFQ2NSVQ4APUMYAC3.pem
export JAVA_HOME=/usr
type bash to reload your bash_rc
cd ~/.ec2
Amazon has this services where you can use virtual servers, either your custom or prebuilt publicly shared server images. The key point here is that Amazon has a lot of servers that can be used at any time.
So let’s get started. The first thing to do is sign up at Amazon EC2. I’ll be using Ubuntu on this.
You need Java JRE, do:
apt-get install sun-java5-jre
vim .bashrc
# Amazon Ec2
export EC2_HOME=~/.ec2
export PATH=$PATH:$EC2_HOME/bin
export EC2_PRIVATE_KEY=~/.ec2/pk-VGKIRWAKVSIEXEPVFQ2NSVQ4APUMYAC3.pem
export EC2_CERT=~/.ec2/cert-VGKIRWAKVSIEXEPVFQ2NSVQ4APUMYAC3.pem
export JAVA_HOME=/usr
type bash to reload your bash_rc
cd ~/.ec2
Amazon has this services where you can use virtual servers, either your custom or prebuilt publicly shared server images. The key point here is that Amazon has a lot of servers that can be used at any time.
So let’s get started. The first thing to do is sign up at Amazon EC2. I’ll be using Ubuntu on this.
You need Java JRE, do:
apt-get install sun-java5-jre
vim .bashrc
# Amazon Ec2
export EC2_HOME=~/.ec2
export PATH=$PATH:$EC2_HOME/bin
export EC2_PRIVATE_KEY=~/.ec2/pk-VGKIRWAKVSIEXEPVFQ2NSVQ4APUMYAC3.pem
export EC2_CERT=~/.ec2/cert-VGKIRWAKVSIEXEPVFQ2NSVQ4APUMYAC3.pem
export JAVA_HOME=/usr
type bash to reload your bash_rc
cd ~/.ec2
ec2-add-keypair arstan-keypair

Save those lines including —–BEGIN RSA PRIVATE KEY—– and also —–END RSA PRIVATE KEY—– lines.
sudo chmod 600 id_rsa-arstan-keypair
ec2-describe-images -o amazon This will show the server images that Amazon has for you. You can see ec2-describe-images -a to see all the server images you have access to.
ec2-run-instances ami-0459bc6d -k arstan-keypair
ec2-describe-instances will show you instances you are running.
How to install and run Ubuntu 8.04.1 Server in VirtualBox
UPDATE:
You can just enable ACPI and PAE/NX in the VirtualBox image General Settings and you are all set to install Ubuntu.
It’s been long time since I posted in my blog. It’s past midnight Wednesday (I love Selangor state for its public holidays!) and no office tomorrow.
I watched closely VirtualBox from its Sun acquisition and I am very pleased with the project progress overall. On my day to day RnD stuff I have already shifted myself from VMWare Sever to VirtualBox.
In VirtualBox after installing Ubuntu 8.04.1 Server (Hardy) and rebooting, you will get some errors that your CPU is not supported.
It’s because you have no linux-virtual package installed. So here’s the steps how to pass by this problem.
- Reboot the instance, boot into Rescue a broken system
- If you chose auto-partitioning, select sda1 as your root directory and enter into it.
- Execute dhclient eth0, apt-get update && apt-get install linux-virtual
- Type exit and reboot the system from the menu.
Now you will be able to boot into your newly installed Ubuntu.
How to change network interface names in Ubuntu
Have you ever found out that your eth0 interface suddenly became eth1 or sth like that? I noticed that after some minor upgrades my eth0 became eth1. I hate this, because I am so used to eth0 as my LAN interface.
Also in latest versions of Ubuntu my WLAN is taken as wlan0. I’m so much used to eth1 as my WLAN. Anyways, on my laptop I won’t have any additional LAN devices except my built in.
So, let’s change those things, shall we?
sudo vim /etc/udev/rules.d/70-persistent-net.rules
# PCI device 0×14e4:0×1600 (tg3)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth1″# PCI device 0×8086:0×4222 (iwl3945)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”wlan*”, NAME=”wlan0″
Change above to:
# PCI device 0×14e4:0×1600 (tg3)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″# PCI device 0×8086:0×4222 (iwl3945)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”00:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”wlan*”, NAME=”eth1″
So, all you have to do is to edit /etc/udev/rules.d/70-persistent-net.rules file and change the NAME option to your choice of your ethernet/wifi device name.

