User authentication is temporarily unavailable. If this situation persists, please inform your Wiki Admin.

SimpleInvoices_20071002 install on Ubuntu 7.10 server (i386)

Updated 2 Nov 2007

This assumes you know how to

  • install ubuntu server
  • use phpmyadmin
  • edit files
  • sudo
  • change any values used below to something you'd rather use
  • you are installing on a server to access from another machine.
  • do ubuntu 7.10 lamp install - unlike 6.06, the option to do a lamp install comes later in the install…it's not the first menu you'll see, as it was in 6.06
    • comment out cdrom in /etc/apt/sources.list so that you get all your packages from the repositories instead of the cdrom
    • update packages available for installation
   apt-get update
  • install required packages
    • ssh - so that you ssh in from another box
    • phpmyadmin - to manage the databases from another pc (select “apache2” during phpmyadmin install)
    • php5-gd - for pdf output
    • unzip - to unzip
    • php5-xsl - for report generation
apt-get install ssh phpmyadmin php5-gd unzip php5-xsl
  • copy to /var/www (or wherever you want to put it. I put it in /var/www so that it's accessible via http://ip_address/simpleinvoices; I also have webcalendar on this server, so that is accessible via http://ip_address/webcalendar. I haven't really messed with apache configs for years, and the structure of apache has changed so much that I don't want to mess with it. this is the easiest way for me to do it.
   cp /media/cdrom/ /var/www (if you were copying from a cdrom to /var/www)
  • unzip - you should end up with /var/www/simpleinvoices. if you want you can change this to something else (I use “invoicing”) do (as root)
  mv /var/www/simpleinvoices /var/www/whateveryouwant
  • create simpleinvoices database
    • click “databases”
    • in “create new database” box, enter the name of the database “simpleinvoices” or whatever you want, click “create” (leave collation box as is).
  • create database user
    • click “home” icon
    • click “privileges”.
    • click “add new user”
    • username – whatever you want, but remember it!
    • host – leave blank
    • password – remember it!
    • click “go” at bottom right
  • grant privileges on simpleinvoices database
    • click “priviliges” tab
    • click “edit” icon to the right of the user you just created
    • under database-specific privileges, “add privilieges on the following database”, select the name of the database you just created in the drop-down box.
    • click “check all” (all boxes should fill with check marks)
    • click “go”
  • import tables (simpleinvoices.sql) into simpleinvoices database (Note: if you are doing the install from your pc, you might want to put a copy of simpleinvoices.sql on your pc so that you can easily browse to it from phpmyadmin for the following step. in fact I have a copy of it on a server mounted via nfs so that whenever I have to do an install for clients, I just browse to the (already unzipped) simpleinvoices.sql file on the server.)
    • click the name of the database you created
    • click “import” tab
    • browse to simpleinvoices.sql file
    • click “go” (after a few seconds, you should see data populated in the tables)
  • set up config.php
    • edit /var/www/simpleinvoices/config/config.php
    • update $db_name, $db_user, $db_password – use the database name, username and password you created in phpmyadmin, above, like $db_name = “simpleinvoices”;
  • set permissions
    • change dir to /var/www/simpleinvoices
   cd /var/www/simpleinvoices
  • change ownership of cache dir to www-data…this allows apache2 to write to the cache dir
   chown -R www-data cache
  • change directory to /var/www/simpleinvoices/include
   cd /var/www/simpleinvoices/include    
  • change ownership of pdf dir to www-data…this allows apache2 to write to the pdf dir
   chown -R www-data pdf  
  • restart apache2 so all changes take effect
  /etc/init.d/apache2 restart
    • you should see html2ps/pdf demo page
    • if you have internet access from the si server, scroll to bottom and click “convert file”
    • your pdf viewer should open and you should see a pdf page of google.
    • if you do not have internet access, change to a valid html page on your server (there's one at http://server_ip_address/simpleinvoices/Credits.html)
    • if your pdf viewer opens and you see a pdf page, you're good to go
  • empty tables
    • use phpmyadmin to empty relevant data tables of preloaded demo data (customers, products, invoices, etc.)
    • log in to phpmyadmin
    • select database “simpleinvoices” in dropdown box on left
    • click on table “si_biller”
    • click “empty”tab at top right
    • click “yes” to popup box “do you really want to…”
    • repeat for si_customers, si_invoices, si_invoice_items, si_products. there may be more that need to be cleaned out, that should make itself evident if so.
  • turn on authentication and invoice emailing
    • edit /var/www/simpleinvoices/config/config.php
    • line 12 - change false to true
    • line 21 – change localhost to your outgoing mail server name
    • line 22 – change false to true
    • line 25 – enter your outgoing (smtp) username
    • line 26 – enter your outgoing (smtp) password
    • put md5.js in /var/www/simpleinvoices/include/md5
  • restart apache
   /etc/init.d/apache2 restart
  • test login using email address [email protected], password demo
  • change login info
    • open phpmyadmin
    • select database “simpleinvoices”
    • select table “si_users”
    • click “browse” tab
    • edit user “[email protected]
    • change user_email to your email address
    • change user_name to your name
    • change user_password – select md5 in dropdown box, enter new password in “value” box
    • click “go”
  • Create a default biller, customers, products, etc.

NOTES: I install ssh immediately so that I can easily ssh in from my linux box to make config changes by copying and pasting from an existing doc (like this one) instead of the more error-prone typing (my typing sucks!). Also, doing configuration from a pc makes it easy to point your browser to the server to check pdf creation, etc. For backup I use a script called automysqlbackup to automagically back up my database every morning at 0300, then rsync it via cron job to Amazon S3 via Jungledisk so that I have off-site backups. And since Amazon s3 is only $0.15 per GB per month (yes, that's 15 cents per gb!), it's pretty cheap. My storage bill for Sep was 78 cents, Oct was 5 cents!

automysqlbackup is available at

jungledisk for linux is available at

check out amazon S3 (Simple Storage Solutions and EC2 (Elastic Compute Cloud) at

any comments, questions, email [email protected]

 | wiki/simple_invoices_install_on_ubuntu_7.10.txt · Last modified: 2016/10/11 06:15 (external edit)