IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13210


Ignore:
Timestamp:
May 3, 2007, 2:48:17 PM (19 years ago)
Author:
jhoblitt
Message:

update

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/docs/setup.txt

    r12972 r13210  
    2121As root:
    2222
    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
    3134
    3235=head2 Build and install the Nebulous Perl modules (see: README)
    3336
    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
     63If you get an error similar to this while initializing the database it means
     64that the creation of the Nebulous's stored procedures failed:
     65
     66    ERROR 1146 (42S02): Table 'mysql.proc' doesn't exist
     67
     68It probably means that your instance of MySQL has been upgraded for an older
     69version that did not support stored precedures.  You can fix this by running
     70the C<mysql_fix_privilege_tables> script that you should have received with
     71MySQL.
     72
     73In order for the test suite to pass the "test" account needs have the
     74appropriate 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
     81Please see this webpage for further details:
     82
     83http://dev.mysql.com/doc/refman/5.0/en/stored-procedure-privileges.html
     84
     85
     86=head2 Setup nebdiskd daemon
     87
     88Create the .netdiskrc file in the home directory of the user that nebdiskd
     89will run as.  This does not need to be/should not be the root user.  Merely a
     90user with permissions to see all of the approparite volumes.
     91
     92Example 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
     105Start the daemon by running the command C<nebdiskd>.  Use this command to
     106verify that the daemon is working correclty.
     107
     108    neb-volstat
     109
     110nebdiskd should always been running when nebulous is use.  This command is an
     111example of how to startup the daemon running as another user.  This could be
     112use to start the daemon from the root account while the system init scripts
     113are running.
     114
     115    sudo -H -u jhoblitt nebdiskd
     116
     117See the nebdiskd POD/man page for further details
    35118
    36119=head2 Install Apache2 with mod_perl
     
    155238    echo "PerlPostConfigRequire /etc/apache2/conf/startup.pl" >> /etc/apache2/conf/apache2.conf
    156239
    157 =head4 initilizing the Nebulous server database
    158 
    159     mysql -u root mysql -p
    160     (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     exit
    168 
    169     export NEB_DB=nebulous
    170     export NEB_USER=nebulous
    171     export NEB_PASS=@neb@
    172 
    173     neb-initdb
    174     neb-addvol --name po01 --uri file:/po01/nebulous
    175     neb-addvol --name po02 --uri file:/po02/nebulous
    176     neb-addvol --name po03 --uri file:/po03/nebulous
    177     neb-addvol --name po04 --uri file:/po04/nebulous
    178 
    179     perl -e 'for (1..24) { $i = sprintf "po%02d", $_ ; system "neb-addvol --name $i --uri file:/$i/nebulous" }'
    180     .
    181     .
    182240
    183241=head3 configurating Apache to act as a Nebulous/SOAP server
     
    185243=item * add the "nebulous" group to /etc/group
    186244=item * configure Apache to run as the nebulous group.
     245
     246    Group nebulous
     247
     248Note that in theory the C<perchild> MPM can run vhosts as differenet
     249users/groups but this module is currently non-funcitonal.
     250
     251L<http://httpd.apache.org/docs/trunk/mod/perchild.html>
     252
     253=item * configure a path for Neublous
    187254
    188255Make sure mod_perl is being loaded into Apache.  In order to do this on
     
    202269    Syntax OK
    203270
     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
    204285# out of date from here down...
    205286
  • trunk/Nebulous/docs/setup.txt

    r12972 r13210  
    2121As root:
    2222
    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
    3134
    3235=head2 Build and install the Nebulous Perl modules (see: README)
    3336
    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
     63If you get an error similar to this while initializing the database it means
     64that the creation of the Nebulous's stored procedures failed:
     65
     66    ERROR 1146 (42S02): Table 'mysql.proc' doesn't exist
     67
     68It probably means that your instance of MySQL has been upgraded for an older
     69version that did not support stored precedures.  You can fix this by running
     70the C<mysql_fix_privilege_tables> script that you should have received with
     71MySQL.
     72
     73In order for the test suite to pass the "test" account needs have the
     74appropriate 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
     81Please see this webpage for further details:
     82
     83http://dev.mysql.com/doc/refman/5.0/en/stored-procedure-privileges.html
     84
     85
     86=head2 Setup nebdiskd daemon
     87
     88Create the .netdiskrc file in the home directory of the user that nebdiskd
     89will run as.  This does not need to be/should not be the root user.  Merely a
     90user with permissions to see all of the approparite volumes.
     91
     92Example 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
     105Start the daemon by running the command C<nebdiskd>.  Use this command to
     106verify that the daemon is working correclty.
     107
     108    neb-volstat
     109
     110nebdiskd should always been running when nebulous is use.  This command is an
     111example of how to startup the daemon running as another user.  This could be
     112use to start the daemon from the root account while the system init scripts
     113are running.
     114
     115    sudo -H -u jhoblitt nebdiskd
     116
     117See the nebdiskd POD/man page for further details
    35118
    36119=head2 Install Apache2 with mod_perl
     
    155238    echo "PerlPostConfigRequire /etc/apache2/conf/startup.pl" >> /etc/apache2/conf/apache2.conf
    156239
    157 =head4 initilizing the Nebulous server database
    158 
    159     mysql -u root mysql -p
    160     (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     exit
    168 
    169     export NEB_DB=nebulous
    170     export NEB_USER=nebulous
    171     export NEB_PASS=@neb@
    172 
    173     neb-initdb
    174     neb-addvol --name po01 --uri file:/po01/nebulous
    175     neb-addvol --name po02 --uri file:/po02/nebulous
    176     neb-addvol --name po03 --uri file:/po03/nebulous
    177     neb-addvol --name po04 --uri file:/po04/nebulous
    178 
    179     perl -e 'for (1..24) { $i = sprintf "po%02d", $_ ; system "neb-addvol --name $i --uri file:/$i/nebulous" }'
    180     .
    181     .
    182240
    183241=head3 configurating Apache to act as a Nebulous/SOAP server
     
    185243=item * add the "nebulous" group to /etc/group
    186244=item * configure Apache to run as the nebulous group.
     245
     246    Group nebulous
     247
     248Note that in theory the C<perchild> MPM can run vhosts as differenet
     249users/groups but this module is currently non-funcitonal.
     250
     251L<http://httpd.apache.org/docs/trunk/mod/perchild.html>
     252
     253=item * configure a path for Neublous
    187254
    188255Make sure mod_perl is being loaded into Apache.  In order to do this on
     
    202269    Syntax OK
    203270
     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
    204285# out of date from here down...
    205286
Note: See TracChangeset for help on using the changeset viewer.