Wednesday, April 29, 2020

Fedora 32 change max open files

#soft limit
> ulimit -Sn
1024

#hard limit
> ulimit -Hn
524288

Add to /etc/sysctl.conf

fs.inotify.max_user_watches=524288
fs.file-max=100000


Add to /etc/security/limits.conf

*     soft  nofile 100000
*     hard  nofile 524288
root  soft  nofile 100000
root  hard  nofile 524288


reboot
https://www.99ideas.in/blog-post/increasing-file-descriptors-and-open-files-limit-in-centos-7/

Tuesday, April 28, 2020

Entware oPKG on Synology NAS

  1. To Install opkg:
  2. Open Package Center Then Settings
  3. Go to the General Tab and under Trust level Click “Any Publisher
  4. Go to the Package Sources Tab Then Add https://www.cphub.net/ to package sources
  5. Search for “Easy Bootstrap Installer” and Install
  6. Choose “Entware oPKG
  7. sudo -i
  8. opkg list

Thursday, April 16, 2020

Update default Python on Debian


Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.14.173-173 armv7l)

> root@hc1-node-1:~# update-alternatives --list python
update-alternatives: error: no alternatives for python

> root@hc1-node-1:~# python -V
Python 2.7.17

> root@hc1-node-1:~# update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in auto mode

> root@hc1-node-1:~# update-alternatives --install /usr/bin/python python /usr/bin/python3.6 2
update-alternatives: using /usr/bin/python3.6 to provide /usr/bin/python (python) in auto mode

> root@hc1-node-1:~# update-alternatives --install /usr/bin/python python /usr/bin/python3.7 3
update-alternatives: using /usr/bin/python3.7 to provide /usr/bin/python (python) in auto mode

> root@hc1-node-1:~# update-alternatives --list python
/usr/bin/python2.7
/usr/bin/python3.6
/usr/bin/python3.7


> root@hc1-node-1:~# update-alternatives --config python
There are 3 choices for the alternative python (providing /usr/bin/python).

  Selection    Path                Priority   Status
------------------------------------------------------------
* 0            /usr/bin/python3.7   3         auto mode
  1            /usr/bin/python2.7   1         manual mode
  2            /usr/bin/python3.6   2         manual mode
  3            /usr/bin/python3.7   3         manual mode

Press <enter> to keep the current choice[*], or type selection number:

> root@hc1-node-1:~# python -V
Python 3.7.5