UPGRADE 3.8 KB

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