Archive for the ‘ Software ’ Category

Headless Ubuntu Server Torrent Box

Install Server Ubuntu 10
During the install, you can usually go with the default options. I chose to install an SSH server, PostregSQL server, and LAMP server. It gives you these options during install.


Create a static IP Address

Once installed modify your IP address to be static so we can always hit the same IP when connecting to our box. Do this by editing your interfaces file.
joel@torrentserver:/$ sudo nano /etc/network/interfaces

Here is what my interfaces file looks like:
(Note: Change the IP address to something that matches your LAN):
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.11.25
netmask 255.255.255.0
network 192.168.11.0
broadcast 192.168.11.255
gateway 192.168.11.1


Additional Hard drive for Data
For my install, I have 2 drive in my linux server to prevent my downloads from filling up my system disk.  This isn’t completely necessary but it’s what I prefer.

By default only the system drive is mounted, so this leaves us to find and mount the extra drive.

List your devicesjoel@torrentserver:/$ sudo fdisk -l
Disk /dev/sdb: 40.0 GB, 40000000000 bytes
255 heads, 63 sectors/track, 4863 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Create a directory to mount our drive:
joel@torrentserver:/$ sudo mkdir /data

Mount the drive to the directory we created:
joel@torrentserver:/$ sudo mount /dev/sdb /data


Adjust Permissions

Make sure our username is part of the debian-transmission group
joel@torrentserver:/$sudo usermod -a -G debian-transmission joel

Make sure our /data directory is owned by the debian-transmission group
joel@torrentserver:/$ sudo chgrp debian-transmission /data

Modify our permissions on our /data folder
joel@torrentserver:/$ sudo chmod 777 /data


Install Transmission Daemon

joel@torrentserver:/$ sudo apt-get install transmission-daemon

When asked, type ‘Y’ to continue

Stop the transmission-daemon so we can modify the settings file.
joel@silvertorrent:/$ sudo service transmission-daemon stop

Copy the settings.json file so we have a backup if necessary
joel@torrentserver:/$ sudo cp /etc/transmission-daemon/settings.json /etc/transmission-daemon/settings.json.bak

Edit the settings.json file:
joel@torrentserver:/$ sudo nano /etc/transmission-daemon/settings.json

Here is my settings.json file:

(NOTE: Adjust “rpc-password”: “password” and “rpc-username”: “username” to the username and password you would like (The password will encrypt automatically). Also make sure you set “download-dir”: “” to a valid disk directory, mine is set to “/data” as I have that mapped to a second drive in my server.)
{
"alt-speed-down": 500,
"alt-speed-enabled": true,
"alt-speed-time-begin": 480,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": true,
"alt-speed-time-end": 0,
"alt-speed-up": 10,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": false,
"dht-enabled": true,
"download-dir": "/data",
"download-limit": 1000,
"download-limit-enabled": 0,
"encryption": 2,
"incomplete-dir": "/var/lib/transmission-daemon/info/Incomplete",
"incomplete-dir-enabled": false,
"lazy-bitfield-enabled": true,
"lpd-enabled": false,
"max-peers-global": 200,
"message-level": 2,
"open-file-limit": 32,
"peer-limit-global": 240,
"peer-limit-per-torrent": 60,
"peer-port": 20635,
"peer-port-random-high": 20500,
"peer-port-random-low": 20599,
"peer-port-random-on-start": true,
"peer-socket-tos": 0,
"pex-enabled": true,
"port-forwarding-enabled": true,
"preallocation": 1,
"proxy": "",
"proxy-auth-enabled": false,
"proxy-auth-password": "",
"proxy-auth-username": "",
"proxy-enabled": false,
"proxy-port": 80,
"proxy-type": 0,
"ratio-limit": 0.2500,
"ratio-limit-enabled": true,
"rename-partial-files": true,
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "transmission",
"rpc-port": 9091,
"rpc-username": "transmission",
"rpc-whitelist": "127.0.0.1,*.*.*.*",
"rpc-whitelist-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"speed-limit-down": 1000,
"speed-limit-down-enabled": false,
"speed-limit-up": 10,
"speed-limit-up-enabled": true,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 2,
"upload-limit": 100,
"upload-limit-enabled": 0,
"upload-slots-per-torrent": 4,
"watch-dir": "/data/_torrents",
"watch-dir-enabled": true
}

Start the Daemon again
sudo /etc/init.d/transmission-daemon start


Web Access

Internally, you should be able to access your server via your browser:

(Note: Change Ubuntu_Server_IP_or_Hostname to your server IP address or host name)
http://Ubuntu_Server_IP_or_Hostname:9091

If you want to access your transmission server from outside your house you will need to forward port 9091 to your ubuntu server on your router.


References

http://1000umbrellas.com/2010/10/04/updated-transmission-installationconfiguration-on-ubuntu-server

Share

Installing World Community Grid on a Headless Ubuntu Server

Install BOINC client:
sudo aptitude install boinc-client

Find your account key:
boinccmd --lookup_account http://www.worldcommunitygrid.org username password

You should get a response something like this
dfb74c9b94e1129c2eac322052eb5f98

Attach to your project:
boinccmd --project_attach http://www.worldcommunitygrid.org dfb74c9b94e1129c2eac322052eb5f98

If you want to verify your attached enter the following command:
boinccmd --get_state

You should get something like the following back, along with a bunch more info:
======== Projects ========
1) -----------
name: World Community Grid
master URL: http://www.worldcommunitygrid.org/
user_name: joelcpatterson
team_name: Preeminent Nonpareil
resource share: 100.000000
user_total_credit: 392663.547845
user_expavg_credit: 0.071871
host_total_credit: 0.000000
host_expavg_credit: 0.000000
nrpc_failures: 0
master_fetch_failures: 0
master fetch pending: no
scheduler RPC pending: no
attached via Account Manager: no
ended: no
suspended via GUI: no
don't request more work: no
disk usage: 0.000000
last RPC: 1297181772.312611
project files downloaded: 1297181833.027173

You can also take a look to verify your processor is being used by typing:
top

This will display your processes that are currently running and how much CPU they are utilizing.

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
20051 boinc 39 19 88388 77m 1484 R 99 3.9 10:21.74 wcg_c4cw_lmps_6
20050 boinc 39 19 88388 77m 1484 R 97 3.9 10:22.88 wcg_c4cw_lmps_6

Further resources:

Google Talk Flash App.

A pretty handy feature that I found several months ago is the GoogleTalk flash app.  It connects to GoogleTalk just like their main installable client.  However, the flash version is definitely more portable.

http://talkgadget.google.com/talkgadget/client
http://talkgadget.google.com/talkgadget/popout -Without the “Pop Out” icon in the upper right side of the screen.

If you would like to open this in your FireFox sidebar, open the client link from above and add a bookmark. Right click that new bookmark and go to it’s properties.  Select the “Load this bookmark in sidebar” check box at the bottom.  Click ok and then open the link.

inSSIDer = NetStumbler for Vista & Win 7 (Windows 7)

In the days of Windows XP, I used a product called NetStumbler to view wireless networks, their relative strengths, and specific broadcast channels.  Since Vista and Windows 7 came a long, I’ve been missing this little app.  Found a new one over at LifeHacker that provides many of the same features for Vista and Windows 7.

* Inspect your WLAN and surrounding networks to troubleshoot competing access points.
* Track the strength of received signal in dBm over time.
* Filter access points in an easy to use format.
* Highlight access points for areas with high Wi-Fi concentration
* Export Wi-Fi and GPS data to a KML file to view in Google Earth.

http://www.metageek.net/products/inssider

Use exFAT for faster flash drive performance

exFAT or (Extended File Allocation Table) is a newer hard drive/flash drive file system designed for mobile devices and well suited for removable devices.  exFAT was first introduced with Vista SP1 and it now ships with Windows 7 as well as Windows server 2008. Microsoft also released a KB to install the drivers on Windows XP, however it is not native to XP.

exFAT is designed to operate with much less overhead than the now standard NTFS file system.  This gives it the ability to run quite efficiently on removable devices.

For a full rundown on the advantages and disadvantages, take a look at the exFAT wikipedia page.

Performance wise exFAT comes out on top for most real life tests, however  FAT32 is still a big contender when it comes to straight file copying.  If you want further tests and benchmark details, head over to TestFreaks.com.  They have way more benchmarking information than you could have asked for or ever wanted.

L4D2 Windows Server Guide

  1. Download HLDSUpdateTool to your desktop or where ever you want.
  2. Install it with the defaults. This should create a folder named “Valve\HLServer” under “C:\Program Files”
  3. With notepad create a new document and copy and paste the following 2 lines into it.
  4. hldsupdatetool
    hldsupdatetool -command update -game left4dead2 -dir .

  5. Save the file as “Update_L4D2.bat” under the “C:\Program Files\Valve\HLServer\”
  6. If you want create a shortcut to this batch file on your desktop.  You can use it to update the L4D2 install as it needs updating.
  7. Run the batch file.  This will take some time because it will start downloading the L4D2 server files from steam.
  8. With Notepad again create a new document and copy and paste the following into it. Make sure it’s all on one line.
  9. start /High srcds.exe -console -game left4dead2 +map c1m1_hotel +maxplayers 16 -tickrate 33

  10. Save the file as “StartL4D2Server.bat” under “C:\Program Files\Valve\HLServer\left4dead2″
  11. Launch this batch file and the server will be up and running.
  12. If you are on the same network as the server you can connect to it by using your server’s local IP address.  Open your console and enter the command “mm_dedicated_force_servers x.x.x.x” where x.x.x.x is your servers IP address.
  13. Setup a lobby and launch.

Note: Since this is a local server, only you will be able to connect to it, or other friends on your local network. To allow external users the ability to connect you will need to setup port forwarding on your router.
Later I’ll add some more information about router port forwarding, srcfpsboost and setting your l4d2 server up as a windows service.

Microsoft Security Essentials

One of the better, free, no frills virus/malware apps.  I’ve been using MSE for a while now and have found it to a good piece of software.  MSE has a very small footprint and keeps to itself, yet it’s quite effective at finding malicious software.  I’ve had it come up with a few  items from spam I received (I might have purposely opened them to do some testing).  If you are interested in a free PC protection solution head over to http://www.microsoft.com/security_essentials/ to take a look.

For further information on how MSE ranks among its competitors here is another article you can look at. http://lifehacker.com/5433229/microsoft-security-essentials-ranks-as-best+performing-free-antivirus

XAMPP:Apache,MySQL,FTP,Mercury & Tomcat

XAMPP is a free application that allows you to run an Apache, MySQL, FTP, Mecury, and Tomcat server in Windows. It can be portable or you can install it as a service. XAMPP is an awesome application for web development or even production environments.

If you haven’t used it before head over to http://www.apachefriends.org/en/xampp.html and download one of the packages and give it a try.

FireFox Addon:WebMail Notifier

WebmailNotifierAwesome little Firefox Addon. WebMail Notifier is a simple little addon that allows you to setup many web accounts for automatic notification if you get an email or message in one of those accounts. It has an “add script” feature that can be used to create custom account notifications or select from the currently available list. Currently I set mine up to monitor my Gmail, Hotmail, Yahoo accounts as well as Adsense, Facebook, and LinkedIn.

Vibe Streamer

Vibe Streamer is a pretty impressive little app. It allows you to stream music from your home PC/Server directly to a browser anywhere in the world.

I recently setup this little app on my windows home server, pointed it to my music folder(mp3s) and it went right to work. It goes through and indexes your files adding them to it’s list of streamable/playable music. The app itself is simple but powerful. You can add multiple users, folders and shares and everything can be locked down via permissions.

If you would like to try it out on my server, head over to http://joelchristian.selfip.com:8081. Username is “guest” and the Password is “password”.