How to make a home server - Ubuntu 9.04
This is just how to access your home server LOCALLY. I will be putting up another guide telling you how you can access it from anywhere in the world as long as you have an Internet connection.
Let's get started, shall we?
I'm going to first start off by giving you links to all my resources... Here they are:
Benji Korsak. First comprehensive guide that I actually ever found. It worked quite well, actually. I just needed to change some of the codes around so that they would actually WORK. Don't use the last page, it's useless.
Systm - Dynamic DNS. Systm was one of the greatest shows, of all time. Well, when it comes to tech stuff like this it is. May it rest in peace.
Tech Support Forum. These people are skilled in just about everything. Anything you throw at them, they can answer. Usually... Don't be afraid to ask questions!
UbuntuForums.org. Just a post that I made on UbuntuForums.org and I had some very friendly people help me out. I love communities
Life Hacker. This is the source for my next guide... Know that it's coming
OK. Now that you've got those links read and at your disposal, we shall finally get into the awesome fun part that is...
CREATING A HOME MEDIA SERVER!!!! *cue awesome music*
Alright.
First, you'll need these things:
A spare laptop or desktop computer
Said computer device of choice must have enough hard drive space for your files you wish to share
MUST have an internet connection (preferably wired using Ethernet, but a STRONG wireless connection will work too)
I am using an old (OLD) Dell Inspiron 1150. It works great as a media server, because the backlight doesn't work, which means that it is useless to me as a laptop.
Alright so there are two ways you can go about doing this next part:
You can install the latest version of Ubuntu over at their site.
OR
You can get the server edition at their site.
I went with the desktop version, because that is all I had at the time and my main computer was out of comission at the time being. So, I went with the desktop (plus, it was a bit easier with a GUI).
If you use the server edition: At the end of the installer there is an option for the type of server. You will choose the LAMP server. the LAMP server is:
Linux Apache MySQL PHP/Perl/Python
If you decide to use the desktop edition, I will walk you through the process of getting the stuff required for a LAMP server.
THIS GUIDE WAS WRITTEN USING UBUNTU 9.04 DESKTOP EDITION.
OK. Now for the REAL instructions:
(I suggest copy-pasting these commands into the terminal, because that way you won't get confused by letters and what have you. To paste into the Terminal on Linux, just tap the third mouse button, or the scroll wheel. If you do not have one, just right click>paste [I think]).
You're going to be installing SSH so that you can access your computer remotely, for whatever reason.
Open a Terminal window (The Applications tab in the top left, and then the first section down. It's sorted in alphabetical order, so Terminal will be near the bottom of the list). Type this command:
Sudo is the command used to get root privileges. All apt-get commands MUST be preceded by sudo. Otherwise, you will get an error 13 message asking if you're root or not. You will be prompted for a password when using sudo (unless you've used sudo before in that session of the Terminal). Apt-get is just the command used to tell the computer to use the package manager. It's used to install software in Linux. Install is very straightforward
Now, if you wish to use a different computer for the rest of this guide, you can. You'll need to grab a copy of Putty, however. Don't worry, it's freeware.
In the terminal type:
You should see a number (in the long list that appears) that says something like 192.168.15.x, or something similar. This is the INTERNAL IP address of your Linux box. You will type that into the host address of Putty. Leave everything else alone and hit connect. Then you'll need to type in the username and then the password. Then you can do whatever you want within the TERMINAL interface. Not a GUI
No make sure it's up to date...
And install those updates:
Now you should be good to go!
Now you'll need to install Samba. Samba is used to connect your Linux machine to a workgroup.
Now you need to stop the Samba service so it doesn't interfere with the next commands:
And now you'll need to move it so that you can easily find it within your server:
The mv command just means move.
You'll need to create a file for Samba:
And then edit it:
And now you'll need to paste this stuff into the space that will appear:
- Code:
[global]
; General server settings
netbios name = YOUR_HOSTNAME
server string =
workgroup = YOUR_WORKGROUP
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast
wins support = yes
printing = CUPS
printcap name = CUPS
syslog = 1
syslog only = yes
;[homes]
;valid users = %S
;create mode = 0600
;directory mode = 0755
;browseable = no
;read only = no
;veto files = /*.{*}/.*/mail/bin/
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775
[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no
;[DVD-ROM Drive]
;path = /media/cdrom
;browseable = yes
;read only = yes
;guest ok = yes
[MyFiles]
path = /media/samba/
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0755
force user = YOUR_USERNAME
force group = YOUR_USERGROUP
(THERE ARE SEVERAL DIFFERENT TEXT EDITORS. PICO IS INSIDE THE TERMINAL, BUT YOU CAN USE GEDIT IF YOU SO CHOOSE. GEDIT IS LIKE NOTEPAD, BUT IN LINUX. GEDIT WILL ALSO ALLOW YOU TO USE CONTROL + F TO FIND THINGS; ESPECIALLY USEFUL IN THE NEXT SECTION).
Now you'll need to save it:
Now you'll want to set the permissions so that you won't have any issues with the Samba service.
REPLACE "/media/samba" WITH THE DIRECTORY THAT YOU SPECIFIED EARLIER (about 8 lines up).
For example, I used my Music directory. So MY code would look like:
Now you'll need to add a user:
And insert the following line into the new file:
And save it:
And now you're all done!!! ...With Samba...
Go onto these next steps to setup your awesome amazing new software:
Jinzora!!!
You can read about it if you want... But it's basically just a web based browser thing that allows people to browse through your media in an interesting way.
Just something fun for you!
My server has been up for:
Since 12:32:11 (PM).
It's working like a charm
So now you'll need to install LAMP and set it up for Jinzora to work properly.
PAY CLOSE ATTENTION.
WHENEVER I USE THE WORD 'pico' IN A COMMAND, FEEL FREE TO SWAP IT OUT WITH 'gedit'. THEY DO THE SAME THING, BUT GEDIT ALLOWS YOU TO SEARCH FOR TEXT USING CONTROL + F, WHICH MAKES THESE NEXT STEPS A LOT EASIER.
Now run the following commands in the terminal:
Now you'll need to configure PHP5 in order for it to meet Jinzora's requirements.
Now change these values:
This will allow PHP5 to work correctly with what Jinzora requires it to do. Unless you change these values correctly, you WILL NOT be able to install Jinzora. It just won't let you.
Now you'll need to configure MySQL (pronounced My Sequel). You'll need to make it so that the database can be accessed from the computer.
And change these values:
Now here is where I ran into some trouble. If you're not looking at the rubbervir.us site that I linked to at the beginning, you don't need to worry. But if you are, don't listen to his commands that he gave you for the MySQL part. They're WRONG in just one little, tiny way.
I don't even know what -p needs to be there for, but it does. If it's not there, it won't work. Now just edit these values:
Change the "PASSWORD('yourpassword')" part with a password of your choosing. LEAVE THE SEMI COLON THERE.
Change 'yourusername' with a username of your choosing. LEAVE 'localhost' ALONE. Change 'yourpassword' with the password that you added in the previous bit.
Now you've properly configured MySQL.
DON'T FORGET THAT USERNAME AND PASSWORD. You will need those for setting up Jinzora to work correctly.
Now here's where all that work comes into play:
Restart Apache.
Apache SHOULD eventually restart itself.
Now open up your browser and enter your IP address. If you forgot what it is, just type
into the terminal again.
You should be greeted by a page either saying "It works!" or listing off a whole bunch of stuff about Apache and things... If not, you'll need to do some port forwarding.
Find your EXTERNAL IP address. Just use
again, and you'll be able to find it. Now enter that IP address into your web browser. Login to your router's configuration page. My router is NOT the same as yours, but you can go here to figure out what you need to do for your router. After you select your router, look in the A's section for Apache and click that. You'll need to forward ports 80 and 443.
Now you get to do the fun part:
Installing Jinzora!!!
Go and download it... Shouldn't be too hard. If you want to be lazy about it, just enter this code into the Terminal:
If that is not latest stable version, then I suggest you go over to their site and you download it. When you download it, but it on your desktop and use this command:
(Replace 'YourUsernameHere' with your username
And then run these commands:
(Replace the things in little quotes with the actual thing's name).
Now the rest of this can be done in your web browser.
Enter the IP address of the server into your browser.
If you don't see a list of things within the '/' directory, and you just see a window that says "It works!", then enter this code into the terminal:
Now you should be good.
hit the directory that says 'jinzora2/'. Now you just need to proceed through the web based installer.
Click the "Proceed to Requirements>>" button.
Read through all the information on the screen, you should not see any red words under "Requirements" other than the proceed button.
Yes, good? Click the "Proceed to License>>" button.
Agree and continue.
Click the "Proceed to Main Settings>>"button.
Fill out the text boxes, but this time leaving "Default Access Level:" and "Backend Type:" as is and continue.
Once again fill out the text boxes leaving "Database Server:" and "Database Type:" and changing "Create Database:" to true. Continue.
Everything should have been successful. If it says failed created database, double check that on the previous page you used the same user name and password you created when setting up MYSQL. Hit "Proceed to Import Media>>"
Here is where you specify the location of your media, if you did not change it from the previous tutorial it will be in /media/samba/. So navigate to that directory and select analyze. How much media you have will determine how long it will take to import. About 15 songs per second.
Click "Proceed to Save Config>>," "Proceed to Launch Jinzora>>," choose to share anonymous stats or not and finally click "Launch Jinzora"
Login and explore. Now it should say something about it not being secure, so open up ssh again and from the terminal type.
Refresh and explore.
If you restart your server, you may have issues connecting to it again. Here's what you'll want to do:
Upon restarting your server, enter these commands into the Terminal:
Now it should work just fine.
Again, this is just how to access your home server LOCALLY. I will be putting up another guide telling you how you can access it from anywhere in the world as long as you have an Internet connection.
Alright, here it is. How to access your server from outside your local network. Enjoy!!!
Intel Core 2 Duo 2.66Ghz OCed to 3.4Ghz
Freezer 7 Pro CPU fan by Arctic Cooling
EVGA nVidia GeForce 9800GT OCed to 700/1780/960
Corsair TX750W PSU
2GB DDR2 RAM - 2x 1GB G Skill
500GB Western Digital Caviar Black HDD
Windows 7 RC 7100 and Ubuntu 9.04
MODDED Rosewill R604-P SL mid ATX case
Full system details
How to setup a home server using Ubuntu 9.04
Case mod


