Tuesday, May 2, 2017

Centos 6: csf blocking whois

symptom:
# whois google.com
[Querying whois.verisign-grs.com]
[Unable to connect to remote host]
To solve this problem, edit /etc/csf/csf.conf, make sure outgoing to port 43 and 53 are allowed.
# vi /etc/csf/csf.conf
...
# Allow outgoing TCP ports
TCP_OUT = "20,21,22,25,43,53,80,110,113,443,587,993,995"
...
# Allow outgoing UDP ports
# To allow outgoing traceroute add 33434:33523 to this list
UDP_OUT = "20,21,43,53,113,123"
...
Restart your csf
# csf -r
Done!

Friday, April 7, 2017

Centos 6/7: using needs-restarting after yum update

Install yum utility
# yum install yum-utils

Some update require system to restart or some services to restart. To determine system needs to restart or some services need to restart, run needs-restarting:

# needs-restarting
1512 : /usr/sbin/sshd
609 : /usr/sbin/NetworkManager --no-daemon
615 : /usr/lib/polkit-1/polkitd --no-debug

Tested on Centos 6.9 and Centos 7.3

References:

Thursday, April 6, 2017

Bignox App Player: upgrade without losing application and data

Nox App Player/NoxPlayer 3.8.1.1  has been release on March 31, 2017. It is based on Android 4.4.2. The upgrade will overwrite any installation on your PC. To prevent any lost your application and data, you need to backup your current Nox.
  1. Use Nox Multi-Drive to backup your application and data. For detail see How to backup and restore your data in Nox App Player. Wait until backup perform successful. It may takes some minutes.
  2. Download latest Nox App Player from bignox.com
  3. Exit any Nox App Player programs, and start installation. 
  4. Installation ask you to overwrite existing installation and choose continue.
  5. At the end of installation, there is a text "restore" (can be click), click it. 
  6. Choose your backup file to restore it into new Nox App Player. 
  7. Wait until finish, it may takes some minutes.
References:

cli: Difference between >> and > operators

Just to refresh and for personal note.
This is apply to all L/Unix.
  • Operator >> will append text to a file.
  • Operator > will overwrite the data in file.

References:

Tuesday, April 4, 2017

Tunning: Odoo 9 and PostgreSQL 9.4

This configuration may not suit for every needs

Default Odoo 9 installation folder:


  • /usr/lib/python2.7/dist-packages/openerp/
  • /usr/lib/python2.7/dist-packages/openerp/addons/

Edit /etc/odoo/openerp-server.conf

...
max_cron_threads = 1
...

Edit /etc/postgresql/9.4/main/postgresql.conf

...
# - Memory -
shared_buffers = 8192MB                 # min 128kB
                                        # (change requires restart)
...
# - Checkpoints -
#checkpoint_segments = 3                # in logfile segments, min 1, 16MB each
checkpoint_segments = 32                # 512MB https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server
...
# - Planner Cost Constants -
#effective_cache_size = 4GB
effective_cache_size = 8GB
...
Note:
  • shared_bufferes = 1/4 physical memory
  • effective_cache_size = 1/2 physical memory

References: