This how-to will cover the basic installation of Debian linux and getting CCcam up and running on it.
This How-to is still WIP by CC_Share
--Todo--
---------------------------------------
First download the netinstall cd of debian linux You can download it from the following URL: http://cdimage.debian.org/debian-cd/4.0_r3/i386/iso-cd/debian-40r3-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
Guided - use entire disk
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
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
<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
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.
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 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.
vim /etc/apt/sources.list
now remove the lines that point to the CD-ROM drive and save the file.
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
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.
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.
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.
Now you can simply start, stop or restart CCcam from any directory by simply typing
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
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.
vim /emu/script/configupdate.sh
#!/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
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.