Skip to content
Daniel Ruus edited this page Jul 28, 2016 · 9 revisions

Welcome to the oscar wiki!

What is oscar?

Oscar, or the Open Source Created Asset Register, is a web based inventory system primarily used for keeping track of various articles, such as computers, mobile phones, book, DVD's and so on.

Requirements

Early days, have only tested with the following, but expect it to work on pretty much any web server with PHP enabled:

  • Web server: Apache version 2.4.7 with PHP 5.6.20

  • Database: MariaDB 10.0.23

  • Operating system: Ubuntu 14.04 LTS 64-bit

  • Web server: Apache version 2.2.22 with PHP 5.4.45

  • Database: MySQL 5.5.49

  • Operating system: Raspbian Linux 7.1 (Raspberry Pi 2 Model B)

Installation

Clone the repository https://github.com/druus/oscar.git in a directory accessible by your webserver, such as /var/www. This creates the directory oscar.

Create a database in MySQL, or decide on an existing one. Here we are assuming that a new database called oscar will be created and used:

$ echo "create database oscar" | mysql -u root -p

Create the relevant tables using the script in database.

$ mysql -u root -p oscar < database/oscar_mysql_install.sql

This creates a default administrative user for oscar called admin, with the password admin. The web interface does not allow a logged in user to change password yet, so to change the password to something else, such as "myfabpassword", login to the database and issue the following statement:

$ mysql -u root -p oscar
Enter password:
...
MariaDB [oscar]> UPDATE users SET password = sha2('myfabpassword', 256) WHERE username = 'admin';

Configuration

Currently configuration takes place in two separate configuration place. This is for historical reasons, and one of the files will be removed in the future.

But for now, configuration is done like follows.

Rename the file config/config-default.conf.php to config/admin.conf.php:

$ mv config/config-default.conf.php config/admin.conf.php

The contents of the file is

<?php
$DBSERVER = "localhost";
$DBUSER = "oscar";
$DBPASSWD = "oscarpassword";
$DBNAME = "oscar";
$DBTYPE = "mysql";
?>

Modify the file to your needs. Here we are assuming that a database user called oscar with password oscarpassword will be used for the connection to a database with the name oscar. For now only MySQL/MariaDB is supported, but support for other databases is planned, so leave $DBTYPE as it is.

Create the file config/config.ini.php and include the following in it:

;<?php
;die();
;/*

;----------------------------------------------
; Section: database
; Key     : Description
; driver  : Database driver (supported: mysql)
; host    : Database host, for example localhost
; port    : Network port the database is listening to
; schema  : Name of the database
; username: Database username
; password: Password for username
[database]
driver = mysql
host = localhost
port = 3306
schema = oscar
username = oscar
password = oscarpassword

;*/
;?>

Modify the contents of the file to match that of config/admin.conf.php. I know, it's rather confusing to have two configuration files for the same thing, but as stated earlier this will be changed. The file config/admin.conf.php is being phased out.

Open your favourite web browser and navigate to http://yourserver/oscar. As this is a new installation there is no data available of any kind, so start by logging in (click Login in the top right corner), login with the admin user (admin/admin - unless you changed the password as described earlier). This will reveal a new menu called Admin. Under the Admin menu you can administer the following:

  • Categories
  • Clients
  • Departments
  • Licenses (this one doesn't work yet)
  • Status
  • Suppliers
  • Users
Clone this wiki locally