Changeset 13210
- Timestamp:
- May 3, 2007, 2:48:17 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
Nebulous-Server/docs/setup.txt (modified) (4 diffs)
-
Nebulous/docs/setup.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/docs/setup.txt
r12972 r13210 21 21 As root: 22 22 23 mkdir /po01/nebulous 24 mkdir /po02/nebulous 25 mkdir /po03/nebulous 26 mkdir /po04/nebulous 27 perl -e 'for (1..24) { $i = sprintf "po%02d", $_ ; mkdir "/$i/nebulous" }' 28 chown nobody:nebulous /po??/nebulous 29 chmod 0770 /po??/nebulous 30 ls -lad /po??/nebulous 23 mkdir /data/ipp000.0/nebulous 24 mkdir /data/ipp000.1/nebulous 25 mkdir /data/ipp002.0/nebulous 26 mkdir /data/ipp003.0/nebulous 27 28 # note that this is just an example, this won't work over NFS with 29 # root_squash enablded 30 chown nobody:nebulous /data/ipp00?.?/nebulous 31 32 chmod 0770 /data/ipp00?.?/nebulous 33 ls -lad /data/ipp00?.?/nebulous 31 34 32 35 =head2 Build and install the Nebulous Perl modules (see: README) 33 36 34 =head2 Create and initialize the database (see: docs/database_setup.txt) 37 =head2 Create and initialize the database 38 39 mysql -u root mysql -p 40 (enter your MySQL root password) 41 42 DROP DATABASE IF EXISTS nebulous; 43 CREATE DATABASE nebulous; 44 GRANT ALL PRIVILEGES ON nebulous.* TO 'nebulous'@'localhost' 45 IDENTIFIED BY '@neb@'; 46 FLUSH PRIVILEGES; 47 exit 48 49 export NEB_DB=nebulous 50 export NEB_USER=nebulous 51 export NEB_PASS=@neb@ 52 53 neb-initdb 54 neb-addvol --name ipp000.0 --uri file:///data/ipp000.0/nebulous 55 neb-addvol --name ipp000.1 --uri file:///data/ipp000.1/nebulous 56 neb-addvol --name ipp002.0 --uri file:///data/ipp002.0/nebulous 57 neb-addvol --name ipp003.0 --uri file:///data/ipp003.0/nebulous 58 59 # perl -e 'for (1..24) { $i = sprintf "po%02d", $_ ; system "neb-addvol --name $i --uri file:/$i/nebulous" }' 60 . 61 . 62 63 If you get an error similar to this while initializing the database it means 64 that the creation of the Nebulous's stored procedures failed: 65 66 ERROR 1146 (42S02): Table 'mysql.proc' doesn't exist 67 68 It probably means that your instance of MySQL has been upgraded for an older 69 version that did not support stored precedures. You can fix this by running 70 the C<mysql_fix_privilege_tables> script that you should have received with 71 MySQL. 72 73 In order for the test suite to pass the "test" account needs have the 74 appropriate permissions to create and modify stored procedures. 75 76 update user set Create_routine_priv = 'Y', Alter_routine_priv = 'Y', Execute_priv = 'Y' where user = 'test'; 77 update db set Create_routine_priv = 'Y', Alter_routine_priv = 'Y', Execute_priv = 'Y' where db = 'test'; 78 79 flush privileges; 80 81 Please see this webpage for further details: 82 83 http://dev.mysql.com/doc/refman/5.0/en/stored-procedure-privileges.html 84 85 86 =head2 Setup nebdiskd daemon 87 88 Create the .netdiskrc file in the home directory of the user that nebdiskd 89 will run as. This does not need to be/should not be the root user. Merely a 90 user with permissions to see all of the approparite volumes. 91 92 Example F<.netdiskrc>: 93 94 db: nebulous 95 dbpass: '@neb@' 96 dbuser: nebulous 97 mounts: 98 - /data/ipp000.0 99 - /data/ipp000.1 100 - /data/ipp002.0 101 - /data/ipp003.0 102 pidfile: /var/tmp/nebdiskd 103 poll_interval: 5 104 105 Start the daemon by running the command C<nebdiskd>. Use this command to 106 verify that the daemon is working correclty. 107 108 neb-volstat 109 110 nebdiskd should always been running when nebulous is use. This command is an 111 example of how to startup the daemon running as another user. This could be 112 use to start the daemon from the root account while the system init scripts 113 are running. 114 115 sudo -H -u jhoblitt nebdiskd 116 117 See the nebdiskd POD/man page for further details 35 118 36 119 =head2 Install Apache2 with mod_perl … … 155 238 echo "PerlPostConfigRequire /etc/apache2/conf/startup.pl" >> /etc/apache2/conf/apache2.conf 156 239 157 =head4 initilizing the Nebulous server database158 159 mysql -u root mysql -p160 (enter your MySQL root password)161 162 DROP DATABASE IF EXISTS nebulous;163 CREATE DATABASE nebulous;164 GRANT ALL PRIVILEGES ON *.* TO 'nebulous'@'localhost'165 IDENTIFIED BY '@neb@';166 FLUSH PRIVILEGES;167 exit168 169 export NEB_DB=nebulous170 export NEB_USER=nebulous171 export NEB_PASS=@neb@172 173 neb-initdb174 neb-addvol --name po01 --uri file:/po01/nebulous175 neb-addvol --name po02 --uri file:/po02/nebulous176 neb-addvol --name po03 --uri file:/po03/nebulous177 neb-addvol --name po04 --uri file:/po04/nebulous178 179 perl -e 'for (1..24) { $i = sprintf "po%02d", $_ ; system "neb-addvol --name $i --uri file:/$i/nebulous" }'180 .181 .182 240 183 241 =head3 configurating Apache to act as a Nebulous/SOAP server … … 185 243 =item * add the "nebulous" group to /etc/group 186 244 =item * configure Apache to run as the nebulous group. 245 246 Group nebulous 247 248 Note that in theory the C<perchild> MPM can run vhosts as differenet 249 users/groups but this module is currently non-funcitonal. 250 251 L<http://httpd.apache.org/docs/trunk/mod/perchild.html> 252 253 =item * configure a path for Neublous 187 254 188 255 Make sure mod_perl is being loaded into Apache. In order to do this on … … 202 269 Syntax OK 203 270 271 =item * initialize Nebulous database connections from C<startup.pl> 272 273 my $dsn = 'DBI:mysql:database=nebulous:host=localhost'; 274 my $dbuser = 'nebulous'; 275 my $dbpasswd = '@neb@'; 276 277 Apache::DBI->connect_on_init( $dsn, $dbuser, $dbpasswd ); 278 Nebulous::Server::SOAP->new_on_init( 279 dsn => $dsn, 280 dbuser => $dbuser, 281 dbpasswd => $dbpasswd, 282 log_level => 'all', 283 ); 284 204 285 # out of date from here down... 205 286 -
trunk/Nebulous/docs/setup.txt
r12972 r13210 21 21 As root: 22 22 23 mkdir /po01/nebulous 24 mkdir /po02/nebulous 25 mkdir /po03/nebulous 26 mkdir /po04/nebulous 27 perl -e 'for (1..24) { $i = sprintf "po%02d", $_ ; mkdir "/$i/nebulous" }' 28 chown nobody:nebulous /po??/nebulous 29 chmod 0770 /po??/nebulous 30 ls -lad /po??/nebulous 23 mkdir /data/ipp000.0/nebulous 24 mkdir /data/ipp000.1/nebulous 25 mkdir /data/ipp002.0/nebulous 26 mkdir /data/ipp003.0/nebulous 27 28 # note that this is just an example, this won't work over NFS with 29 # root_squash enablded 30 chown nobody:nebulous /data/ipp00?.?/nebulous 31 32 chmod 0770 /data/ipp00?.?/nebulous 33 ls -lad /data/ipp00?.?/nebulous 31 34 32 35 =head2 Build and install the Nebulous Perl modules (see: README) 33 36 34 =head2 Create and initialize the database (see: docs/database_setup.txt) 37 =head2 Create and initialize the database 38 39 mysql -u root mysql -p 40 (enter your MySQL root password) 41 42 DROP DATABASE IF EXISTS nebulous; 43 CREATE DATABASE nebulous; 44 GRANT ALL PRIVILEGES ON nebulous.* TO 'nebulous'@'localhost' 45 IDENTIFIED BY '@neb@'; 46 FLUSH PRIVILEGES; 47 exit 48 49 export NEB_DB=nebulous 50 export NEB_USER=nebulous 51 export NEB_PASS=@neb@ 52 53 neb-initdb 54 neb-addvol --name ipp000.0 --uri file:///data/ipp000.0/nebulous 55 neb-addvol --name ipp000.1 --uri file:///data/ipp000.1/nebulous 56 neb-addvol --name ipp002.0 --uri file:///data/ipp002.0/nebulous 57 neb-addvol --name ipp003.0 --uri file:///data/ipp003.0/nebulous 58 59 # perl -e 'for (1..24) { $i = sprintf "po%02d", $_ ; system "neb-addvol --name $i --uri file:/$i/nebulous" }' 60 . 61 . 62 63 If you get an error similar to this while initializing the database it means 64 that the creation of the Nebulous's stored procedures failed: 65 66 ERROR 1146 (42S02): Table 'mysql.proc' doesn't exist 67 68 It probably means that your instance of MySQL has been upgraded for an older 69 version that did not support stored precedures. You can fix this by running 70 the C<mysql_fix_privilege_tables> script that you should have received with 71 MySQL. 72 73 In order for the test suite to pass the "test" account needs have the 74 appropriate permissions to create and modify stored procedures. 75 76 update user set Create_routine_priv = 'Y', Alter_routine_priv = 'Y', Execute_priv = 'Y' where user = 'test'; 77 update db set Create_routine_priv = 'Y', Alter_routine_priv = 'Y', Execute_priv = 'Y' where db = 'test'; 78 79 flush privileges; 80 81 Please see this webpage for further details: 82 83 http://dev.mysql.com/doc/refman/5.0/en/stored-procedure-privileges.html 84 85 86 =head2 Setup nebdiskd daemon 87 88 Create the .netdiskrc file in the home directory of the user that nebdiskd 89 will run as. This does not need to be/should not be the root user. Merely a 90 user with permissions to see all of the approparite volumes. 91 92 Example F<.netdiskrc>: 93 94 db: nebulous 95 dbpass: '@neb@' 96 dbuser: nebulous 97 mounts: 98 - /data/ipp000.0 99 - /data/ipp000.1 100 - /data/ipp002.0 101 - /data/ipp003.0 102 pidfile: /var/tmp/nebdiskd 103 poll_interval: 5 104 105 Start the daemon by running the command C<nebdiskd>. Use this command to 106 verify that the daemon is working correclty. 107 108 neb-volstat 109 110 nebdiskd should always been running when nebulous is use. This command is an 111 example of how to startup the daemon running as another user. This could be 112 use to start the daemon from the root account while the system init scripts 113 are running. 114 115 sudo -H -u jhoblitt nebdiskd 116 117 See the nebdiskd POD/man page for further details 35 118 36 119 =head2 Install Apache2 with mod_perl … … 155 238 echo "PerlPostConfigRequire /etc/apache2/conf/startup.pl" >> /etc/apache2/conf/apache2.conf 156 239 157 =head4 initilizing the Nebulous server database158 159 mysql -u root mysql -p160 (enter your MySQL root password)161 162 DROP DATABASE IF EXISTS nebulous;163 CREATE DATABASE nebulous;164 GRANT ALL PRIVILEGES ON *.* TO 'nebulous'@'localhost'165 IDENTIFIED BY '@neb@';166 FLUSH PRIVILEGES;167 exit168 169 export NEB_DB=nebulous170 export NEB_USER=nebulous171 export NEB_PASS=@neb@172 173 neb-initdb174 neb-addvol --name po01 --uri file:/po01/nebulous175 neb-addvol --name po02 --uri file:/po02/nebulous176 neb-addvol --name po03 --uri file:/po03/nebulous177 neb-addvol --name po04 --uri file:/po04/nebulous178 179 perl -e 'for (1..24) { $i = sprintf "po%02d", $_ ; system "neb-addvol --name $i --uri file:/$i/nebulous" }'180 .181 .182 240 183 241 =head3 configurating Apache to act as a Nebulous/SOAP server … … 185 243 =item * add the "nebulous" group to /etc/group 186 244 =item * configure Apache to run as the nebulous group. 245 246 Group nebulous 247 248 Note that in theory the C<perchild> MPM can run vhosts as differenet 249 users/groups but this module is currently non-funcitonal. 250 251 L<http://httpd.apache.org/docs/trunk/mod/perchild.html> 252 253 =item * configure a path for Neublous 187 254 188 255 Make sure mod_perl is being loaded into Apache. In order to do this on … … 202 269 Syntax OK 203 270 271 =item * initialize Nebulous database connections from C<startup.pl> 272 273 my $dsn = 'DBI:mysql:database=nebulous:host=localhost'; 274 my $dbuser = 'nebulous'; 275 my $dbpasswd = '@neb@'; 276 277 Apache::DBI->connect_on_init( $dsn, $dbuser, $dbpasswd ); 278 Nebulous::Server::SOAP->new_on_init( 279 dsn => $dsn, 280 dbuser => $dbuser, 281 dbpasswd => $dbpasswd, 282 log_level => 'all', 283 ); 284 204 285 # out of date from here down... 205 286
Note:
See TracChangeset
for help on using the changeset viewer.
