April 2006


Here are the details on how to install the Serendipity blogging application on a Westhost server.

You will need to have installed PHP Version 4 or greater (PHP 4.3.1 or greater recommended) and MySQL first.

  • Download the latest release from SourceForge or Serendipity. The file name will be something like serendipity-1.0-beta2.tar.gz
  • Upload this file to your webserver. I use /usr/home/xx/apps to build applications
  • Connect to your webserver using SSH
  • Change to the directory where you want to install Serendipity (Example: /var/www/htdocs)
  • Decompress the gz file using the full path and the command tar xzvf ~/apps/serendipity-1.0-beta2.tar.gz.
    Parameter Meaning
    x Extract files
    z Filter archive through gzip
    v Verbose output
    f Use archive file

    This will create a subdirectory called serendipity in the current directory. If you want the directory to be called something other than “serendipity” then change the directory name now using the rename or mv command.

  • Create a database for Serendipity to connect to. In this example we will use MySQL
  • Enter mysqlat the command prompt. The system prompt will change to mysql>. If you need to enter a password, then use mysql -u ‘root’ -p instead
  • List the current databases by typing SHOW DATABASES; (Remember to terminate all commands with the semicolon!)
  • Create the new database by typing CREATE DATABASE serendipity;
  • You can list the current users by typing SELECT Host, User FROM mysql.user;
  • Create a new user for Serendipity by typing GRANT ALL ON serendipity.* TO ‘s9yuser’@'localhost’ IDENTIFIED BY ‘s9ypass’with GRANT OPTION; Choose your own user and passwords (instead of s9yuser and s9ypass). You can change the password by typing SET PASSWORD FOR ‘s9yuser’@'localhost’ = PASSWORD(‘newpass’); If you are using MySQL version 5.0 or later, then you can use CREATE USER user
  • Verify that you have created the necessary items by typing SHOW GRANTS FOR ‘s9yuser’@'localhost’;
  • Exit MySQL by typing EXIT;
  • Open serendipity in your browser using the URL http://www.mydomain.com/serendipity and the installer will say hi to you. Enter the correct details for database name
    Parameter Meaning
    Database Type MySQL
    Database Host localhost
    Database User s9yuser
    Database Password s9ypass
    Database Name serendipity
  • Serendipity ships world-writeable (777) to make installation easier. (permissions are only preserved on Unix/Linux systems using tar). After the install is complete, you should change those base permissions to allow only your web-server user (e.g. nobody) to access the serendipity directory. Serendipity needs to write to its core directory to be able to create the serendipity_config_local.inc.php and .htaccess file. After this has been done, the world-writable folder can be set to the sane permissions again using the command chmod 755 serendipity. Detailed file permission requirements are outlined in the Serendipity FAQ.
Bookmark this article

mysqldump --opt -Q -uUSERNAME -p DATABASENAME > /PATH/TO/DUMP.SQL

n this line, you should change the following: USERNAME – this is the username you use to access MySQL. It is specified in your config.php file. DATABASENAME – the name of the database which your vBulletin is installed into. It is specified in your config.php file. /PATH/TO/DUMP.SQL – this is the path to the file that will be outputted. If you are unsure what to put here, simply use dbname_bak.sql or something similar.

When you press enter, you will be prompted for the password you use to access MySQL. This is also specified in your config.php file. The system will dump the database once you have entered the correct password. Verify that DUMP.SQL exists in the directory you specified. If you did not specify a full directory, the file will be in the directory you are currently in.

Repeat this procedure for each database you wish to backup.

Bookmark this article

Use the following command to create a symbolic link in Unix

ln -s ActualFilename LinkFileName

Example: ln -s /var/www/html/ webpages will create a link called webpages to /var/www/html in the current directory.

Bookmark this article