-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathreviewboard_config.sh
44 lines (39 loc) · 1.14 KB
/
reviewboard_config.sh
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
#!/bin/bash
# Install reviewboard
yum remove -y ReviewBoard
easy_install reviewboard
easy_install RBTools
easy_install rbbz
easy_install rbmozui
# Configure reviewboard database
/usr/bin/mysqld_safe &
sleep 5
mysql -u root mysql -e "GRANT ALL PRIVILEGES ON *.* TO $RB_USER@localhost IDENTIFIED BY '$RB_USER'; FLUSH PRIVILEGES;"
mysql -u $RB_USER -p$RB_USER -e "CREATE DATABASE reviewboard CHARACTER SET = 'utf8'"
# Condfigure reviewboard site
mkdir /etc/reviewboard
chown $RB_USER:$RB_USER /etc/reviewboard
rb-site install \
--copy-media \
--noinput \
--domain-name=localhost:8080 \
--site-root=/ \
--static-url=static/ \
--media-url=media/ \
--db-type=mysql \
--db-name=$RB_USER \
--db-host=localhost \
--db-user=$RB_USER \
--db-pass=$RB_USER \
--cache-type=memcached \
--cache-info=localhost:11211 \
--web-server-type=apache \
--web-server-port=80 \
--python-loader=wsgi \
--admin-user=admin \
--admin-password=password \
--sitelist=/etc/reviewboard/sites \
/home/$RB_USER/devel/htdocs/reviewboard
# Shutdown database
mysqladmin -u root shutdown