aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-09-27 09:53:15 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-09-27 09:53:15 +0200
commitafb9ca187195b8f577330e2d23afa82743a99a9f (patch)
treed31d2d7ece5078a8d3020af5b35cba95e30945ac
parentFixed a bug when getting the last retrieved article for the generation of the... (diff)
downloadnewspipe-afb9ca187195b8f577330e2d23afa82743a99a9f.tar.gz
newspipe-afb9ca187195b8f577330e2d23afa82743a99a9f.tar.bz2
newspipe-afb9ca187195b8f577330e2d23afa82743a99a9f.zip
Updated installation process.
-rwxr-xr-xinstall.sh24
1 files changed, 22 insertions, 2 deletions
diff --git a/install.sh b/install.sh
index a0dc15ca..1487feda 100755
--- a/install.sh
+++ b/install.sh
@@ -1,14 +1,31 @@
#! /usr/bin/env bash
#
-# This script install all dependencies and configure JARR for Python 3.
+# This script install all dependencies and configure JARR.
+# Usage:
+# ./install.sh (sqlite|postgres)
#
PYTHON_VERSION="3.5"
-#sudo apt-get install -y python$PYTHON_VERSION libpq-dev python$PYTHON_VERSION-dev build-essential git > /dev/null
+
+sudo apt-get install -y build-essential git wget > /dev/null
sudo apt-get install -y libxml2-dev libxslt1-dev > /dev/null # for lxml
+
+echo "Installation of Python..."
+wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz -o /dev/null > /dev/null
+tar -xf Python-3.5.2.tar.xz > /dev/null
+rm Python-3.5.2.tar.xz > /dev/null
+cd Python-3.5.2/
+export LD_RUN_PATH=/usr/local/lib/
+./configure --enable-loadable-sqlite-extensions --enable-shared > /dev/null
+make > /dev/null
+sudo make install > /dev/null
+cd ..
+rm -Rf Python-3.5.2/
+
+
echo "Installing required Python libraries..."
sed -i '/psycopg2/d' requirements.txt > /dev/null
sudo pip$PYTHON_VERSION install --upgrade -r requirements.txt > /dev/null
@@ -23,6 +40,7 @@ sed -i '/database_url/d' src/conf/conf.cfg
if [ "$1" == postgres ]; then
echo "Installing requirements for PostgreSQL..."
sudo apt-get install -y postgresql postgresql-server-dev-9.4 postgresql-client > /dev/null
+ sudo apt-get install -y libpq-dev > /dev/null
sudo pip$PYTHON_VERSION install psycopg2 > /dev/null
echo "Configuring the database..."
echo "127.0.0.1:5433:aggregator:pgsqluser:pgsqlpwd" > ~/.pgpass
@@ -42,10 +60,12 @@ elif [ "$1" == sqlite ]; then
echo 'database_url = sqlite:///jarr.db' >> src/conf/conf.cfg
fi
+
echo "Initialization of the database..."
python$PYTHON_VERSION src/manager.py db_empty
python$PYTHON_VERSION src/manager.py db_create
+
# Bootstrap
echo "Retrieving bootstrap..."
git submodule init > /dev/null
bgstack15