The Best Streaming Software!
VIVO Rent A Car - Your car rental
Върни се   Digital TV Forums - БЪЛГАРСКИЯТ ФОРУМ ЗА ЦИФРОВА ТЕЛЕВИЗИЯ > Шеринг и емулатори > Емулатори > CCcam

Отговори
 
Контрол над темата Начин на разглеждане
  #1  
Стар 27-10-2009
Аватара на ТИНТИН
ТИНТИН ТИНТИН не е на линия
Модератор
 

Дата на присъединяване: Mar 2009
Мнения: 4,148
Благодари: 362
Получил благодарност:
2,431 пъти в 1,521 поста
Сваляния: 71
Ъплоуди: 0
По подразбиране CCCam на GNU Debian Linux

This how-to will cover the basic installation of Debian linux and getting CCcam up and running on it.



First download the netinstall cd of debian linux
  • 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 hostname 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/interfaces

now remove the following line
Code:
iface eth0 inet dhcp

and 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.1

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/networking restart
ifconfig

ifconfig should now look something like this
Code:
cardserverBackup:/home# ifconfig
eth0 Link encap:Ethernet HWaddr 00:00:00:100:70
inet addr:192.168.1.225 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::250:4ff:fe1d:d27b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8931 errors:0 dropped:0 overruns:0 frame:0
TX packets:6028 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7585683 (7.2 MiB) TX bytes:916823 (895.3 KiB)
Interrupt:10 Base address:0x4000


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-server

Once 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

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.
Quote:
deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1 20070407-11:29]/ etch contrib main
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 update

Installing 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.
Code:
vim /emu/script/cccam

Code:
#!/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 restart


Upload 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.x86

Config 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.sh

Code:
#!/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
exit

Code:
chmod 755 /emu/script/configupdate.sh

Putting configupdate in crontab
To make sure the config update script will run at 3 am everynight, we can place it in the crontab.
Code:
cd /etc
vim crontab

and 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.
Code:
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 above 'exit 0'
Code:
/bin/cccam start &

test the config update script created earlier to see if that works
Code:
/emu/script/./configupdate.sh

If it works, you can reboot the server and check if CCcam is running.
Отговори с цитат
  #2  
Стар 27-10-2009
Аватара на ТИНТИН
ТИНТИН ТИНТИН не е на линия
Модератор
 

Дата на присъединяване: Mar 2009
Мнения: 4,148
Благодари: 362
Получил благодарност:
2,431 пъти в 1,521 поста
Сваляния: 71
Ъплоуди: 0
По подразбиране Стартиране на втори CCCam сървър на една и съща GNU Debian машина

Here is little tutorial to run second CCcam server on same Debian Linux PC.

  • Rename CCcam.x86 to CCcam1
  • Ftp the CCcam1 file to /usr/local/bin
  • Change the file attributes to 755 by command
Code:
chmod 755 /usr/local/bin/CCcam1
  • Rename the second CCcam.cfg flie to CCcam1.cfg
  • Change WEBINFO LISTEN PORT to 16002 port as you might have 16001 for the first CCcam.cfg
  • Ftp the CCcam1cfg file to var/etc
  • Give command to start the second cam:
Code:
CCcam1 -C var/etc/CCcam1.cfg &

Dont forget to forward port!! Make sure both ports are different!

To check if all working
Code:
http://IP:16002/
You are ready to go!

ps: every time you reboot you PC you need to manually start the second cam by the command above.
Отговори с цитат
  #3  
Стар 27-10-2009
Аватара на ТИНТИН
ТИНТИН ТИНТИН не е на линия
Модератор
 

Дата на присъединяване: Mar 2009
Мнения: 4,148
Благодари: 362
Получил благодарност:
2,431 пъти в 1,521 поста
Сваляния: 71
Ъплоуди: 0
По подразбиране

Howto CCcam 2.1.0 on Debian Linux PC We all know that new CCcam version 2.1.0 does not work on Debiam Linux. Here is quick and simple tutorial to make CCcam 2.1.0 work on Debiam Linux PC server by upgrading Debian Etch to Debian Lenny.

1. Open file name sources.list. You will find this file in

Code:
/etc/apt/sources.list

2. Edit and change keywords like stable or etch to lenny and save the file. If it says 'permission denied' then you will have to change the attribute to 777. After editing you can change attribute to 644.

3. run the command below:
Code:
apt-get update && apt-get dist-upgrade

4. Install CCcam 2.1.0 and restart the Cam.

Done!
Отговори с цитат
  #4  
Стар 12-10-2011
sky2 sky2 не е на линия
форумец-ветеран
 

Дата на присъединяване: May 2011
Мнения: 1,903
Благодари: 303
Получил благодарност:
1,098 пъти в 516 поста
Сваляния: 49
Ъплоуди: 1
По подразбиране

Колеги, debian-6.0.3 работи ли с последните версии на ццкам?
Отговори с цитат
Sponsored Links
VIVO Rent A Car  Вземи своят Vu+ сега!  SatPlus
Отговори

Съобщения от Devil M
VIVO Rent A Car  

Тагове
cccam, debian, gnu, linux, на


Активни потребители разглеждащи тази тема в момента: 1 (0 членове и 1 гости)
 
Контрол над темата
Начин на разглеждане

Подобни теми
Тема Започнал темата Форум Отговори Последно мнение
Как да си на Linux PC CCcam сървър с ClarkConect netman Уроци и съвети за начинаещи 14 27-11-2015 17:14
cccam invalid user script за Linux PC thunderstorm6 CCcam 0 04-04-2010 06:37
SkyStar2 + Linux dvelev САТЕЛИТНА цифрова телевизия [DVB-S] 4 16-02-2010 14:29
linux b00m Въпроси и отговори 2 30-12-2009 14:03
Dreambox DM500S и Debian CCCam сървър vlad DREAMBOX 9 17-08-2009 16:19


Всички времена са във формат GMT +3. Часът е 19:06.


DTV-BG Powered by vBulletin Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.