Skip to main content

Posts

How to Install PostgreSQL 12 on CentOS/RHEL/OEL 7

This article will help you to install PostgreSQL 12 on CentOS/RHEL/OEL 7 system. 1.  Configure Yum Repository # rpm -Uvh https://yum.postgresql.org/12/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm 2. Install PostgreSQL 12 on CentOS # yum install postgresql12-server 3. Initialize PGDATA # /usr/pgsql-12/bin/postgresql-12-setup initdb PostgreSQL 12 default data directory location is /var/lib/pgsql/12/data 4. Enable PostgreSQL Server on reboot # systemctl enable postgresql-12.service 5. Start PostgreSQL Server # systemctl start postgresql-12.service 6. Verify PostgreSQL Installation # su - postgres -c "psql" psql (12.0) Type "help" for help. postgres=#   You may create a password for user Postgres for security purposes. postgres=# \password postgres Thanks!!!!!!!!!! Enjoy Programming!!! :) Referecnce: https://tecadmin.net/install-postgresql-11-on-centos/

Odoo 12: Unable to find Wkhtmltopdf on this system.

Hi, First of all very Happy New Year-2019 to each and everyone. Today, I am going to post my first article of this year. I hope it will help people. Today's post is about Wkhtmltopdf error for odoo12. Even after you install Wkhtmltopdf you may encounter this error if you are not installing the compatible version needed for odoo12. Odoo version: Odoo 12.0 (Community Edition) Error: OS: Ubuntu 18.04 LTS For Wkhtmltopdf compatible versions please follow the link: https://github.com/odoo/odoo/wiki/Wkhtmltopdf For different Wkhtmltopdf verions: https://builds.wkhtmltopdf.org/0.12.1.3/ Solution steps: sudo wget https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~bionic_amd64.deb or try another URL: sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb sudo dpkg -i wkhtmltox_0.12.1.3-1~bionic_amd64.deb sudo apt-get install -f sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin sudo ln -s /usr/l...

Python: Parse JIRA comments to HTML

Hi Guys, this article is to render JIRA comments into html form. For this JIRA provides one REST API to get things done. Python code is as follow: import requests from requests.auth import HTTPBasicAuth headers = {'content-type': 'application/json'} response = requests.post(         'https://jira.xxxx.com/rest/api/1.0/render',          verify=False,          data='{"rendererType":"atlassian-wiki-renderer","unrenderedMarkup":"*Hello World*"}',          headers=headers,          auth=HTTPBasicAuth('username','password') ) and response will be <p><b>Hello World</b></p> Postman Screenshots: Thanks!!!!!!!!!! Enjoy Programming!!! :)

RHEL wsgi nginx error: permission denied while connecting to upstream

I had the same issue. What I found is that "SELinux" was blocking nginx from using the socket. If SELinux is enabled you can check the status (which should look similar to below): [root@localhost ~]# sestatus SELinux status: enabled SELinuxfs mount: /selinux Current mode: enforcing Mode from config file: enforcing Policy version: 21 Policy from config file: targeted You can add an NGINX SELinux policy or just disable SELinux to get around the issue.  Check the status of SELinux using       # sestatus If it says enabled, vi into /etc/sysconfig/selinux . This is a symlink to /etc/selinux/config so modify this file in case you don't find the above file.       Terminal command: sudo vi /etc/sysconfig/selinux      The file is highly self-explanatory. Just change the value of           SELINUX to "disable...

Odoo 10: Link external url to menu

Hi, following code can be used to link menu to external url: <record id="external_link" model="ir.actions.act_url">         <field name="name">Odoobiz</field>         <field name="type">ir.actions.act_url</field>         <field name="target">new</field>         <field name="url">http://blog.odoobiz.com</field> </record> <menuitem action="external_link" name="Odoobiz" id="menu_odoobiz_link" parent="website_blog.menu_website_blog_root"/> This code will create Odoobiz menu under Blog menu and link it to http://blog.odoobiz.com . This will open link in new tab. If you want to open it in same tab itself. Please use - <field name="target">self</field> Thanks!!!!!!!! Enjoy Programming!! :)

PostgreSQL: Scheduler to take db backup every two hours

Hi, Today we are going to write a scheduler to take PostgreSQL db dump every two hours in ubuntu OS. 1. Create a folder called backup in your home directory where we are going to store all the dump files. 2. Because it's cron script so can provide password at runtime, we are going to store required details in ~/. pgpass file in following format hostname:port:database:username:password localhost:5432:mydb:user1:test123 don't forget to change it's permission to 0600 ( chmod 0600 ~/.pgpass ) Note: You can change localhost with Server IP if you have 3. Create a file to write script for db backup. Let's create it in home directory itself and call it db_backup.sh Add following command to the file. pg_dump -d mydb -h localhost -p 5432 -U user1 -w  | gzip > /home/ubuntu/backup/$(date +%Y-%m-%d-%H:%m:%s).psql.gz It will save the dump file with date and time as name. e.g  2017-09-16-07:09:1505546517.psql.gz Don't forget to make db_backup.sh ...

Odoo10: Automatically Update Currency Exchange Rates

Hi, we have developed a module to automatically update currency exchange rates with respect to your company's base currency. This module can be used with any of the following API: OANDA EXCHANGE RATE API CURRENCYLAYER EXCHANGE RATE API  FOREX CURRENCY CONVERSION API You can buy this module directly from us or from apps.odoo.com using following url: https://www.odoo.com/apps/modules/10.0/odoobiz_exchange_rates/ Thanks!!!! Enjoy Programming!! :)