How to Build Debian Linux server with CCcam

bod

Inactive User
Joined
Feb 4, 2009
Messages
3,304
Reaction score
222
Location
In the SIN BIN
First download the netinstall cd of debian linux
You can download it from the following URL:
Link http://cdimage.debian.org/debian-cd/4.0_r2/i386/iso-cd/debian-40r2-i386-netinst.iso

This will install the basic debian linux system on you’re harddisk.
Just follow the steps on CD to get the system up and running.
During the installation process, it will ask you several questions
Hostname and domain are not really of much importance right now as you can change it lateron. Here you can input a hostanem and domain of you’re choice.

Another question is if it can use the entire harddisk. As it is going to be a dedicated server, you can use the entire harddisk

When it’s asking you for a network mirror, make sure you choose a fast and stable server.
Usually univercity servers are fast and stable.

When you’ve completed the network mirror, it’s going to download the software list.
Now you can deselect everything to keep the server as small as possible.
All you have to select is webserver.
After a while it will eject the CD and it will start to reboot.

As you might have noticed, during installation, debian uses dhcp to aquire an ip adress.
For a cardserver, it’s not recommened to have it’s IP adress handled by DHCP.
First thing we need to do is remove the DHCP and assign a static IP to the linux server

Assigning static IP
Log in as root with the right password
then type in the following command
Code:

vim /etc/network/interfacesnow remove the following line

iface eth0 inet dhcpand replace it with
Code:

auto eth0
iface eth0 inet static
address 192.168.1.225
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1T

these IP adresses might be different for you’re situation.
Remember to replace them with the numbers you need.
You can save the file with the following commands
Code:

<esc>:wq

Once the file is saved, you can restart the network and check if you’re linux server is running with it’s new IP adress
[

CODE]

/etc/init.d/net

[/code]working restart
ifconfigifconfig should now look something like this

Installing SSH
Next thing that needs to be done is install a SSH deamon.
This will allow you to log into the cardserver from you’re own computer and the server does not require a keyboard and monitor if you want to change something.
Code:
apt-get install openssh-serverOnce SSH is installed, you can logout of the server,remove the keyboard and monitor as we don’t need it anymore.
Getting Putty
We need to download putty so we can log in with SSH
http://the.earth.li/~sgtatham/putty/…/x86/putty.exe

Remove the CD-ROM drive from the apt-get mirror list:
To make sure the server does not need the CD-ROM anymore to update or install software, we need to remove it from the mirror list of apt-get.
Code:

vim /etc/apt/sources.list

now remove the lines that point to the CD-ROM drive and save the file.

Update apt-get software list
To make sure, you locally have a good software list available, you have to update the apt-get database
Code:

apt-get updateInstalling

FTP server
To be able to transfer files between you’re computer and the linux server, a FTP server is needed.
During the installation it will ask you one question,. Answer it with “stand-alone”
This will consume a bit more memory but will prevent linux from spawning a new process every time you log in.
Code:

apt-get install proftpd

The server is now installed and all the needed files are in place.
Now it’s time to get it ready for CCcam.
First thing we need to do is make 6 directory’s and adjust the parameters.
Code:

mkdir /emu
mkdir /emu/cccam
mkdir /emu/script
mkdir /emu/log
mkdir/var/etc
mkdir /var/keys
chmod 777 /emu
chmod 777 /emu/*
chown <username> /emu
chown <username> /emu/*

The username started above is the username you created during the installation. This name is going to be used for file transfer.
Startup script for CCcam
To prevent from having to change directory all the time we’re gonna place a script on the server so CCcam can be started from any directory on the server.
Quote:
vim /emu/script/cccamCode:
#!/bin/sh
CAMNAME=”CCcam Server”
# end

# This method starts CCcam
start_cam ()
{
/emu/cccam/CCcam.x86 &
sleep 2
}
# This method stops CCcam
stop_cam ()
{
pkill CCcam.x86
}
case “$1″ in
start)
echo “[SCRIPT] $1: $CAMNAME”
start_cam
;;
stop)
echo “[SCRIPT] $1: $CAMNAME”
stop_cam
;;
restart)
echo “Restaring $CAMNAME”
stop_cam
start_cam
;;
*)
“$0″ stop
exit 1
;;
esac
exit 0


Code:

chmod 755 /emu/script/cccam
ln /emu/script/cccam /bin/cccam

Now you can simply start, stop or restart CCcam from any directory by simply typing
Code:
cccam start
cccam stop
cccam restartUpload CCcam
Now use a FTP program to upload CCcam.x86 and CCcam.cfg to /emu/cccam
Making CCcam executable
Use putty again to give CCcam.x86 execution rights
Code:
chmod 755 /emu/cccam/CCcam.x86Config update script
When you’re running a big server, restoring connections can take some time then you change you’re config file. I like to do my config changes once a day. I use this script to backup the old config and put the new config in place. This is done at 3am so my peers don’t notice it and they don’t suffer from a freezing picture every time you make a change.
Code:
vim /emu/script/configupdate.shCode:
#!/bin/sh
#Script to process new config and backup old one.
#Script designed and written by CC_Share
SOURCE=/emu/cccam
TARGET=/var/etc
FILE=CCcam.cfg
BACKUPDIR=/var/backup
CONFIGOLD=CCcam.old
if test -f $SOURCE/$FILE ; then
echo “New Config Present”
if test -d $BACKUPDIR ; then
if test -f $BACKUPDIR/$CONFIGOLD ; then
echo “Removing OLD config file from backup directory”
rm $BACKUPDIR/$CONFIGOLD
else
echo “No OLD config to remove.”
fi

if test -f $BACKUPDIR/$FILE ; then
echo “Renaming Backup to old config”
cp $BACKUPDIR/$FILE $BACKUPDIR/$CONFIGOLD
rm $BACKUPDIR/$FILE
else
echo “No Backupfile present yet”
fi
if test -f $TARGET/$FILE ; then
echo “Copying Original config to Backup directory”
cp $TARGET/$FILE $BACKUPDIR
rm $TARGET/$FILE
else
echo “No Original Config File Present!?!?”
fi
else
echo “Backup directory does not exist.”
echo “making new directory”
mkdir $BACKUPDIR
if test -f $TARGET/$FILE ; then
echo “Copying Original config to Backup directory”
cp $TARGET/$FILE $BACKUPDIR
else
echo “No Original Config File Present!?!?”
fi
fi
echo “Moving New config file to “$TARGET
cp $SOURCE/$FILE $TARGET
rm $SOURCE/$FILE
else
echo “No New Config present, Nothing to process”
fi
exitCode:
chmod 755 /emu/script/configupdate.shPutting configupdate in crontab
To make sure the config update script will run at 3 am everynight, we can place it in the crontab.
Code:
Code:

cd /etc

vim crontaband add the following line to it
Code:

00 3 * * * root /emu/script/./configupdate.sh >>/emu/log/configupdate.log 2>&

1

This will run the script every day at 3am, and it’s output will be writen in /emu/log/configupdate.log so you can check on occasion if all went well.
Putting CCcam in bootsequence
There’s only one more thing to do. Add CCcam to the startup so it will start on the next reboot.
Code:

vim /etc/rc.local

and add the following line at the bottom
Code:

/bin/cccam start

&test the config update script created earlier to see if that works

Code:
HTML Code:

/emu/script/./configupdate.sh

If it works, you can reboot the server and

check if CCcam is running.
Good luck

Many thx to the guys at DB tuts and guides
 
Last edited:
Hi Bod, thanks for this great post, i have been looking on another forum which has a tut on card server useing ubuntu. not knowing much about linux servers but is it poossible to make a ghost image? any chance of one?


thanks
thegringo
 
hi great post im new to this cs stuff so go easy on me lol the only thing im stuck with is the cccam config where do i find this please thanks alot
 
Linux pc server have a look in var/etc for cccam.cfg
 
have looked in there via ftp and is empty no files at all
 
intresting, I will be having a play soon once my 500S arrives. Looks better than running a server directly off the 500S

- I take it you use a card reader connected to the server via COM or USB, and share out to clients by F lines and corresponding C lines in cccam config ?

- Any ideas on what sorta spec the server needs to be, CPU, memory, hard disk etc...obviously this is going to depend on how many shares you've got going. Im talking about a typically small setup 5 or 6 users. Is there any point using a PC based server for a small setup ? Or is it easier to just run server directly on the reciever ?
 
Thank bod, I've followed this the other day to install the server on an old Dell laptop :)
 
can i set this up in vmware??

on a spare pc

as im not much good at linux

and im planning to setting it up on a acer aspire n260g revo

or should i create a partition for the server??
 
Yes, you can set it up in VMWare easy. Just follow the same instructions and create a virtual drive for the virtual server.

If it's a spare PC, you can just install direct.
 
ok the reason im setting it up in vmware is because i dont have a clue about linux

plus it should be fairly easy to setup in vmware as i dont have to mess around with drivers .etc

will let u guys know how i get on

once i got it running properly then i could always convert into realhd image and put it on a spare partition
 
sorry if im being stupid here but cant see where i have gone wrong

the code to start, stop and restart cccam is bringing up an error on line 8 saying

/bin/cccam: line 8: /emu/ccam/CCcam.x86: No such file or directory

i have copied the tutorial word for word, gone through it 100 times

any help please
 
/bin/cccam: line 8: /emu/ccam/CCcam.x86: No such file or directory

the bold part should be cccam was that a typo?

if yes go to the /emu/cccam folder and type ls to list the folder contents, is Cccam.x86 there?
 
sorry, it was a typo. yes cccam.x86 exists in /emu/cccam

EDIT: its actually listed as CCCam.x86 sleep, not as CCcam.86 sleep
 
Last edited:
ok i done a clean install, and followed word for word the instructions, now in folder /emu/cccam there doesn't seem to be anything there. however cccam is in /emu/script. is this right?
 
Last edited:
ok the reason im setting it up in vmware is because i dont have a clue about linux

plus it should be fairly easy to setup in vmware as i dont have to mess around with drivers .etc

will let u guys know how i get on

once i got it running properly then i could always convert into realhd image and put it on a spare partition


I found this - how to install a cccam server on windows
 
hi guys....sorry to hijack the thread but it seems a relevent place to ask this.
ok,trying to set up a sever under debian using vmplayer.
all installed ok. using a smargo 1.3 and sly card. network is bridged and my openbox is talking to the server..so far so good. heres the problem it wont decode any channels.think its to do with my cccam cfg.does this look ok.....

SERVER LISTEN PORT : 12300
# ALLOW TELNETINFO: yes
# ALLOW WEBINFO: yes
# WEBINFO USERNAME :
# WEBINFO PASSWORD :
# TELNETINFO USERNAME :
# TELNETINFO PASSWORD :
# TELNETINFO LISTEN PORT : 16000
# WEBINFO LISTEN PORT : 15001
# ZAP OSD TIME :5
# OSD USERNAME :
# OSD PORT :80
SERIAL READER : /dev/ttyUSB0 smartreader+
# SMARTCARD WRITE DELAY :
SMARTCARD CLOCK FREQUENCY: /dev/ttyUSB0 4800000
# EMM Blocker
F: user pass 2 0 0{0:0:1}
# SHOW TIMING : yes
# DEBUG : yes
# NEWCAMD CONF :no
# DISABLE EMM : no
# MINI OSD : no
#CAM KEY
#CAMDATA
BOXKEY: /dev/ttyUSB0 ** ** ** **
#BEEF ID :
#PIN :
SOFTKEY FILE : /var/keys/SoftCam.Key
AUTOROLL FILE : /var/keys/AutoRoll.Key
STATIC CW FILE : /var/keys/constant.cw
CAID PRIO FILE : /var/etc/CCcam.prio
PROVIDERINFO FILE : /var/etc/CCcam.providers

And the files at the bottom of the config,are they auto generated or do i have to put them in the relevent dirs ?

been at this for over a week now and its doin my head in.

cheers guys

Heres the reply from cccam debug..

00:31:47.489 CCcam: ======================================================================
00:31:47.490 CCcam: starting CCcam 2.1.4 compiled on Jan 30 2010@17:00:48
00:31:47.491 CCcam: ======================================================================
00:31:47.492 CCcam: online using nodeId ****************
00:31:47.494 CCcam: create 1 cam device(s)
00:31:49.466 CCcam: card detect fail
00:31:49.501 CCcam: readKeyfile: cannot open /var/keys/SoftCam.Key or not found
00:31:49.503 CCcam: readKeyfile: cannot open /var/keys/AutoRoll.Key or not found
00:31:49.504 CCcam: static cw not found or bad
00:31:49.505 CCcam: parsed 0 entries from /var/etc/CCcam.prio
00:31:49.506 CCcam: readProviderfile: cannot open /var/etc/CCcam.providers or not found
00:31:49.506 CCcam: readChannelList: cannot open /var/etc/CCcam.channelinfo or not found
00:31:49.508 CCcam: server started on port 12300
00:31:49.907 CCcam: /dev/ttyUSB0 configured clock frequency: 4800000 Hz
00:31:50.195 CCcam: nds card found(new type)
00:31:50.634 CCcam: nds: using boxkey ** ** **
00:31:51.169 CCcam: card added to broker with caid 963
 
Last edited:
The only thing I can see is the fline m8

F: user pass 2 0 0{0:0:1} should be

F: user pass 2 0 0 { 0:0:1 } note the spaces :)
 
Back
Top