Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts
Thursday, February 13, 2020
Tuesday, December 17, 2019
Sunday, February 17, 2019
Error starting userland proxy: listen tcp 0.0.0.0:5432: bind: address already in use
This issue happens when I installed Postgres in my vagrant (vm) and then I after a while I removed it. But the service is still running in the system causing the default 5432 port is not available to be used.

first I run this command
but still, it didn't totally remove. so I have to run this command to list all running postgres

then, I run again this command

Eureka!
Thanks for this reference
https://askubuntu.com/questions/32730/how-to-remove-postgres-from-my-installation

first I run this command
sudo apt-get --purge remove postgresql
but still, it didn't totally remove. so I have to run this command to list all running postgres
dpkg -l | grep postgres

then, I run again this command
sudo apt-get --purge remove postgresql postgresql-doc postgresql-common

Eureka!
Thanks for this reference
https://askubuntu.com/questions/32730/how-to-remove-postgres-from-my-installation
Wednesday, January 30, 2019
useful unix commands
to see all processes
ps -aef | more
ps -aef | sort | more
ps -aef | sort > out.txt
Wednesday, December 5, 2018
curl: (60) Peer's Certificate issuer is not recognized
After our company implements stricter rules, I can't install docker in my vagrant properly. I have been solving this issue for about a week and its hard to point out the correct solution until I found from stackoverflow.
add this in vagrant file
config.vm.box_download_ca_cert = "./Fortinet_CA_SSL.cer"
https://stackoverflow.com/questions/47676980/curl-60-peers-certificate-issuer-is-not-recognized
add this in vagrant file
config.vm.box_download_ca_cert = "./Fortinet_CA_SSL.cer"
Finally fixed it. Post the answer here as reference.
- Export company trusted root certificate with .cer extension. Somthing naming external root certificate
- Convert the ca file to .pem file using
openssl x509 -in xxx.cer -inform der -outform pem -out xxx.pem
Then on the centos 7 os:
- Install the ca-certificates package: yum install ca-certificates
- Enable the dynamic CA configuration feature: update-ca-trust force-enable
- Add the exported pem files to /etc/pki/ca-trust/source/anchors/
- Use command: update-ca-trust extract
https://stackoverflow.com/questions/47676980/curl-60-peers-certificate-issuer-is-not-recognized
Monday, November 26, 2018
Sunday, September 23, 2018
Fix: is not in the sudoers file. This incident will be reported.
lynard is not in the sudoers file. This incident will be reported.
switch to root
sudo usermod -g sudo lynard
Eureka!
switch to root
sudo usermod -g sudo lynard
Eureka!
Thursday, August 30, 2018
Permanent aliases
Sometimes typing docker-compose up is too long to type. The best to make it shorter is to create aliases like alias ll="ls -al" but this is only temporary.
To make it a permanent aliases edit the ~/.bashrc and add the following
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias dbup='docker-compose up -d db'
alias up='docker-compose up app'
alias stop='docker-compose stop'
alias re='docker-compose restart'
alias logs='docker-compose logs -f --tail 10'
refresh
source ~/.bashrc
Eureka!
To make it a permanent aliases edit the ~/.bashrc and add the following
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias dbup='docker-compose up -d db'
alias up='docker-compose up app'
alias stop='docker-compose stop'
alias re='docker-compose restart'
alias logs='docker-compose logs -f --tail 10'
refresh
source ~/.bashrc
Eureka!
Sunday, August 5, 2018
How to make folder writable in ubuntu
That makes the directory writable, readable and executable by anybody
sudo chmod 777 directory
It will give all permission except write by anybody.
It will give all permission except write by anybody.
sudo chmod 775 'your directory'
Cron job
sudo crontab -e
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of week (0 - 6) (Sunday to Saturday; 7 is also Sunday on some systems)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * * command_to_execute
0 0 * * * /opt/odoo12/run_backup.sh
Sunday, July 29, 2018
Rsync (Remote Sync)
Every time I create a new odoo instance is that I always copy my source code to a new odoo folder setup. It's not only time-consuming but every time I need to edit a single source code I also need to edit the other source code. bit confusing? anyway, I'm the only one who understands. :)
I found this Linux command and I think it is very useful. The last time I remember that I have encountered this kind of command but didn't think of it much how useful it is.
so here we go, without further ado.
first install the tool
sudo apt-get install rsync
I found this Linux command and I think it is very useful. The last time I remember that I have encountered this kind of command but didn't think of it much how useful it is.
so here we go, without further ado.
first install the tool
sudo apt-get install rsync
sudo rsync -avzh /odoo/trunk/app/customaddons /odoo/sit3/app
eureka!
reference:
Wednesday, July 25, 2018
Tuesday, July 24, 2018
Wednesday, July 18, 2018
Monday, July 2, 2018
Change user and group permission in linux
problem:
solution:
sudo chown -R odoo:odoo vbroker20-beta2
references:
Monday, June 18, 2018
VBoxGuestAdditions in vagrant centos
1. sudo yum update && sudo yum -y install kernel-headers kernel-devel
2. manually by downloading the iso file inside VM (e.g. wget) and installing it, e.g.
wget http://download.virtualbox.org/virtualbox/5.0.16/VBoxGuestAdditions_5.0.16.iso -P /tmp
(read only to write permission)
sudo chmod 777 /tmp/VBoxGuestAdditions_5.0.16.iso
sudo mount -o loop /tmp/VBoxGuestAdditions_5.0.16.iso /mnt
(install libraries)
sudo yum -y install gcc
sudo yum install freeglut-devel
sudo yum install mesa*
sudo sh -x /mnt/VBoxLinuxAdditions.run # --keep
forget all the commands above , just download the geerlingguy/centos7
that's it!!! voila
Sunday, June 3, 2018
fluentd the new logging
while working in one of my freelance jobs, I encountered this logging technology fluentd. It is quite interesting, hopefully can learn with this new technology.
I have installed in my centos operating system
References:
https://docs.fluentd.org
I have installed in my centos operating system
curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent3.sh | sh
References:
https://docs.fluentd.org
Wednesday, March 14, 2018
Linux command
To set new password for root in Ubuntu
> sudo passwd root
To locate a file
find / -name 'pg_hba.conf' 2>/dev/null
To add new user
> sudo adduser --home /home/demo --shell /bin/bash demo
> sudo passwd root
To locate a file
find / -name 'pg_hba.conf' 2>/dev/null
To add new user
> sudo adduser --home /home/demo --shell /bin/bash demo
Monday, February 19, 2018
Install VirtualBox guest additions in CentOS
Open up the virtualbox centos gui
type:
su -
yum update kernel*
yum -y install kernel-devel kernel-headers dkms gcc gcc-c++
reboot
insert virtual optical disk in settings
mount /dev/cdrom /mnt
cd /mnt
./VBoxLinuxAdditions.run
Merci!
References:
http://nanxiao.me/en/install-virtualbox-guest-additions/
type:
su -
yum update kernel*
yum -y install kernel-devel kernel-headers dkms gcc gcc-c++
reboot
insert virtual optical disk in settings
mount /dev/cdrom /mnt
cd /mnt
./VBoxLinuxAdditions.run
Merci!
References:
http://nanxiao.me/en/install-virtualbox-guest-additions/
Subscribe to:
Posts (Atom)
free online comma separating tool
https://delim.co/#
-
In my current company, I'm using Visual Paradigm for my documentation task. If you go there site, you can either download community and ...
-
I spend many days to figure it out my problem in Vagrant. After I posted my question in stackoverflow, nobody is helping me instead they dow...
-
I used KeePass long time ago and until now I'm still using it. It's a great tool to save your password encrypted. At my home, I sa...


