Quick PhoneGap setup on Ubuntu

September 5, 2014 Leave a comment

(tested on Ubuntu 14.04)

 

Install NodeJS

Go to https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager to get the following instructions updated:

curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install nodejs

 

Install PhoneGap

sudo npm install -g phonegap

If some part of the output of this (xcode, etc) gives error messages, I recommend uninstalling (sudo npm uninstall phonegap) and trying again, to avoid weird dependency issues later on.

 

Create a PhoneGap app

phonegap create my-app
cd my-app
phonegap run android

This last line is to run it as an Android app (but you can also do that in other environments).

If, for some reason (libraries dependencies, etc) the last line doesn’t work, you can still test your app launching the PhoneGap local server in what I understand is a special independent web mode, by typing

phonegap serve

This will give you the IP that you need to give in the next step.

Test your PhoneGap app

Since recently, PhoneGap offers a PhoneGap “app” that will allow you to run a locally-developed app on your device.

See instructions here http://app.phonegap.com/ (or basically download the “PhoneGap Developer” app).

Categories: Uncategorized

Crowdin terms review for Chamilo LMS translations

As we migrate to gettext for Chamilo LMS v10, we are also looking for a platform to host our translation system (considering our current translation system does not support gettext).

We will migrate most existing translations, but we were looking for the right platform to manage the translations as a community. One tool that attracted our attention was Pootle, a Python-based open source translation system that seems to be lead by the right, passionate people.

In this first phase though, we really need to avoid being distracted by other things than the development of the core code of Chamilo LMS v10. This is why we looked for a hosted solution, with an existing community, preferrably with special plans for open source projects (like Github has).

So we found Crowdin.net, with apparently all the features we will need at first. We also looked at terms and conditions and privacy terms. Terms and conditions indicate that all content translated remain the property of the user, which is good, but we will have to manage some kind of agreement with all translators that their translation work will be considered Creative Commons BY-SA. Finally, privacy terms are pretty reasonnable and respectful of our privacy, but they *do* indicate that Crowdin.net can send promotional e-mails about its services to all members, which means that translators will get a (hopefully reasonnable) amount of spam (I call it spam anyway), but that’s limited to Crowdin.net services only. This being said, we will try it as a reduced core of developers for a while and see if the mails flow is reasonnable before we generalize its use.

So if you want to try it, you should be able to take a look within a few days from now on https://crowdin.com/project/chamilo-lms

Optimiser NFS

Voici quelques pistes pour améliorer les performances de NFS sous Linux (du moins en
environnement peu chargé). On fera directement attention aux points suivants:

1. Performances réelles du serveur

Est-ce que les disques/contrôleurs qu’on utilise sont réellement plus
rapides que le réseau?
Des petits coups de “dd” et de “bonnie” nous le diront.

2. Vitesse du réseau

Est-ce que le réseau est capable de transférer les informations
rapidement entre les clients et le serveur? On utilisera pour cela un
protocole réseau minimaliste, comme FTP par exemple. Mais évidemment, on
pourrait probablement obtenir déjà des informations intéressantes avec
tout autre protocole. Si la vitesse de transfert est déjà mauvaise,
inutile d’aller plus loin.
De même, tracker les erreurs sur l’interface réseau (output d’ifconfig)
sur le client et le serveur est intéressant.

3. Résolution de noms

Si on voit apparaître des délais (freeze) particulièrement quand on
commence à accéder à la ressource réseau, il y a de fortes chances que
ce soit lié à la résolution de noms, du client ou du serveur (les deux
sont importants), et ce dans les deux sens.
Les outils suivants nous y aideront: “ping”, “dig” et “host”.

4. Configuration propre au protocole NFS

De nos jours, on veillera à utiliser NFSv3 au moins, et ce en TCP (et
non pas en UDP, pourtant par défaut sous Linux, à moins d’être sur un
réseau local vraiment “propre” et totalement dédié à NFS).
Pour vérifier cela, on fera des transferts par NFS, et on vérifiera
ensuite ce que l’output de “nfsstat” nous dit à propos de ce qui est
passé (on verra de cette façon la version de NFS réellement utilisée
ainsi que le transport TCP ou UDP, et des erreurs éventuelles).
Ensuite, en fonction du type de données transférées (petits fichiers,
gros fichiers accédés séquentiellement ou de manière aléatoire), on
jouera avec la taille des blocs (“rsize” et “wsize”, ainsi que “sync”,
“async”, etc…).

5. Gestion des locks

Pour garantir la validité des données lors de l’accès en écriture
simultané de plusieurs clients NFS, celui-ci utilise un “lock manager”.
Dans certains cas, ce “lock manager” ne fonctionne pas bien (problème de
communication entre implémentations, …) et peut sévèrement affecter
les performances. Dès lors, il faut être attentif à cela, surtout dans
les environnements hétérogènes (y compris entre les versions d’une
distribution GNU/Linux).

Categories: Uncategorized

Evento: Chamilo en Argentina

August 7, 2014 Leave a comment

google

Categories: cursos, e-learning, eventos, Spanish

Curso Oficial de Certificación Internacional – Chamilo LMS

August 7, 2014 Leave a comment

google_banner

Skype 4.2 for Linux: Unable to connect

August 4, 2014 3 comments

If your Skype 4.2 for Linux is reporting an “Unable to connect” error since about the 28th of July 2014 or so… that’s because you need version 4.3. There isn’t much documentation around about this, so I’m writing this short post.

To replace it on Ubuntu 13.10 or 14.04:

  • download version 4.3 from the Skype website
  • sudo apt-get remove skype
  • sudo dpkg -i skype-ubuntu-precise_4.3.0.37-1_i386.deb (this filename may vary slightly)

Done.

Categories: English, Misc Tags:

Howto install Odoo on Debian 7 64bit

This is an attempt at shortening the installation time of Odoo (OpenERP 7) on a pristine Linux Debian system. In particular, we’ll execute this procedure on a 2GB RAM VM from Digital Ocean, a recent, cheap and efficiente hosting provider.

First off, you’ll need to install PostgreSQL. This is important, as the Debian package for Odoo does not install nor configure postgresql at all. Note that defining your first users with postgresql is possibly one of the most frustrating thing in the history of computation, so hang in there and follow these steps carefully.

$ sudo apt-get install postgresql
$ sudo su postgres
postgres$ psql
postgres=# CREATE USER odoo WITH PASSWORD 'odoo';
CREATE ROLE
postgres=# CREATE DATABASE odoo OWNER odoo;
CREATE DATABASE
postgres=# ALTER USER odoo CREATEDB
ALTER ROLE
postgres=# \q

This last command gets you out of PostgreSQL. Now try to connect as the user you just created:

psql -U odoo -W odoo -h localhost

If you don’t use “-h localhost”, you will probably get an error like this:

psql: FATAL:  Peer authentication failed for user "odoo"

Don’t panic. Locate your /etc/postgresql/9.1/main/pg_hba.conf file, find the “local all all peer” line and change it to “local all all trust”, then reload postgresql:

postgres$ exit
$ sudo vim /etc/postgresql/9.1/main/pg_hba.conf// find and edit the line that says "local     all     all     peer". Change it to "local all all trust", save and exit
$ sudo service postgresql reload

If you know what you’re doing (which is always better), you can leave things as they are (by default) and connect with the “-h localhost”. That’s just fine.

Now you should be able to connect as user “odoo” (see above). We can now install the basic layers of Odoo itself (but first its dependencies):

$ sudo apt-get install python-dateutil python-feedparser python-gdata python-ldap \
    python-libxslt1 python-lxml python-mako python-openid python-psycopg2 \
    python-pybabel python-pychart python-pydot python-pyparsing python-reportlab \
    python-simplejson python-tz python-vatnumber python-vobject python-webdav \
    python-werkzeug python-xlwt python-yaml python-zsi
# wget http://nightly.openerp.com/7.0/nightly/deb/openerp_7.0-latest-1_all.deb
# sudo dpkg -i openerp_7.0-latest-1_all.deb

Note that the “\” at the end of each line is only a special character for continuation from one line to another. You can also remove those characters and put all the packages on one single line, this will work as well.

Make sure Odoo is present by asking the options for the command-line executable:

openerp-server -h

It should *not* return a “command not found” error, but rather a large list of possible commands.

The default configuration file for Odoo is /etc/openerp/openerp-server.conf. It is much easier to edit it now and change the settings, and avoid doing it later. The default config file looks like this;

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = False
db_port = False
db_user = openerp
db_password = openerp

Change it to something like this:

[options]
; This is the password that allows database operations:
admin_passwd = some_kickass_password
db_host = localhost
db_port = 5432
db_user = odoo
db_password = odoo

Now we’ll ask Odoo to install its database so we can start using it. If you used all the default options, then you should be able to start it *just* like that:

sudo service openerp stop
sudo service openerp start

To try it out, connect your browser on localhost (if you installed it on your computer) or to the IP or domain of the server where you installed it, but on port 8069 (the default for Odoo).

http://odoo.beeznest.com:8069

This should load the general Odoo installer.

It will ask you for the admin password (some_kickass_password you configured in the config file), then for a database name (whatever you like) and a password (odoo). It will then proceed to create your database for one OpenERP instance. This will take some time, so relax and leave it be for a while. In the end, it will show you the apps section. Choose whichever you like and let it process the database.

The rest is up to you.

If you are wondering what other configuration options can be set, a very good reference is a page on vionblog. It helped me figure out that one central reference point for OpenERP/Odoo options is the /usr/share/pyshared/openerp/tools/config.py file (do not modify it, just look).

If you want to configure OpenERP to wor on HTTPS, you should follow this guide.

You can also modify Odoo’s CSS style with this guide.

Categories: English, Odoo Tags: ,
Follow

Get every new post delivered to your Inbox.

Join 64 other followers

%d bloggers like this: