Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

UPGRADE.txt 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. #
  2. # Postfix Admin
  3. # by Mischa Peters <mischa at high5 dot net>
  4. # Copyright (c) 2002 - 2005 High5!
  5. # Licensed under GPL for more info check GPL-LICENSE.TXT
  6. #
  7. REQUIRED!!
  8. ----------
  9. - You are using Postfix 2.0 or higher.
  10. - You are using Apache 1.3.27 / Lighttpd 1.3.15 or higher.
  11. - You are using PHP 5.1.2 or higher.
  12. - You are using MySQL 3.23 or higher OR PostgreSQL v7.4+
  13. READ THIS FIRST!
  14. ----------------
  15. This document describes upgrading from an older PostfixAdmin version
  16. (>= v1.5x)
  17. It's recommend that you install Postfix Admin in a new folder and not
  18. on-top of the old install!! (At the very least, make sure you have backups of
  19. the database and relevant filesystem!)
  20. When upgrading Postfix Admin, make sure you backup your database before
  21. running upgrade.php.
  22. 1. Backup the Database
  23. ----------------------
  24. When you install from a previous version make sure you backup your database
  25. first. There are a lot of changes in the database structure since Postfix Admin
  26. 1.5.4.
  27. $ mysqldump -u root -p postfixdb > /tmp/postfixadmin-backup.sql
  28. or
  29. $ pg_dump -ad -u postfix postfixdb > /tmp/postfixadmin-backup.sql
  30. (Replace postfixdb with your Postfixadmin database's name)
  31. 2. Unarchive new Postfix Admin
  32. ------------------------------
  33. Make sure that you are in your WWW directory and then unarchive the
  34. Postfix Admin archive (whatever the filename is):
  35. $ tar -zxvf postfixadmin-X.X.tgz
  36. 3. Change permissions
  37. ----------------------
  38. Since the database password is stored in the config.inc.php it's a good idea
  39. to have change the permissions for Postfix Admin.
  40. $ cd /usr/local/www/postfixadmin
  41. $ find -type f -print0 | xargs -0 chmod 640
  42. $ find -type f -print0 | xargs -0 chown root:www-data
  43. (the last command assumes your Apache is running with group "www-data")
  44. Since version 3.0 we use smarty templates. That means the templates_c directory
  45. needs to be writeable for your webserver.
  46. $ cd /usr/local/www/postfixadmin
  47. $ mkdir templates_c && chmod 750 templates_c && chown -R www-data templates_c
  48. (if your Apache runs as user "www-data")
  49. If you have SELinux enabled, also run (adust the path to match your setup)
  50. $ sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/utils/pfadmin/public/templates_c(/.*)?"
  51. $ sudo restorecon -Rv /var/www/utils/pfadmin/
  52. 4. Configure
  53. ------------
  54. Check the config.inc.php file. There you can specify settings that are
  55. relevant to your setup.
  56. Comparing config.inc.php with your previous using "diff" might save you some
  57. time.
  58. You can use a config.local.php file to contain your local settings.
  59. These will override any defined in config.inc.php - and save some time when upgrading to a new version of PostfixAdmin ;-)
  60. 5. Run setup.php
  61. ----------------------------------------
  62. Access setup.php through a web browser.
  63. It will attempt to upgrade your database, and also allow you to create a superadmin user.
  64. (In case the database upgrade fails, you can run setup.php?debug=1 to see the last executed query.)
  65. From version 2.3, you need to specify a setup_password in config.inc.php -
  66. setup.php should guide you through this process. If you do not have a setup_password, type one
  67. into the form, and setup.php will echo out the hashed value (which needs to go into config.inc.php).
  68. The setup_password removes the requirement for you to delete setup.php, and also closes a security hole.
  69. Since version 2.2 of Postfixadmin, setup.php can perform the needed database
  70. updates automatically .
  71. If you update from 2.1 or older, also create a superadmin account using setup.php.
  72. Note that admin/ has been merged into the main directory. Login with the
  73. superadmin account to setup domains and domain admins.
  74. 6. Upgrade your postfix config
  75. ------------------------------
  76. Since version 2.3, PostfixAdmin supports alias domains ($CONF['alias_domain']).
  77. If you want to use them, you have to add some queries to your postfix config -
  78. see POSTFIX_CONF for details.
  79. 7. Done
  80. -------
  81. This is all that is needed. Fire up your browser and go to the site that you
  82. specified to host Postfix Admin.