A tutorial for a web serverimplementation in an oldreborn computer
This page is for working on how to configure inadyn as part of a FreedomBox Router Required information As part of the freedom box setup process, the user is prompted to register with a?
0. Introduction
I have a Compaq Presario 2292 withaCPUAMD-K6 3Dthat works at 333Mhz.
And a RAM memory of 128MB (maximum is 256MB).
The disk capacity is outstanding: 4GB!
Impressive computer.. don't you think so ???
Well, believe it or not, you may read an updated version of this page from the Compaq Presario 2292 that you can see in the pictures. Just click on the link! Yeah, my Compaq Presario 2292is a fine web server still in service.
What is able to do an oldcomputer with the right software?
The best way to answer this question is to use one of the lightestLinux distributions: Damn Small Linux(DSL).
This small creature is able to enter your old computer and bring itback to life all over again.
In the official web page of DamnSmallLinux(DSL) you can find basic information about thisdistribution and you can download the newest version (go for therelease candidate). The stable one is from 2008 and the releasecandidate is a good version.
A fresh install of DSL in the hard disk takes less than 14Mb of RAMmemory and several hundred MB of the hard disk.
DSL is then like an Atom Ant(remember the atom ant???). Itworks withmy damn old computer at a very reasonablespeed (Much faster than Windows 95 was !!!). The number of applications and extensions you can add to a basicinstall is more than enough to enjoy working in your old computer.
So we should all thank so much toeveryone who did an effort to developDSL!!!
DSL is based on Debian, but only some Debian packages can be safelyand easily installed. Some programs that you can install with synapticmay not work properly.
DSL is not userfriendly for people who does not have experience in using Debian orany other Linux distro, mainly because of the lack of documentation.
Anyway, facing problems in DSLis an enternaing task, and itis a good way of learningmore about Debian and Linux.
My purpose was then to give a new life to my old computer and use it asa web server.
And I succeeded thanks to a HardDisk Install of DSL!.
I had fun solving many problems.
And I finally decided to collect allthe useful information that I found by googling, andalso the solutions to the problems that I solved.
I hope this is useful to newbies like myself !!!
1. Hard Disk Installation
Downloadthe image .iso file and burnit to a CD.
I like the release candidate dsl-4.11.rc2-syslinux.iso.
Boot the CD and enter
dsl 2
at prompt to boot into text mode.
Run cfdisk and prepare threepartitions. I used:
/dev/hda1 - 3Gbfor image, set as linux type and bootable
/dev/hda2-256Mb(doubletheamountofRAM)forswap,settypeto82(type82meansswap).
/dev/hda3 - rest of drive for /home, mydsl, and backup/restore.
Write partitions. After writting the table to disk, a message willappear.
If any error occurs, reboot and repeat the process.
Otherwiseyou may have some trouble (the OS can not find the swap area, forinstance).
Exit cfdisk and format the partitions:
mke2fs /dev/hda1
mke2fs /dev/hda3
mkswap /dev/hda2
swapon /dev/hda2
Reboot (with the CD inside) into level 5 (just let it boot).
Right-click on desktop and select Apps->Tools->InstalltoHardDrive
Ask the questions carefully:
at image partition, enter -> hda1 (orthe appropriate);
at install from, enter -> l (that's L for LiveCD);
at format question, enter -> y.
Select grub install, sincelater on wewill modify the menu.lst fileto change the cheat codes.
When install completes, the system will ask you to reboot and removethe CD.
Hopefully, now we're successfully running off our HD install.
Now, we'll edit the grub menu. Openaterminalwindow:
sudo su
mount /mnt/hda1
edit/mnt/hda1/boot/grub/menu.lst
We edit the first boot option and we let it as follows:
title DSL
kernel/boot/linux24 root=/dev/hda1 quiet vga=normal acpi=force apm dma scsifrugal
Cheat codes are machine dependent.
If these cheat codes are not goodfor your machine, you may reboot using any of the other entries in theGRUB menu.
Save the changes and DO NOT FORGET:
umount /mnt/hda1
And reboot.
Check this paragraph fully before doing any changes.
Go to DSLpaneland enable the option Backup andRestore by adding the partion hda3.
When you stop the computer, a backup of the folder /home/dsl/ (your home folder, you are user dsl by default!) and someconfiguration files will be saved in a backup.tar.gz file.
When the computer boots, this file is used to restore the saved files.
So, if the computer stops because of power outage, for instance, youwill loose all the changes in the system!!!
In my opinion this is a bad idea in a Hard Disk Install as we aredoing, so my advice is: forget this paragraph (it is good that youknow that this possibility exists though).
If you suffer a power outage or you make a hard reboot, you will not beable to restart the system.
The first time you reboot you will arrive to a command line.
Reboot the system again by using sudo reboot in the command line and in the next reboot everything should be fine(it happen to me already 3-4 times).
Your computer is now ready for the next step.
2. Installation of Extensions andProgram Compilation (darkstat, darkhttpd, arno-iptables-firewall,tcpdump, inadyn, ethereal)
We are interested now toinstall the following programs:
- Darkstat(very light program for a basic control of network traffic).
- Darkhttpd (verylight and simple web server that really works fine).
- Arno-iptables-firewall(my favorite firewall).
- Tcpdump (standardcommand-line packet analyzer).
- Inadyn (free DynDNS client).
- Vncserver (to remotecontrol the computer)
- Ethereal (The world's mostpopular network protocol analyzer)
If you are interested in compiling other programs, install all theextensions that we suggest in here (in sections 2.1 and 2.2) in thesame order as we do (order is veryimportant!).
2.1 Basic Extensions
Now we install basic and important extensions (extensions are programs,libraries or any kind of useful software to be used in DSL).
Go to Apps -> Tools-> Upgrade to Gnu utils.
Then go to Apps -> Tools ->Enable Apt.
To install any other new extensions go to MyDsl -> MyDslbrowser.
The first time it will ask you to update the data base.
YOUSHOULDONLYINSTALLEXTENSIONS*.tar.gzor*.dsl !!!
DO NOT INSTALL *.ucior other types in this kind of installation (youcan use them in a FRUGALinstall but we did a Hard Disk Install).
Using MyDsl browser, install the following extensions to manage Debianpackages:
dsl-dpkg.dsl
synaptic.dsl
This synaptic allows toinstall or upgrade Debian Woody packages, but there are many packagesthat can not be installed in DSL.
If you know what you are doing, you can force the installation of apackage following the instructions of section 7.
2.2 Darkstat
Darkstatis a very light program that captures network traffic,calculates statistics about usage, and serves reports over HTTP.
To compile programs like darkstat youshouldinstall the following extensionsin the order they are listed below:
gcc1-with-libs.dsl
linux-kernel-headers.dsl
libc6.dsl
libc6-dev.dsl
libncurses5.dsl(to compile drivers)
libncurses5-dev.dsl(tocompiledrivers)
kernelsource-2.4.31.dsl
flex-bison-libtool.dsl(tocompiledarkstat)
Not all of them are necessary, but you will need them all in the thenear future.
Download libpcap-0.9.6.tar.gz andinstallthelibrary(neededtocompiledarkstat):
tar xvzflibpcap-0.9.6.tar.gz
cdlibpcap-0.9.6/
./configure--prefix=/usr
su -c 'makeinstall-shared'
su -c 'rm/usr/lib/libpcap.so; ln -s libpcap.so.0.9.6 /usr/lib/libpcap.so'
su -c'/sbin/ldconfig'
We do not use the libpcap libraryin the extensions because it is notcomplete and does not allow us to compile darkstat.
Download darkstat_3.0.713.orig.tar.gzfrom the Debiansite (donot use 3.0.715 version in theweb page of darkstat because it will notwork out of the box in DSL).
Compile it following the instructions contained in the package.
It is possible to use use the version 3.0.715 from the officialsite if you replace the original file http.cby this one: http.c.
This version allows to sort on last-seen,whichisaveryinterestingfeature.
After installation, make sure you have the files /etc/init.d/darkstat and /etc/darkstat/init.cfg (In DSL, forunknow reasons, names are a bit different so rename the files).
If you want to start darkstat using/etc/init.d/darkstator using /etc/darkstat/init.cfg atboottimeyouneedthefile/lib/lsb/init-functions, which is not installed in the system.
It is necessary to install it by hand downloading from Debian site (ortaking it from a Debian system) or cliking here(It is not possible to install lsb-corepackages because of broken dependencies).
Then, edit the file /etc/init.d/darkstatand add the path /usr/local/sbinfor the variable PATH andchange the path for DAEMON to/usr/local/sbin.
Edit the file /etc/darkstat/init.cfgand make sure you have START_DARKSTAT=yesand DIR='/var/lib/darkstat'and PORT='-p 667'.
Then run from a command line:
sudoupdate-rc.d darkstat defaults
This will install the necessary files to start at boot time after eth0 configuration (DHCP).
However, if you use a static IP,theprogramwillprobablynotbeabletostart.
In such case, edit the /opt/bootlocal.shfile and add the following line after eth0.sh&:
/etc/init.d/darkstatstart&
And it will always successfully start.
If you need to undo the update-rc.dprocess just type:
update-rc.d -fdarkstat remove
And that's all.
After restarting the system open a browser in http://localhost:667 and enjoy theinformation.
You have some more information about darkstat in a Debian system in here.
2.3 Darkhttpd
We install a very light and reliable web server called darkhttpd(Monkey web server in DSLfails to serve pages with several images onit).
Download the source: darkhttpd-1.8.tar.bz2and compile it following the instructions contained in the package.
It is a very simple process.
Install the resulting executable file in the same folder as darkstat(/usr/local/sbin).
It can be good to create the file for logging: sudo touch/var/log/access.log
We can start the server with the following command line example:
sudo darkhttpd/var/www/htdocs --port 80 --maxconn 10 --log /var/log/access.log--chroot --pidfile httpd.pid --daemon
Syntax is explained in the web page and in the file included in thepackage that we downloaded, but it is quite self-explanatory.
2.4 Arno's Iptables Firewall
I am familiar with arno-iptables-firewalland I explain now how to use it in DSL.
Download from the Debianwebsite the package arno-iptables-firewall_1.9.2.k.orig.tar.gz.
Install the extensions iptables.dsl and curl.tar.gzwith MyDsl Browser.
Install from synaptic thepackages gawk, iproute, dnsutils, sysklogd.
Sysklogd is better than syslogd used in DSL (but it willbe heavier).
Since we will have a lot of logs from the webserver and other programs(this one included),it may be necessary to install logrotateto manage the log files.
I explain that in section 11.
Unpack the package arno-iptables-firewall_1.9.2.k.orig.tar.gz.and follow the simple instructions forinstallation.
You have further information about this firewall in thistutorial.
When you start the firewall, you can completly ignore the errormessages about some modules not being found in the system.
You can check with sudo iptables -L thatallthenecessaryrulesarewellestablished.
I tested the firewall and it works completly fine.
In section 10, I use arno-iptables-firewallto set up a proxy server.
DSL has its own firewall that you can install as an extension, rcfirewall.dsl, that may be morethan enough for a basic setup.
However, I was not able to get any logs at all from the firewall and Ilike controlling who, when, through which port, etc is getting blocked.
Anyway I am familiar with arno-iptables-firewall.Itcanbeaquestionoftaste!
PDT:
This is a list of not found modules: nf_conntrack,nf_conntrack_ftp,xt_conntrack,xt_limit,xt_state,xt_multiport,xt_TCPMSS,xt_DSCP,nf_nat_ftp.
This is the list of working modules: ip_tables,ip_conntrack,ip_conntrack_ftp,ipt_conntrack,ipt_limit,ipt_state,ipt_multiport,iptable_filter,iptable_mangle,ipt_REJECT,ipt_LOG,ipt_TCPMSS,ipt_DSCP, ip_nat_ftp, iptable_nat.
2.5 Tcpdump
From tcpdump web, go to http://www.tcpdump.org/release/and download tcpdump-3.9.8.tar.gz
Follow the usual instructions to compile and install it.
You should have no trouble at all if you already installed the libpcaplibrary as suggested in section 2.2.
After the installation, the tcpdumpbinary is in /usr/local/sbinfolder, together with darkstatand darkttppd.
To run the program at boot time I first created the file /usr/local/sbin/tcpdump.sh(executable!) with the following content:
----------------------------------------------------------------------------------------
TIME='$(date+%F_%T)'
tcpdump port 80-i eth0 -ns 0 -w /home/dsl/tcpdump/box_$TIME.cap -C 10 -W 3 &
-----------------------------------------------------------------------------------------
This makes tcpdump to listento eth0, port 80, and generate a filewith a name like box_'Date-and-time'.cap.
The files generated by tcpdumpwill have a maximum size of 10MBand it will be rotated 3times.
You can choose the parameters that suits your needs.
Then edit/opt/bootlocal.sh and add the following command:
/usr/local/sbin/tcpdump.sh&
See section 4 for more comments about bootlocal.sh
2.6 Ethereal
To compile Ethereal, we needto install GTK+, or the GIMP Toolkit, which is amulti-platform toolkit for creating graphical user interfaces.
The gtk+2.X from theextensions does not allow to compile Etherealand it can not be reinstalled from synaptic.
So we install version 1.2.10.
We download the file gtk+-1.2.10.tar.gz fromthispage.
To install the library you just need to follow the usual stepsindicated in the package.
If you have trouble with ./configure,addtheoption--host=i586-pc-linux-gnu.
After installing the gtk+ library,weproceedtocompile Ethereal.
We download the source from this page and choosethe file ethereal-0.99.0.tar.bz2.
Use ./configure with theoptions --disable-gtk2 and --disable-ipv6.
After compiling the program (it takes more than one hour) andinstalling it, run from the command line:
sudo ldconfig
to 're-create the bindings and the cache for the loader of dynamiclibraries ('ld')'.
You may want to run ldconfig after an installation of new dynamicallylinked libraries on your system.
(It is also re-run every time you boot the computer, so if you rebootyou don't have to run it manually.)
Otherwise the program does not start because it can not find somelibraries.
Ethereal runs smoothly in mycomputer and I may easily check the information provided by tcpdump.
It is better to capture with tcpdumprather than with Ethereal,because Ethereal likes RAM memory too much..
2.7 Inadyn
INADYN is a free DynDNS client. It gives the possibility tohave your own fixed hostname registered on the internet, althoughyour IP might be changing.
It checks periodically whether the IPaddress stored by the DNS server isthe real current IP address of the machine that is running INADYN.
You can install it from myDSL browser (inadyn.dsl).
To run it using NO-IP you can create an executable file like this /usr/local/sbin/inadyn.sh:
/usr/sbin/inadyn--background--log_file/var/log/inadyn.log--update_period_sec1800--dyndns_systemdefault@no-ip.com-uusername-ppassword-awww.yourweb.com
This will update your IP every 30 minutes.
To start this service at boot time include the correspondinginstruction in /opt/Bootlocal.sh(see section 4 to know more).
2.8 VNC server
If you use several computers at the same time, it is a good idea toremote control them from a singleclient computer.
You can install vncserverfrom myDSL browser: vnc4x-1.4.6.dsl
This program will install two very nice icons in the desktop.
My advice is not to use any of them.
Define a password by using the program vncpasswd in a terminal.
To start vncserver fromboot, edit the file .Xinitrc(see section 5 for more information) and add:
vncserver :1-name BOX -geometry 1680x1050 -depth 16 2>/dev/null &
This will allow you to open a connection from port 5900 + 1 (open that port inyour firewall!).
Choose whatever you need for -geometrydepending on the screen you are using in the client computer.
Notice that you will not be using the graphic's card of your oldcomputer.
You will be using the client's graphic card, so controling yourcomputer from a remote client can be faster than using the old computerdirectly!
When you start the client in a Debian systemusing xtightvncviewer -fullscreen192.168.x.x:1 inthecommandline,yougetafluxboxdesktop with a scary graybackground, no icons, no system information. If it is the first time touse fluxbox, just right clickwith your mouse anywhere in the desktopand you get a menu that gives you access to everything.
Explore a bit by yourself to be able to configure things:
- To get a fast desktop, choose a black background (in fluxbox desktop you choose the 'simple' background).
- Then choose xtdesktopicons.
- Finally you can open a terminal and type torsmo to get systeminformation on the top, right corner of the screen (see image on theright).
- The default desktop invncserver is fluxbox, but thedefault desktop in DSL is jwm.
- The default desktop invncserver is determined in the file /home/dsl/.vnc/Xstartup.
- The default desktop in DSL isdetermined in the file/home/dsl/.desktop
3. Sound Problems(in a Compaq Presario 2292)
I wanted to have a complete basic setup in my old computer, and Iwanted sound to work, even if it was not essential.
Solving this took me a while although the solution was pretty simple.
To use xmmsafter a fresh install was impossible.
The system detects no soundcard because my computer has a built-in ESS1869 chip.
To startgetting sound open a terminal and type:
sudo modprobe sb
This command tells the system to use Sound Blaster drivers (I was luckythis worked for my chip!).
This way I can get nice music from CD reproduction, but sound frommusic files sounds horrible.
After including this instruction in the /opt/bootlocal.shfileandrestarting the system, I checked /var/log/kernel.logfile and I foundthe following interesting information.
Nov 5 15:32:49 box kernel:Soundblaster audio driver Copyright(C) by Hannu Savolainen 1993-1996
Nov 5 15:32:49 box kernel: sb:No ISAPnP cards found, tryingstandard ones..
Nov 5 15:32:49 box kernel: SB3.01 detected OK (220)
Nov 5 15:32:49 box kernel: ESSchipES1869detected
Nov 5 15:32:49 box kernel: sb:Interrupt test onIRQ7 failed - Probable IRQconflict
In such case it is necessary to carefully check the BIOS.
The interrupt test indicatesthat something is already using IRQ7.
In my case the parallel port (forthe printer) had IRQ7assigned.
And the sound system had IRQ5assigned.
Changing this, assigning IRQ7to the sound system and IRQ5to theparallelport solved the problem.
4. Programs to be executedbefore X is loaded(bootlocal.sh)
Those programs are called from the file /opt/bootlocal.sh
A sample of the content of this file is the following:
#!/bin/bash
# put other system startup command here
#/sbin/syslogd
/etc/init.d/sysklogd start
modprobe sb
loadkeys es
/opt/eth0.sh &
/opt/eth1.sh &
/etc/init.d/darkstat start &
/usr/local/sbin/tcpdump.sh&
/usr/local/sbin/inadyn.sh &
The last instruction allows to configurethekeyboardtoyourownlanguage.
5. Programs to be executedafter X is loaded(.Xinitrc)
Those programs are called from /home/dsl/.Xinitrc
To get rid of dillo at thestart up and execute our own .shfiles Ialtered the following code (compare with the original):
if egrep -qvlowram /proc/cmdline 2>/dev/null; then
# dillo/usr/share/doc/dsl/getting_started.html&>/dev/null &
vncserver :1 2>/dev/null &
torsmo2>/dev/null &
fi
The program torsmo displaysinformation of the system in right top corner of the screen.
6. X server
DSL includes two TinyXservers from XFree 4.3.0: Xvesa, and Xfbdev.
They are named as X + driver name, for example Xvesa for the Vesadriver.
The configuration is contained in the file /home/dsl/.Xserverrc. For a USBmouse:
exec/usr/bin/X11/Xvesa -mouse /dev/input/mice,5 -screen 1024x768x32-shadow -nolisten tcp -I &>/dev/null
If you want to install better drivers try the extensions Xvesa.tar.gz or Xchips.tar.gz. and then you shouldalter the content of the file like this:
exec/opt/bin/Xvesa -mouse /dev/input/mice,5 -screen 1024x768x32-shadow -nolisten tcp -I &>/dev/null
In my case, when trying to use the new drivers, the scrolling wheelstoppedworking, so I could not use them.
7. Installing Debian Packages
Thereare limitations to apt in DSL.
If you can not use synaptic, you may have better luck by downloadingthe .deb and installing a package manually with dpkg.
dpkg -i--force-all file.deb
Do this at your own responsability!
8. Desktop and Icons
First of all, in my opinion, it is better to use fluxbox desktop rather than jwm, which is the default desktop.
You can change the desktop by editing the file .desktop and changing jwm by fluxbox.
Then you do ctr+alt+del andtype xinit to restart thedesktop environment.
There are two different set of icons, dfmand xtdesk.
You can change also which set you use by editing the .desktop file.
It is easier to manage the icons if you choose xtdesk, which is the default choicein this 4.11rc2 version.
The program xtdesk load orreloads the icons (xtdesk type)onthedesktop.
So, if for any reason, the icons go away, just open a terminal and typextdesk to have them back.
Thishappens to me everytime I use the vncserverfrom a client.
To manage the icons, use the programicontool.lua, which is a very simple and intuitive program.
In the desktop, the default xtdeskicons are (on the image on the left you can see more icons that I addedlater on):
Emelfm: GUI for navigating thedirectories.
xZGV: for viewing graphicsfiles
Beaver: text editor, but not agood one. It is so slow when scrolling text or finding words!!! Forgetit and install Neditinstead (from MyDSL browser).
Firefox: web browser. It isstill heavy for a slow computer like mine.
Siag: spreadsheet
XMMS: for playing audio andvideo files.
DSL panel: points you toimportant functions.
axyFTP: FTP client
Sylpheed: email client
mtPaint: for creating images.
Dillo: lightweight web browser
MyDSL: for installingadditional applications
Ted: primitive word processorfor RichText documents
Xpdf: for reading pdf files.
9. 'Please mount mediacontaining optional dir and try again'
If you get this annoying message (some people report dozens!) when youtry to shutdown your computer, it may be because you installedextensions *.uci in your computer..
To solve this problem:
i) Use the uci tool in the system menu to unmount the *.uci programs (if they remainmounted).
ii) Erase all the *.uci files you downloaded. If you do not know wherethey are, you open a terminal and type:sudo find / -name'*.uci'
iii) *.ucifiles are mounted in /opt so eraseall the folders corresponding to the programs.
IV) Open the file /tmp/mydsl.mapand replace the name of the *.uci filesby the word free.
This procedure worked for me. Consequences on your system are yourresponsability.
10. Two network cards (to setup a proxy server for a small LAN)
It is possible to work with as many network cards as your computer mayallow.
You can go to the control panel-> netcardconfig andconfigure the ip addresses, broadcast addresses and so on for each card.
In my case, I have two cards and I have the computer working as a proxyserver.
The configuration of every card is saved by netcardconfig to a file /opt/ethX.sh.
In my case those files have the following content:
eth0.sh
#!/bin/bash
pkill pump
ifconfig eth0192.168.1.14 netmask 255.255.255.0 broadcast 192.168.1.255 up
route adddefault gw 192.168.1.1
eth1.sh
#!/bin/bash
pkill pump
ifconfig eth1192.168.11.1 netmask 255.255.255.0 broadcast 192.168.11.255 up
route adddefault gw
In my setup eth0 correspondsto the external card and eth1 is connected to an internal network (a switch withcomputers whose ip address is 192.168.11.Xand dns 192.168.1.1).
Then you may configure the arno-iptables-firewallto enable NAT andSNAT.
11. Logrotate
Logrotate is designed to easeadministration of systems that generate large numbers of logfiles.
It allows automatic rotation,compression, removal, andmailing of log files.
Each log file may be handled daily,weekly, monthly, or when itgrowstoo large.
You may install logrotatefrom synaptic (it willinstall cron too, but do notdo it!).
The logrotate command may be called daily by the cron scheduler.
But in my computer, for unknown reasons, cron doesn'twork.
Also, the cron program fromthe control panel does notwork properly (CPU goes to a 100% activity forever).
So I did the following:
- I installed another program called fcron that works with no trouble atall.
- Then I forced the installation of the logrotate package without itsdependencies (without cronand mailx, among others).Those dependences are not needed at all for logrotate to work properly.
11.1 Compilation, Installation andConfiguration of fcron.
You can download fcron from this webpage. I downloaded thefile fcron-3.0.6.src.tar.gz.Fcronis well documented.
To compile and install the program you can follow the installationprocess suggested by the authors. It is the standard process.
Just two hints:
i) Run ./configure with the followingoptions:
./configure --with-pam=no --with-selinux=no --with-fcrondyn=no--with-username=dsl --with-groupname=dsl
ii) After running ./configure add the group dsl,
sudo groupadddsl
and add the user dsl to thegroup dsl:
sudo usermod -gdsl dsl
If you need further help with this issue, check in here.
When running make you willhave to answer some simple questions and the compilation process willbe fast and successful.
After make install, you willhave fcron up and running.
Then you have write a very simple configuration file, that we call /etc/fcrontab, like the one itfollows (very similar to crontab):
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Minute Hour Day-of-Month Month Day-of-Week (Monday 1- Sunday 7) command
14 1 * * 7 /usr/sbin/logrotate/etc/logrotate.conf
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The stars '*' means 'any'. Sothis file configuration file is tellingfcron to execute the command every week, on Sunday at 01:14.
We shall tell fcron that we wish to use this configuration file usingthe following command.
sudo fcrontab/etc/fcrontab
The program fcrontab readsthe file and tells fcron, so it and takes effect immediatly.
Easy!!!!
11.2 Installation andconfiguration of logrotate
To install logrotate, wedownload the .deb file from aspecial web page where you can find packages of every version of Debian.
Debian is wonderful, isn't it???
You can download the package logrotate_3.5.9-8_i386.debfrom here.
Now we install it without its dependences (we do not wish to installcron or mailx). To do that we follow section 7 and execute thefollowing command:
sudo dpkg -i--force-all logrotate_3.5.9-8_i386.deb
and that's it. Installation is finished.
Now we need to talk about the configuration.
Fcron will call logrotate early on Sunday (if youfollowed section 11.1) so it is good to do the configuration beforeSunday!
The logrotate command readsthefollowing files:
- The logrotate configuration file /etc/logrotate.conf
- Files in the logrotate configuration directory /etc/logrotate.d. Most of theprograms installed on any system create a configuration file forlogrotate in /etc/logrotate.d.
-----------------------------------------------------------------------------------------------------------------
# see 'manlogrotate' for details
# rotate logfiles weekly
weekly
# keep 4 weeksworth of backlogs
rotate 4
# create new(empty) log files after rotating old ones
create
# uncommentthis if you want your log files compressed
#compress
# packages droplog rotation information into this directory
include/etc/logrotate.d
# no packagesown wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
missingok
monthly
create0664rootutmp
rotate1
}
#system-specific logs may be configured here
--------------------------------------------------------------------------------------------------------------
This is the file /etc/logrotate.d/sysklogdthat I use:
---------------------------------------------------------------------------------
/var/log/syslog
/var/log/mail.info
/var/log/mail.warn
/var/log/mail.err
/var/log/mail.log
/var/log/daemon.log
/var/log/kern.log
/var/log/auth.log
/var/log/user.log
/var/log/lpr.log
/var/log/cron.log
/var/log/debug
/var/log/messages
/var/log/firewall.log
{
rotate4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
/usr/bin/killall -HUP syslog
endscript
}
----------------------------------------------------------------------------------
(To restart a process: /usr/bin/killall -HUP name of process)
Do not forget to create a configuration file forlogrotate in /etc/logrotate.dfor each program that generates logfiles.
For instance, for darkhttpd:
-------------------------------------------------------------------------------------------------------------------------------
/var/log/access.log
/var/log/error.log
{
rotate4
weekly
missingok
notifempty
compress
delaycompress
postrotate
skilldarkhttpd&&darkhttpd/var/www/htdocs--port80--maxconn10--log/var/log/access.log--chroot--pidfile httpd.pid--daemon
endscript
}
-------------------------------------------------------------------------------------------------------------------------------
It is needed to stop each program and restart it.
Otherwise, the program will keep writting in the rotated file insteadof writting in the new fresh file.
There are exceptions, like arno-iptables-firewall,thatdo not need to be restarted, because they write logs through sysklogd (which is of courserestarted!)
How to testlogrotate config file
Finally, you can experiment with the log rotation (outside of the usualfcron job) by forcing anexecution of the logrotateprogram:
sudo logrotate -f/etc/logrotate.conf
Get into the /var/log folderto check if everything went fine.
Take into account the following
Logrotate writes in the file /var/lib/logrotate/statuswhich files have been rotated and when they have been rotated.
When more than a week haspassed from the last rotation, files are rotated (keep this in mind ifyou rotated the files 'manually' in the test we suggested before).
In my case I rotated the files 'manually' before installing fcron.
I defined an icon using icontool.lua,andwhenI push it, it executed the command sudo /usr/sbin/logrotate /etc/logrotate.conf.
It only rotates the files if a week has passed from the last rotation.
12. Finale
After installing every program in this tutorial, and using them at the same time:
darkstat, darkhttpd,iptables-firewall, betaftpd, tcpdump, vncserver (with a clientconnected using a 1680x1050:16 fluxbox desktop) and inadyn,
Install Configure Inadyn Download Free
the total RAM memory use is 29.7MB.If I do not have a VNC client connected the RAM memory use goes down to
Inadyn Download
20.1MB.For a webserver 64MB of total RAM memory is more than enough.
I run the computer with 128MB, so I have enough for everything I intendto do.
Thefull installation that I did needs less than1GB of the hard disk (Totalspace is 4GB in my computer).
Ialsoinstalled some other programs that I mention below: GIMP, Nvu, GNU Scientific Library, Nedit,xgraph, scite. Some take more space thanothers.
Those numbers are absolutly impressive.
And I can tell, with all those processes going on, I can useGimp to edit some images, forinstance, designing new icons for someshortcuts I am interested in or taking the following screenshot to showmemory use with the program top (see image on the right after a freshreboot and no VNC client connected).
I can't still believe it!!!
So if you have an old computer, work with it or donate it to others.
Many people could still use it for educational and professionalpurposes in poor areas all around the world.
With DSL installed, you canuse or teach about text editors, spreadsheets, databases.. whatever!
You can teach programming in Clanguage with gcc andwrite programs using the sciteeditor.
You can teach HTML by usingany editor, or helping yourself with Nvu-gtk2-0.50.dsl(a heavy program that you may install as an extension and that it lookslike Kompozer).
And of course you can teach so much about LINUX, how to set up a LAN, ftpservers, webservers, internet, whatever!!!
It is also possible to compile andinstall with no trouble at all thelatest version of the GNUScientific Library of mathematical functions, so you may carry outall sort of mathematical calculations and perform graphicalrepresentations with the programxgraph that you may install through synaptic.
I should not be so surprised of all this taking into account that I didmy Ph.D in a computer like this one.. sometime ago..
It is easy to forget that so much can be done with so little.
At that time I heard of Linux a few times although I used some Unixsystems..
These days I only use Linux (I am a proud user of Debian).
PDT. Some basic resources that youshould read:
- DSL wiki.
- DSL is a 50MB distribution created especially for underpoweredmachines. It is abootable CD distribution, but is easily installed on the CD. DSL isunusual, with lots of gotchas. Thesearticlesgetyoupastthosegotchas.
- DSL in Wikipedia.
- DSL forums.
If you need some help, please visit my personal web page: http://cosmolinux.no-ip.org and get in touch with me.
Parent page: Internet and Networking
Contents
|
Every computer attached to the Internet has an IP address. Name Translation is the process of relating a name (like 'www.google.com') to an IP address (like '74.125.19.103') so that a website (or other service) on a computer can be accessed using an easily remembered name, rather than the IP address number of the computer. Name Translation is implemented via a distributed database known as the Domain Name System.
This database is implemented on the Internet by DNS name servers which keep track of DNS records and exchange this information between each other to maintain consistency. Every request for a name (ie. a web browser) is then directed to one of these name servers.
Most servers on the Internet have a fixed (static) IP address that never changes. The DNS record for this node will only change infrequently.
However, many home users are assigned an IP address that changes more frequently. These dynamic IP addresses are assigned by an ISP. This makes it a challenge to translate a Name to one of these IP addresses.
A number of DNS name servers offer a method to update the DNS database with dynamic IP name translations. This is accomplished by using a small software utility on their computer or a local router.
These Dynamic DNS services allow the user to choose a hostname and set an initial IP address to correspond to that hostname. The software utility then periodically checks for a change to the computer's IP address, and when a new IP address is discovered, it updates the Dynamic DNS database to reflect that change.
DNS requires that a name server somewhere on the Internet keep track of 'where you are' (i.e. your current IP address). That is, its database must always be updated to make sure your hostname always corresponds to your current IP address.
In order to use one of these Dynamic DNS services, registration is required first. Here is a selection of these services (a full list is available at DMOZ and at Dynamic DNS):
The Ruby Devkit is a 7-zip based self-extracting archive. I would like to invoke it silently without having to install 7-Zip to extract the files to a folder of my choosing, so that I can script the installation. Pack up all the install files in a.7z (including hidcon.exe) using your favorite 7z archiver. Drop the new.7z file on mk7zSsfx.bat. If the.7z, config.txt, and.sfx are in the same directory, the batch will automatically create the.exe with the same name as whatever you named your.7z. Hidcon.exe:wrappers Tutorial to build a 7z installer. 7z setup sfx silent install script.
DynDNS.com
No-IP
Dynu.com(free)
EasyDNS
ZoneEdit
DNSPark
NameCheap
DSLReports
FreeDNS (Afraid.org)
OpenDNS
dy.fi (Finland only)
deSEC
DNS Made Easy
Now-IP
Upon registering, you will select a username and password, as well as a hostname that you will use as the DNS name (to allow external access to your machine using the hostname).
Many Dynamic DNS providers offer a selection of hostnames available for free use with their service. However, with a paid plan, any hostname (including your own registered domain name) can be used.
Once you have chosen a Dynamic DNS service provider, you need to set up a way that your IP address record will be updated whenever it is changed. There are two ways of doing this:
- using a dynamic DNS software utility that is installed on your computer
- using the built-in capabilities of a cable/DSL modem/router
Many router/modems support Dynamic DNS reporting/notification/updating directly. If your router's configuration is accessible from a web browser, try accessing it by logging into the local IP address of your router (for example, http://10.1.1.1/ or http://192.168.0.1/ ) and look for the Dynamic DNS (DDNS) settings.
However, even if your modem/router does support dynamic DNS reporting, there are cases in which you may wish to use a software utility on your computer to perform the updates anyway:
- you are using several Dynamic DNS services at once (most routers only accommodate one service at a time)
- the router does not support your particular Dynamic DNS service
- your server is on a mobile computer (e.g. laptop) which is not always connected to the same network/router/modem.
Using a software utility to perform Dynamic DNS Updates
There are several available utilities. Each Dynamic DNS service may work better with a particular utility. (You may need to add the Ubuntu Universe to your set of software repositories to install some of these utilities. See InstallingSoftware.)
ddclient
ddclient is the original Linux utility for dynamic DNS updates. The ddclient wiki lists some configurations for several Dynamic DNS services. More info can be found on the ddclient forums. The following section has been adapted from Ubuntuguide.org Dynamic IP servers.
- Install ddclient using a software package manager, or using the command-line interface:
If this is the first time you have installed ddclient, you will be prompted by the installation script for the hostname(s) that you registered with DynDNS (or other Dynamic DNS service). You will also be prompted for the username/password your registered with your Dynamic DNS service. Lastly, you will be asked which ethernet port you primarily use to connect to the Internet (eth0 for wired or wlan0 for wireless, usually). Most of the time this is all you will need to do for the utility to function correctly.
You can also later edit the ddclient configuration file, however, to suit your specific needs (or if you make changes to your service, hostname, or other variables).
- Edit the ddclient configuration file (using kate instead of nano in Kubuntu, or gedit instead of nano in Ubuntu):
- To set the number of seconds between updates, I add the line
My dynamic IP only changes rarely, so I only check it hourly (3600 seconds in an hour).
- To use secure SSL communications, I add the line
- To use the DynDNS checkip service (which will autodetect your current IP address), I add the line
My configuration file now looks like:
Note: if this doesn't work, try changing web-skip to 'Current Address'
Note that the password must be enclosed in quotation marks, e.g 'myDynDNSuserpassword' for DynDNS.
To use ddclient with Dynu free dynamic DNS service, the configuration file is as followed:
Note: refer to this setup page for more information about updating subdomains.
- Ensure that the configuration is working:
- Note that you can add additional services and/or domain names to be updated simply by adding an additional block to the configuration file (appropriate for the service). Here is an example (see below for references to additional examples).
Troubleshooting
The following details a troubleshooting method used to repair a ddclient setup.
- Remove/purge all of the previous install attempts:
Install ssh & ssh socket so that you can send your password via ssh instead of in the clear:
Install Configure Inadyn Downloads
Note: ssh w/ddclient won't work without libio-socket-ssl-perl, so make sure that you install that even if you have ssh already installed.
- Reinstall a current ddclient package from the repositories:
At the prompts enter the appropriate values, for example:
Install Configure Inadyn Downloader
Dynamic DNS service provider: www.dyndns.com
DynDNS fully qualified domain names: your-hostname.dyndns.org
Username for dynamic DNS service: your-username
Password for dynamic DNS service: your-password
Interface used for dynamic DNS service: web
- Modify the /etc/ddclient.conf to send the password using ssh and to properly check for the IP address:
Add entries for 'daemon', 'ssl' and replace 'use=if, if=web' with 'use=web' to match the following example:
Reference for secure updates: https://www.dyndns.com/support/kb/using_ddclient_with_dyndns_services.html
Now ddclient is set to run as a daemon. Because you had other ddclient configs previously, check:
Check to make sure it contains the following lines:
Note: you can set the interval shorter or longer, but if you do, also reset your /etc/ddclient.conf to match. https://bugs.launchpad.net/ubuntu/+source/ddclient/+bug/152875
Now, just to be sure everything sticks I generally reboot at this point, then check the status afterward:
Cara cheat monster rancher 2 psx emulator. Metal Gear Solid - Disk 2 PlayStation game (Soldier Gaboo) Syphon Filter PlayStation game (Unknown) Resident Evil 3 PlayStation game (Unknown) Diablo PC game (Unknown); needs to be class E or D. Money with a Sueki Suezo. If you need money, first go to the shrine and use the first Monster Rancher CD. This should result in a Sueki Suezo. Get the latest Monster Rancher 2 cheats, codes, unlockables, hints, Easter eggs, glitches, tips, tricks, hacks, downloads, hints, guides, FAQs, walkthroughs, and more. Berikut cara menggunakan cheat di emulator ePSXe dengan menggunakan software pec. Ambil contoh game yang akan di cheat adalah game Harvest Moon: Back to Nature. Game seperti Harvest Moon: Back To Nature, Monster Rancher 2. Blog Archive. June 2017 (1) Report Abuse Awesome Inc. Thank you for printing this page from www.SuperCheats.com. Remember to come back to check for more great content for Monster Rancher 2. ALL Codes game shark code for Monster Rancher 2. If your monster cheats scold it.If it does well prais it.If it loses. All our cheats and codes for Monster Rancher 2 on PlayStation Questions?
You should see:
However, that may not always catch problems in the ddclient.conf file, so issue:
Install Configure Inadyn Download Windows 7
if you do not get an error similar to the following you probably are good to go:
Then I obtain a new IP address/lease from my service provider (shutting off the modem, having my router request a new lease, whatever) & monitor https://www.dyndns.com/account/services/hosts/ to see if the change actually makes it to dyndns. Also monitor /var/log/syslog to watch the changes there as well.
Also note that there is a password length limitation.
Not very well tested, but passwords >=64 characters in length seem to fail. If you have a fairly long password, try changing it something shorter temporarily (try 8 characters) to see if that's the problem.
Running ddclient with cron
Cron is the automatic task scheduler for Linux systems. Although ddclient runs as a daemon, for various reasons I have found it necessary to force an update at least once a day. This can be done as a daily scheduled task, using cron.
- Edit the crontab with administrative (root) privileges:
- Add the line:
This will run ddclient and force an update daily at 04:45. See here for a full description of cron and its options or Ubuntu Community Help -- Cron.
Now-IP with Curl
Updating from Ubuntu is easy using just curl and Now-IP
Namecheap & Python
You can update with namecheap and python with the following script. Use your prefered editor and create the file /home/USERNAME/update_dns
Enter into the terminal
and add the following line
This will update every hour.
no-ip
This is another Dynamic DNS reporting client. Install the noip2 package from a software package manager, or from the command-line interface:
- Run no-ip and follow the installation prompts:
- Start the no-ip client
inadyn
Install the inadyn package using a software package manager, or from the command-line interface:
- Edit the file /etc/inadyn.conf:
It should contain something like:
- Test that it works:
* Add inadyn to your 'crontab':
Edit the file to add the following line:
- Verify using:
- When you reboot, you should see indyn listed when you type:
You should be able to log in to your Dynamic DNS provider's website and verify that the DNS entry is being updated. Certainly this is possible with www.dyndns.org, in any case. Alternatively you can type your hostname into a service like http://www.dnsstuff.com/.
Using dy.fi by cron tab
Edit crontab:
Add lines To update ddns at 0610 mon-sat:
Add lines To redirect ddns and stop pointing 5.10pm mon-sat:
Another method is to install the perl script dyfi-update.pl from http://www.dy.fi/page/clients
Using your Modem/Router to perform Dynamic DNS Updates
Here are some example screenshots from Wireless Routers that support dynamic DNS updates:
Netgear router example:
D-Link router example:
Linksys/Cisco router example:
A user may already have a hostname registered with a name server that does not have Dynamic DNS capabilities. Most DNS services allow URL forwarding, however. That makes it possible to set up a free Dynamic DNS service (using the instructions above) with a free hostname (URL) and then forward the previously-registered static hostname (URL) to the Dynamic DNS hostname (URL).
For example, I set up a free Dynamic DNS hostname URL at DynDNS.com that is foobar.dyndns.org. I set up my software utility (DynDNS likes ddclient or inadyn) to constantly update the Dynamic DNS database for foobar.dyndns.org.
However, I have used example.myoriginalfoobar.com as a registered hostname (URL) for years, with a static DNS service (DinosaurDNS.org) that doesn't have Dynamic DNS capabilities. I login to DinosaurDNS.org and set my DNS record for example.myoriginalfoobar.com to forward (using a CNAME (Alias) record) to foobar.dyndns.org.
Now anyone trying to access example.myoriginalfoobar.com will be redirected to foobar.dyndns.org, which will then redirect them to whichever IP address my Dynamic DNS updating utility has specified.
Using forwarding rules, an infinite number of URLs can be forwarded to a single dynamic URL. (The primary host that resides at the destination IP address must then resolve the forwarded URLs (using virtual host or .htaccess files) and direct them to the appropriate server on the computer (or LAN).) For this reason, it is only necessary to have one dynamic DNS URL for your computer (or LAN).
CNAME aliases
Install Configure Inadyn Downloader
Different DNS registrars have different methods of forwarding a URL, but in general there is one method common to all of them: CNAME aliases.
Install Configure Inadyn Downloads
If you have a URL registered with a DNS registrar, go to the DNS settings for your domain name. Delete any A records (or other entries) and use only CNAME entries.
For example, let's say my free Dynamic DNS URL is foobar.dyndns.org (at DynDNS.com). My domain URL is myoriginalfoobar.com, registered at DinosaurDNS Registrar.
Logging into DinosaurDNS Registrar, I edit the DNS settings for myoriginalfoobar.com (which in my control panel is found under Manage DNS). I make sure I have these entries:
The period ('full stop') at the end of the URL is important to designate that the CNAME is a FQDN (fully qualified domain name). A CNAME should not have 'http://' in it. The @ symbol indicates a URL name without the first segment, e.g. the URL myoriginalfoobar.com by itself. In this example, I am forwarding myoriginalfoobar.com, www.myoriginalfoobar.com, and example.myoriginalfoobar.com.
Using CNAME aliasing, the original URL is retained in the browser. It is up to you (using virtual host files or Rewrite rules in the .htaccess files of Apache, for example) if you wish to massage the URL at your server (to change it to a canonical name) or redirect it.
Much of this page was adapted from the original articles at:
Wolfenstein 3d free download windows 8. The game was inspired by the 1980s Muse Software video game Castle Wolfenstein, a top-down infiltration game. Wolfenstein 3D came out hot on the heels of the Commander Keen series and utilized the game engine created by John Cormack. It was pre-Doom, but you can see that many of the gameplay elements made their way into this future release. Playing as a captured allied spy, you must escape your Nazi captors and foil their plans for world domination.
Ubuntuguide.org Dynamic IP servers -- information about Dynamic DNS and setting up one or more webservers using Dynamic DNS with ddclient
Kubuntuguide Dynamic IP servers -- information about Dynamic DNS and setting up one or more webservers using Dynamic DNS with ddclient
CategoryInternetCategoryNetworking