INSTALL.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. eAthena SQL Installation and Upgrade Instructions
  2. 1 Installation
  3. 1.1 Windows
  4. 1.2 Linux
  5. 1.3 FreeBSD
  6. 2 Upgrading
  7. 2.1 Upgrading from version 817
  8. 2.2 Upgrading from version 0.5.2
  9. 2.3 Upgrading from version 1.0 RC 1
  10. 3 Mail System
  11. 3.1 Adding the mail database
  12. 3.2 Activating the mail system
  13. 1 Installation
  14. ==============
  15. 1.1 Windows
  16. -----------
  17. 1. It is not the aim of this document to explain the installation, concepts or usage of MySQL. If you are unfamiliar with MySQL, familiarise yourself with it and read at least these sections of the MySQL reference manual (http://dev.mysql.com/doc/mysql/en/index.html):
  18. - 2.2.1 Installing MySQL on Windows
  19. - 2.4 Post-Installation Setup and Testing
  20. - 5.4 General Security Issues
  21. - 5.5 The MySQL Access Privilege System
  22. - 5.6 MySQL User Account Management
  23. 2. If fast and secure access to a MySQL server is unavailable, install, start and configure MySQL database server version 4.0.x. If you are using a version of Windows which is a member of the NT family, we recommend that you install MySQL as a service.
  24. 3. Create a new database and a new user account with only SELECT, INSERT, UPDATE and DELETE privileges on the database. For example:
  25. CREATE DATABASE ragnarok;
  26. GRANT
  27. SELECT,INSERT,UPDATE,DELETE
  28. ON `ragnarok`.* # database
  29. TO 'ragnarok'@'localhost' # username@address
  30. IDENTIFIED BY 'password'; # password
  31. For security, do not use the password "password" for your user account.
  32. 4. Execute the batch queries stored in sql\main.sql. If you want your item and monster databases stored in your MySQL database, execute sql\database.sql too. For example:
  33. mysql -D ragnarok -h localhost -u root -p < sql/main.sql | more && mysql -D ragnarok -h localhost -u root -p < sql/database.sql | more
  34. 5. Add an inter-server account for every character server you intend to link to your login server. For example:
  35. USE ragnarok
  36. INSERT INTO `login`
  37. (`userid`,`user_pass`,`sex`,`email`)
  38. VALUES ('inter-server_chaos','password','S','');
  39. Every character server linked to your login server requires its own inter-server account; inter-server accounts are used by the servers to communicate with each other. The differences between user and inter-server accounts are:
  40. - The "sex" field value must equal "S"
  41. - The "e-mail" field value is unused and therefore should be set to ""
  42. - The "level", "error_message", "connect_until", "memo", "ban_until" and "state" field values are unsued and therefore should be set to 0
  43. Anyone who knows the username and password of an inter-server account can control a character server using that account. Therefore, choose secure passwords for your inter-server accounts.
  44. 6. Add accounts or convert existing accounts from a text file database.
  45. To add new accounts, use, for example:
  46. USE ragnarok
  47. INSERT INTO `login`
  48. (`userid`,`user_pass`,`sex`,`email`,`level`)
  49. VALUES ('<username>','<password>','<gender>','<e-mail address>',<game master level>);
  50. Where <gender> is either M, F, or S for male, female, and inter-server respectively and <e-mail address> is the e-mail address (for confirmation of character deletion).
  51. To convert existing accounts stored in a text file database, use login-converter.exe and char-converter.exe. Parties and guilds cannot be converted.
  52. 7. Edit the configuration files in conf\ (except import\, mapflag\, help.txt, water.txt and water_height.txt) according to your computer configuration, network configuration, MySQL database server configuration and personal preferences.
  53. 8. Download the latest cygwin1-yyyymmdd.dll.bz2 snapshot, where "yyyymmdd" is the build date, from http://cygwin.com/snapshots/. Extract cygwin1-yyyymmdd.dll from the archive, rename it to cygwin1.dll, and move it to your system or system32 directory -- depending on your version of Windows -- in your system root directory.
  54. 9. Optionally compile:
  55. a. Install Cygwin with these packages:
  56. devel/
  57. gcc,
  58. gcc-g++,
  59. gcc-mingw-core,
  60. gcc-mingw-g++,
  61. make,
  62. mingw-runtime,
  63. mktemp
  64. b. Using Cygwin, install the MySQL libraries by compiling and installing the MySQL database server source distribution for Linux with "./configure --without-server && make && make install".
  65. c. Using Cygwin, enter "make" in the eAthena SQL directory. Recompile with "make clean && make".
  66. 1.2 Linux
  67. ---------
  68. 1. It is not the aim of this document to explain the installation, concepts or usage of MySQL. If you are unfamiliar with MySQL, familiarise yourself with it and read at least these sections of the MySQL reference manual (http://dev.mysql.com/doc/mysql/en/index.html):
  69. - 2.2.2 Installing MySQL on Linux
  70. - 2.4 Post-Installation Setup and Testing
  71. - 5.4 General Security Issues
  72. - 5.5 The MySQL Access Privilege System
  73. - 5.6 MySQL User Account Management
  74. 2. If fast and secure access to a MySQL server is unavailable, install, start and configure MySQL database server version 4.0.x. If you are using a version of Windows which is a member of the NT family, we recommend that you install MySQL as a service.
  75. 3. Create a new database and a new user account with only SELECT, INSERT, UPDATE and DELETE privileges on the database. For example:
  76. CREATE DATABASE ragnarok;
  77. GRANT
  78. SELECT,INSERT,UPDATE,DELETE
  79. ON `ragnarok`.* # database
  80. TO 'ragnarok'@'localhost' # username@address
  81. IDENTIFIED BY 'password'; # password
  82. For security, do not use the password "password" for your user account.
  83. 4. Execute the batch queries stored in sql/main.sql. If you want your item and monster databases stored in your MySQL database, execute sql/database.sql too. For example:
  84. mysql -D ragnarok -h localhost -u root -p < sql/main.sql | more && mysql -D ragnarok -h localhost -u root -p < sql/database.sql | more
  85. 5. Add an inter-server account for every character server you intend to link to your login server. For example:
  86. USE ragnarok
  87. INSERT INTO `login`
  88. (`userid`,`user_pass`,`sex`,`email`)
  89. VALUES ('inter-server_chaos','password','S','');
  90. Every character server linked to your login server requires its own inter-server account; inter-server accounts are used by the servers to communicate with each other. The differences between user and inter-server accounts are:
  91. - The "sex" field value must equal "S"
  92. - The "e-mail" field value is unused and therefore should be set to ""
  93. - The "level", "error_message", "connect_until", "memo", "ban_until" and "state" field values are unsued and therefore should be set to 0
  94. Anyone who knows the username and password of an inter-server account can control a character server using that account. Therefore, choose secure passwords for your inter-server accounts.
  95. 6. Add accounts or convert existing accounts from a text file database.
  96. To add new accounts, use, for example:
  97. USE ragnarok
  98. INSERT INTO `login`
  99. (`userid`,`user_pass`,`sex`,`email`,`level`)
  100. VALUES ('<username>','<password>','<gender>','<e-mail address>',<game master level>);
  101. Where <gender> is either M, F, or S for male, female, and inter-server respectively and <e-mail address> is the e-mail address (for confirmation of character deletion).
  102. To convert existing accounts stored in a text file database, use login-converter and char-converter. Parties and guilds cannot be converted.
  103. 7. Edit the configuration files in conf/ (except import/, mapflag/, help.txt, water.txt and water_height.txt) according to your computer configuration, network configuration, MySQL database server configuration and personal preferences.
  104. 8. Compile with "make". Recompile with "make clean && make".
  105. 1.3 FreeBSD
  106. -----------
  107. 1. It is not the aim of this document to explain the installation, concepts or usage of MySQL. If you are unfamiliar with MySQL, familiarise yourself with it and read at least these sections of the MySQL reference manual (http://dev.mysql.com/doc/mysql/en/index.html):
  108. - 2.2.5 Installing MySQL on Other Unix-Like Systems
  109. - 2.4 Post-Installation Setup and Testing
  110. - 5.4 General Security Issues
  111. - 5.5 The MySQL Access Privilege System
  112. - 5.6 MySQL User Account Management
  113. 2. If fast and secure access to a MySQL server is unavailable, install, start and configure MySQL database server version 4.0.x. If you are using a version of Windows which is a member of the NT family, we recommend that you install MySQL as a service.
  114. 3. Create a new database and a new user account with only SELECT, INSERT, UPDATE and DELETE privileges on the database. For example:
  115. CREATE DATABASE ragnarok;
  116. GRANT
  117. SELECT,INSERT,UPDATE,DELETE
  118. ON `ragnarok`.* # database
  119. TO 'ragnarok'@'localhost' # username@address
  120. IDENTIFIED BY 'password'; # password
  121. For security, do not use the password "password" for your user account.
  122. 4. Execute the batch queries stored in sql/main.sql. If you want your item and monster databases stored in your MySQL database, execute sql/database.sql too. For example:
  123. mysql -D ragnarok -h localhost -u root -p < sql/main.sql | more && mysql -D ragnarok -h localhost -u root -p < sql/database.sql | more
  124. 5. Add an inter-server account for every character server you intend to link to your login server. For example:
  125. USE ragnarok
  126. INSERT INTO `login`
  127. (`userid`,`user_pass`,`sex`,`email`)
  128. VALUES ('inter-server_chaos','password','S','');
  129. Every character server linked to your login server requires its own inter-server account; inter-server accounts are used by the servers to communicate with each other. The differences between user and inter-server accounts are:
  130. - The "sex" field value must equal "S"
  131. - The "e-mail" field value is unused and therefore should be set to ""
  132. - The "level", "error_message", "connect_until", "memo", "ban_until" and "state" field values are unsued and therefore should be set to 0
  133. Anyone who knows the username and password of an inter-server account can control a character server using that account. Therefore, choose secure passwords for your inter-server accounts.
  134. 6. Add accounts or convert existing accounts from a text file database.
  135. To add new accounts, use, for example:
  136. USE ragnarok
  137. INSERT INTO `login`
  138. (`userid`,`user_pass`,`sex`,`email`,`level`)
  139. VALUES ('<username>','<password>','<gender>','<e-mail address>',<game master level>);
  140. Where <gender> is either M, F, or S for male, female, and inter-server respectively and <e-mail address> is the e-mail address (for confirmation of character deletion).
  141. To convert existing accounts stored in a text file database, use login-converter and char-converter. Parties and guilds cannot be converted.
  142. 7. Edit the configuration files in conf/ (except import/, mapflag/, help.txt, water.txt and water_height.txt) according to your computer configuration, network configuration, MySQL database server configuration and personal preferences.
  143. 8. Compile with "gmake". Recompile with "gmake clean && gmake".
  144. 2 Upgrading
  145. ===========
  146. 2.1 Upgrading from version 817
  147. ------------------------------
  148. 1. Execute the batch queries stored in sql/upgrade_817.sql and sql/upgrade_0.5.2_main.sql.
  149. 2. If you want your item and monster databases stored in your MySQL database, execute the batch queries stored in sql/database.sql.
  150. 2.2 Upgrading from version 0.5.2
  151. --------------------------------
  152. 1. Execute the batch queries stored in sql/upgrade_0.5.2_main.sql.
  153. 2. If you created the item_db and mob_db tables, execute the batch queries stored in sql/upgrade_0.5.2_database.sql.
  154. 2.3 Upgrading from version 1.0 RC 1
  155. -----------------------------------
  156. 1. Execute the batch queries stored in sql/upgrade_1.0.0-rc1_main.sql.
  157. 3 Mail System
  158. =============
  159. 2.1 Adding the mail database
  160. ----------------------------
  161. 1. Execute the batch queries stored in sql/mail.sql
  162. 2. Set mail_system option in conf/battle_athena.conf to 1 or yes.