Installation & Configuration |
Make sure you have all the required components to run Inventory
tar -zxvf inv-0.80.tgz
Under Windows you can use utilities such as Winzip.mv inv /var/www/html
- Alternately you can map the inv directory, to the webserver by changing the server's internal configuration. Under Apache it's done using Alias and <Directory> directives. (And the same can be acheived by IIS).
create database if not exists inventory;
use inventory;
Use the file to create the database and tables running this command:
mysql -u root -p < SQL/database.init.mysql
Explanation of the command:Now use the same method to initialize default data: (from Inventory version 0.82 you can initialize the database in your local language, if supported by Inventory).
mysql -u root -p inventory < SQL/defaults.english.mysql
Note that 'inventory' should be replaced with your DB's name (whatever you chose at the beginning of this step).
The example above initializes the database with English data (default, use this option if unsure). Look inside the SQL/
directory for more files of the format defaults.???.mysql - you may initialize with a file of your local language.
(remember to initialize only once, meaning that you must choose one of the supplied files, and initialize with it.
After the init is done, you should not repeat the process, rather you can change settings using the web interface).
Again, if you get no errors, you're ready to proceed with the next stage.
The file used to create a user is also in the SQL directory and is called create.user.mysql
You may want to make some modifications before running it. The file contains only 1 line to SQL commands
around line 17 in the file:
grant select,insert,update,delete on inventory.* to inv@localhost identified by 'testing';
You may want to change the following:Now dump the file into the mysql client (same as the previous step), by this command:
mysql -u root -p < SQL/create.user.mysql
If there are no errors from the client - the command succeeded.This section explains how to use the cfg.php file which is the main configuration file. This file is located under the include/ directory.
You will first need to make a copy of your cfg.defaults.php file:
cd inv/include/
cp cfg.defaults.php cfg.php
Edit the cfg.php file to change the variables inside.
Each line in the file that starts with // is a comment and can be ignored. (These are used to give a short explanation
of what each variable means).
Each line that is not a comment defines a variable. You must not change the names of the variables,
just the contents - which means anything right to the = sign. If the value is in double-quotes "
you must leave them and only change what's inside. Also, do not remove the semi-colon ; sign from the
end of the line.
Here are the definitions:
$inv_db['host'] = "localhost";
This is the host name where the MySQL database is running as a service. If the Web-Server and Database Server are on the same machine "localhost" will usually do; otherwise you need to specify the host name where the MySQL server is hosted. If MySQL is running on a port different than standard, say port 4321 you may specify it by: "myhost:4321".$inv_db['user'] = "inv";
This is the username to connect to MySQL with. Use the name defined in step #4.$inv_db['pass'] = "testing";
This is the password to connect to MySQL with. Use the value defined in step #4.$inv_db['db'] = "inventory";
This is the database name to use. Use the value defined in step #3.$inv_data['base'] = "/inv/";
This is the path part of the URL where Inventory will be served. This is defined by your web sever and where you put Inventory under it. If your web server serves: http://www.me.org then Inventory will be served under: http://www.me.org/inv/$inv_data['theme'] = "default";
This defines which theme to use with Inventory. This is the name of the directory that holds the theme and is found under themes/$inv_data['lang'] = "english";
This defines which language to use with Inventory. The language should be installed in the langs/ sub directory.$inv_data['display'] = 10;
Default value for the 'Display Rows' variable. This is the number of lines (per page) to display to a user when showing a list of items. This defines the default; the value can be set individually for each user in the system under 'User Management'.$inv_data['duration'] = 60;
Default value (in minutes) for 'Session Timeout'. The 'Session Timeout' will automatically logout a user after using the system for a predefined amount of time. (This helps prevent unauthorized usage of the system when the browser is left open). This value can be individually set for each user using the 'User Management' menu.$inv_data['edit'] = 0;
This setting defines if the configuration file may be edited through the web interface Inventory provides. There are three possible values for this variable:$inv_data['tmpDir'] = "/tmp/";
This setting defines the location of the temp directory where Inventory may write files. This directory should be writable for the web server process, and should be specified with a trailing / sign. The path may be absolute or relative.Installation & Configuration |