Install the lm-sensors Install lm-sensors and fancontrol Install fancontrol packages. # Configure lm-sensors; respond with yes for everything below (will modify /etc/modules): sudo sensors-detect # Monitoring programs won’t work until the needed modules are # loaded. You may want to […]
Month: October 2015
/var/mail && thunderbird
See http://askubuntu.com/questions/1916/how-can-i-access-system-mail-in-var-mail-via-thunderbird. Create the account Thunderbird -> Edit -> Account settings -> Account Action -> Add Another Account -> Unix Mailspool (Movemail) Your Name: adr (mailspool) Email Address: adr@localhost Browse your mails Open Thunderbird then press Get Messages button; you […]
nagios3
change user & password in passwd-file specified by /etc/nagios3/apache2.conf # change nagiosadmin to the user chosen sed -i s/”nagiosadmin”/”adr”/ /etc/nagios3/cgi.cfg # Edit the disk.cfg file located in /etc/nagios-plugins/config and add the arguments # -A -i ‘.gvfs’ # at the […]
Angularjs project setup (NODE & YEOMAN)
see also https://docs.angularjs.org/guide/migration # general setup sudo ln -s /usr/bin/nodejs /usr/bin/node -> when node file is not found sudo npm install -g yo bower grunt-cli generator-karma generator-angular # see https://docs.npmjs.com/cli/view # npm help list # sudo npm list -gp […]
Linux errors/problems, tips & tricks
error # adr@adr-desktop:~$ su-to-root -X -c zenmap (gksu:24352): Gtk-WARNING **: cannot open display: adr@adr-desktop:~$ echo $DISPLAY … showing nothing … adr@adr-desktop:~$ export DISPLAY=:0.0 -> add this in .bashrc adr@adr-desktop:~$ su-to-root -X -c zenmap … now is working … # […]
angularjs errors
error (e.g. in project named projectx) Running “imagemin:dist” (imagemin) task Fatal error: Cannot read property ‘contents’ of undefined # solution 1 remove node_modules/grunt-contrib-imagemin from projectx copy node_modules/grunt-contrib-imagemin to projectx from another working project run again grunt build # solution […]
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 -> […]