Status : Draft
Instalasi
Melalui pip
Install dengan pip masih gagal.
Melalui Git Repository
clone repo indico seperti di dokumentasi.
#untuk postgrsql-9.6-dev, sesuaikan dengan versi yang digunakan
sudo apt-get install libpq-dev postgresql-9.6-dev
sudo apt-get install python-dev
sudo apt-get install libxml2-dev
sudo apt-get install libxslt1-dev
sudo apt-get install zlib1g-dev
sudo apt-get install npm
sudo -H pip install -r requirements.dev.txt
sudo -H pip install -r requirements.txt
sudo -H pip install -r requirements.zodb.txt
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install grunt
sudo apt install node-grunt-cli
sudo npm install findup-sync -g
Ketika install requirement muncul error :
...
Found existing installation: blinker 1.3 [38/439]
DEPRECATION: Uninstalling a distutils installed project (blinker) has been deprecated and will be removed in a future version. This is due
to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling blinker-1.3:
Successfully uninstalled blinker-1.3
...
Found existing installation: PyYAML 3.11
DEPRECATION: Uninstalling a distutils installed project (PyYAML) has been deprecated and will be removed in a future version. This is due t
o the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling PyYAML-3.11:
Successfully uninstalled PyYAML-3.11
...
Successfully installed Flask-0.11.1 Flask-BabelEx-0.9.3 Flask-Migrate-1.2.0 Flask-Multipass-0.0.dev0 Flask-OAuthlib-0.9.1 Flask-PluginEngine-0.
2.2.dev0 Flask-SQLAlchemy-2.1 Flask-Script-2.0.5 Flask-WTF-0.13 Jinja2-2.8 Pillow-2.7.0 PyYAML-3.12 SQLAlchemy-1.1.4 WTForms-2.1 WTForms-Compon
ents-0.10.0 alembic-0.6.7 amqp-1.4.9 bcrypt-3.1.0 beautifulsoup4-4.5.1 billiard-3.3.0.23 blinker-1.4 celery-3.1.23 certifi-2017.1.23 click-6.6
colorclass-2.2.0 contextlib2-0.5.4 decorator-4.0.11 flask-marshmallow-0.7.0 functools32-3.2.3.post2 hiredis-0.2.0 html2text-2016.5.29 infinity-
1.4 intervals-0.8.0 jsonschema-2.5.1 kombu-3.0.37 marshmallow-2.10.3 marshmallow-enum-1.0 marshmallow-sqlalchemy-0.12.0 pathlib-1.0.1 psycopg2-
2.6.2 pyScss-1.3.5 pytest-3.0.1 pytest-catchlog-1.2.2 pytest-cov-2.3.1 pytest-localserver-0.3.6 pytest-mock-0.11.0 redis-2.10.5 reportlab-3.2.0
requests-2.12.1 requests-oauthlib-0.8.0 speaklater-1.3 terminaltables-3.0.0 translitcodec-0.4.0 validators-0.11.3 xlsxwriter-0.9.3 zope.sqlalc
hemy-0.7.7
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==9.0.1', 'console_scripts', 'pip')()
File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 233, in main
return command.main(cmd_args)
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 252, in main
pip_version_check(session)
File "/usr/local/lib/python2.7/dist-packages/pip/utils/outdated.py", line 102, in pip_version_check
installed_version = get_installed_version("pip")
File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 838, in get_installed_version
working_set = pkg_resources.WorkingSet()
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 644, in __init__
self.add_entry(entry)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 700, in add_entry
for dist in find_distributions(entry, True):
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1949, in find_eggs_in_zip
if metadata.has_metadata('PKG-INFO'):
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1463, in has_metadata
return self.egg_info and self._has(self._fn(self.egg_info, name))
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1823, in _has
return zip_path in self.zipinfo or zip_path in self._index()
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1703, in zipinfo
return self._zip_manifests.load(self.loader.archive)
File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1643, in load
mtime = os.stat(path).st_mtime
OSError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/hiredis-0.1.3-py2.7-linux-x86_64.egg'
Solusi, uninstall kemudian install kembali redis dan hiredis :
sudo -H pip uninstall redis
sudo -H pip uninstall hiredis
sudo -H pip install redis
sudo -H pip install hiredis
Jalankan perintah :
fab setup_deps
Jika muncul error :
Error: Cannot find module 'findup-sync'
indico>>sudo rm node_modules/findup-sync
indico>>sudo npm install -g grunt-cli
Muncul error :
...
SOLINK_MODULE(target) Release/obj.target/encode.node
COPY Release/encode.node
make: Leaving directory '/home/wildan/jobstuff/openthinklabs/investor/UNHAS/software/indico/ext_modules/fullcalendar/node_modules/grunt-contrib-compress/node_modules/iltorb/build'
npm ERR! Linux 4.4.0-67-generic
npm ERR! argv "/home/wildan/jobstuff/openthinklabs/investor/UNHAS/software/indico/ext_modules/node_env/bin/node" "/home/wildan/jobstuff/openthinklabs/investor/UNHAS/software/indico/ext_modules/node_env/bin/npm" "install"
npm ERR! node v4.2.2
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! phantomjs-prebuilt@2.1.14 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.14 install script 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs-prebuilt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/wildan/jobstuff/openthinklabs/investor/UNHAS/software/indico/ext_modules/fullcalendar/npm-debug.log
Fatal error: local() encountered an error (return code 1) while executing 'npm install'
Aborting.
Error ini sepertinya akibat tidak menggunakan phantojs terbaru, setelah menginstall phantomjs terbaru (2.1.1) error ini tidak terjadi.
sudo apt-get remove --purge phantomjs
sudo apt-get install phantomjs
Lalu jalankan :
sudo python setup.py install
Jika ingin setup development environtment untuk indico, bisa menjalankan juga :
sudo python setup.py develop_config
Lalu :
sudo indico_initial_setup
Setelah selesai, akan ada informasi :
Congratulations!
Indico has been installed correctly.
indico.conf: /opt/indico/etc/indico.conf
BinDir: /opt/indico/bin
DocumentationDir: /opt/indico/doc
ConfigurationDir: /opt/indico/etc
HtdocsDir: /opt/indico/htdocs
For information on how to configure Apache HTTPD, take a look at:
http://indico.readthedocs.org/en/latest/installation/#configuring-the-web-server
Please do not forget to start the Celery worker in order to use background tasks
such as event reminders and periodic cleanups. You can run it using this command:
$ indico celery worker -B
If you are running ZODB on this host:
- Review /opt/indico/etc/zodb.conf and /opt/indico/etc/zdctl.conf to make sure everything is ok.
- To start the database run: zdaemon -C /opt/indico/etc/zdctl.conf start
Sesudah mensetup virtual host, dan merestart apache muncul error :
[Sat Apr 08 07:22:28.208705 2017] [core:error] [pid 23613] [client 127.0.0.1:53164] AH00037: Symbolic link not allowed or link target not accessible: /opt/indico/htdocs/indico.wsgi
Ketika diperiksa ternyata symlink nya salah. Setelah diperbaiki, Alhamdulillah, bisa, berikut adalah konfigurasi virtual host yang digunakan untuk development :
#/etc/apache2/sites-available/indico.conf
AddDefaultCharset UTF-8
<VirtualHost *:8080>
ServerName indico.np
ErrorLog /var/log/apache2/indico_error.log
LogLevel warn
Alias /indico/images "/opt/indico/htdocs/images"
Alias /indico/css "/opt/indico/htdocs/css"
Alias /indico/js "/opt/indico/htdocs/js"
Alias /indico/ihelp "/opt/indico/htdocs/ihelp"
WSGIDaemonProcess WSGIDAEMON processes=8 threads=1 inactivity-timeout=3600 maximum-requests=10000 \
python-eggs=/opt/indico/tmp/egg-cache
WSGIScriptAlias /indico "/opt/indico/htdocs/indico.wsgi"
<Directory "/opt/indico">
WSGIProcessGroup WSGIDAEMON
WSGIApplicationGroup %{GLOBAL}
AllowOverride None
Options Indexes FollowSymLinks MultiViews
Order deny,allow
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:443>
ServerName indico.np
ErrorLog /var/log/apache2/indico_error.log
LogLevel warn
Alias /indico/images "/opt/indico/htdocs/images"
Alias /indico/css "/opt/indico/htdocs/css"
Alias /indico/js "/opt/indico/htdocs/js"
Alias /indico/ihelp "/opt/indico/htdocs/ihelp"
WSGIScriptAlias /indico "/opt/indico/htdocs/indico.wsgi"
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
</VirtualHost>
Setelah restart Apache, masih muncul error :
[Sat Apr 08 07:41:09.459898 2017] [wsgi:error] [pid 8875] [remote 127.0.0.1:26393] mod_wsgi (pid=8875): Target WSGI script '/opt/indico/htdocs/indico.wsgi' cannot be loaded as Python module.
[Sat Apr 08 07:41:09.460172 2017] [wsgi:error] [pid 8875] [remote 127.0.0.1:26393] mod_wsgi (pid=8875): Exception occurred processing WSGI script '/opt/indico/htdocs/indico.wsgi'.
[Sat Apr 08 07:41:09.460382 2017] [wsgi:error] [pid 8875] [remote 127.0.0.1:26393] Traceback (most recent call last):
[Sat Apr 08 07:41:09.460569 2017] [wsgi:error] [pid 8875] [remote 127.0.0.1:26393] File "/opt/indico/htdocs/indico.wsgi", line 18, in <module>
[Sat Apr 08 07:41:09.461446 2017] [wsgi:error] [pid 8875] [remote 127.0.0.1:26393] application = make_app()
[Sat Apr 08 07:41:09.461581 2017] [wsgi:error] [pid 8875] [remote 127.0.0.1:26393] File "/usr/local/lib/python2.7/dist-packages/indico-1.9.9-py2.7.egg/indico/web/flask/app.py", line 353, in make_app
[Sat Apr 08 07:41:09.462408 2017] [wsgi:error] [pid 8875] [remote 127.0.0.1:26393] configure_app(app, set_path)
[Sat Apr 08 07:41:09.462516 2017] [wsgi:error] [pid 8875] [remote 127.0.0.1:26393] File "/usr/local/lib/python2.7/dist-packages/indico-1.9.9-py2.7.egg/indico/web/flask/app.py", line 88, in configure_app
[Sat Apr 08 07:41:09.462703 2017] [wsgi:error] [pid 8875] [remote 127.0.0.1:26393] raise ValueError('SecretKey must be set to a random secret of at least 16 characters. '
[Sat Apr 08 07:41:09.462831 2017] [wsgi:error] [pid 8875] [remote 127.0.0.1:26393] ValueError: SecretKey must be set to a random secret of at least 16 characters. You can generate one using os.urandom(32) in Python shell.
Sepertinya, konfigurasinya belum diisi semua.
Lengkapi dulu konfigurasinya : /opt/indico/etc/indico.conf