aboutsummaryrefslogtreecommitdiffstats
path: root/README.mga.md
blob: 4482eba580294c15666c1610ae126dae9955a33a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
## Mageia Update Instructions

phpBB is a free bulletin board written in PHP. Mageia use this to power their [forums](https://forums.mageia.org/). 

## Updating Code

To be completed by MaĆ¢t.

## Testing

1. Create a backup database of one of the forums (pick your preferred language - using "en" here)

        [root@alamut ~]# psql -U postgres
        psql (9.0.13)
        Type "help" for help.
        .
        postgres=# CREATE DATABASE phpbb_xx WITH TEMPLATE phpbb_en OWNER phpbb;

2. Copy the current forum folder on the webserver (note the folder has to be two letters)

        [root@alamut ~]# ssh friteuse
        [root@friteuse ~]# cd /var/www/forums/
        [root@friteuse forums]# cp -a en xx

3. Edit the copies db config and point it at the new db you just created

        [root@friteuse forums]# vi xx/phpBB/config.php 

4. Test the "new" [forum](https://forums.mageia.org/xx/) to make sure it works as current.

5. Update the code to what is in git. First we have to restore the "install" folder which is removed for security.

        [root@friteuse forums]# cd xx/
        [root@friteuse xx]# git checkout -- phpBB/install
        [root@friteuse xx]# git pull

6. The forum shold be disabled automatically. You can login and perform the upgrade.

7. When done, delete the "install" folder.

        [root@friteuse xx]# rm -rf phpBB/install

8. Now test the forum as normal and make sure the upgrade has worked!

## Deployment

Mostly the same as above. As space is limited we should tidy up first.

1. Delete our test schema.

        [root@alamut ~]# psql -U postgres
        psql (9.0.13)
        Type "help" for help.
        .
        postgres=# DROP DATABASE phpbb_xx;

2. Make a database dump file as a backup.

        [root@alamut ~]# pg_dump -U postgres phpbb_en | xz >forums_dump/forum_en-20131202.sql.xz

3. Trash the test folder

        [root@alamut ~]# ssh friteuse
        [root@friteuse ~]# cd /var/www/forums/
        [root@friteuse forums]# rm -rf xx

4. Copy the forum files "just in case"

        [root@friteuse forums]# cp -a en en-bak

5. Perform steps 5 onwards as per the testing section above.