Friday, March 27, 2015

Lamp server install link



Here is a nice LAMP server setup page.

Using and posting this from a 2" x 2" x 2" quad core cubox debian system.

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-debian

Will copy edit inline later on update.

use sudo apt-get -y install apache2 mysql-server mysql-client php5-cli phpmyadmin 
to get that running

Install mysql
Install apache2 (if not by default)
install php

if php is installed prior to apache you may need to install

libapache2-mod-php7.0 (or whatever php if earlier or later install)

Thursday, March 26, 2015

Show installed packages and other queries on Ubuntu / Debian

http://askubuntu.com/questions/17823/how-to-list-all-installed-packages



To get a list of packages installed locally do this in your terminal:
dpkg --get-selections | grep -v deinstall
To save that list to a text file called packages on your desktop do this in your terminal:
dpkg --get-selections | grep -v deinstall > ~/Desktop/packages

if you wish to install apt or aptitude the following will work.  This is a package other than what contains apt-get

apt list installed

Nice NFS setup page


https://help.ubuntu.com/community/SettingUpNFSHowTo

NFS server


To check the NFS server is not installed, you can do...
  • $ dpkg -l | grep nfs-kernel-server
Install the required packages...

# apt-get install nfs-kernel-server

NFSv4 client


Install the required packages...
  • # apt-get install nfs-common 
On the client we can mount the complete export tree with one command:
  • # mount -t nfs -o proto=tcp,port=2049 nfs-server:/ /mnt
    Note that nfs-server:/export is not necessary in NFSv4, as it is in NFSv3. The root export :/ defaults to export with fsid=0.
We can also mount an exported subtree with:
  • # mount -t nfs -o proto=tcp,port=2049 nfs-server:/users /home/users
To save us from retyping this after every reboot we add the following line to /etc/fstab:

nfs-server:/   /mnt   nfs    auto  0  0
 
It may be required to force rpcbind to start.
 
this is accomplished by:
 
update-rc.d enable rpcbind
 
/etc/init.d/rpdbind start
 
The latter starts it for the current boot incarnation.  The update-rc.d makes it be
started on all subsequent boots till it is explicitly disabled.
 

Friday, March 6, 2015

XFCE window manager tab setting switch window key

XFCE on cubox comes with a setting such that the tab character switches windows, rather than auto completing.

info on this page:

http://ubuntuforums.org/archive/index.php/t-1771058.html

Also

http://stackoverflow.com/questions/23418831/command-line-auto-complete-tab-key-not-work-in-terminal-for-ubuntu

Without changing any settings, use control-i to autocomplete.

Try using Ctrl-I instead of tab

For changing the setting in the XFCE xml config:

edit
~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml

find the line 

<property name="&lt;Super&gt;Tab" type="string" value="switch_window_key"/>

and change it to 

<property name="&lt;Super&gt;Tab" type="empty"/>

reboot or whatever and then tab will work properly!

I have no idea why but when using vnc this file seems to override tab's normal behavior and makes it into a switch window key.

On Ubuntu 14.04, the xfce4 somehow resets the xfce4-keyboard-shortcuts.xml file each time you log in, so one needs a method to change the default

the Window manager keyboard shortcuts don't include a setting for the tab-complete Super tab, so it must be edited somewhere else.

Explanation of how to find and change what settings are in the Window Manager->Keyboard tab is here

http://forum.xfce.org/viewtopic.php?id=8860

Found explanation:
change "Switch window for same application" to clear from "alt tab"

xx

Building packages on debian jesse arm

http://lauri.v├Ásandi.com/2014/04/debian-jessie-sunxi-packages.html

Monday, March 2, 2015

Nethogs Linux per process bandwidth tool


link to page


http://www.cyberciti.biz/faq/linux-find-out-what-process-is-using-bandwidth/

sudo apt-get install nethogs

example incantations:


nethogs
nethogs eth1
nethogs [option] eth0 eth1
nethogs [option] eth0 eth1 ppp0
sudo /usr/sbin/nethogs eth0

Sunday, March 1, 2015

Handy network connections trick



alias mynetcon='sudo lsof -n -P -i +c 15'
mynetcon 

https://plus.google.com/104257421720370350735/posts/LZPwPoGoRom

 example:

COMMAND           PID     USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
sshd              654     root    3u  IPv6     8214      0t0  TCP *:22 (LISTEN)
sshd              654     root    4u  IPv4     8216      0t0  TCP *:22 (LISTEN)
avahi-daemon      807    avahi   13u  IPv4     7999      0t0  UDP *:5353
avahi-daemon      807    avahi   14u  IPv6     8000      0t0  UDP *:5353
avahi-daemon      807    avahi   15u  IPv4     8001      0t0  UDP *:55143
avahi-daemon      807    avahi   16u  IPv6     8002      0t0  UDP *:56264

...