Add support for a remote mysql server.
[koha.git] / debian / scripts / koha-create.8
1 .\" Copyright 2010  Catalyst IT, Ltd
2 .\" 
3 .\" This program is free software: you can redistribute it and/or modify
4 .\" it under the terms of the GNU General Public License as published by
5 .\" the Free Software Foundation, either version 3 of the License, or
6 .\" (at your option) any later version.
7 .\" 
8 .\" This program is distributed in the hope that it will be useful,
9 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
10 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 .\" GNU General Public License for more details.
12 .\" 
13 .\" You should have received a copy of the GNU General Public License
14 .\" along with this program.  If not, see <http://www.gnu.org/licenses/>.
15 .TH KOHA-CREATE 8 2010-05-03 Koha
16 .SH NAME
17 koha-create \- create a new Koha instance
18 .SH SYNOPSIS
19 .B koha-create
20 .IR instance-name
21 .SH DESCRIPTION
22 .B koha-create
23 creates a new Koha instance.
24 It is meant for a site that provides Koha hosting,
25 and serves several sites from the same host.
26 .PP
27 The name of the instance is used as the domain name for Apache,
28 and Unix user and group names, and MySQL username and table names
29 are derived from it.
30 Unix user and group are named
31 .IR instance -koha.
32 MySQL username is 
33 .RI koha_ instance ,
34 and table is
35 .RI koha_ instance .
36 .PP
37 The Unix user has logins disabled.
38 The password for MySQL is generated randomly, and printed to the terminal.
39 .PP
40 The instance name is used as the domain name (ServerName) for Apache.
41 The open catalog (OPAC), for library customers, is on port 80.
42 The librarian intranet interface is on port 8080.
43 .PP
44 After the Koha instance is created, it is ready to be used, 
45 but the librarian needs to log in via the intranet and configure things.
46 .PP
47 Several configuration variables are available for adjusting this behavior.
48 The variables are put into
49 .B /etc/koha/koha-site.conf .
50 The following variables are obeyed:
51 .PP
52 .TP
53 .B DOMAIN
54 The domain to append to the instance name, for Apache ServerName.
55 Default is empty.
56 The value must begin with a period.
57 .TP
58 .B INTRAPORT
59 The port for the intranet.
60 If you set this to empty or 80, then you
61 .I must
62 also define
63 .B INTRAPREFIX
64 or
65 .BR INTRASUFFIX .
66 .TP
67 .B INTRAPREFIX
68 This is inserted before the instance name when forming Apache ServerName.
69 For subdomains, make sure it ends with a period.
70 .TP
71 .B INTRASUFFIX
72 This is inserted after the instance name,
73 but before the domain name,
74 when forming Apache ServerName.
75 .TP
76 .B DEFAULTSQL
77 An SQL file (possibly compressed with gzip) that can be fed to
78 .BR mysql (1)
79 to initialize the database after it has been created.
80 Might be created using
81 .BR koha-dump-defaults (8).
82 .SH FILES
83 .TP
84 .B /etc/koha/koha-site.conf
85 Configuration variables are read from this file, if it exists.
86 .SH BUGS
87 The program is a bit fragile.
88 If something goes wrong, it does not clean up after itself.
89 .SH EXAMPLE
90 To create a new Koha instance:
91 .PP
92 .RS
93 koha-create hslibrary
94 .RE
95 .PP
96 The public catalog is now at 
97 .I http://hslibrary/
98 and the librarian interface at
99 .IR http://hslibrary:8080/ .
100 .PP
101 To use full domain names, and have the intranet interface on port 80, but
102 on a different domain name, add the following variables to the
103 configuration file:
104 .PP
105 .nf
106 .RS
107 DOMAIN=".example.com"
108 INTRAPORT=""
109 INTRASUFFIX="-intra"
110 .RE
111 .fi
112 .PP
113 This will result in the addresses for the public and intranet interfaces
114 becoming these:
115 .PP
116 .nf
117 .RS
118 http://hslibrary.example.com/
119 http://hslibrary-intra.example.com/
120 .RE
121 .fi
122 .PP
123 Configuration changes only apply to instances created afterwards.
124 .SH "SEE ALSO"
125 .BR koha-remove (8).
126 .PP
127 .B http://koha-community.org/
128