Virtualhost for Couchpotato, Sickbeard, Transmission and SABnzbd

July 24th, 2011 6 comments

I wanted to be able to get to my applications without having to enter the port numbers e.g.

http://mydomain.com/couchpotato

instead of

http://mydomain.com:5000

First off is to add the information to enable the Apache Proxy Module. This information came from linode.com

sudo gedit /etc/apache2/mods-available/proxy.conf

File excerpt: /etc/apache2/mods-available/proxy.conf

<IfModule mod_proxy.c>
        #turning ProxyRequests on and allowing proxying from all may allow
        #spammers to use your proxy to send email.
 
        ProxyRequests Off
 
        <Proxy *>
                AddDefaultCharset off
                Order deny,allow
                Allow from all
        </Proxy>
 
        # Enable/disable the handling of HTTP/1.1 "Via:" headers.
        # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
        # Set to one of: Off | On | Full | Block
 
        ProxyVia On
</IfModule>

Then you need to make sure that the modules are enabled

sudo a2enmod proxy
sudo a2enmod proxy_http
sudo /etc/init.d/apache2 restart

Then you need to add the locations to the defaults sites

sudo gedit /etc/apache2/sites-available/default

File excerpt: /etc/apache2/sites-available/default

    <Location /couchpotato>
        ProxyPass http://localhost:5000
        ProxyPassReverse http://localhost:5000
    </Location>
 
    <Location /sabnzbd>
        ProxyPass http://localhost:8080/sabnzbd
        ProxyPassReverse http://localhost:8080/sabnzbd
    </Location>
 
    <Location /sickbeard>
        ProxyPass http://localhost:8081/sickbeard
        ProxyPassReverse http://localhost:8081/sickbeard
    </Location>
 
    <Location /transmission>
        ProxyPass http://localhost:9091/transmission
        ProxyPassReverse http://localhost:9091/transmission
    </Location>

Restart apache by running

sudo /etc/init.d/apache2 restart

You will have to edit the config.ini files for both Couchpotato, and SickBeard to use a webroot. Here’s are the lines in the config.ini files that had to change, and what they were changed to.

SickBeard config.ini
web_root = /sickbeard

Couchpotato config.ini
urlbase = couchpotato

Categories: Software Tags: , , ,

Usenet Deals

July 10th, 2011 No comments

I’ve been using Usenet for a while now, and have used a couple different companies. Either of the companies worked fine for me. The first company I used was Newshosting.com. With Newshosting I had 30 SSL connections, and I could use them from separate locations, e.g. I had my server at home running SABnzbd+ and I had my laptop with my wireless connection running SABnzbd+ too. News hosting was costing me $15/mo for unlimited downloads.

I have since switched to Astraweb. I found a couple deals on the internet for astraweb.  The first deal was $11/mo for unlimited downloads and 20 ssl connections. The second deal, which I am currently on is $96/year for unlimited downloads and 20 ssl connections. The second deal at $96/year ends up being $8/mo.  That’s cheaper than even Netflix currently is!

Useful Usenet Programs

HandBrake install for Ubuntu

June 9th, 2011 No comments

I recently upgraded my machine to Ubuntu 11.04, but I still want to be able to convert my movies for my iPod. HandBrake is a nice little tool that will allow you to do just that. At the time of this writing these instructions would work for ubuntu 9.10 – 10.04.

To install simply type the following in your terminal:

sudo add-apt-repository ppa:stebbins/handbrake-releases
sudo apt-get update
sudo apt-get install handbrake-gtk

You should now find HandBrake installed in you system menu.

Categories: Media Player Tags: ,

Connecting to MySQL on remote machine

May 31st, 2011 No comments

I just installed Ubuntu 11.04 on a machine that I was using as a shared XBMC database server.  It was the same machine that I was using before.  I backed up the database and restored it on the new machine, but when I went to use XBMC it wouldn’t connect to my shared database.  I tried doing the following from a XBMC machine:

ERROR 2003 (HY000): Can't connect to MySQL server on '###.###.###.###' (111)

After a bit of time on Google I found the solution.  It appears that they changed the security in the latest version of MySQL.  It used to be a setting called skip_networking which had to be set to off, they have since added the bind-address setting in the MySQL my.cnf file.

sudo nano /etc/mysql/my.cnf

You will need to find the bind-address setting and comment it out. Save and exit the file, and then restart MySQL.

sudo /etc/init.d/mysql restart

After that I could connect to the remote database, which was on my LAN. Please note that should take care to make sure that your server isn’t accessible from the outside, e.g. stay behind a firewall.

Categories: Software Tags: , , ,

Automount samba drives

May 30th, 2011 No comments

I have a network share that gets backups sent to it automatically, so I want to have the network drive automatically mounted on bootup, so the backups will work. You’ll need to make sure you have smbfs installed and then open fstab and edit it.

sudo apt-get install smbfs
sudo gedit /etc/fstab

Add the following to the fstab

# My Network Drives
//192.168.0.11/media /media/media cifs credentials=/home/michael/.mediaserverCredentials,rw,iocharset=utf8,_netdev,uid=1000,gid=1000 0 0
  • _netdev is supposed to make it not try to mount the drive until the network is up and going.
  • credentials is where your access credentials are stored
  • cifs is the samba file system type
  • uid is the user id, exclude for root
  • guid is the group id

You will need to create your .mediaserverCredentials

sudo gedit /home/michael/.mediaserverCredentials

and add the following to it.

username=michael
password=PASSWORD

obviously you will need to put your username and password, and change the paths to something for you. You may want to use /etc/samba/ as a location to store the credentials file. You need to make sure that the file is owned by root, and only readable to root.

sudo chown root:root /home/michael/.mediaserverCredentials
sudo chmod 400 /home/michael/.mediaserverCredentials

I’ve seen it mentioned places to update the unmount order to prevent hanging during shutdown. I’m not sure if this is necessary or not.

sudo update-rc.d -f umountnfs.sh remove
sudo update-rc.d umountnfs.sh stop 15 0 6 .
Categories: Operating Systems Tags: , ,

Automount drives based on UUID

May 29th, 2011 No comments

I wanted to be able to automatically mount my drives by adding them to fstab. I have done it before, but I have used the /dev/sdb1 syntax. I have noticed a problem when I unplug the drives, and plug them back into a different SATA controller. When I do that it changes the /dev/sd## to something else. I have learned that if you use the UUID in the fstab, then this issue doesn’t really arise.

First off is to determine the UUID of the drives that you have mounted. Enter the following in the command line.

sudo blkid

It will return something like

/dev/sda1: UUID="6413b21e-ec40-4d80-8103-da8ea5fbbd30" TYPE="ext4" 
/dev/sdd1: UUID="08ae0157-7718-4e3d-be15-11a3b2802148" TYPE="ext3" 
/dev/sdd5: UUID="e580e4fe-4aed-4ea9-bcac-8ab9220414db" TYPE="swap" 
/dev/sdb1: LABEL="Seagate320" UUID="ce09b320-c7b3-4d7c-a192-a2d55208473c" TYPE="ext3"

You can also run “sudo fdisk -l” if you want more information about the different /dev/sd## drives. Otherwise if you can tell from the results which UUID you want then theres no need for “sudo fdisk -l”. The drive I am going to add to fstab is the “Seagate320” drive.

sudo gedit /etc/fstab

Add the following to the fstab file

# My Local Drives
UUID=ce09b320-c7b3-4d7c-a192-a2d55208473c /media/Seagate320/ ext3    defaults,errors=remount-ro 0       1

Next time you reboot the drive will automatically be mounted.

Categories: Operating Systems Tags: , ,

LAMP with Ubuntu

April 21st, 2011 1 comment

I have a new install of Ubuntu 11.04 beta installed on a machine, and I wanted to use it to do some web development, so I needed to install Apache2 with PHP5 and MySQL. All I needed to do was run a simple command.

sudo apt-get install mysql-server mysql-client apache2 php5 libapache2-mod-php5

You’ll then need to restart apache to get php working.

sudo /etc/init.d/apache2 restart

You may view you phpinfo by editing a file in /var/www/

sudo gedit /var/www/info.php

add the following to the info.php.

<?php phpinfo(); ?>

Now visit http://localhost/info.php to view your php info. You may also want to add additional things to php5. You may search the repository using

sudo aptitude search php5

Then once you found what other things you’d like to have installed you may do so by entering something like

sudo aptitude install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json

Usually I need to have mod_rewrite enabled for my applications to work.

sudo a2enmod rewrite

Finally you may want to install phpmyadmin for working with your MySQL databases

sudo apt-get install phpmyadmin
Categories: Operating Systems Tags: , , , ,

Zotac HD-ID11-U 1GB memory

March 13th, 2011 No comments

I have been using my Zotac HD-ID11-U Zbox for a little bit now.  Recently I found a stick of 1GB DDR2 6400 ram sitting around my house.  I believe that I originally bought it to put in my Acer REVO 1600, but I haven’t been seeing any playback problems with it.  The Acer only has 1GB of ram in it currently, and I had read articles about it needing 2GB if you want to be ably to do 1080 video.  I don’t have any 1080 videos, because they take up too much space on the server.  Actually it’s mostly likely because I don’t have a 1080p tv.  So here is what I’m going to change I am going to remove:

  • CORSAIR VS2GSDS667D2 2GB 200-Pin DDR2 667 (PC2 5300) Memory
    • Newegg Item #: N82E16820145172
    • Price: $29.99 (Free with Zotac)

and replace it with

  • Crucial CT12864AC800 1GB 200-Pin DDR2 800 (PC2 6400) Memory
    • Newegg Item #: N82E16820148165
    • Price: $23.99 (2010/02/13)

I don’t think that I should have any problems with this setup.  The Zotac has dedicated memory for the video card, where the Acer Revo does not, this means that the Zotac should have more memory available for the system to use.

The reason that I am doing this, is so that I can put the 2GB stick of ram in my laptop.  Currently it only has 2.5GB of ram.  A 2GB stick (same as listed above), and one of the 512MB sticks that came in the laptop.  This should help out running those virtual machines.

Categories: Operating Systems Tags: , ,

CONKY-colors

March 12th, 2011 1 comment
Conky Desktop

Conky Desktop

Conky is a free, light-weight system monitor for X, that displays any information on your desktop. Conky is licensed under the GPL and runs on Linux and BSD. The biggest issue that I have had with conky is setting it up.

It’s kind of a pain to get everything up and running just right.  Recently I ran across CONKY-colors. It is a nice little program to help you set up conky. To get CONKY-colors to work properly you will have to do several things.

Read more…

Find words in files in linux

March 7th, 2011 No comments

After wanting to find text inside of files in Ubuntu I ran across a nice little post. They way it was described to do it works great.  It uses the grep command.

Say you want to find some text called “my_function” in your scripts folder located at the /home/michael/scripts/ directory. Simply run the following command:

grep -i -n -r 'my_function' /home/michael/scripts/

Here is what is happening:
grep is function name to search a pattern in files
-i means ignore case
-n means output line number
-r search recursively

This makes it easy to edit the files with vim, and then jump straight to the line that you needed to edit.

Categories: Scripts Tags: , , ,