Archive for September, 2012


Install Ubuntu 12.04 Server on 4GB USB stick

Few days ago i decided to update my server. I was running old Fedora 14 (Amahi) and update to Fedora 15 wasnt possible because of Amahi installation. Amahi recently switched over to Ubuntu and they abandoned support for Fedora 16. Well, even if update to F16 would be possible, i wouldnt update because Amahi isnt that useful in my opinion. Many apps are payable and you need to install them manually if you want to get them for free.

Therefore i decided to install Ubuntu 12.04 on 4GB USB stick. Why on USB stick? That is because i use my server for only three things: torrents (Transmission), OScam and CCcam. 4GB USB stick seemed like a great alternative to ordinary HDD (i was running F14 on 200GB HDD that came with the HP Microserver N36L). EDIT: I now suggest that you rather use 8GB or 16GB. Its better because 4GB can soon become abit tight and you will run out of space 🙂

You may be asking yourself now, how is it possible to install Ubuntu 12.04 Server on such small storage device. Well its possible without any problems. Just check this page: http://athlon1900.dyndns.tv/OsirisCS-Ubuntu12/Allgemeines/

Here you can find x86 version of Ubuntu 12.04. Sorry, no x64 version on this site. Size of .ISO file is only 27MB which is just crazy low number! A lot of packages are missing but you can download them manually so thats not a problem.

Here is install procedure:


Find 4GB or larger USB stick. 2GB is too small for Ubuntu installation!


Remove old HDD with Linux OS (if you have it) and use your chosen USB stick. You also need to change boot priority in BIOS. USB stick should boot first. I have HP Microserver that has USB port on motherboard and when it detect USB stick in this port, it automatically boots from this USB. Very neat feature!


Follow on screen instructions. Installation is not hard so i will not go into details here.


Ubuntu will boot into command line mode after installation. If you are not familiar with command line (terminal), then walk away from this tutorial! Now you need to create root password. Use these commands:

sudo passwd root

Ubuntu will then ask you for password. It should look something like this:

[sudo] password for ramesh:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully


Now you need to set up auto login with user root. Use this command in terminal:

nano /etc/init/tty1.conf

Now you search for something like this:

exec /sbin/getty -8 38400 tty1 -a root

You see root at the end? In default installation there wont be root at the end of this line. You need to replace default value (i dont remember now what was there by default) with root! When you are done with editing, press CTRL-X and then confirm changes with button Y. Thats it. After reboot you wont have to enter username and password! You will be automatically login as user root. Nice!


Now i would recommend that you install WEBMIN which is very useful if you want to set up network shares or change some other settings. You need to do this:

sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python

Then you run this command:

wget http://prdownloads.sourceforge.net/webadmin/webmin_1.590_all.deb

and the this one:

sudo dpkg -i webmin_1.590_all.deb

Thats easy right? Webmin will be then accessible through port 1000 = http://SERVERIP:10000/


Be sure to install OpenSSH package during Ubuntu installation. If you dont select this, you have to install it afterwards. Just use apt-get install openssh-server openssh-client command! OpenSSH enables you to connect to your server using Putty and SSH connection!


If you want, you can also install Transmission. Use this command:

apt-get install transmission-daemon

This will only install daemon and not a client. You dont need this on headless server that we are trying to build or make 🙂 Now connect to your server using FTP (i suggest WINSCP) and search for transmission-daemon file in /etc/init.d/ folder. Open it with Notepad++ and search for this:


Replace this with these lines:


Now we need to edit settings.json. I suggest you use these settings:

    "alt-speed-down": 50, 
    "alt-speed-enabled": false, 
    "alt-speed-time-begin": 540, 
    "alt-speed-time-day": 127, 
    "alt-speed-time-enabled": false, 
    "alt-speed-time-end": 1020, 
    "alt-speed-up": 50, 
    "bind-address-ipv4": "", 
    "bind-address-ipv6": "::", 
    "blocklist-enabled": false, 
    "blocklist-url": "http://www.example.com/blocklist", 
    "cache-size-mb": 4, 
    "dht-enabled": true, 
    "download-dir": "/mnt/500GB/Torrents", 
    "download-limit": 100, 
    "download-limit-enabled": 0, 
    "download-queue-enabled": true, 
    "download-queue-size": 5, 
    "encryption": 1, 
    "idle-seeding-limit": 30, 
    "idle-seeding-limit-enabled": false, 
    "incomplete-dir": "/root/Downloads", 
    "incomplete-dir-enabled": false, 
    "lpd-enabled": false, 
    "max-peers-global": 200, 
    "message-level": 2, 
    "peer-congestion-algorithm": "", 
    "peer-limit-global": 240, 
    "peer-limit-per-torrent": 60, 
    "peer-port": 51413, 
    "peer-port-random-high": 65535, 
    "peer-port-random-low": 49152, 
    "peer-port-random-on-start": false, 
    "peer-socket-tos": "default", 
    "pex-enabled": true, 
    "port-forwarding-enabled": false, 
    "preallocation": 1, 
    "prefetch-enabled": 1, 
    "queue-stalled-enabled": true, 
    "queue-stalled-minutes": 30, 
    "ratio-limit": 2, 
    "ratio-limit-enabled": false, 
    "rename-partial-files": true, 
    "rpc-authentication-required": false, 
    "rpc-bind-address": "", 
    "rpc-enabled": true, 
    "rpc-password": "{9e73614bdbc1012766d2d4f864650f956281c5feGBTlCrfH", 
    "rpc-port": 9091, 
    "rpc-url": "/transmission/", 
    "rpc-username": "", 
    "rpc-whitelist": "", 
    "rpc-whitelist-enabled": false, 
    "scrape-paused-torrents-enabled": true, 
    "script-torrent-done-enabled": false, 
    "script-torrent-done-filename": "", 
    "seed-queue-enabled": false, 
    "seed-queue-size": 10, 
    "speed-limit-down": 100, 
    "speed-limit-down-enabled": false, 
    "speed-limit-up": 100, 
    "speed-limit-up-enabled": false, 
    "start-added-torrents": true, 
    "trash-original-torrent-files": false, 
    "umask": 0, 
    "upload-limit": 100, 
    "upload-limit-enabled": 0, 
    "upload-slots-per-torrent": 14, 
    "utp-enabled": true

Line that is bold need to be changed, according to your setup. Also, umask needs to be set to value 0! Default value is 18 and its not good. Where is this settings.json file? You can find it in folder /etc/transmission-daemon

Before editing, you need to first stop transmission-daemon service, otherwise settings.json will revert to default state when you will reboot your server. Use this comman to stop this service:

service transmission-daemon stop

Then you can start with editing settings.json file. When you finish with editing, save this file and upload it back to the server using FTP of course. Use this command to start the service again:

service transmission-daemon start

Transmission will now start and settings should not be erased this time. Transmission can be access via http://YOURSERVERIP:9091/

I suggest that you install Transmission Remote GUI on your PC (if you have Windows OS). Its great piece of software and enables you to add or remove new torrents with ease.


Now you can install other stuff too, it depends what you want. If you want to use server for OScam and CCcam, please also check my other tutorials on this site. Installing CCcam is easy. Download CCcam 2.1.3 for x86 linux and put it in usr/local/bin folder. Then create /var/etc folder. You need to put CCcam.cfg file here. This is main configuration file for CCcam, very important!

If you want that CCcam starts automatically when you start your server, use Webmin! Just check image that you can find below if you want to see how to create cronjob in order to enable autostart of CCcam. You can do the same for OScam too 😉 OScam installation is a bit harder because you need to compile it. On this you can also find tutorial about compiling OScam on Ubuntu.

Also check this pictures:

This is the end of this quite long tutorial. If you have any questions, just leave a comment!




Optimal settings for OScam Cache-EX MODE 3

OScam Cache-EX is very CPU/RAM intensive  and can also consume a lot of your internet bandwith. Therefore you need to have proper settings and proper version of OScam.

If you DO NOT want to have memory problems, please use OScam version 7190! Later versions have stability problems and are not recommended.  Latest versions of OScam should be already OK, so i strongly recommend you start using them!!

For internet bandwith problems, please follow this guide. I made it with the help of users on satfriends.com forum and my own mind of course 🙂

Optimal Settings for Camd35


label                         = xxx
protocol                      = camd35
device                        = xxx,17835
user                          = xxx
password                      = xxx
cacheex                       = 3
cacheex_maxhop                = 2
group                         = 1,4,5,6,10,20 # 20 is group which is intended to be used only for cacheex
dropbadcws                    = 1
audisabled                    = 1


user                          = xx
pwd                           = xxx
group                         = 20
uniq                          = 3
cacheex                       = 3
cacheex_maxhop                = 2
allowedprotocols              = camd35

Bolded lines are important if you want to control internet bandwith consumption. At first i used 4 instead of 2. Well, not a good decision, because OScam was sometimes using more that 200KB/s of my internet bandwith!! And i only have 3Mbit of upload. With setting “2”, consumption dropped to around 30KB/s which is alot lower number. Browsing internet sites is also faster now.

Optimal Settings for CCcam (recommended protocol)


label                         = xx
protocol                      = cccam
device                        = xx,20000
user                          = sfxxTV-ca
password                      = xx
cacheex                       = 3
cacheex_maxhop                = 2
group                         = 1,4,5,6,10,20
dropbadcws                    = 1
cccversion                    = 2.3.0
ccckeepalive                  = 1
cccreconnect                  = 0
cccreshare                    = 0
cccmaxhops                    = 0
audisabled                    = 1


user                          = tuxrbxx
pwd                           = txx
uniq                          = 3
group                         = 20
cacheex                       = 3
cacheex_maxhop                = 2
cccmaxhops                    = -1 #important, because you dont want, that your cache-ex peer sees your CCcam cards!!
cccreshare                    = 0

You should also use these settings for oscam.conf file:

clienttimeout                 = 10000
nice                          = -1
dropdups                      = 1
cacheexwaittime               = 0 # this setting is not indented to be used with mode 3 cacheex!
max_cache_time                = 12
max_cache_count               = 7500

port                          = 12464 #doesnt matter just choose one number.
wait_time                     = 100 #currently this is the best settings for cacheex. Yes i know, this section is for CSP but you need to use it for cacheex in mode 3! Very important!!

Additional info about some new settings that were added in recent versions of OScam!

wait_time = global for csp,cacheex mode 2 and mode 3
csp_ecm_filter = block incoming ecm (csp only)

cacheex_ecm_filter = block incoming ecm (mode 3 only) from current user
caid = block outgoing ecm (mode 3) from you to selected user

cacheex_ecm_filter = block incoming ecm (mode 2 only) from current reader

I got this info from user TNe-Two on streamboard forum!



Powered by moviekillers.com.com

Seraphinite AcceleratorOptimized by Seraphinite Accelerator
Turns on site high speed to be attractive for people and search engines.