8
|
1 |
==========================
|
|
2 |
Downloading and Installing
|
|
3 |
==========================
|
|
4 |
|
|
5 |
Downloading
|
|
6 |
===========
|
|
7 |
The recommended way to download moin2 is to clone
|
|
8 |
the moin2 Mercurial repository or its mirror. Open a terminal
|
|
9 |
window or a command prompt, cd to the directory that will hold
|
|
10 |
your project root directory and enter either one of the commands
|
|
11 |
below::
|
|
12 |
|
|
13 |
hg clone http://hg.moinmo.in/moin/2.0 moin-2.0
|
|
14 |
|
|
15 |
OR
|
|
16 |
|
|
17 |
hg clone http://bitbucket.org/thomaswaldmann/moin-2.0 moin-2.0
|
|
18 |
|
|
19 |
Now make sure your work directory is using the default branch::
|
|
20 |
|
|
21 |
hg up -C default
|
|
22 |
|
|
23 |
An alternative installation method is to download the bz2 archive
|
|
24 |
from http://hg.moinmo.in/moin/2.0 and unpack it. Once unpacked,
|
|
25 |
continue to follow the instructions below.
|
|
26 |
|
|
27 |
Installing
|
|
28 |
==========
|
|
29 |
Before you can run moin, you need to install it:
|
|
30 |
|
|
31 |
Using your standard user account, run the following command
|
|
32 |
from the project root directory. Replace <python> in the command
|
|
33 |
below with the path to a python 2.7 executable. This is usually
|
|
34 |
just "python", but may be "python2.7", "/opt/pypy/bin/pypy"
|
|
35 |
or even <some-other-path-to-python>::
|
|
36 |
|
|
37 |
<python> quickinstall.py
|
|
38 |
|
|
39 |
OR
|
|
40 |
|
|
41 |
<python> quickinstall.py <path-to-venv>
|
|
42 |
|
|
43 |
The above will download all dependent packages to the PIP cache,
|
|
44 |
install the packages in a virtual environment, and compile the translations
|
|
45 |
(`*.po` files) to binary `*.mo` files. This process may take several minutes.
|
|
46 |
|
|
47 |
The default virtual environment directory name is:
|
|
48 |
|
|
49 |
* ../<PROJECT>-venv-<PYTHON>/
|
|
50 |
|
|
51 |
where <PROJECT> is the name of the project root directory, and <PYTHON>
|
|
52 |
is the name of your python interpreter. As noted above, the default
|
|
53 |
name may be overridden.
|
|
54 |
|
|
55 |
Check the output of quickinstall.py to determine whether there were
|
|
56 |
fatal errors. The output messages will normally state that stdout
|
|
57 |
and stderr messages were written to a file, a few key success/failure
|
|
58 |
messages will be extracted and written to the terminal window, and
|
|
59 |
finally a message to type "m" to display a menu.
|
|
60 |
|
|
61 |
If there are failure messages, see the troubleshooting section below.
|
|
62 |
|
|
63 |
Typing "./m" (or "m" on Windows) will display a menu similar to::
|
|
64 |
|
|
65 |
usage: "./m <target>" where <target> is:
|
|
66 |
|
|
67 |
quickinstall update virtual environment with required packages
|
|
68 |
docs create moin html documentation
|
|
69 |
extras install OpenID, Pillow, pymongo, sqlalchemy, ldap, upload.py
|
|
70 |
interwiki refresh contrib/interwiki/intermap.txt (hg version control)
|
|
71 |
log <target> view detailed log generated by <target>, omit to see list
|
|
72 |
|
|
73 |
new-wiki create empty wiki
|
|
74 |
sample create wiki and load sample data
|
|
75 |
restore * create wiki and restore wiki/backup.moin *option, specify file
|
|
76 |
import19 <dir> import a moin 1.9 wiki/data instance from <dir>
|
|
77 |
|
|
78 |
run * run built-in wiki server *options (--port 8081)
|
|
79 |
backup * roll 3 prior backups and create new backup *option, specify file
|
|
80 |
dump-html * create a static HTML image of wiki *options, see docs
|
|
81 |
index delete and rebuild indexes
|
|
82 |
|
|
83 |
css run Stylus and lessc to update theme CSS files
|
|
84 |
tests * run tests, output to pytest.txt *options (-v -k my_test)
|
|
85 |
coding-std correct scripts that taint the repository with trailing spaces..
|
|
86 |
api update moin api docs (files are under hg version control)
|
|
87 |
|
|
88 |
del-all same as running the 4 del-* commands below
|
|
89 |
del-orig delete all files matching *.orig
|
|
90 |
del-pyc delete all files matching *.pyc
|
|
91 |
del-rej delete all files matching *.rej
|
|
92 |
del-wiki create a backup, then delete all wiki data
|
|
93 |
|
|
94 |
While most of the above menu choices may be executed now, new users should
|
|
95 |
do::
|
|
96 |
|
|
97 |
m sample # in Windows
|
|
98 |
./m sample # in Unix
|
|
99 |
|
|
100 |
to create a wiki instance and load it with sample data. Next, run the
|
|
101 |
built-in wiki server::
|
|
102 |
|
|
103 |
m run # in Windows
|
|
104 |
./m run # in Unix
|
|
105 |
|
|
106 |
As the server starts, about 20 log messages will be output to the
|
|
107 |
terminal window. Point your browser to http://127.0.0.1:8080, the
|
|
108 |
sample Home page will appear and more log messages will be output
|
|
109 |
to the terminal window. Do a quick test by accessing some of the
|
|
110 |
demo items and do a modify and save. If all goes well, your installation
|
|
111 |
is complete. The built-in wiki server may be stopped by typing ctrl-C
|
|
112 |
in the terminal window.
|
|
113 |
|
|
114 |
Next Steps
|
|
115 |
==========
|
|
116 |
|
|
117 |
If you plan on contributing to the moin2 project, there are more
|
|
118 |
instructions waiting for you under the Development topic.
|
|
119 |
|
|
120 |
If you plan on using this wiki as a production wiki,
|
|
121 |
then before you begin adding or importing data and registering users
|
|
122 |
review the configuration options. See the sections on configuration for
|
|
123 |
details. Be sure to edit `wikiconfig.py` (or `wikiconfig_editme.py`) and
|
|
124 |
change the settings for:
|
|
125 |
|
|
126 |
* interwikiname
|
|
127 |
* SECRET_KEY
|
|
128 |
* secrets
|
|
129 |
|
|
130 |
If you plan on just using moin2 as a desktop wiki (and maybe
|
|
131 |
help by reporting bugs), then some logical menu choices are:
|
|
132 |
|
|
133 |
* `./m docs` - to create docs, see User tab, Documentation (local)
|
|
134 |
* `./m extras` - to install Pillow for manipulating images
|
|
135 |
* `./m del-wiki` - get rid of the sample data
|
|
136 |
* `./m new-wiki` or `m import19 ...` - no data or moin 1.9 data
|
|
137 |
* `./m backup` - backup wiki data as needed or as scheduled
|
|
138 |
|
|
139 |
Warning: Backing up data at this point may provide a false sense
|
|
140 |
of security because no migration tool has been developed to migrate
|
|
141 |
data between moin2 versions. In its current alpha state, there
|
|
142 |
may be code changes that impact the structure of the wiki data or
|
|
143 |
indexes. Should this occur, first try rebuilding the indexes with the
|
|
144 |
`./m index` command. If that fails, you must start over with an empty
|
|
145 |
wiki and copy and paste the contents of all the old wiki
|
|
146 |
items into the new wiki. While no such changes are planned,
|
|
147 |
they have happened in the past and may happen in the future.
|
|
148 |
|
|
149 |
If you installed moin2 by cloning the Moin2 Mercurial repository,
|
|
150 |
then you will likely want to install updates on a periodic basis.
|
|
151 |
To determine if there are updates available, open a terminal
|
|
152 |
window or command prompt, cd to your project root, and enter the
|
|
153 |
command below::
|
|
154 |
|
|
155 |
hg incoming
|
|
156 |
|
|
157 |
If there are any updates, a brief description of each update will
|
|
158 |
be displayed. To add the updates to your cloned repository, do::
|
|
159 |
|
|
160 |
hg pull -u
|
|
161 |
|
|
162 |
After pulling updates, it is best to also rerun the quickinstall process
|
|
163 |
to install any changes or new releases to the dependant packages::
|
|
164 |
|
|
165 |
m quickinstall # in Windows
|
|
166 |
./m run # in Unix
|
|
167 |
|
|
168 |
Troubleshooting
|
|
169 |
===============
|
|
170 |
|
|
171 |
PyPi down
|
|
172 |
---------
|
|
173 |
Now and then, PyPi might be down or unreachable.
|
|
174 |
|
|
175 |
There are mirrors b.pypi.python.org, c.pypi.python.org, d.pypi.python.org
|
|
176 |
you can use in such cases. You just need to tell pip to do so::
|
|
177 |
|
|
178 |
# put this into ~/.pip/pip.conf
|
|
179 |
[global]
|
|
180 |
index-url = http://c.pypi.python.org/simple
|
|
181 |
|
|
182 |
Bad Network Connection
|
|
183 |
----------------------
|
|
184 |
If you have a poor or limited network connection, you may run into
|
|
185 |
trouble with the commands issued by the quickinstall.py script.
|
|
186 |
You may see tracebacks from pip, timeout errors, etc. within the output
|
|
187 |
of the quickinstall script.
|
|
188 |
|
|
189 |
If this is the case, you may try rerunning the "python quickinstall.py"
|
|
190 |
script multiple times. With each subsequent run, packages that are
|
|
191 |
all ready cached (view the contents of pip-download-cache) will not
|
|
192 |
be downloaded again. Hopefully, any temporary download errors will
|
|
193 |
cease with multiple tries.
|
|
194 |
|
|
195 |
ActiveState Python
|
|
196 |
------------------
|
|
197 |
While ActiveState bundles pip and virtualenv in its distribution,
|
|
198 |
there are two missing files. The result is the following error
|
|
199 |
messages followed by a traceback::
|
|
200 |
|
|
201 |
|
|
202 |
Cannot find sdist setuptools-*.tar.gz
|
|
203 |
Cannot find sdist pip-*.tar.gz
|
|
204 |
|
|
205 |
To install the missing files, do the following and then rerun
|
|
206 |
"python quickinstall.py"::
|
|
207 |
|
|
208 |
\Python27\Scripts\pip.exe uninstall virtualenv
|
|
209 |
\Python27\Scripts\easy_install virtualenv
|
|
210 |
|
|
211 |
Other Issues
|
|
212 |
------------
|
|
213 |
|
|
214 |
If you encounter some other issue not described above, try
|
|
215 |
researching the unresolved issues at
|
|
216 |
https://bitbucket.org/thomaswaldmann/moin-2.0/issues?status=new&status=open.
|
|
217 |
|
|
218 |
If you find a similar issue, please add a note saying you also have the problem
|
|
219 |
and add any new information that may assist in the problem resolution.
|
|
220 |
|
|
221 |
If you cannot find a similar issue please create a new issue.
|
|
222 |
Or, if you are not sure what to do, join us on IRC at #moin-dev
|
|
223 |
and describe the problem you have encountered.
|