File README changed (mode: 100644) (index 6495c3c..021f62a) |
1 |
1 |
== About == |
== About == |
2 |
|
. Website: http://kernel.embedromix.ro/us/ |
|
|
2 |
|
. Website: https://rocketgit.com |
3 |
3 |
. Author: Catalin(ux) M. BOIE |
. Author: Catalin(ux) M. BOIE |
4 |
4 |
. Description: Light and fast Git hosting solution |
. Description: Light and fast Git hosting solution |
5 |
5 |
. License: Affero GPLv3+ |
. License: Affero GPLv3+ |
|
21 |
21 |
|
|
22 |
22 |
|
|
23 |
23 |
== Install == |
== Install == |
24 |
|
. Edit /etc/rocketgit/config.php |
|
25 |
|
. Edit /etc/rocketgit/php-fpm.conf |
|
26 |
|
. Edit /etc/rocketgit/pool.conf |
|
27 |
|
. Edit /etc/httpd/conf.d/rocketgit.conf |
|
|
24 |
|
. Install RocketGit from source (./configure && make && make install) or |
|
25 |
|
with a package manager: |
|
26 |
|
Fedora: |
|
27 |
|
dnf install http://kernel.embedromix.ro/dinorepo-0.0.10-1.noarch.rpm |
|
28 |
|
dnf install rocketgit |
|
29 |
|
CentOS/RedHat/Oracle |
|
30 |
|
yum install http://kernel.embedromix.ro/dinorepo-el-0.0.11-1.noarch.rpm |
|
31 |
|
yum install rocketgit |
|
32 |
|
|
|
33 |
|
Edit /etc/rocketgit/config.php |
|
34 |
|
Edit /etc/rocketgit/php-fpm.conf |
|
35 |
|
Edit /etc/rocketgit/pool.conf |
|
36 |
|
|
28 |
37 |
. Activate rocketgit php-fpm: |
. Activate rocketgit php-fpm: |
29 |
38 |
systemd based distributions: |
systemd based distributions: |
30 |
|
# systemctl enable rocketgit-fpm |
|
31 |
|
# systemctl start rocketgit-fpm |
|
|
39 |
|
systemctl enable rocketgit-fpm |
|
40 |
|
systemctl start rocketgit-fpm |
32 |
41 |
RedHat/CentOS/Oracle |
RedHat/CentOS/Oracle |
33 |
|
# chkconfig rocketgit-fpm on |
|
34 |
|
# service rocketgit-fpm start |
|
|
42 |
|
chkconfig rocketgit-fpm on |
|
43 |
|
service rocketgit-fpm start |
35 |
44 |
|
|
36 |
45 |
. PHP |
. PHP |
37 |
46 |
Adjust php.ini to: |
Adjust php.ini to: |
38 |
47 |
- allow enough RAM and execution time |
- allow enough RAM and execution time |
39 |
48 |
- fix timezone |
- fix timezone |
40 |
49 |
You may want to activate an op cache to speed up the PHP scripts: |
You may want to activate an op cache to speed up the PHP scripts: |
41 |
|
# Only on Fedora/CentOS based distributions |
|
42 |
50 |
yum/dnf install php-opcache |
yum/dnf install php-opcache |
43 |
51 |
Also, we recommend to activate opcache also for cli: |
Also, we recommend to activate opcache also for cli: |
44 |
|
change opcache.enable_cli to 1 in /etc/php.d/10-opcache.ini or |
|
|
52 |
|
change opcache.enable_cli to 1 in /etc/php.d/10-opcache.ini and |
45 |
53 |
/etc/php-zts.d/10-opcache.ini. |
/etc/php-zts.d/10-opcache.ini. |
46 |
54 |
|
|
47 |
|
. Activate web server (apache) |
|
48 |
|
systemd based distributions: |
|
49 |
|
# systemctl enable httpd.service |
|
50 |
|
# systemctl restart httpd.service |
|
51 |
|
RedHat/CentOS/Oracle |
|
52 |
|
# chkconfig httpd on |
|
53 |
|
# service httpd restart |
|
|
55 |
|
. Install and prepare a web server: nginx/apache: |
|
56 |
|
nginx is recommended because of the chunked encoding in POST requests. |
|
57 |
|
yum/dnf install nginx |
|
58 |
|
or |
|
59 |
|
yum/dnf install httpd mod_ssl |
|
60 |
|
|
|
61 |
|
Copy rocketgit.conf.sample from /etc/nginx/conf.d |
|
62 |
|
(or /etc/httpd/conf.d) into rocketgit.conf and edit it. |
|
63 |
|
|
|
64 |
|
Activate web server (nginx) |
|
65 |
|
systemd based distributions: |
|
66 |
|
systemctl enable nginx.service |
|
67 |
|
systemctl restart nginx.service |
|
68 |
|
RedHat/CentOS/Oracle |
|
69 |
|
chkconfig nginx on |
|
70 |
|
service nginx restart |
|
71 |
|
|
|
72 |
|
Activate web server (apache) |
|
73 |
|
systemd based distributions: |
|
74 |
|
systemctl enable httpd.service |
|
75 |
|
systemctl restart httpd.service |
|
76 |
|
RedHat/CentOS/Oracle |
|
77 |
|
chkconfig httpd on |
|
78 |
|
service httpd restart |
54 |
79 |
|
|
55 |
80 |
. Activate sshd (for ssh:// access) |
. Activate sshd (for ssh:// access) |
56 |
81 |
systemd based distributions: |
systemd based distributions: |
57 |
|
# systemctl enable sshd.service |
|
58 |
|
# systemctl start sshd.service |
|
|
82 |
|
systemctl enable sshd.service |
|
83 |
|
systemctl start sshd.service |
59 |
84 |
RedHat/CentOS/Oracle |
RedHat/CentOS/Oracle |
60 |
|
# chkconfig sshd on |
|
61 |
|
# service sshd restart |
|
|
85 |
|
chkconfig sshd on |
|
86 |
|
service sshd restart |
62 |
87 |
|
|
63 |
|
. Activate xinetd (for git:// access) |
|
|
88 |
|
. Activate xinetd (for git:// access, optional) |
64 |
89 |
systemd based distributions: |
systemd based distributions: |
65 |
|
# systemctl enable xinetd.service |
|
66 |
|
# systemctl start xinetd.service |
|
|
90 |
|
systemctl enable xinetd.service |
|
91 |
|
systemctl start xinetd.service |
67 |
92 |
RedHat/CentOS/Oracle |
RedHat/CentOS/Oracle |
68 |
|
# chkconfig xinetd on |
|
69 |
|
# service xinetd restart |
|
|
93 |
|
chkconfig xinetd on |
|
94 |
|
service xinetd restart |
70 |
95 |
|
|
71 |
|
. Configure PostgreSQL server |
|
72 |
|
Fedora: |
|
73 |
|
# systemctl enable postgresql.service |
|
74 |
|
# export PGSETUP_INITDB_OPTIONS="--data-checksums" # recommended |
|
75 |
|
# postgresql-setup --initdb # (TAKE CARE! YOU MAY DESTROY ALL YOUR DATA!) |
|
76 |
|
# systemctl start postgresql.service |
|
77 |
|
RedHat/CentOS/Oracle |
|
78 |
|
# chkconfig postgresql on |
|
79 |
|
# service postgresql initdb |
|
80 |
|
# service postgresql start |
|
|
96 |
|
. Prepare PostgreSQL server |
|
97 |
|
yum/dnf install postgresql-server |
81 |
98 |
|
|
82 |
|
. Create a PostgreSQL user and database |
|
83 |
|
# su - postgres |
|
84 |
|
$ createuser --createdb --no-createrole --no-superuser rocketgit |
|
85 |
|
$ createdb -O rocketgit rocketgit |
|
86 |
|
|
|
87 |
|
. Allow access to PostgreSQL and restart: |
|
88 |
99 |
Add the following lines, before wildcard matches, in |
Add the following lines, before wildcard matches, in |
89 |
100 |
/var/lib/pgsql/data/pg_hba.conf: |
/var/lib/pgsql/data/pg_hba.conf: |
90 |
101 |
local rocketgit rocketgit trust |
local rocketgit rocketgit trust |
|
92 |
103 |
host rocketgit rocketgit ::1/128 trust |
host rocketgit rocketgit ::1/128 trust |
93 |
104 |
|
|
94 |
105 |
systemd based distributions: |
systemd based distributions: |
95 |
|
# systemctl reload postgresql.service |
|
|
106 |
|
systemctl enable postgresql.service |
|
107 |
|
export PGSETUP_INITDB_OPTIONS="--data-checksums" # recommended |
|
108 |
|
postgresql-setup --initdb # (TAKE CARE! YOU MAY DESTROY ALL YOUR DATA!) |
|
109 |
|
systemctl start postgresql.service |
96 |
110 |
RedHat/CentOS/Oracle |
RedHat/CentOS/Oracle |
97 |
|
# service postgresql reload |
|
|
111 |
|
chkconfig postgresql on |
|
112 |
|
service postgresql initdb |
|
113 |
|
service postgresql start |
98 |
114 |
|
|
99 |
115 |
Notes: |
Notes: |
100 |
116 |
- Check also the config file (/etc/rocketgit/config.php) and set |
- Check also the config file (/etc/rocketgit/config.php) and set |
101 |
117 |
correctly the rg_sql string. |
correctly the rg_sql string. |
102 |
118 |
- If the web server and the db are not on the same host, you need to |
- If the web server and the db are not on the same host, you need to |
103 |
119 |
replace 127.0.0.1 and ::1 with your "safe network". You may want to use |
replace 127.0.0.1 and ::1 with your "safe network". You may want to use |
104 |
|
md5 for authentication. Also, you may want to change 'listen_addresses' |
|
105 |
|
to '*'. You may also want to activate SSL. |
|
|
120 |
|
md5/etc. for authentication. Also, you may want to change |
|
121 |
|
'listen_addresses' to '*'. You may also want to activate SSL. |
|
122 |
|
|
|
123 |
|
# Create a PostgreSQL user and database |
|
124 |
|
su - postgres |
|
125 |
|
createuser --createdb --no-createrole --no-superuser rocketgit |
|
126 |
|
createdb -O rocketgit rocketgit |
106 |
127 |
|
|
107 |
|
. Mail |
|
|
128 |
|
. Prepare the mail |
108 |
129 |
To be able to generate e-mails as other user, you have to: |
To be able to generate e-mails as other user, you have to: |
109 |
130 |
For sendmail: |
For sendmail: |
110 |
131 |
- Enable daemon: |
- Enable daemon: |
|
118 |
139 |
. Edit firewall to permit ssh, git, http and https ports |
. Edit firewall to permit ssh, git, http and https ports |
119 |
140 |
In /etc/sysconfig/iptables (IPv4) and ip6tables (IPv6), add something |
In /etc/sysconfig/iptables (IPv4) and ip6tables (IPv6), add something |
120 |
141 |
like this: |
like this: |
121 |
|
-A INPUT -m tcp -p tcp --dport ssh -j ACCEPT |
|
122 |
|
-A INPUT -m tcp -p tcp --dport git -j ACCEPT |
|
123 |
|
-A INPUT -m tcp -p tcp --dport http -j ACCEPT |
|
124 |
|
-A INPUT -m tcp -p tcp --dport https -j ACCEPT |
|
|
142 |
|
-A INPUT -m tcp -p tcp --dport ssh -j ACCEPT |
|
143 |
|
-A INPUT -m tcp -p tcp --dport git -j ACCEPT |
|
144 |
|
-A INPUT -m tcp -p tcp --dport http -j ACCEPT # optional |
|
145 |
|
-A INPUT -m tcp -p tcp --dport https -j ACCEPT |
|
146 |
|
|
|
147 |
|
If you use firewalld: |
|
148 |
|
firewall-cmd --permanent --add-port=ssh/tcp |
|
149 |
|
firewall-cmd --permanent --add-port=git/tcp |
|
150 |
|
firewall-cmd --permanent --add-port=http/tcp # optional |
|
151 |
|
firewall-cmd --permanent --add-port=https/tcp |
|
152 |
|
firewall-cmd --reload |
125 |
153 |
|
|
126 |
154 |
. Point your browser to the newly created server and you will be asked to |
. Point your browser to the newly created server and you will be asked to |
127 |
155 |
create the admin account. |
create the admin account. |