npm
show npm configuration npm config list npm config ls -l -> to show all defaults outdated packages listing global outdated packages npm outdated -g –depth=0 update packages named n respectivelly npm sudo npm update -g n npm show npm cache […]
Node js
see https://nodesource.com/blog/nodejs-v012-iojs-and-the-nodesource-linux-repositories # First, you need to install the PPA in order to get access to its contents # curl -sL https://deb.nodesource.com/setup | sudo bash – curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash – # then install nodejs sudo apt-get […]
Ubuntu useful software/packages
info about package_name dpkg -l package_name sudo apt-get install git-gui (run then “git gui”) sudo apt-get install mesa-utils (see glxgears) sudo apt-get install alarm-clock-applet sudo apt-get install unity-tweak-tool -> Unity Tweak Tool sudo apt-get install compiz -> Compiz Config […]
Ubuntu: enable automatic file system check
sudo sed -i s/”#FSCKFIX=no”/”FSCKFIX=yes”/ /etc/default/rcS sudo reboot
Ubuntu: apache
print apache version apache2 -v # install module sudo apt-get install libapache2-svn # enable apache module sudo a2enmod headers sudo a2enmod dav_fs sudo a2enmod dav_svn # disable apache module sudo a2dismod php5 # apache status systemctl -l status apache2 […]
Ubuntu: X11 forward to putty
Installation download http://cygwin.com/setup-x86_64.exe install X11 package configure /etc/ssh/sshd_config sudo grep -nri X11 /etc/ssh X11Forwarding yes X11DisplayOffset 10 Cygwin-X config make sure XWin Server shortcat contains the command below: F:\cygwin64\bin\run.exe –quote /usr/bin/bash.exe -l -c “cd; /usr/bin/startxwin — -listen tcp” configure putty […]
Ubuntu: php-fpm
see php-fpm service at /etc/init.d/php5-fpm # see configuration at /etc/php5/fpm # Any php application must be owned by www-data (php-fpm’s user) and have 770 permission set. service php5-fpm status
Ubuntu: creating an init.d service
#create then put your script (e.g. nginx) into /etc/init.d with root as user & group sudo update-rc.d nginx defaults -> loads the script sudo update-rc.d nginx enable -> enable the script to run at system sturtup/boot service nginx start -> […]
Ubuntu: login with certificate
See also https://adrhc.go.ro/wordpress/how-to-create-a-certificate/ for how to create public-pub.openssh. # Configure server # Uncomment in /etc/ssh/sshd_config: AuthorizedKeysFile %h/.ssh/authorized_keys # public-key in openssh format cat public-key.openssh.pem > ~/.ssh/authorized_keys # Configure client # id_rsa -> mandatory name # # private-key.pem.des3.bitvise must start […]
Ubuntu & cron
edit cron tab in order to add a new cron job for the current user crontab -e # show current cron jobs crontab -l # cron jobs saved here: sudo cat /var/spool/cron/crontabs/adr # job info sudo service cron status […]
Ubuntu swap & ram
ALT+F2 gksudo gedit /etc/sysctl.conf #append or modify (if already exists) the following: #0 .. 100 (0 = no swap) vm.swappiness=1 # http://askubuntu.com/questions/1357/how-to-empty-swap-if-there-is-free-ram # swap info swapon -s cat /proc/swaps vmstat 1 systemctl list-units –type=swap systemctl list-units | grep .swap # […]
Ubuntu: phpMyAdmin setup
wget https://files.phpmyadmin.net/phpMyAdmin/4.5.0.2/phpMyAdmin-4.5.0.2-english.tar.gz tar xvzf phpMyAdmin-4.5.0.2-english.tar.gz mv phpMyAdmin-4.5.0.2-english myadmin mkdir myadmin/config chown -R **** myadmin/config /etc/php5/fpm/php.ini session.gc_maxlifetime = 3600 sudo service php5-fpm restart #save configuration created using https://adrhc.go.ro/myadmin/setup mv -v myadmin/config/config.inc.php myadmin/config.inc.php sudo chown **** myadmin/config.inc.php rmdir myadmin/config sudo service php5-fpm […]