CentOS

SELinux for nginx connect to gunicorn

  • Posted on: 7 January 2017
  • By: oon
SELinux on CentOS

Biasanya saya sering menonaktifkan SELinux begitu pertama kali masuk ke console linux yang diinisialisasi oleh penyedia cloud.

Kali ini ingin mencoba bagaimana mengaktifkan setting SELinux hanya agar nginx bisa connect ke gunicorn socket file saat memberikan layanan untuk Django.

Oke semua bermula dari log nginx:

Install PostgreSQL 9.6 on Centos 7

  • Posted on: 29 September 2016
  • By: oon
PostgreSQL

Postgresql Global Development Group (PGDG) sudah menyediakan repo untuk memudahkan pengguna Linux dalam instalasi PosgreSQL.

Untuk Redhat dan distribusi linux yang berbasis Redhat, misalnya Centos, tersedia di [1]

yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/p...

yum install postgresql96-server

Setting Timezone and Firewall on CentOS 7

  • Posted on: 5 December 2014
  • By: oon
Centos Timezone and Firewall Setting

sudo timedatectl list-timezones

sudo timedatectl set-timezone region/timezone
sudo timedatectl set-timezone Asia/Jakarta

 

sudo firewall-cmd --permanent --list-all

sudo firewall-cmd --permanent --add-service=https

sudo firewall-cmd --permanent --add-port=7777/tcp

[1]https://www.digitalocean.com/community/tutorials/additional-recommended-...

What's New on CentOS 7?

  • Posted on: 7 July 2014
  • By: oon
CentOS Linux

CentOS 7 release on July 7th, 2014 [1].

Here's something that I found quite new related to previous versions:


[root@api ~]# chkconfig --list

Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.

If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'.

yum remove with dependencies

  • Posted on: 10 March 2014
  • By: oon

Waktu kita install package dengan yum kan secara otomatis langsung dicarikan dependencies-nya, nah waktu mau uninstall tidak secara otomatis menghapus dependencies yang tidak lagi digunakan. Nah solusinya adalah menggunakan plugin yum bernama yum-plugin-remove-with-leaves

Berarti langkahnya adalah install plugin tersebut, kemudian lakukan penghapusan package yang diinginkan sekaligus dengan dependencies-nya:


# yum install yum-plugin-remove-with-leaves
# yum remove *packagename* --remove-leaves

RPM Fatal error, run database recovery

  • Posted on: 8 March 2014
  • By: oon

when you received error while update yum:

rpmdb: Thread/process 4313/140191119701760 failed: Thread died in Berkeley DB library

error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery

error: cannot open Packages index using db3 -  (-30974)

error: cannot open Packages database in /var/lib/rpm

CRITICAL:yum.main:

here's how to fix:

# ls /var/lib/rpm/__db.00*
# rm -f /var/lib/rpm/__db.00*
# rpm --rebuilddb
# yum clean all

Tags: 

hostname -f return unknown host

  • Posted on: 6 March 2014
  • By: oon

Some scripts in linux, getting hostname using command `hostname -f`. I have tried this command on CentOS Linux.

If you got the command return unknown host, please check this lists:

  • check your /etc/sysconfig/network file,
    find variable HOSTNAME and make sure it's declared on file.
  • check environment variable $HOSTNAME, and make sure it returns the hostname that you set.
  • check if your hostname already declared with IP Address on /etc/hosts

hope it helps!

Tags: 

Pages