""
daCode documentation : daCode webmaster's guide
Chapter 1. Preparing the host

 

Setting up your box

Before installing daCode itself, we'll prepare a pleasant place just for him, and we will check if everything is OK. Here we speak Unix, you've been warned! You may create a specific user, 'dacode' if you want to really separate it from the rest of your box. But a personnal login is OK too.


  # adduser dacode 
    # su - dacode 
    $ passwd 
  
     
You will use this login whenever you need to work on daCode, be it upgrades, developement or reconfiguration.

 

Config checks

Now we will check if your configuration is correct. At home, I do it this way:


    
    $ mysql -V 
    mysql  Ver 9.38 Distrib 3.22.32, for pc-linux-gnu (i686) 
    $ cvs -v 
    Concurrent Versions System (CVS) 1.10.8 (client/server) 
    $ mkdir public_html 
    $ echo "<? phpinfo(); ?>" > public_html/test.php3 
 
    $ netscape http://localhost/~dacode/test.php3 
    
   
If Netscape doesn't display anything, first suspect a problem with the file permissions. Correct it with `chmod o+rx'. Apache needs to read your files and access your directories. You should have something like this:

  $ ls -l ~dacode | grep public_html     ### ca c'est OK 
    drwxr-xr-x    2 dacode   dacode       4096 jan  3 22:50 public_html/ 
    $ ls -l ~dacode/.. | grep dacode       ### ca c'est pas bon 
    drwx------    8 dacode   dacode       4096 jan  3 22:52 dacode/ 
    $ chmod o+rx ~dacode  
    $ ls -l ~dacode/.. | grep dacode       ### là c'est mieux 
    drwx---r-x    8 dacode   dacode       4096 jan  3 22:52 dacode/ 
    
   
If Netscape doesn't find anything better to display, you may have a problem with PHP. Go hunt for coffee and cigarettes, and forget about sleeping for some time. If it works, first thank your computer for saving your lungs, and then take note of the PHP version and the presence of the MySQL and Apache extentions of PHP (the MySQL extension may be replaced by the PostGreSQL extension). We may need it later if something goes wrong.

 

Setting up the database

We decided to publish on the web, so we'll need some help from root. Prepare it now, and don't call him BOFH for some time. Then pay him a Guiness, and ask him, very politely a database to store your infos.

Root has to give you the name of the database, the username for this database and the password for it.