Posts

Showing posts from April, 2021

increase local php memory limit

  Local Value check htacess ## adjust memory limit     php_value memory_limit 2048M     php_value max_execution_time 18000

How to Troubleshoot/Investigate Ubuntu slow boot/startup (systemd)

Keywords: Ubuntu check slow boot, Ubuntu check slow startup, Ubuntu troubleshoot slow boot, Ubuntu check slow startup, systemd, systemd-analyze blame, Kali Linux, boot time, slow boot time, slow startup time Sometimes, Ubuntu startup takes very long time, we want to find out the cause. (Following command is not limited to Ubuntu, it can actually be used on any Linux distributions with systemd installed) When the systems boots up completely, we can use following command to check which process took longest time during boot time. $ sudo systemd-analyze blame We can also use head to see top 10 slowest ones $ sudo systemd-analyze blame | head root@linux:/var/log# sudo systemd-analyze blame | head 55.280s plymouth-quit-wait.service 22.142s snapd.service 22.140s dev-sda6.device 17.104s networkd-dispatcher.service 15.401s dev-loop60.device 15.234s dev-loop64.device 15.221s dev-loop39.device 15.006s udisks2.service 14.995s dev-loop66.device 14.826s dev-loop58.device if you have dual boot with w

FTP shows diffrent time on file uploads

 change  use_localtime=NO in /etc/vsftpd.conf systemctl restart vsftpd

how to setup nodejs

install nodejs for a single user nodejs apps needs to be run under user not glabally or even root this will encounter errors add the user in sudoers file usermod -aG sudo username passwd username then install nvm globally sudo apt install curl curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash then install node js using nvm then add bash profile manually vi ~/.bashrc export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm add above to lines in bashrc => Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zprofile, ~/.zshrc, and ~/.profile. => Create one of them and run this script again    OR => Append the following lines to the correct file yourself: export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm strap5887@vmi728455:~/public_html/strapi-backend$ sudo mkdir -p /home/strap5887 if you m