sudo dpkg-reconfigure tzdata
sudo apt-get install python-dev
## Instalamos Python 2.7
sudo apt-add-repository universe
sudo apt update
sudo apt install python2-minimal
python2 -V
ln -s /usr/bin/python2.7 /usr/bin/python
wget -P ~/.local/lib https://bootstrap.pypa.io/pip/2.7/get-pip.py
python2.7 ~/.local/lib/get-pip.py --user
printf "\nPATH=\$PATH:~/.local/bin/" >> ~/.bashrc
source ~/.bashrc
apt-get update && apt-get upgrade -y
adduser --system --home=/opt/odoo --group odoo
sudo apt install postgresql postgresql-contrib
service postgresql restart
su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo
exit
apt-get update
sudo apt-get install postgresql-contrib
sudo /etc/init.d/postgresql restart
sudo su - postgres
psql
ALTER USER "odoo" with superuser;
apt-get install unzip
apt install python-pip libcups2-dev libxml2-dev libxslt-dev node-less libsasl2-dev libldap2-dev python-lxml -y
pip install --upgrade pip
hash -d pip
# Con el usuario ubuntu
export LC_ALL=C
source .bashrc
cd /opt/odoo/
wget https://github.com/odoo/odoo/archive/10.0.zip
unzip 10.0.zip
mv odoo-10.0 server
chown -R odoo: server
pip install -r /opt/odoo/server/requirements.txt
mkdir /opt/odoo/DTES
chown odoo:root /opt/odoo/DTES
cd /opt/odoo/DTES
chmod 777 .
mkdir /opt/odoo/backups
chown odoo:root /opt/odoo/backups
mkdir /var/log/odoo/
chown odoo:root /var/log/odoo
mkdir /etc/odoo
cp /opt/odoo/server/debian/odoo.conf /etc/odoo/odoo.conf
chown odoo: /etc/odoo/odoo.conf
chmod 640 /etc/odoo/odoo.conf
mkdir /opt/odoo/server/extra-addons
chown odoo: /opt/odoo/ -R
nano /etc/odoo/odoo.conf
17- Modificamos y/o agregamos lo siguiente y guardamos el archivo, si no tienes módulo en estra-addons no coloque la ruta sino te dará problemas.
db_user = odoo
db_password = CLAVE DEL USUARIO ODOO EN POSTGRES
addons_path = /opt/odoo/server/addons,/opt/odoo/server/extra-addons/odoo_chile_community,/opt/odoo/server/extra-addons/odoo-modulos-3ros,/opt/odoo/server/extra-addons/odoo_general,/opt/odoo/server/extra-addons/odoo_chile_rrhh,/opt/odoo/server/extra-addons/odoo-modulos-web,/opt/odoo/server/extra-addons/odoo_general_web
logfile = /var/log/odoo/odoo-server.log
logrotate = True
log_level = warn
db_user = odoo
db_password = CLAVE DEL USUARIO ODOO EN POSTGRES
addons_path = /opt/odoo/server/addons,/opt/odoo/server/extra-addons/odoo_chile_community,/opt/odoo/server/extra-addons/odoo-modulos-3ros,/opt/odoo/server/extra-addons/odoo_general,/opt/odoo/server/extra-addons/odoo_chile_rrhh,/opt/odoo/server/extra-addons/odoo-modulos-web,/opt/odoo/server/extra-addons/odoo_general_web
logfile = /var/log/odoo/odoo-server.log
logrotate = True
log_level = warn
proxy_mode = True
longpolling_port = 8072
xmlrpc_port = 8069
xmlrpc_interface = 127.0.0.1
netrpc_interface = 127.0.0.1
workers = 17
limit_time_real = 1200
limit_time_cpu = 600
upstream odoo{
server localhost:8069;
}
upstream odoochat {
server localhost:8072;
}
server {
listen 80 default;
server_name erp.yourdomain.com 52.67.84.113;
keepalive_timeout 600;
client_header_timeout 600;
client_max_body_size 200M;
client_body_timeout 600;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
root /usr/share/nginx/html;
index index.html index.htm;
proxy_buffers 16 64k;
proxy_buffer_size 128k;
location / {
proxy_pass http://odoo;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
# invento mio
proxy_set_header X-ODOO_DBFILTER db;
proxy_pass_request_headers on;
}
location /longpolling {
proxy_pass http://odoochat;
}
}
[options]
addons_path = /opt/odoo/server/addons
admin_passwd = pass_1
db_host = False
db_name = False
db_password = pass_2
;db_port = 5432
db_user = odoo
;dbfilter = db10-chile-sii
list_db = True
log_db = False
logfile = /var/log/odoo/odoo-server.log
logrotate = True
;log_level = warn
proxy_mode = True
longpolling_port = 8072
xmlrpc_port = 8069
xmlrpc_interface = 127.0.0.1
netrpc_interface = 127.0.0.1
workers = 17
limit_time_real = 1200
limit_time_cpu = 600
cp /opt/odoo/server/debian/init /etc/init.d/odoo
chmod 755 /etc/init.d/odoo
chown root: /etc/init.d/odoo
nano /etc/init.d/odoo
DAEMON=/opt/odoo/server/odoo-bin
update-rc.d odoo defaults
update-rc.d postgresql enable
/etc/init.d/odoo start|stop|restart
nano /etc/postgresql/10/main/pg_hba.conf
Editamos la siguiente linea
local all all peer
*Sustituimos por:
local all all trust
service postgresql restart
/etc/init.d/odoo restart
sudo apt-get update -y
sudo apt-get install -y xfonts-75dpi
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.focal_amd64.deb
dpkg -i wkhtmltox_0.12.5-1.focal_amd64.deb
apt install -f
/etc/init.d/odoo restart
tail -f /var/log/odoo/odoo-server.log
tzselect
sudo dpkg-reconfigure tzdata
date --set "2007-05-27 17:27"
hwclock --set --date="2007-05-27 17:27"
hwclock
date
sudo -u postgres psql postgres
\password postgres
Enter new password:
cd /opt/odoo/server/extra-addons
git clone [email protected]:marlonodoo/odoo-modulos-3ros.git
git clone [email protected]:marlonodoo/odoo_chile_community.git
git clone [email protected]:marlonodoo/odoo_general.git
git clone [email protected]:marlonodoo/odoo_chile_rrhh.git
git clone [email protected]:marlonodoo/odoo-modulos-web.git
git clone [email protected]:marlonodoo/odoo_general_web.git
sudo apt-get install nginx -y
cd /etc/nginx/sites-available
git clone https://github.com/falconsoft3d/ngix-para-odoo-erp/
cd ngix-para-odoo-erp/
sudo cp /etc/nginx/sites-available/ngix-para-odoo-erp/default.conf /etc/nginx/sites-available/default.conf
cd ..
mv default default-temp
mv default.conf default
cd /etc/nginx/sites-available
nano default
server_name j.wemakeyourdayeasy.com 11.64.123.12;
nginx -s reload
cd /opt/odoo/server/extra-addons
pip install simplejson
apt install libxml2 python-openpyxl python-libxml2 ghostscript libssl-dev -y
apt install python-m2crypto
pip install mammoth xmltodict Crypto elaphe cchardet suds urllib3 SOAPpy xlwt xlsxwriter pybase64 dicttoxml rsa dropbox==7.3.1
pip install requests pysftp cryptography openpyxl pycrypto pyopenssl signxml==1.0.1
pip install python-telegram-bot
pip install telegram
sudo pip install mega.py
pip install Pillow==5.2.0
pip install qrcode==6.0
pip install pyotp==2.2.6
# Recursos Humanos
pip install pypandoc
pip install jinja2
sudo apt-get install pandoc
sudo apt-get install python-tidylib
36- Instalando el certificado digital ( https://certbot.eff.org/lets-encrypt/ubuntuxenial-nginx )
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx
sudo certbot --nginx
-A
- 2
Dentro de Odoo configuras los parámetros.
Configuración > Parámetros > Parámetros del sistema
web.base.url
http -> https
web.base.url.freeze
True
Hasta aquí la instalación…. los siguientes comandos son para configuración de programación y no son necesarios.
/etc/init.d/o +Tab
/etc/init.d/odoov8 restart
tail -f /var/log/odoo/odoo-server.log
sudo -su postgres
psql
alter role odoo with password 'odoo';
dbfilter = db10_*
/home/marlon/odoo/odoo_10/odoo-bin
--config=/home/marlon/odoo/odoo_10/odoo.conf
/home/marlon/odoo/odoo_10
sudo chown marlon: -R odoo_10/
[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = odoo
db_password = odoo
addons_path = /home/marlon/odoo/odoo_10/addons
git clone https://github.com/odoo/odoo.git --branch 10.0 --single-branch odoo_10
/home/marlon/Documentos/odoo-apt/odoo-10.0/odoo-bin
--config=/home/marlon/Documentos/odoo-apt/odoo-10.0/debian/odoo.conf
sudo apt-get install putty
puttygen private.ppk -o private-key -O private-openssh
ssh -i private-key username@remote-server-ip
chown -R marlon odoo-10.0
grep "243028" /var/log/odoo/odoo-server.lo*
grep "Documento no enviado" /var/log/odoo/odoo-server.log
grep "'STATUS', u'0" /var/log/odoo/odoo-server.log
grep "242893" /var/log/odoo/odoo-server.log
pip install Babel==2.3.4
pip install decorator==4.0.10
pip install docutils==0.12
pip install ebaysdk==2.1.4
pip install feedparser==5.2.1
pip install gevent==1.1.2
pip install greenlet==0.4.10
pip install jcconv==0.2.3
pip install Jinja2==2.8
pip install lxml==3.5.0
pip install Mako==1.0.4
pip install MarkupSafe==0.23
pip install mock==2.0.0
pip install ofxparse==0.16
pip install passlib==1.6.5
pip install Pillow==3.4.1
pip install psutil==4.3.1
pip install psycogreen==1.0
pip install psycopg2==2.7.1
pip install pydot==1.2.3
pip install pyparsing==2.1.10
pip install pyPdf==1.13
pyserial==3.1.1
pip install Python-Chart==1.39
pip install python-dateutil==2.5.3
pip install python-ldap==2.4.27
pip install python-openid==2.2.5
pip install pytz==2016.7
pip install pyusb==1.0.0
pip install PyYAML==3.12
pip install qrcode==5.3
pip install reportlab==3.3.0
pip install requests==2.11.1
pip install six==1.10.0
pip install suds-jurko==0.6
pip install vatnumber==1.2
pip install vobject==0.9.3
pip install Werkzeug==0.11.11
pip install wsgiref==0.1.2
pip install XlsxWriter==0.9.3
pip install xlwt==1.1.2
pip install xlrd==1.0.0
[FACTURA DE VENTA]
Ventas de Giro = Ingresos
Iva Venta == Pasivo actual
[FACTURA DE COMPRA]
Proveedores == Coste directo de la ventas
IVA Compra == Activos Actuales
[CLIENTES]
Deudores por Ventas == A Cobrar
[PROVEEDOR]
Por pagar proveedores vario == A Pagar
proxy_mode = True
longpolling_port = 8072
xmlrpc_port = 8069
xmlrpc_interface = 127.0.0.1
netrpc_interface = 127.0.0.1
workers = 17
limit_time_real = 1200
limit_time_cpu = 600
upstream odoo{
server localhost:8069;
}
upstream odoochat {
server localhost:8072;
}
server {
listen 80 default;
server_name erp.yourdomain.com 52.67.84.113;
keepalive_timeout 600;
client_header_timeout 600;
client_max_body_size 200M;
client_body_timeout 600;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
root /usr/share/nginx/html;
index index.html index.htm;
proxy_buffers 16 64k;
proxy_buffer_size 128k;
location / {
proxy_pass http://odoo;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
# invento mio
proxy_set_header X-ODOO_DBFILTER db;
proxy_pass_request_headers on;
}
location /longpolling {
proxy_pass http://odoochat;
}
}