-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprovision.sh
executable file
·62 lines (51 loc) · 1.44 KB
/
provision.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
whoami
apt-get update
apt-get install -y build-essential git libtool nodejs npm nodejs-legacy jpegoptim
apt-get install -y advancecomp gifsicle imagemagick m4 automake lzma lzma-dev
apt-get install -y liblzma-dev pkg-config libmagic-dev zlib1g-dev libgumbo-dev
apt-get install -y icu-devtools libicu-dev tcl screen
apt-get install -y git cmake meson python3-virtualenv virtualenvwrapper aria2 libtool
apt-get install -y libpng-dev m4
add-apt-repository ppa:xapian-backports/ppa
apt update
apt install -y libxapian-dev
git clone https://gerrit.wikimedia.org/r/p/openzim.git
cd openzim/zimlib/
./autogen.sh
./configure
make
make install
ldconfig
cd ../zimwriterfs
./autogen.sh
./configure CXXFLAGS=-I../zimlib/include LDFLAGS=-L../zimlib/src/.libs
make
make install
ldconfig
cd ../..
git clone https://github.com/kiwix/mwoffliner
cd mwoffliner
npm install
cd ..
wget http://download.redis.io/redis-stable.tar.gz
tar xvf redis-stable.tar.gz
cd redis-stable
make
make install
# make test - OK
# configure redis
sed -i 's?# unixsocket /tmp/redis.sock?unixsocket /dev/shm/redis.sock?' redis.conf
sed -i 's?# unixsocketperm 700?unixsocketperm 700?' redis.conf
# Need to build latest pngquant
# apt-get install libpng-dev
cd ..
git clone https://github.com/pornel/pngquant.git --depth 1
cd pngquant
./configure
make
make install
cd ..
sudo chown -R ubuntu:ubuntu ~/mwoffliner
echo 'ready to start redis and mwoffliner'
# redis-server redis-stable/redis.conf