📄 install
字号:
INSTALL file for MyLibrary.pm version 2.60 (January 17, 2003)TODO:- discussion about localhost vs socket connects in PostgreSQL (usesocket connects if possible)- should I add grant all to mylibrary? (depends on PostgreSQL versionsomewhat...)0.0 Instructions for the Impatient (or Power User)If you are upgrading from version 2.2.6, then: 0.10) mysqldump -uroot -p mylibrary > mylibrary-backup.sql 0.11) mysql -uroot -p mylibrary < upgrade-to-2.50.sql 0.12) perl Makefile.PL 0.13) make 0.14) make test 0.15) make install 0.16) perldoc MyLibraryIf you are upgrading from version 2.50, then: 0.10) mysqldump -uroot -p mylibrary > mylibrary-backup.sql 0.11) mysql -uroot -p mylibrary < upgrade-to-2.51.sql 0.12) perl Makefile.PL 0.13) make 0.14) make test 0.15) make install 0.16) perldoc MyLibraryIf you are upgrading from version 2.51, then: 0.10) mysqldump -uroot -p mylibrary > mylibrary-backup.sql 0.11) mysql -uroot -p mylibrary < upgrade-to-2.60.sql 0.12) perl Makefile.PL 0.13) make 0.14) make test 0.15) make install 0.16) perldoc MyLibraryIf you are new to MyLibrary or you don't care about overwriting yourprevious MyLibrary database AND you want to use MySQL as the underlyingdatabase, then: 0.20) mysqladmin -uroot -p drop mylibrary 0.21) mysqladmin -uroot -p create mylibrary 0.22) mysql -uroot -p mylibrary < sample-data.sql 0.23) vi new-user.sql 0.24) mysql -uroot -p mysql < new-user.sql 0.25) perl Makefile.PL 0.26) make 0.27) make test 0.28) make install 0.29) perldoc MyLibraryIf you are upgrading from a MySQL-based version of MyLibrary, then makesure you are the PostgreSQL admin user and: 0.30) mysqldump -uroot -p mylibrary > mylibrary-backup.sql 0.31) my2pg.pl < mylibrary-backup.sql | sed 's/\(DEFAULT.*\)NOT NULL/\1/' > mylibrary.pgsql 0.31) createuser mylibrary (answer n and n to questions) 0.33) createdb mylibrary 0.34) psql --username=mylibrary mylibrary < mylibrary.pgsql 0.35) psql --username=mylibrary mylibrary < convert_sequence.pgsql 0.36) perl Makefile.PL 0.37) make 0.38) make test 0.39) make install 0.40) perldoc MyLibraryIf you are new to MyLibrary or you don't care about overwriting yourprevious MyLibrary database AND you want to use PostgreSQL as yourunderlying database, then: 0.41) dropdb mylibrary 0.42) createuser mylibrary 0.43) createdb mylibrary 0.44) psql --user=mylibrary mylibrary < sample-data.pgsql 0.45) perl Makefile.PL 0.46) make 0.47) make test 0.48) make install 0.49) perldoc MyLibraryIf none of these make sense, then read on.1.0 IntroductionThis file describes how to install a Perl module called MyLibrary.pm version 2.60, as well as how to upgrade previous databases that ranagainst the Perl scripts called MyLibrary. This file describeshow to install the Perl libraries, not the scripts. Once the librariesare installed you have to acquire and install the Perl scripts thatprovide input/output services against the underlying database.For more information about the MyLibrary system, visit thefollowing URL: http://dewey.library.nd.edu/mylibrary/ In a nutshell, the steps to installation are: * Install the system's infrastructure o Obtain a host o Install Perl o Install a number of Perl modules o Install and configure MySQL or PostgreSQL * Install MyLibrary o Decide on migration path o Import sample data o Verify data integrity o Install the MyLibrary Perl modules * Test2.0 UpgradingIf you have previously installed a version of MyLibrary, thenyou can proceed directly to section 8.0. "Yes, you do pass GO, and youdo collect $200."3.0 Obtain a hostThe physical requirements of your host computer are moderate (if youhave very small or slow host, consider using MySQL). The sourcecode itself, combined with data enough for 400 users, presently requiresless than five (5) MB of disk space. Tiny. Perl requires about fifteen(15) MB of disk space, and PostgreSQL requires at least eighty (80) MBof space for sample database. Therefore half a gigabyte of availabledisk space should be more than enough for supporting MyLibrary. However,keep in mind that you migth have to run 'VACUUM' on a PostgreSQL databaseoccasionally if you want to keep it ticking. Exact procedure andfrequency of vacuuming is explained in PostgreSQL administration manual.RAM is a more important question, but at the same time, most computerscome with at least sixty-four (64) MB of RAM, and this should be plenty,especially if the computer is only hosting MyLibrary services. Get 512MB of RAM if you can.The flavor of operating system run by your host is presently a wildcard. MyLibrary was originally developed under Solaris 2.0. It has beeninstalled on an Intel-based computer with RedHat 6.0. Development ofPostgreSQL extension was done on Intel-Based Debian GNU/Linux. It shouldwork under any Unix operating system, but this has yet to be proven. Irun and develop MyLibrary on a Macintosh PowerBook G4 running Mac OS X.The limitations in using other operating systems do not lie in theMyLibrary code per se, but in its supporting infrastructure (ie. Perland RDBMS).Assuming you can meet the hardware requirements above, continue to thenext step.4.0 Install PerlMyLibrary is implemented as a common gateway interface (CGI) scriptwritten in Perl. The development version works under version 5.005_2. Ifyou have already installed Perl, issue the command perl -V to see whatversion you have. If you do not have version 5.005_2 or later, thenvisit CPAN at the following URL, download a newer version of Perl, andinstall it according to it's instructions: http://www.perl.com/CPAN 5.0 Install a number of Perl modulesMyLibrary requires quite a number of Perl modules in order to run. Theyare listed below and available from the URL above. Note that some ofthese modules require the installation of other modules. Don't worry,installing this is not difficult, just tedious.When Perl was installed so was a handy program called cpan. It allowsyou to quickly and easily download, configure, test, and install Perlmodules. To use cpan, enter 'cpan' at the Unix command line prompt, andyou will get the cpan prompt. You can then install the modules below byentering command such as 'install DBI'. If you have a choice, alwayschoose the latest version of a module since they are almost alwaysbackward compatible with older versions. Install the modules below andin the suggested order to make your life easier: * Digest - provides an encoding algorithm * DBI - Database independent interface for Perl * CGI - Simple Common Gateway Interface Class * MIME-Base64 - required by URI * Mail::Send - used to send email without using sendmail * URI - Universal Resource Identifiers * Time-modules - Time calculations * IO-stringy - required for MIME-tools * libnet - required by Mailtools and LWP * MailTools - required for MIME-tools * MIME-tools - MIME support * HTML-Parser - required by LWP * libwww-perl (LWP) - Library for WWW access in Perl * Data-ShowTable - required by Msql-Mysql-modules * PodParser - required by Msql-Mysql-modules 6.1 If you want to use MySQL, then install and configure MySQLThis is the most difficult aspect of the entire MyLibrary installationprocess. Breath deeply.MyLibrary is essentially a database application with a Web front-end.Presently, MySQL is the only database application supported by thesystem, but the system has been written in such a way that otherSQL-based database applications could be used as back-ends. For now, youwill have to install MySQL. Extensive installation instructions,documentation, support files, and the MySQL distribution are availablefrom the URL below or one of it's mirrors: http://www.mysql.com/ First, download a version of MySQL (pre-compiled binary or source).Compile and/or install it accordingly. I have had success with both thepre-compiled version as well as the source code version. I recommend thesource code version because it provides more customization. Whencompiling the source code version, just go with the default settings."Tastes great and less filling."Become familiar with MySQL's documentation. Print it out.Now that the MySQL binaries are installed, you need to configure themfor access. The utilities needed to complete this process have beensaved in your MySQL installation directory (ie. /usr/local/bin or/usr/local/mysql/bin/, etc.), and these directories might not be in yourpath. You might have to issue the rehash command to get your shell tofind the utilities and/or update your PATH environment variable.The MySQL configuration process begins by initializing the grant tablesfor the user named root with the following command: mysql_install_db Start the database daemon with this command: safe_mysqld & Change root's password with the command below where new_password isroot's... new password: mysqladmin -u root password new_password Create an empty mylibrary database with this command: mysqladmin -uroot -p create mylibrary 6.2 If you want to use PostgreSQL then, install and configure PostgreSQLThis is the most difficult aspect of the entire MyLibrary installationprocess. Breath deeply.MyLibrary is essentially a database application with a Web front-end.Presently, PostgreSQL is not the only database application supported bythe system. The system has been written in such a way that otherSQL-based database applications could be used as back-ends. You willhave to install PostgreSQL (the alternative is MySQL, but you know whyyou want PostgreSQL, don't you?). Extensive installation instructions,documentation, support files, and the PostgreSQL distribution are
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -