Friday, August 6, 2010

How to setup CCcam/Newcs with Omnikey cardsharing server with ClearOS 5.2 Linux

This tutorial helps you to setup a Linux PC CCcam server under 1 hour, even for users with no Linux knowledge.

We need some old working PC. Hardware: Pentium 3 or Amd 600Mhz and up, 256mb (512mb optimal) ram, from 5gb HDD and up, Networkcard, and a simple 1mb, 4mb, 8mb... or onboard videocard (no need a fancy 128mb AGP/PCI-E videocard).

Out there are many Linux distro's. With most of them you can build a good share server, but we use today "ClearOs".

What is ClearOs you ask!? ClearOs is a powerful network and gateway server designed for small organizations and distributed environments. Though ClearOs comes with an extensive list of features and integrated services (see sidebar), the solution is easy to configure thanks to the intuitive web-based interface. ClearOs Homepage

Is it stable!? Yes it is very stable and works almost perfectly with CCcam.

OK lets start now.

1: Download and burn it to a CD. Link for ClearOs iso:
ClearOS Enterprise 5.2

2: Installation steps:
1) Choose a Language: Installation language
2) Keyboard Type: Your keyboard language
3) Installation Method: Local CDrom
4) Install Type: Install
5) To Proceed with the installation type "ClearOs"
6) System Mode: Standalone Mode
7) Specify Lan IP Address: Manual Configuration (Set dynamic ip configuration if your router support MAC based static lease)
8) Nameserver IP: your router gateway IP (example or what u have there)
9) Set The System Root Password
10) Partitioing: Use default
11) Select Software Modules: Now with new ClearOs you can choose install "Graphical Console" (GUI), or without it. "Intrusion Detection And Prevention" is pretty cool thing against the hackers and prevents smaller DDOS attacks. Everything else you can tropp. You can install missing modules easy later under dashboard directly if needed.

3: Now if ClearOs is installed and you used manual IP table then you can unplug monitor and keyboard from PC you do not need them anymore.
If you used automatic DHCP, then log to server from current monitor and keyboard to know what IP your server has.
Use command: ifconfig
Now you see your server IP, unplug monitor and keyboard from PC.

4: System setup.
1) Write to your webbrouser next of cource your server lan IP.
2) Next u get warning message like so "This Connection is Untrusted"
Hit the tab "I Understand the Risks", then the tab "Add Exception" and at least "Confirm Security Exception" (It can happen that u need make 2-3 times that over again, when u get to the login page!)
3) Login
Username: root
Password: What u entered during the ClearOS installation
4) Language: default is English
5) Network: Please set mode to "Standalone Mode No Firewall" later if everything is working u can enable Firewall if u want it.
6) Time Zone: set your country
7) Domain: you can leave it to default "clearos.lan" or change. It is up to you.
8) Organization: fill the forms like u want, not needed to use your real data there.
9) Congratulations, you have completed the system setup wizard! and hit the tab "Continue configuring your system"
10) Finish: and again u need make that step "This Connection is Untrusted" Hit the tab "I Understand the Risks". Then the tab "Add Exception" then "Confirm Security Exception" and at last "Resend". (It can happen that with FireFox brouser u need make 3-5 times that over again, when u get to the main page back!)

5: Set up the Dashboard.
1) Hit on tab "ClearCenter" and "Register System". (If you had already ClarkConnect registered, then same data u can use forward with ClearOS as well. But if you are new user then hit that link and register your self: Register ClearOS
2) Hit on tab "ClearCenter" and "Software Modules" From there tick "FTP server module" and hit "Go". Wait, when it finish install. Depends from system speed from 2-3 minutes it can take, but you get constant info as well to when it is finish.
3) Close the dashboard window complete and open it again, then u see new Tab up there called "Server" and under that is now FTP. Next open that FTP and set "Status - Running" as "On boot - Automatic". "Maximum Instances" set down from 30 to 1
4) Open tab "Directory" and "Users" Now u have message there "The required user database engine is not running. Continue" Please hit that "Continue" tab now.
5) LDAP is used to store user and password information. Just hit there "Update" tab.
6) Open again "Directory" and "Users". Now hit the tab "Add" and fill the next form:

Username: blabla (your FTP and Home directory username)
First Name: fafa
Last Name: gaga
Password: xxxxx (your FTP access password)
Verify: xxxxx
Hit the tab "Add" to save new user data.

6: Download CCcam pack and FTP client software. Unpack CCcam pack and take out from there CCcam.x86 and CCcam.cfg.
WinSCP Free SFTP, FTP and SCP client for Windows

7: Open FTP client app add there lines like so:
Session: server
Host named:
User name: blabla that you have created under dashboard
Password: xxxxx
Now OK and connect to server.

8: Copy with FTP client CCcam.x86 and CCcam.cfg to share server. If it is done close the FTP session.

9: Now we need open Putty. If you do not have putty you can download it here: Download putty for windows PC
Log with putty to server as root not as user blabla!
Now we can put some commands to get CCcam to right place.

10: Commands: (command "ls" is directory viewer) Please give commands exactly like i write here then it works 100%!!!

cd /var
mkdir /var/bin
mkdir /var/etc

Note: mkdir is command for create new directory. If you see now 2 new directory then that part is OK. Next commands are:

cd /home/blabla

Note: that blabla is user what you created under dashboard and you see there CCcam.x86 and CCcam.cfg.

cp CCcam.x86 /var/bin
cp CCcam.cfg /var/etc

Note: cp is command for copy. Command rm is for delete.

cd /var/bin
chmod 755 CCcam.x86

Note: Now you see that CCcam.x86 is green, before it wase withe.

CCcam auto startup script:

nano /etc/rc.d/rc.local

Note: there you see line like that: "touch" and so one. under that line is lot empty space. Now please write next line exact under that "touch" line there so:


Note: / you can get there only with shift+7 and ctrl+o is save file and ctrl+x exit. Look out that you do not change there nothing else!

cd /var/bin

Note: ./CCcam.x86 is command to start CCcam manually from command line and command: killall CCcam.x86 stops it agan. For CCcam debuge mode use command: ./CCcam.x86 -d

cd /var/etc
nano CCcam.cfg

Note: with that command you have access to cfg file to edit it or you can use tutorial 15: to set to whole server FTP access . I prefer to change cfg file over putty.

12: How to get CCcam 2.1.0, 2.1.1 and 2.1.2 working with ClearOs 5.1. CCcam 2.1.3 and 2.1.4 don´t work with ClearOs 5.1!
Please give next commands into your system command line:

cd /home/blabla
cp /usr/lib
cd /usr/lib
chmod 755
ln -s

Note: that blabla is user what you created under dashboard!

13: Done. CCcam server is up and running. With ClearOs working most external cardreaders serial and usb with no extra linux configuration.

For serial reader in COM1 put into CCcam.cfg so:


If you have attached to COM2 then so:


COM3: ttyS2 and so one.

For attached USB1 reader like Smargo Smartreader+ so:

SERIAL READER : /dev/ttyUSB0 smartreader+

Attached USB2:

SERIAL READER : /dev/ttyUSB1 smartreader+

For USB3: ttyUSB2 and so one.

14: How to setup Infinity reader under ClearOs 2 way options: or Note: "apt-get" does not work with ClearOs 5.1 anymore u need to use command "yum"

Big thanks for that Infinity reader howtos goes to Bennieboy and to Ramad

15: As lot asked how to install NewCs into ClearOs so here is tutorial how do too that. Please follow exaclty my next instruction!

cd /lib
ln -sf

Download NewCs pack NewCS 1.67 RC1 and do so:
Unpack Newcs pack and take out from there 2 files: newcs.i686 and
newcs.xml.phoenix Next rename newcs.i686 to a newcs.x86 and newcs.xml.phoenix to a newcs.xml
Copy newcs.x86 to /var/bin and set chmod 755
Copy newcs.xml to /etc
Next edit newcs.xml for you needs and start newcs.x86 same way as you started CCcam: /var/bin ./newcs.x86
And for last we put newcs.x86 to server auto startup script.
If use newcs and CCcam together then palce so that newcs.x86 script is next over CCcam.x86 startup script then boots newcs.x86 first up and then CCcam.x86 like it should.
newcs auto startup script:

nano /etc/rc.d/rc.local

Note: there you see line like that: "touch" and so one. under that line is lot empty space. Now please write next line exact under that "touch" line there so:


16: Here is tutorial how to install No-Ip under ClearOs:
You need first install cc-devel developers package to be abel to execute no-ip install commands:

yum groupinstall "Development Tools"
cd /home/blabla
mkdir no-ip
cd no-ip
tar zvxf noip-duc-linux.tar.gz
cd noip-2.1.9-1
make install

Note: that blabla is user what you created under dashboard!

Put your no-ip account login/email string

Put password to that login/email

Enter update interval: [30] write to there 30 Then no-ip makes updates to your IP every 30 minute

Do you wish to run something at successful update? [N] (y/n) hit n

cd .. and agan cd ..
rm -rf no-ip and hit enter
tipe command exit to leave.
Done. You have successfuly installed no-ip under linux.
Here u can look same commands too: The Newbie's Guide to the No-IP™ Linux Client

17: Here is tutorial how to install DynDns under ClearOs Big thanks for that link goes to Bennieboy

18: Totorial how to set FTP access under ClearOs to by root and not only as user.
To enable the user that you have created to to have ftp access to the hole server you must do this steps:

1) edit file proftpd.conf: nano /etc/proftpd.conf
2) comment this line #DefaultRoot ~
you should have something like this:

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
# DefaultRoot ~

Big thanks for that FTP tutorial goes to nmga

19: If you have CCcam stabilty problem with your PC server and you have tryed everything, then here comes a help for that issue. Change from your CCcam.cfg next line:

#DVB API: -1
to a

Note: You need restart the CCcam after change. It works only with linux PC based CCcam servers. Dreambox or other reciver users do not try that!

Big thanks for that tip goes to Shalafi

20: Tutorial how to create CCcam running check script and if CCcam stops then that script runs CCcam self up again.

1) Log over putty to server as root and give next commands to create the script:

cd /etc
chmod 777

Next copy all that inside the
if ! ps -C CCcam.x86 > /dev/null
Next hit from your keyboard ctrl+o to save and ctrl+x to exit.

2) Now we need make a cron job what executes the script every 5, or from you set minutes. Please give next commands to make a cron job:

cd /etc
export EDITOR="nano"
crontab -e

There add new line to the job list so:
*/5 * * * * /etc/
Note: / sign you can get there only with shift+7 !

Hit ctrl+o to save and ctrl+x to exit and test the script out if it is working. Kill CCcam from /var/bin and wait 5 minutes and CCcam should go self up agan.
Note: If you feel that 5 minutes is too long, then u can lower it.

3 minute cron:
*/3 * * * * /etc/
1 minute cron:
*/1 * * * * /etc/
I know that "CCcam running check script" is not the best one, but it works well and it is easy to use. If u want use more complicate script then they you find in forum.

Big thanks for that CCcam running check script goes to FSS

21: Tutorial how to Configure CCcamphpinfo in ClearOs Big thanks goes to gangster429

22: How to get working a cheap ID cardreader Omnikey or SCM with ClearOs 5.1.
yum install opensc pcsc-lite ccid
chkconfig pcscd on
service pcscd start

Next you need "pcsc" version of newcs. Exmple u have PC linux server, then you need newcs.i686.pcsc Newcs conf examples and chat you find from here: How to get a Omnikey or SCM reader working with NewCs/Oscam under Linux and Windows

Good testing


Post a Comment