This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| computing:gnulinux [2018/05/18 07:47] – oemb1905 | computing:gnulinux [2018/05/18 08:05] (current) – removed oemb1905 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ------------------------------------------- | ||
| - | * **gnulinux** | ||
| - | * **Jonathan Haack** | ||
| - | * **Haack' | ||
| - | * **netcmnd@jonathanhaack.com** | ||
| - | ------------------------------------------- | ||
| - | |||
| - | //Welcome to my gnulinux wiki page. Tis page has simple and complex system administrationnotes to remind me when I forget something that I already learned! | ||
| - | |||
| - | |||
| - | ------------------------------------------- | ||
| - | #**optical media ripping from command line** | ||
| - | ------------------------------------------- | ||
| - | |||
| - | cdrecord -pad -dao -data blag-140k-i686.iso | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | ------------------------------------------- | ||
| - | #**security & policy information** | ||
| - | ------------------------------------------- | ||
| - | |||
| - | sudo nano / | ||
| - | |||
| - | Prevent Log in - create file | ||
| - | |||
| - | / | ||
| - | |||
| - | tcpdump common uses; monitoring traffic on network | ||
| - | |||
| - | tcpdump -n -i < | ||
| - | tcpdump -n -i < | ||
| - | tcpdump -i eth0 -nn -c 10 tcp and host < | ||
| - | tcpdump -i wlan0 port http or port smtp or port imap or port pop3 -l -A | egrep -e ' | ||
| - | | ||
| - | |||
| - | |||
| - | ------------------------------------------- | ||
| - | #**display managers; lightdm & gdm3** | ||
| - | ------------------------------------------- | ||
| - | |||
| - | cd / | ||
| - | | ||
| - | Global lightdm settings here | ||
| - | |||
| - | cd / | ||
| - | sudo nano lightdm.conf | ||
| - | | ||
| - | Lightdm ubuntu-MATE greeter and lock screen issues | ||
| - | |||
| - | / | ||
| - | / | ||
| - | | ||
| - | The .conf file w/ some common sense parameters | ||
| - | |||
| - | [SeatDefaults] | ||
| - | allow-guest=false | ||
| - | greeter-hide-users=true | ||
| - | |||
| - | |||
| - | ------------------------------------------- | ||
| - | # | ||
| - | ------------------------------------------- | ||
| - | |||
| - | start or stop network manager (or other services) | ||
| - | | ||
| - | systemctl < | ||
| - | / | ||
| - | | ||
| - | verify dhcp client working for interface eno1 | ||
| - | | ||
| - | dhclient -v eno1 | ||
| - | | ||
| - | add subnet to interface eno1 | ||
| - | | ||
| - | ip address add 192.1## | ||
| - | | ||
| - | interface tool w/ eno1 example | ||
| - | | ||
| - | ethtool eno1 | ||
| - | |||
| - | interface with switch using screen | ||
| - | | ||
| - | screen / | ||
| - | |||
| - | calculate subnet automatically | ||
| - | | ||
| - | subnetcalc | ||
| - | | ||
| - | proxying web traffic through remote server | ||
| - | | ||
| - | ssh -D < | ||
| - | | ||
| - | get block ID of drives | ||
| - | | ||
| - | blkid | ||
| - | |||
| - | nmap to scan devices on lan | ||
| - | | ||
| - | nmap -sP 10.## | ||
| - | |||
| - | find utils example | ||
| - | |||
| - | find . -iname " | ||
| - | |||
| - | |||
| - | ------------------------------------------- | ||
| - | #**scripts and miscellaneous** | ||
| - | ------------------------------------------- | ||
| - | |||
| - | downloading scripts and executing them; example from DO | ||
| - | |||
| - | curl -sSL https:// | ||
| - | |||
| - | ngrok notes; private http(s) tunnels | ||
| - | |||
| - | ./ngrok http 80 | ||
| - | wget https:// | ||
| - | cat ~/ | ||
| - | |||
| - | query hosts on the lan | ||
| - | |||
| - | avahi-browse -tl _workstation._tcp | ||
| - | |||
| - | Debian print system configuration to stdout; use root | ||
| - | |||
| - | cat / | ||
| - | lsb_release -a | ||
| - | lspci | ||
| - | |||
| - | Debian repo management | ||
| - | |||
| - | cd /etc/apt | ||
| - | nano sources.lsit | ||
| - | [main contrib non-free] | ||
| - | | ||
| - | Uploading files to remote webservers with sftp | ||
| - | |||
| - | cd ~/Downloads | ||
| - | sftp user@host.com:/ | ||
| - | > put / | ||
| - | | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | ------------------------------------------- | ||
| - | #**Building From Source to Custom library Location** | ||
| - | ------------------------------------------- | ||
| - | |||
| - | tar -xf < | ||
| - | |||
| - | Navigate to the directory that tar unarchived the files to. Then, within that directory, execute: | ||
| - | |||
| - | ./configure --prefix=/ | ||
| - | | ||
| - | make | ||
| - | sudo make install clean | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | ------------------------------------------- | ||
| - | #**Cacti Server Notes** | ||
| - | ------------------------------------------- | ||
| - | |||
| - | Installing snmpd to an embedded system and then installing cacti to a client to monitor the | ||
| - | device. Additionally, | ||
| - | running on the client machine (ping only). | ||
| - | |||
| - | ssh -p ###### root@nameofembeddedhost | ||
| - | opkg update | ||
| - | opkg install snmpd | ||
| - | cd /etc/config | ||
| - | nano snmpd | ||
| - | / | ||
| - | / | ||
| - | |||
| - | There are many customizations possible, but my colleagues recommend the minimum of changing the | ||
| - | name of the public community to something indicative of the network purpose. | ||
| - | is also adviseable to change three fields below that refer to the physical location, ip address, and the contact email for the system administrator in charge of managing the snmp server. | ||
| - | |||
| - | sudo apt install cacti | ||
| - | |||
| - | I used the default recommendations, | ||
| - | reconfiguration command below. | ||
| - | |||
| - | sudo dpkg-reconfigure cacti | ||
| - | <Yes, rebuild database, default to other options> | ||
| - | <I chose matching MySQL pass because it failed with blank> | ||
| - | |||
| - | At this point, cacti should work so to speak, but it will need to be configured and have its license terms accepted. | ||
| - | |||
| - | localhost/ | ||
| - | <say yes to EULA, etc.> | ||
| - | <user: admin> | ||
| - | <pass: admin> | ||
| - | |||
| - | Since cacti' | ||
| - | |||
| - | Create Devices | ||
| - | Add (upper right corner) | ||
| - | Host Template - ucd/net SNMP Host | ||
| - | Ping or SNMP | ||
| - | ICMP Ping | ||
| - | Version 2 | ||
| - | <name of public community chosen must match / | ||
| - | <fully qualified hostname must be the external domain name or local ip> | ||
| - | <for linux devices or the cacti server itself, use local ip or 127.0.0.1, snmpd version 1> | ||
| - | |||
| - | After it successfully creates the device, then scroll down to graphs and add them all unless you have a reason not to. Once you do that, click return, and then select to "Place Device on a Tree" using the defaults provided. | ||
| - | | ||
| - | During this install I had a conflict with a previously installed web server nginx, so I had to find its process and then kill it: | ||
| - | |||
| - | netstat -enpl | ||
| - | sudo kill -XXX PID | ||
| - | | ||
| - | After that, I restarted the web-server apache2 as follows: | ||
| - | |||
| - | sudo / | ||
| - | |||
| - | |||
| - | |||
| - | ------------------------------------------- | ||
| - | # | ||
| - | ------------------------------------------- | ||
| - | Start defualt | ||
| - | sudo virsh net-start default | ||
| - | |||
| - | Remove bridge | ||
| - | sudo ifconfig virbr0 dow | ||
| - | sudo brctl delbr virbr0 | ||
| - | |||
| - | List all | ||
| - | sudo virsh net-list --all | ||
| - | |||
| - | ------------------------------------------- | ||
| - | #**rsync** | ||
| - | ------------------------------------------- | ||
| - | |||
| - | sudo rsync -avxHAX --progress / | ||
| - | |||
| - | |||
| - | ------------------------------------------- | ||
| - | #**next topic** | ||
| - | ------------------------------------------- | ||
| - | |||
| - | chmod 700 ~/ | ||
| - | chmod 644 ~/ | ||
| - | chmod 600 ~/ | ||
| - | chmod 755 ~/ | ||
| - | |||
| - | ------------------------------------------- | ||
| - | #**Simple Bridge Mode Virt-Manager** | ||
| - | ------------------------------------------- | ||
| - | create it - use gui, or brctl | ||
| - | |||
| - | sudo nano / | ||
| - | |||
| - | auto br1 | ||
| - | iface br1 inet dhcp | ||
| - | | ||
| - | | ||
| - | | ||
| - | |||
| - | |||
| - | |||
| - | ------------------------------------------- | ||
| - | #**smart tests** | ||
| - | ------------------------------------------- | ||
| - | smartctl -t short | ||
| - | smartctl -t long | ||
| - | |||
| - | ------------------------------------------- | ||
| - | #**ssh with screen** | ||
| - | ------------------------------------------- | ||
| - | ssh -t xx.xx.xx.xx screen -DRO | ||
| - | |||
| - | |||
| - | ------------------------------------------- | ||
| - | #**RAID 1 Notes** | ||
| - | ------------------------------------------- | ||
| - | The sfdisk command is not complete ... the proc shows kernel report on mirroring / syncing status ... | ||
| - | |||
| - | sfdisk -d | sfdisk | ||
| - | cat / | ||
| - | | ||
| - | Temperamental Swap mirroring ... | ||
| - | | ||
| - | mdadm --readwrite /dev/md1 | ||
| - | |||
| - | |||
| - | |||
| - | ------------------------------------------- | ||
| - | #**Purism Keyboard Issue** | ||
| - | ------------------------------------------- | ||
| - | |||
| - | sudo nano / | ||
| - | |||
| - | Put this in the file. | ||
| - | | ||
| - | #!/bin/sh | ||
| - | setkeycodes 56 43 | ||
| - | exit 0 | ||
| - | |||
| - | Ctrl-X, Y, Enter. | ||
| - | | ||
| - | sudo chmod 750 / | ||
| - | sudo chown root:root / | ||
| - | sudo reboot | ||
| - | |||
| - | Done - problem fixed. | ||
| - | | ||
| - | |||
| - | |||
| - | |||
| - | ------------------------------------------- | ||
| - | #**Level 3 DNS & resolv.conf** | ||
| - | ------------------------------------------- | ||
| - | |||
| - | sudo nano / | ||
| - | search domain.com [local domain] | ||
| - | nameserver xx.xx.xx.xx [router] | ||
| - | nameserver 4.2.2.1 | ||
| - | nameserver 4.2.2.2 | ||
| - | nameserver 4.2.2.3 | ||
| - | nameserver 4.2.2.4 | ||
| - | | ||
| - | |||
| - | ------------------------------------------- | ||
| - | #**next topic** | ||
| - | ------------------------------------------- | ||
| - | |||
| - | |||
| - | |||
| - | --- // | ||