Example data swapped out for optional import
This commit is contained in:
parent
23b73a387b
commit
ed33c0553d
|
@ -5,6 +5,7 @@ IP Reg version 0.6 and up depends on smarty template engine.
|
||||||
In Debian install ist with: "apt-get install smarty3".
|
In Debian install ist with: "apt-get install smarty3".
|
||||||
The GHP-GD module is also required: "apt-get install php-gd".
|
The GHP-GD module is also required: "apt-get install php-gd".
|
||||||
|
|
||||||
|
|
||||||
2. Create database
|
2. Create database
|
||||||
Create a database for IP Reg on your web server, as well as a MySQL user who
|
Create a database for IP Reg on your web server, as well as a MySQL user who
|
||||||
has all privileges for accessing and modifying it.
|
has all privileges for accessing and modifying it.
|
||||||
|
@ -16,19 +17,26 @@ Create database-user for application with minimum necessary rights.
|
||||||
CREATE USER 'ipreg'@'localhost' IDENTIFIED BY '********';
|
CREATE USER 'ipreg'@'localhost' IDENTIFIED BY '********';
|
||||||
GRANT SELECT, INSERT, UPDATE, DELETE ON ipreg.* TO 'ipreg'@'localhost';
|
GRANT SELECT, INSERT, UPDATE, DELETE ON ipreg.* TO 'ipreg'@'localhost';
|
||||||
|
|
||||||
3. Run import
|
|
||||||
|
3. Run database import
|
||||||
Import the mysql.sql file into your database, which will create the tables
|
Import the mysql.sql file into your database, which will create the tables
|
||||||
and some sample data.
|
|
||||||
|
|
||||||
mysql ipreg < mysql.sql
|
mysql ipreg < mysql.sql
|
||||||
|
|
||||||
|
Optional import some sample data
|
||||||
|
|
||||||
|
mysql ipreg < mysql_sample.sql
|
||||||
|
|
||||||
|
|
||||||
4. Edit config file
|
4. Edit config file
|
||||||
Open config.php in a text editor and fill in your database details.
|
Open config.php in a text editor and fill in your database details.
|
||||||
|
|
||||||
|
|
||||||
5. Upload files
|
5. Upload files
|
||||||
Upload all files and directory's (except the install directory) to your
|
Upload all files and directory's (except the install directory) to your
|
||||||
webserver.
|
webserver.
|
||||||
|
|
||||||
|
|
||||||
6. Check file access rights for security
|
6. Check file access rights for security
|
||||||
Only directory tpl_c should be writeble by webserver
|
Only directory tpl_c should be writeble by webserver
|
||||||
|
|
||||||
|
@ -37,6 +45,7 @@ Only directory tpl_c should be writeble by webserver
|
||||||
|
|
||||||
chown www-data tpl_c
|
chown www-data tpl_c
|
||||||
|
|
||||||
|
|
||||||
7. Start using IP Reg
|
7. Start using IP Reg
|
||||||
Start your browser and login to IP Reg with the default username/password:
|
Start your browser and login to IP Reg with the default username/password:
|
||||||
admin/admin
|
admin/admin
|
||||||
|
|
|
@ -7,11 +7,6 @@ CREATE TABLE asset (
|
||||||
PRIMARY KEY (asset_id)
|
PRIMARY KEY (asset_id)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
INSERT INTO asset (asset_name, assetclass_id) VALUES
|
|
||||||
('My Computer', 1),
|
|
||||||
('My Server', 2);
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE assetclass (
|
CREATE TABLE assetclass (
|
||||||
assetclass_id int(10) NOT NULL AUTO_INCREMENT,
|
assetclass_id int(10) NOT NULL AUTO_INCREMENT,
|
||||||
assetclassgroup_id int(10) NOT NULL,
|
assetclassgroup_id int(10) NOT NULL,
|
||||||
|
@ -19,11 +14,6 @@ CREATE TABLE assetclass (
|
||||||
PRIMARY KEY (assetclass_id)
|
PRIMARY KEY (assetclass_id)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
INSERT INTO assetclass (assetclassgroup_id, assetclass_name) VALUES
|
|
||||||
(1, 'PC'),
|
|
||||||
(2, 'Server');
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE assetclassgroup (
|
CREATE TABLE assetclassgroup (
|
||||||
assetclassgroup_id int(10) NOT NULL AUTO_INCREMENT,
|
assetclassgroup_id int(10) NOT NULL AUTO_INCREMENT,
|
||||||
assetclassgroup_name varchar(100) NOT NULL,
|
assetclassgroup_name varchar(100) NOT NULL,
|
||||||
|
@ -31,11 +21,6 @@ CREATE TABLE assetclassgroup (
|
||||||
PRIMARY KEY (assetclassgroup_id)
|
PRIMARY KEY (assetclassgroup_id)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
INSERT INTO assetclassgroup (assetclassgroup_name, assetclassgroup_color) VALUES
|
|
||||||
('Workstations', '000000'),
|
|
||||||
('Servers', '0000CC');
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE location (
|
CREATE TABLE location (
|
||||||
location_id int(10) NOT NULL AUTO_INCREMENT,
|
location_id int(10) NOT NULL AUTO_INCREMENT,
|
||||||
location_name varchar(100) NOT NULL,
|
location_name varchar(100) NOT NULL,
|
||||||
|
@ -46,10 +31,6 @@ CREATE TABLE location (
|
||||||
KEY location_sort (location_sort)
|
KEY location_sort (location_sort)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
INSERT INTO location (location_name, location_parent) VALUES
|
|
||||||
('Main Office', 0);
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE nat (
|
CREATE TABLE nat (
|
||||||
nat_id int(10) NOT NULL AUTO_INCREMENT,
|
nat_id int(10) NOT NULL AUTO_INCREMENT,
|
||||||
nat_type int(1) NOT NULL,
|
nat_type int(1) NOT NULL,
|
||||||
|
@ -72,11 +53,6 @@ CREATE TABLE node (
|
||||||
PRIMARY KEY (node_id)
|
PRIMARY KEY (node_id)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
INSERT INTO node (node_ip, node_mac, subnet_id, asset_id) VALUES
|
|
||||||
('192.168.1.2', '001122334455', 1, 1),
|
|
||||||
('192.168.1.1', 'aabbccddeeff', 1, 2);
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE subnet (
|
CREATE TABLE subnet (
|
||||||
subnet_id int(10) NOT NULL AUTO_INCREMENT,
|
subnet_id int(10) NOT NULL AUTO_INCREMENT,
|
||||||
subnet_address varchar(45) NOT NULL,
|
subnet_address varchar(45) NOT NULL,
|
||||||
|
@ -89,10 +65,6 @@ CREATE TABLE subnet (
|
||||||
PRIMARY KEY (subnet_id)
|
PRIMARY KEY (subnet_id)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
INSERT INTO subnet (subnet_address, subnet_mask) VALUES
|
|
||||||
('192.168.0.0', 24);
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE subnetlocation (
|
CREATE TABLE subnetlocation (
|
||||||
subnetlocation_id int(10) NOT NULL AUTO_INCREMENT,
|
subnetlocation_id int(10) NOT NULL AUTO_INCREMENT,
|
||||||
subnet_id int(10) NOT NULL,
|
subnet_id int(10) NOT NULL,
|
||||||
|
@ -100,7 +72,6 @@ CREATE TABLE subnetlocation (
|
||||||
PRIMARY KEY (subnetlocation_id)
|
PRIMARY KEY (subnetlocation_id)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE subnetvlan (
|
CREATE TABLE subnetvlan (
|
||||||
subnetvlan_id int(10) NOT NULL AUTO_INCREMENT,
|
subnetvlan_id int(10) NOT NULL AUTO_INCREMENT,
|
||||||
subnet_id int(10) NOT NULL,
|
subnet_id int(10) NOT NULL,
|
||||||
|
@ -108,10 +79,6 @@ CREATE TABLE subnetvlan (
|
||||||
PRIMARY KEY (subnetvlan_id)
|
PRIMARY KEY (subnetvlan_id)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
INSERT INTO subnetvlan (subnet_id, vlan_id) VALUES
|
|
||||||
(1, 1);
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE user (
|
CREATE TABLE user (
|
||||||
user_id int(10) NOT NULL AUTO_INCREMENT,
|
user_id int(10) NOT NULL AUTO_INCREMENT,
|
||||||
user_name varchar(100) NOT NULL,
|
user_name varchar(100) NOT NULL,
|
||||||
|
@ -137,9 +104,8 @@ CREATE TABLE user (
|
||||||
PRIMARY KEY (user_id)
|
PRIMARY KEY (user_id)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
INSERT INTO user (user_name, user_pass, user_displayname, user_imagesize, user_imagecount, user_mac, user_dateformat, user_menu_assets, user_menu_assetclasses, user_menu_assetclassgroups, user_menu_locations, user_menu_nodes, user_menu_subnets, user_menu_users, user_menu_vlans) VALUES
|
INSERT INTO user (user_name, user_pass, user_displayname) VALUES
|
||||||
('admin', '21232f297a57a5a743894a0e4a801fc3', 'administrator', 6, 64, 'xxxxxxxxxxxx', 'd M Y H:i', 'on', 'on', 'on', 'on', 'on', 'on', 'on', 'on');
|
('admin', '21232f297a57a5a743894a0e4a801fc3', 'administrator');
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE vlan (
|
CREATE TABLE vlan (
|
||||||
vlan_id int(10) NOT NULL AUTO_INCREMENT,
|
vlan_id int(10) NOT NULL AUTO_INCREMENT,
|
||||||
|
@ -149,10 +115,6 @@ CREATE TABLE vlan (
|
||||||
PRIMARY KEY (vlan_id)
|
PRIMARY KEY (vlan_id)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
INSERT INTO vlan (vlan_number, vlan_name) VALUES
|
|
||||||
(1, 'DEFAULT_VLAN');
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE zone (
|
CREATE TABLE zone (
|
||||||
zone_id int(10) NOT NULL AUTO_INCREMENT,
|
zone_id int(10) NOT NULL AUTO_INCREMENT,
|
||||||
zone_soa varchar(40) CHARACTER SET utf8 NOT NULL,
|
zone_soa varchar(40) CHARACTER SET utf8 NOT NULL,
|
||||||
|
@ -172,6 +134,3 @@ CREATE TABLE zone (
|
||||||
zone_info text CHARACTER SET utf8 DEFAULT NULL,
|
zone_info text CHARACTER SET utf8 DEFAULT NULL,
|
||||||
PRIMARY KEY (zone_id)
|
PRIMARY KEY (zone_id)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
INSERT INTO zone (zone_soa, zone_origin, zone_hostmaster, zone_serial, zone_ns1) VALUES
|
|
||||||
('ns1.example.com.', 'example.com.', 'hostmaster@example.com', '2023021301', 'ns1.example.com');
|
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
INSERT INTO asset (asset_name, assetclass_id) VALUES
|
||||||
|
('Computer', 1),
|
||||||
|
('Server', 2),
|
||||||
|
('Printer', 3);
|
||||||
|
|
||||||
|
INSERT INTO assetclass (assetclassgroup_id, assetclass_name) VALUES
|
||||||
|
(1, 'Desktop'),
|
||||||
|
(1, 'Notebook'),
|
||||||
|
(2, 'Server'),
|
||||||
|
(3, 'Printers'),
|
||||||
|
(4, 'Scanners');
|
||||||
|
|
||||||
|
INSERT INTO assetclassgroup (assetclassgroup_name, assetclassgroup_color) VALUES
|
||||||
|
('Personal Computer', '000000'),
|
||||||
|
('Servers', '0000CC'),
|
||||||
|
('Periphery', '00CC00'),
|
||||||
|
('Miscellaneous', 'CC0000');
|
||||||
|
|
||||||
|
INSERT INTO location (location_name, location_parent) VALUES
|
||||||
|
('Main Office', 0),
|
||||||
|
('Branch Office A', 1),
|
||||||
|
('Branch Office B', 1);
|
||||||
|
|
||||||
|
INSERT INTO node (node_ip, node_mac, subnet_id, asset_id) VALUES
|
||||||
|
('192.168.1.2', '001122334455', 1, 1),
|
||||||
|
('192.168.1.1', 'aabbccddeeff', 1, 2),
|
||||||
|
('192.168.0.1', '667755441122', 2, 3);
|
||||||
|
|
||||||
|
INSERT INTO subnet (subnet_address, subnet_mask) VALUES
|
||||||
|
('192.168.0.0', 24),
|
||||||
|
('192.168.1.0', 24),
|
||||||
|
('192.168.10.0', 24),
|
||||||
|
('192.168.20.0', 24);
|
||||||
|
|
||||||
|
INSERT INTO subnetlocation (subnet_id, location_id) VALUES
|
||||||
|
(1, 1),
|
||||||
|
(2, 1),
|
||||||
|
(3, 2),
|
||||||
|
(4, 3);
|
||||||
|
|
||||||
|
INSERT INTO subnetvlan (subnet_id, vlan_id) VALUES
|
||||||
|
(1, 1);
|
||||||
|
|
||||||
|
INSERT INTO user (user_name, user_pass, user_displayname, user_imagesize, user_imagecount, user_mac, user_dateformat) VALUES
|
||||||
|
('admin', '21232f297a57a5a743894a0e4a801fc3', 'administrator', 6, 64, 'xxxxxxxxxxxx', 'd M Y H:i');
|
||||||
|
|
||||||
|
INSERT INTO vlan (vlan_number, vlan_name) VALUES
|
||||||
|
(1, 'DEFAULT_VLAN');
|
||||||
|
|
||||||
|
INSERT INTO zone (zone_soa, zone_origin, zone_hostmaster, zone_serial, zone_ns1) VALUES
|
||||||
|
('ns1.example.com.', 'example.com.', 'hostmaster@example.com', '2023021301', 'ns1.example.com');
|
|
@ -185,9 +185,9 @@ $lang = array(
|
||||||
'lang_options_dateformat' => 'Datumsformat',
|
'lang_options_dateformat' => 'Datumsformat',
|
||||||
'lang_options_dateformat_help' => 'Format in which dates are displayed using the php-date-format (see http://www.php.net/date for more info)',
|
'lang_options_dateformat_help' => 'Format in which dates are displayed using the php-date-format (see http://www.php.net/date for more info)',
|
||||||
'lang_options_dns1suffix' => 'DNS Name suffix',
|
'lang_options_dns1suffix' => 'DNS Name suffix',
|
||||||
'lang_options_dns1suffix_help' => 'Default DNS Name suffix für neue Knoten',
|
'lang_options_dns1suffix_help' => 'Default DNS Name suffix für neue Knoten',
|
||||||
'lang_options_dns2suffix' => 'DNS Alias suffix',
|
'lang_options_dns2suffix' => 'DNS Alias suffix',
|
||||||
'lang_options_dns2suffix_help' => 'Default DNS Alias suffix für neue Knoten',
|
'lang_options_dns2suffix_help' => 'Default DNS Alias suffix für neue Knoten',
|
||||||
'lang_options_currentpassword' => 'Aktuelles Kennwort',
|
'lang_options_currentpassword' => 'Aktuelles Kennwort',
|
||||||
'lang_options_currentpassword_help' => 'Bitte geben Sie hier Ihr bisheriges Kennwort ein',
|
'lang_options_currentpassword_help' => 'Bitte geben Sie hier Ihr bisheriges Kennwort ein',
|
||||||
'lang_options_newpassword1' => 'Neues Kennwort',
|
'lang_options_newpassword1' => 'Neues Kennwort',
|
||||||
|
|
Loading…
Reference in New Issue