Showing posts with label linux commands. Show all posts
Showing posts with label linux commands. Show all posts

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"


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

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!

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!

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.
sudo chmod 775 'your directory'

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


sudo rsync -avzh /odoo/trunk/app/customaddons /odoo/sit3/app


eureka!


reference:


Tuesday, July 24, 2018

free online comma separating tool

https://delim.co/#