In today's tip I'm going to run through how to setup an Ubuntu media server. First of all, what is Ubuntu. Wikipedia says:
Ubuntu is a Linux distribution for desktops, laptops, and servers. It has consistently been rated among the most popular of the many GNU/Linux distributions. Ubuntu's goals include providing an up-to-date yet stable operating system for the average user and having a strong focus on usability and ease of installation.
It is very much like apache, which I showed you how to setup in my article on how to make your computer into a local server, in that it is commonly used as a server software. Now then, what is a media server?
To refer to Wikipedia again, a media server is
A media server is a computer appliance, ranging from an enterprise class machine providing video on demand, to, more commonly, a small home computer storing various digital media.
Basically, it's just like a local server which stores and shares solely media instead of other types of files. I'll leave the uses of one to your imagination. Let's on with setting it up.
What you'll need:
Step 1
Install Ubuntu. It's really that simple. The Ubuntu site has a really comprehensive guide on installing it for pretty much every configuration and possible way. You can get that at https://help.ubuntu.com/community/Installation.
Step 2
Setup SSH.
Secure Shell or SSH is a network protocol that allows data to be exchanged over a secure channel between two computers
Thanks, again, go to Wikipedia for that quote. Sorry for all the wiki' quotes - but it's the best way to explain it.
From the Ubuntu terminal, type
sudo apt-get install ssh
To be able to use SSH to access your remote machine from another Linux box type this into the terminal, assuming the IP is "123.456.7.8". (To find the IP type "ifconfig" in the terminal)
ssh username@123.456.7.8
Step 3
Update Ubuntu. This can be tedious and time consuming but it's a necessary evil if you want to be update to date with security and bug fixes. To update, type this into the terminal:
sudo apt-get update
sudo apt-get upgrade
Step 4
This step is optional but, over a very long period of time, could possibly save you a small fortune in electricity bills. Turn off GDM. To turn off GDM, from Gnome, click System/Administration/Services and uncheck Graphical Logic Manager (GDM)
Step 5
Reboot and leave it. Now you've got the box setup you won't need to tamper with it any. Go to your client machine.
Step 6
Use SSH to connect to the server from your client machine.
Step 7
Install and setup Samba. Samba allows Linux computers to connect to Linux workgroups. Do the following from the SSH terminal.
Install
sudo apt-get install samba smbfs
Configure samba:
Stop
sudo /etc/init.d/samba stop
Backup or move
sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.orig
Create
sudo touch /etc/samba/smb.conf
Edit
sudo pico /etc/samba/smb.conf
Step 8
Add this text file into Pico and replace the following (Item -> Replacement):
"YOUR_HOSTNAME" -> Whatever you want. It's probably best just to name it the same as your box though.
"YOUR_WORKGROUP" -> Name of your windows work group.
"/media/samba/" -> Path to content you want to share
"YOUR_USERNAME" -> Your username
Step 9
Save. Press CTRL+X, Y, Enter
Step 10
Set permissions. Replace "/media/samba" with the path to the content you want to share.
sudo chmod 0777 /media/samba
Step 11
Restart Samba
sudo /etc/init.d/samba star
That's it! Your media server is setup. I've still got the 3 last commands to give you though.
Add user
sudo smbpasswd -a system_user
sudo pico /etc/samba/smbusers
Insert this into a new file
system_username = "network username"
Then save it.
Edit user
sudo smbpasswd -a system_username
Delete user
sudo smbpasswd -x system_username
Thanks for reading. Check out the rest of Daily Tip for more great articles, tips, tricks and facts.