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.

