⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install

📁 我的图书馆或资料库
💻
📖 第 1 页 / 共 2 页
字号:
available from the URL below or one of it's mirrors:  http://www.postgresql.org/Create a user and empty mylibrary database with this commands:  createuser mylibrary  createdb mylibrary7.0  Download and uncompress the MyLibrary modulesPresumably you have already done this. If you haven't, then the sourcecode is available at following URL:  http://dewey.library.nd.edu/mylibrary/download/Download the distribution named MyLibrary-module-2.60.tar.gz. Gunzip it.De-tar it.8.0  Decide on migration pathAt this point all the necessary infrastructure for the system should bein place. As a review, you have installed Perl and all of its necessarymodules. You have installed MySQL, given the root account a password,and created a database named mylibrary. If you have not completed thesesteps then you must go back to section 4.0. Sorry.If this is the first time you have installed MyLibrary, thenproceed to section 10.0. Otherwise, continue reading.If you are upgrading from version 2.50 to version 2.51, then a few morerecords in the help_simple table must be added to your database. Go tosection 9.1 to learn how to do this. Otherwise, continue reading.If you are upgrading from version 2.51 to version 2.60, then a few ofyour simple help texts must be updated. Go to section 9.2 to learn howto do this. Otherwise, continue reading.If you made it here, then you must now decide whether or not tooverwrite your existing MyLibrary data or simply install new sampledata. I suggest the later. Features of version 2.50 required changingthe underlying database structure of the system. Consequently existingdatabases must be converted to the new structure. This can be donethrough the use of a conversion script supplied with this distribution,but frankly, this is very scary. I suggest you start with a clean slateby importing new sample data, if you can.If you are unwilling to overwrite your existing data, then proceed tosection 9.0. Otherwise, continue reading.Overwriting your existing database is easy. All you have to do is backupyour existing data, delete the database, and recreate it. If you areusing MySQL, then:  mysqldump -uroot -p mylibrary > mylibrary-backup.sql  mysqladmin -uroot -p drop mylibrary  mysqladmin -uroot -p create mylibraryIf you are using PostgreSQL, then:  pg_dump mylibrary > mylibrary-backup.sql  dropdb mylibrary  createdb mylibraryThat's it. Go to section 10.0.9.0  Convert existing databaseThe first step in converting your older MyLibrary database to the newstructure is to back up your original data:  mysqldump -uroot -p mylibrary > mylibrary-backup.sql  Next, feed the mysql client a set of SQL statements namedupgrade-to-2.50.sql. It converts and adds new data to your existingdatabase. If you try to run this script more than once, against the sameset of data, then it will return a number of errors. Theupgrade-to-2.50.sql script should output a number of brief statementsdescribing what it's doing and what it has done. Remember, only run thisscript against your database one time:  mysql -uroot -p -s mylibrary < upgrade-to-2.50.sql  Whew! Hopefully everything went well and if worse comes to worse youhave a back up of your original data. Right? Go to section 11.0.9.1  Upgrading from version 2.50 to version 2.51The structure of the MyLibrary database has not changed from version2.50 to version 2.51, but the new version requires three additionalrecords in the help_simple table. To add these records to your existingdatabase you must first back up your exisiting data. Did I say that loudenough? BACK UP YOUR DATA:  mysqldump -uroot -p mylibrary > mylibrary-backup.sqlNext, you add the new records like this, but do not run the script morethan once:  mysql -uroot -p -s mylibrary < upgrade-to-2.51.sqlDiagnostic messages should be echoed to STDOUT, and you're all done. Goto section 11.0.9.2  Upgrading from version 2.51 to version 2.60The structure of the MyLibrary database has not changed from version2.51 to version 2.60, but the new version requires a few of your simplehelp text fields to be updated. To update these records to your existingdatabase you must first back up your exisiting data. Did I say that loudenough? BACK UP YOUR DATA:  mysqldump -uroot -p mylibrary > mylibrary-backup.sqlNext, you add the new records like this, but do not run the script morethan once:  mysql -uroot -p -s mylibrary < upgrade-to-2.60.sqlDiagnostic messages should be echoed to STDOUT, and you're all done. Goto section 11.0.10.0  Import sample dataIf you are using MySQL, the using the mysql terminal client (mysql),grant access to a user named mylibrary to the mylibrary database wheresecret_password is the mylibrary user's password:  mysql -uroot -p mysql  mysql> GRANT SELECT, INSERT, UPDATE, DELETE         ON mylibrary.*         TO mylibrary@localhost         IDENTIFIED BY 'secret_password';Quit the terminal client with the \q command and run the terminal clientagain filling the mylibrary database with sample data found in thedistribution's directory:  mysql -uroot -p mylibrary < sample-data.sql  If you are using PostgreSQL, then run the terminal client (psql) to fillthe mylibrary database with sample data found in the distribution'sdirectory:  psql mylibrary < sample-data.pgsql11.0  Verify data integrityYou are now ready to do some testing with the data in your database.Using the mysql terminal client, connect to the mylibrary database asthe mylibrary user:  mysql -umylibrary -p mylibrary  If you are using PostgreSQL, then using the psql terminal client,connect to the mylibrary database as the mylibrary user:  psql --user=mylibrary mylibraryFrom there you should be able to issue SQL commands like the followingand get comprehensible output:  * SELECT * from librarians;  * SELECT name, email_address FROM librarians ORDER BY name;  * EXPLAIN disciplines;  * SELECT discipline_name FROM disciplines;  * EXPLAIN items4librarians;  * SELECT name, discipline_name    FROM librarians, items4librarians, disciplines    WHERE librarians.librarian_id = items4librarians.librarian_id    AND items4librarians.discipline_id = disciplines.discipline_id    ORDER BY discipline_name;  If you get understandable output from the SQL commands above, then itworked. (Whew!) Congratulations. Take another deep breath. Pat yourselfon the back and realize that it is all downhill from here. Really! Ifyou did not get comprehensible output, then something is missing fromthese instructions or your installation. Call Eric. "You do have a backup of your data. Right?"If you are using MySQL, then last part of installing/configuring MySQLis installing a last set of Perl modules, Msql-Mysql-modules. Thesemodules were most likely included in the MySQL distribution, but a morecurrent version is also be available via CPAN. Install it. When it asksyou for a database to test, the name of a user, and the user's password,use the database named test, root as the name of the user, and the valueyou supplied for new_password above for the password.If you are using PostgreSQL, then the last part ofinstalling/configuring PostgreSQL is installing a last set of Perlmodules, DBD::Pg module. If you installed PostgreSQL developmentcorrectly, you can use cpan to fetch DBD::Pg module.Qevax n srj orref, and take a nap.12.0  Install the MyLibrary Perl modulesFinally, it is now time to install the MyLibrary Perl modules. This iseasy. At the command line and in the same directory where you unpackedthe distribution, type:  perl Makefile.PL  This will execute Makefile.PL, make sure you have all the necessary Perlmodules installed, ask you a few questions, and create a number of newfiles. The questions you need to know the answer to are the sort ofanswers you needed to know from Section 10.0:  * What is the name of the host where your database resides?  * What is the name of your MyLibrary database?  * What is the username used to access the database?  * What is the the username's password?  * What is the full path to your key file?The last question is a new one in version 2.51. MyLibrary version 2.51now encodes a user's ID and sends the ID as well as the encoded ID tothe user as a cookie. (In the past just the ID was sent.) The content ofthe key file is used to encode the ID, and various MyLibrary scripts(mylibrary.pl, mylibrary-admin.pl, and generate-key.pl) need to knowwhere the key file is located. The last question, above, addresses thisissue. Do a perldoc on generate-key.pl for more complete details.The next step is to run make with this command:  make  This will create even more files. Before completing the installation,test it with this command:  make test  The next to last step is to do the actual install:  make install  13.0  The final wordCongratulations, you have successfully installed Perl, your RDBMS, andthe MyLibrary Perl modules. You should now be able to read the POD(Plain O' Documentation) with the following command to learn more aboutthe modules themselves, how to acquire the MyLibrary scripts, and learnabout the structure of the configuration file necessary for running theMyLibrary scripts. Try:  perldoc MyLibrary  Software is never complete. There are always new techiques to use, bugsto fix, and features to implement. MyLibrary and all of its friends areno exception. If you have any question, then don't hesitate to drop me aline or better yet, participate in the mailing list,mylib-dev@listserv.nd.edu.'See you on the 'Net.-- Eric Lease Morgan <emorgan@nd.edu>University Libraries of Notre DameJanuary 17, 2003

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -