Author Topic: Installing -- single domain host, cpanel -- how-to  (Read 3589 times)

Offline ssmith

  • Newbie
  • *
  • Posts: 6
Installing -- single domain host, cpanel -- how-to
« on: January 07, 2008, 04:23:26 AM »
I just installed RoundCube RC2 and I like it. A lot.

I'm a bit of a newb and had some trouble getting it working, but finally did it -- so to help anyone else I've put my notes below:

I used a windows PC, and use cpanel to manage my website, which is a simple single domain account.

1. http://roundcube.net/downloads"]Download [/URL]latest roundcube package (RC2, it's a tar.gz file)

2. Unpack the file (I used 7zip, which is open source)

3. Open up the downloaded and unzipped roundcubemail folder and then navigate to the config folder. In here you will find two files, db.inc.php.dist and main.inc.php.dist. Rename both of them to remove .dist. You now have db.inc.php and main.inc.php.

4. You can also rename the unpacked folder to something like mail (so when it is uploaded you can access you mail by typing http://yourdomain.com/mail). Don't call it 'webmail' as this may clash with access to Horde and Squirrelmail, or the default webmail programs your host provides.

5. Log in to cpanel and click on 'MySQL databases'.

6. Click on 'create database' -- call it 'mail' and you'll end up with a database called 'username_mail'.

7. Click on 'create user' -- call the user 'mail' and assign a password. You'll end up with a user called 'username_mail'.

8. Assign the new user to the new database using the dropdown boxes.

9. At the bottom of the mysql page in cpanel, click on phpmyadmin.

10. on the left of the new page in the dropdown box, select the new 'mail' database.

11. on the tabs at the top, click on import.

12. on the import box, browse to your downloaded mail folder, and use the file 'mysql.initial.sql'. That's cpanel done for the moment.

13. In the downloaded mail folder, you have to edit the db.inc.php file (using a text editor).
  modify this line to your database and user:
  $rcmail_config['db_dsnw']='mysql://user:password@localhost/databasename';

  Which using the above example would be:
  $rcmail_config['db_dsnw']='mysql://username_mail:password@localhost/username_mail';

14. In main.inc.php make the following changes (others can be made too):

  $rcmail_config['default_host'] = 'localhost';
  $rcmail_config['mail_domain'] = 'yourdomain.com';

15. Save the changes, and using an ftp app (I used filezilla), upload the downloaded 'mail' folder into your public_html folder.

16. In cpanel, go to file manager, and navigate to the newly uploaded ../public_html/mail folder and change the permissions (chmod) of the temp and logs directories to 777.

Now in your browser, navigate to http://yourdomain.com/mail and there should be a login screen.

If not, troubleshoot, try the forums and readme, and look at the following tutorials, which I referred to to get mine working:

http://opensourceheaven.net/?page_id=122
http://forums.site5.com/showthread.php?t=9374 (contains a chmod instruction that didn't work for me)
http://paulstamatiou.com/2005/10/29/how-to-setup-roundcube-webmail-on-your-server/

roundcube has a far nicer interface than Horde or Squirrelmail (not very difficult!), but is still in beta so there will be bugs. It also lacks some basic functionality -- like address book import, a calendar, etc, etc, etc...

Took me as a total noob a while to figure out an install, though as documentation gets better hopefully people will be on it in 5 minutes, including the ftp upload.

Hope that helps somebody! (DISCLAIMER: I'm not an expert and there could be errors in the above, and I apologise in advance if there are, and feel free to add corrections).

all best, ssmith


Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,566
    • http://SKaero.com/
Re: Installing -- single domain host, cpanel -- how-to
« Reply #1 on: January 08, 2008, 03:57:20 AM »
Thanks for the how to! ;)