Chaos Mind getting into order

Archive for the ‘Debian’ Category

Quick guide for mounting FTP directory using curlftpfs on a Debian Lenny system

1 – install curlftpfs
 aptitude install curlftpfs

2 – create mount point:
  make  /mnt/ftp-dir
 
3 – add this line in /etcfstab:
  curlftpfs#ftp.example.com /mnt/ftp-dir fuse rw,uid=0,noauto 0 0

4 – add some security for authentication. Create file /root/.netrc
    machine ftp.example.com
    login ftp-user
    password ftp-pass

Note: May not suit your needs. I would recommend you to read those pages:

Problem found in the /var/log/syslog:

postfix/smtpd[4183]: warning: database /etc/aliases.db is older than source file /etc/aliases

Solution:

  • As root, erase the /etc/aliases.db file and create a new one:
    # rm /etc/aliases.db
    # newaliases

Done!

Problem:

from : Cannot open the disk ‘/path/to/virtual-disk.vmdk’ or one of the snapshot disks it depends on. Reason: Failed to lock the file.

Solution:

cd /path/to/virtual-disk.vmdk/
rm *.lck

Done!

This problem happens when the server didn’t shutdown properly.

Etiquetas:

Warning: This is just my personal note about how to install SySAM2 on Debian Etch. I don’t give any warranty that is going to work perfectly for you. Meanwhile, I advice that you can help me to get this “recipe” better with your comments/suggestions/corrections.

So, let’s get down to business. This are the steps to install SySAM on Debian.

0 – Preparation:

1 – Generate response file:

./setup -silent -options-template ./response_file.txt

2 – Edit response_file.txt

Change lines:
### -P installLocation=
### -W setupTypes.selectedSetupTypeId=

-P installLocation=/opt/sybase
-W setupTypes.selectedSetupTypeId=full

3 – Install SySAM2:

./setup -options “./response_file.txt” –W  SybaseLicense.agreeToLicense=true -silent

4 – Setup Enviroment:

mkdir /usr/tmp

5 – Copying Licenses:
You should copy all your licenses files (*.lic) into your “installLocation” licenses’s folder (in this case is /opt/sybase/SYSAM-2_0/licenses/).

6 – Init script:
There is no init script bundled with SySAM, so its necessary to create one. SySAM has ‘diag’ and ‘status’ funcionalities that can come handy. For sake for presentation, I made the init scritp available for download . Copy the file and adapt it for your instalation.(not yet, later!) For my case, my file is /etc/init.d/sysam

7 – Init Levels!
We need to add the script to be used to start/stop the service. Just do:

update-rc.d -n sysam defaults 99

8 – Done!!!
Start using your SySAM server!

Did this worked for you? If yes, great! If not, please leave a comment about it and, if you managed, how did you solved it 🙂

Cheers!

Etiquetas: , ,

After booting if you have this line:

Not starting internet superserver: no services enabled

To remove it:

update-rc.d -f openbsd-inetd remove

If you change ideas later and need to put it back, do:

update-rc.d -n openbsd-inetd defaults 20

Etiquetas: , ,

It’s pretty easy. Just follow the Ubuntu fakeRAIDHowto instructions.

Yuppi! 1.5 TB (ext3) working!

Etiquetas: , ,

Mooshak is a system for managing programming contests on the Web. Mooshak’s basic features include automatic judging of submitted programs, answering to clarification questions about problem descriptions, reevaluation of programs, tracking printouts, among many others [reference: Mooshak’s website].

Since I want to have a dedicated server for it (thanks, Algardata), I had the oportunity to install on a fresh debian etch system. Unfortunately, the installation manual is very incomplete (even the README file bundled with it), so I created this small step-by-step tutorial what will help you to install it flawless.

Warning: This rough tutorial was the solution to install mooshak only. Mooshak configuration, setting users, competitions, etc, is far from the scope of this tutorial.

1 – Requeriments:

For this tutorial I used a debian etch 4.0r3 network install CD and I installed the basic system and nothing more.

Mooshak needs the following software to work:

  • Tcl 8.3 or greater;
  • Apache 1.2 or greater;

Well, in my case I need a little more, because this is a very basic system. To be able to install Mooshak, it’s needed to install:

  • xsltproc (version: 1.1.19)
  • lpr (version: 2006.11.04)
  • rsync (version: 2.6.9)
  • gcc (version: 4.1.1)
  • libxm2-utils (version: 2.6.27)

The version number next to each package it’s the one that I’ve installed. It doesn’t mean that it can’t work with a minor version, but I don’t have that knowledge.

2 – Requirements installation:

To install it all at once:

aptitude install tcl apache2 xsltproc lpr rsync gcc libxml2-utils

This command line worked fine for me. I just recommend to see which extra packages it would install, but they are safe and expected.

3 – Mooshak installation

Now our box is ready to install Mooshak. Just download the lastest stable version and install it:

% tar xzf mooshak-version.tgz
% cd mooshak-version
% su	
# ./install
Prerequisites Ok. Installing Mooshak on debian, Apache 2.2
home dir created
data.tgz copied
source.tgz copied
setting file permissions ... done
connecting to host [your-server's-name] ... connected!
Mooshak installation seems OK

You can check it from the webserver http://%5Byour-server’s-name%5D/~mooshak/cgi-bin/info

4 – Configuring Apache2

Since mooshak site it’s from a system user (mooshak), you will need to activate userdir module:

# a2enmod userdir

Next step is to configure /etc/apache2/mods-available/user-dir.conf and add the following lines between IfModule section:

        <Directory /home/*/public_html/cgi-bin>
Options +ExecCGI -Includes -Indexes
SetHandler cgi-script
</Directory>

Now, it’s time to reload the apache2 server:

/etc/init.d/apache2 reload

Final Thoughts

Mooshak have big lacks of documentation and it’s build in TCL, which it doesn’t help to be widely adopted. Meanwhile, it’s quite popular among portuguese universities because of programming contests, or even it’s used in programming classes to test students.

I would like to see a mooshak version using a more popular language (PHP, Ruby, JAVA, etc.).

Finally, I invite everyone to help me to keep this tutorial up-to-date.

Etiquetas: