Setting Up Navigator
From ISP_RAS
Contents |
Requirements
In order to setup local copy of Navigator, the following items are required:
- PHP (both 4.x and 5.x are supported) with the following additional packages:
- php-mysql
- php-ctype (usually it is installed with php automatically, but on some systems it is a separate package)
- MySQL 5.x. Note: MySQL 4.x is not supported.
- Web server (Navigator was tested on Apache 2.x) with php support
- On client side, javascript and cookies should be enabled. Cookies are responsible for storing filters values; if they are disabled, these values will be lost every time user changes page.
Setup
- Download and setup LSB Specification Database. Follow Instructions from SpecDatabaseUsage page
- Obtain Navigator from LSB version control (bazaar):
bzr branch http://bzr.linux-foundation.org/lsb/devel/dbadmin
- Modify "dbadmin/browse/db.inc" file: find the line
$DB=mysql_connect("localhost","lsbuser");
and replace "localhost" with the host where LSB Specification Database is located, and "lsbuser" with appropriate username. If this user requires a password, add it as a third parameter to 'mysql_connect' function. The user should have the following privileges:
- "SELECT" privileges on all tables
- "CREATE TEMPORARY TABLES" privileges
- "INSERT" privileges on "InterfaceComment" table (not required, if you are not planning to add comments for interfaces using Navigator)
- If you want to use 'Administration' mode of Navigator, modify "dbadmin/admin/db.inc" file: find the line
$DB=mysql_connect("localhost","lsbadmin");
and replace "localhost" with the host where LSB Specification Database is located, and "lsbadmin" with user which have all privileges on the database. If this user requires a password, add it as a third parameter to 'mysql_connect' function.
- Copy 'dbadmin' folder to a place visible to your web browser (in a simplest case, it is 'htdocs' directory)
- Navigator is ready to use - type "<your_host_url>/dbadmin/commons/welcome.php" in any browser. 'Welcome' page should be displayed.
Technical Notes
DB Access
By default, Navigator works with the specification database named 'lsb' on the localhost (i.e. on the same machine where web-server is running). In 'browse' mode, it uses 'lsbuser' username and in the 'admin' mode - 'lsbadmin' one. None of these users require password, but 'lsbuser' is only allowed to perform 'selects', while 'lsbadmin can actually modify data. These users are created during database default setup. To change users creation process, modify 'dbperms.sql' file in the 'specdb' directory. In order to change users which are used by Navigator, modify 'browse/db.inc' and 'admin/db.inc' files for 'browse' and 'administration' modes correspondingly.
Administration Mode Restrictions
All scripts used in the 'admin' mode are located in the 'admin' subfolder of Navigator. So the simplest way to restrict access to 'admin' mode is to protect this folder on web server level (e.g., using '.htaccess' for Apache).