forked from speed/newcrawler
-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_x86_64.sh
49 lines (38 loc) · 1.91 KB
/
install_x86_64.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
#install.sh
#jetty http://download.eclipse.org/jetty/
#jre http://www.oracle.com/technetwork/java/javase/downloads/index.html
#PhantomJs http://phantomjs.org/download.html
jetty="http://download.eclipse.org/jetty/9.3.7.v20160115/dist/jetty-distribution-9.3.7.v20160115.tar.gz"
jre="http://download.oracle.com/otn-pub/java/jdk/8u74-b02/server-jre-8u74-linux-x64.tar.gz"
phantomjs="https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2"
mkdir newcrawler
cd newcrawler
yum -y install tar
#jetty
wget --no-check-certificate $jetty -O jetty.tar.gz
mkdir ./jetty && tar -xzvf jetty.tar.gz -C ./jetty --strip-components 1
#jre
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" $jre -O server-jre-linux.tar.gz
mkdir ./jre && tar -xzvf server-jre-linux.tar.gz -C ./jre --strip-components 1
#war
yum -y install unzip
wget --no-check-certificate https://github.com/speed/newcrawler/archive/master.zip -O master.zip
unzip -n master.zip
mv newcrawler-master/war war
rm -R -f -v newcrawler-master
#PhantomJs
yum -y install bzip2
yum -y install fontconfig freetype libfreetype.so.6 libfontconfig.so.1
wget --no-check-certificate $phantomjs -O phantomjs-linux.tar.bz2
mkdir ./phantomjs && tar -xjvf phantomjs-linux.tar.bz2 -C ./phantomjs --strip-components 1
phantomjs/bin/phantomjs --version
#Script and Config
wget --no-check-certificate https://github.com/speed/linux-64bit-jetty-jre/raw/master/jetty/webapps/newcrawler.xml -P jetty/webapps/ -O jetty/webapps/newcrawler.xml
wget --no-check-certificate https://github.com/speed/linux-64bit-jetty-jre/raw/master/start.sh -O start.sh
wget --no-check-certificate https://github.com/speed/linux-64bit-jetty-jre/raw/master/stop.sh -O stop.sh
#Remove install package
rm -f -v jetty.tar.gz
rm -f -v phantomjs-linux.tar.bz2
rm -f -v server-jre-linux.tar.gz
rm -f -v master.zip
echo 'Congratulations, the installation is successful.'