UPGRADE 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. Upgrading
  2. =========
  3. GNU social 1.1.x to GNU social 1.2.x
  4. ------------------------------------
  5. If you are tracking the GNU social git repository, we currently recommend
  6. using the "master" branch (or nightly if you want to use latest features)
  7. and follow this procedure:
  8. 0. Backup your data. The StatusNet upgrade discussions below have some
  9. guidelines to back up the database and files (mysqldump and rsync).
  10. MAKE SURE YOU ARE THE SAME USER THAT RUNS THE PHP FILES WHILE PERFORMING
  11. THE COMMANDS BELOW (I usually prepend the commands with 'sudo -u social')
  12. 1. Stop your queue daemons (you can run this command even if you do not
  13. use the queue daemons):
  14. $ bash scripts/stopdaemons.sh
  15. 2. Run the command to fetch the latest sourcecode:
  16. $ git pull
  17. If you are not using git we recommend following the instructions below
  18. for upgrading "StatusNet 1.1.x to GNU social 1.2.x" as they are similar.
  19. 3. Run the upgrade script:
  20. $ php scripts/upgrade.php
  21. The upgrade script will likely take a long time because it will
  22. upgrade the tables to another character encoding and make other
  23. automated upgrades. Make sure it ends without errors. If you get
  24. errors, create a new task on https://git.gnu.io/gnu/gnu-social/issues
  25. 4. Start your queue daemons again (you can run this command even if you
  26. do not use the queue daemons):
  27. $ bash scripts/startdaemons.sh
  28. 5. Report any issues at https://git.gnu.io/gnu/gnu-social/issues
  29. If you are using ssh keys to log in to your server, you can make this
  30. procedure pretty painless (assuming you have automated backups already).
  31. Make sure you "cd" into the correct directory (in this case "htdocs")
  32. and use the correct login@hostname combo:
  33. $ ssh social@domain.example 'cd htdocs
  34. && bash scripts/stopdaemons.sh
  35. && git pull
  36. && time php scripts/upgrade.php
  37. && bash scripts/startdaemons.sh'
  38. StatusNet 1.1.x to GNU social 1.2.x
  39. -----------------------------------
  40. We cannot support migrating from any other version of StatusNet than
  41. 1.1.1. If you are running a StatusNet version lower than this, please
  42. follow the upgrade procedures for each respective StatusNet version.
  43. You are now running StatusNet 1.1.1 and want to migrate to GNU social
  44. 1.2.x. Beware there may be changes in minimum required version of PHP
  45. and the modules required, so review the INSTALL file (php5-intl is a
  46. newly added dependency for example).
  47. * Before you begin: Make backups. Always make backups. Of your entire
  48. directory structure and the database too. All tables. All data. Alles.
  49. 0. Make a backup of everything. To backup the database, you can use a
  50. variant of this command (you will be prompted for the database password):
  51. $ mysqldump -u dbuser -p dbname > social-backup.sql
  52. 1. Stop your queue daemons 'bash scripts/stopdaemons.sh' should do it.
  53. Not everyone runs queue daemons, but the above command won't hurt.
  54. 2. Unpack your GNU social code to a fresh directory. You can do this
  55. by cloning our git repository:
  56. $ git clone https://git.gnu.io/gnu/gnu-social.git gnusocial
  57. 3. Synchronize your local files to the GNU social directory. These
  58. will be the local files such as avatars, config and files:
  59. avatar/*
  60. file/*
  61. local/*
  62. .htaccess
  63. config.php
  64. This command will point you in the right direction on how to do it:
  65. $ rsync -avP statusnet/{.htaccess,avatar,file,local,config.php} gnusocial/
  66. 4. Replace your old StatusNet directory with the new GNU social
  67. directory in your webserver root.
  68. 5. Run the upgrade script: 'php scripts/upgrade.php'
  69. The upgrade script will likely take a long time because it will
  70. upgrade the tables to another character encoding and make other
  71. automated upgrades. Make sure it ends without errors. If you get
  72. errors, create a new task on https://git.gnu.io/gnu/gnu-social/issues
  73. 6. Start your queue daemons: 'bash scripts/startdaemons.sh'
  74. 7. Report any issues at https://git.gnu.io/gnu/gnu-social/issues