User Tools

Site Tools


start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
start [2016/04/21 04:53] oemb1905start [2024/04/13 16:55] (current) oemb1905
Line 1: Line 1:
-#Darwin Basics +====== Haack's Networking ======
-#Jonathan Haack +
-#Haack's Networking +
-#netcmnd@jonathanhaack.com+
  
-------------------------------------------- 
  
-/etc/paths (location of PATH on Mac) +Haack's Networking is a networking and security firm that leverages [[wp>Free Software]] principles to serve educators and small businesses. When new tutorials or workflows are developed, Haack's Networking will typically introduce those to the community on its Technology Blog. Since blog entries were written at a certain point in time, they ultimately age and become out of date, however, the corresponding entries on this Wiki will be maintained and updated. For those who share the passion for Free Software, Haack's Networking hosts both Mastodon and Matrix communities. Additionally, Haack's Networking sponsors a student Hacking Club - and associated self-hosted Gitlab CE repository - where configuration files, scripts, and/or code for GNU/Linux projects can be foundHere's what we offer:
-/etc/man.path (man page paths)+
  
-#Force Remove Trash+  * [[https://services.haacksnetworking.org|Technology Blog]] 
 +  * [[https://repo.haacksnetworking.org/haacknet/haackingclub|Hacking Club Repository]] 
 +  * [[https://gnulinux.social/invite/MH79WS26|GNU/Linux Social (Mastodon)]] 
 +  * [[https://matrix.to/#/#pubglug:gnulinux.club|GNU/Linux Club (Matrix)]]
  
-#User Directory (sudo not required, but can help)+----
  
-sudo rm -rf ~/.Trash/*+<dokuteaser>
  
-#All Trashes (sudo not requiredbut can help)+==== Self-Hosting Solutions ==== 
 +{{ :self-hosted.png?nolink&80}} 
 +Tutorials on self-hosting common services and/or instancesincluding ways of virtualizing and automating those solutions.
  
-sudo rm -rf /Volumes/*/.Trashes+  * Virtualization wVirsh: [[computing:vmserver|]] 
 +  * Virtualization wPVE: [[computing:proxmox|]] 
 +  Installing VMs wPreseeds: [[computing:preseed|]] 
 +  * Mail Relay: [[computing:exim4|]] 
 +  * Mail Server: [[computing:mailserver|]] 
 +  * Gitlab CE: [[computing:gitlab-ce|]] 
 +  * Airsonic Advanced: [[computing:airsonic|]] 
 +  * Invoice Plane: [[computing:invoiceplane|]] 
 +  * Mastodon: [[computing:mastodon|]] 
 +  * Matrix: [[computing:synapse|]] 
 +  * Nextcloud: [[computing:nextcloud|]] 
 +  * WordPress: [[computing:selfhostedwp|]] 
 +  * Moodle: [[computing:moodle|]] 
 +  * Dokuwiki: [[computing:dokuwiki|]] 
 +  * R-Studio: [[computing:rstudio|]]
  
-#If this still causes trouble, then +</dokuteaser>
-login root +
-#enter password +
-sudo rm -rf /Volumes/*/.Trashes+
  
-#Now, all trashes should empty, but it is slow so view +<dokuteaser> 
-#Finder Status bar at /Volumes/Macintosh HD/+==== Networking ==== 
 +{{ :networking.png?nolink&80}}  
 +The tutorials below pertain to network connections/storage, monitoring, or hardening. They may or may not be self-hosted solutions.
  
-#Showing hidden items in Finder (highly recommended)+  * Basic LAMP Configuration: [[computing:apachesurvival|]] 
 +  * Configuring openWRT: [[computing:openwrt|]] 
 +  * VPN w/ openWRT: [[computing:vpnserver-openwrt|]] 
 +  * VPN w/ Debian: [[computing:vpnserver-debian|]] 
 +  * Cacti Monitoring: [[computing:cactiwebserver|]] 
 +  * Smokeping Monitoring: [[computing:smokeping|]] 
 +  * Munin Monitoring: [[computing:munin|]] 
 +  * Fail2Ban: [[computing:fail2ban|]] 
 +  * Webmin Monitoring: [[computing:webmin|]] 
 +  * Virtualmin Monitoring: [[computing:virtualmin|]] 
 +  * Securing SSH: [[computing:ssh|]] 
 +  * Adblocking w/ Pihole: [[computing:piholeonblack|]] 
 +  * Network Shares: [[computing:samba|]] 
 +  * Packet Monitoring: [[computing:tcpdump|]] 
 +  * DNS w/ ISPConfig: [[computing:ispconfig|]] 
 +  * SPF & DKIM Notes: [[computing:spfdkim|]] 
 +  * IPv6 Notes: [[computing:ipv6|]]
  
-defaults write com.apple.finder AppleShowAllFiles TRUE +</dokuteaser>
-killall Finder+
  
-#replace with FALSE to change back ... make sure before entering killall +<dokuteaser> 
-#could also use YES / NO, or 1/0 (have not tested 1/0)+==== Miscellaneous ==== 
 +{{ :miscellaneous.png?nolink&80}} 
 +These tutorials have no proper home. They could extensions of tutorials aboverandom topics, and/or other notes from random jobs/tasks.
  
-#Hiding Users+  * Miscellaneous Notes: [[computing:miscadmin|]] 
 +  * Virsh Reminders: [[computing:virtmanagerhell|]] 
 +  * Windows 11 on Virt-Manager: [[computing:windows11-vm|]] 
 +  * Non-public Git Server: [[computing:gitserver|]] 
 +  * Automating Apt Upgrades: [[computing:remote-upgrades|]] 
 +  * Simple Crypto Mining: [[computing:bfgminer|]] 
 +  * Minecraft Server: [[computing:minecraft|]] 
 +  * HP Printer Issues: [[computing:hp-plugin|]] 
 +  * Debian on Beaglebone: [[computing:beaglebone|]] 
 +  * Migrating WordPress: [[computing:migratewp|]] 
 +  * Configuring Multi-Site WordPress: [[computing:wpmultisite|]] 
 +  * Quicken 2007 on APFS: [[computing:mac-quicken2007|]] 
 +  * Wiki Syntax: [[computing:wikisyntax|]]
  
-sudo dscl . create /Users/shortnameofuser IsHidden 1+</dokuteaser>
  
-#change to to de-activate+<dokuteaser> 
 +==== Storage ==== 
 +{{ :storage.png?nolink&80}} 
 +These tutorials all have to do with storage whether that be how to setup RAID, check for the health or integrity of physical devices, or manage backups/versions.
  
-#Moving user directory to var (warning, do this logged in as root) +  * Encryption w/ LUKS: [[computing:encryption|]] 
-sudo mv /Users/shortnameofuser /var/shortnameofuser +  * RAID wmdadm: [[computing:RAID|]] 
-#Then, update the user record path +  * RAID wzfs: [[computing:zfsreminders|]] 
-sudo dscl . -create /Users/shortnameofuser NSFHomeDirectory /var/shortnameofuser +  * SMART Tools: [[computing:smartmontools|]] 
-#Remove public share point through Terminal (or go to FS in SP in GUI) +  * Rsnapshot Version Control: [[computing:rsyncrsnapshot|]]
-sudo dscl . -delete "/SharePoints/shortnameofuser's Public Folder"+
  
--------------------------------------------+</dokuteaser>
  
-#Homebrew Basics+<dokuteaser> 
 +==== Projects ==== 
 +{{ :project.png?nolink&80}} 
 +These are official projects that are supported by Haack's Networking as an official maintainer and/or developer.
  
-#Install: +  * Frontier Team Builder[[projects:frontier-team-builder|]] 
-ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"+  * Community Big Blue Button[[computing:nmbbb|]] 
 +  * Achievement/Opportunity Gap Research: [[computing:spss|]] 
 +  * Linux From Scratch: [[computing:linuxfromscratch|]] 
 +  * Virtual Hosts: [[computing:virtualhosts|]]
  
-#Uninstall: +</dokuteaser>
-Download script from GitHub https://gist.github.com/SteveBenner/11254428+
  
-#Update +<dokuteaser> 
-brew update+==== Extras ==== 
 +{{ :extras.png?nolink&90}} 
 +Haack's Networking uses Debian when/if given the choice, but that luxury is not always available. Some ecosystems require diving into other operating systems.
  
-#Cleanup: +  * FreeBSD Notes: [[computing:freebsd|]
-brew cleanup +  * Darwin Notes: [[computing:darwin|]
- +  * Fedora Notes[[computing:fedora|]] 
-#Verify Config: +  * Slackware Notes: [[computing:slackware|]]
-brew doctor +
- +
-#Update Packages +
-brew update packagename +
- +
-#Install from Casks +
-brew install Caskroom/cask/nameofcasknoextension +
- +
-#To find the Casks in your GUI +
-/Volumes/Macintosh HD/usr/local/Library/Taps/caskroom/homebrew-cask/Casks +
- +
-#To see what you have installed using your GUI +
-/Volumes/Macintosh HD/usr/local/Cellar +
- +
-#Sometimes they are installed by default in opt +
-#(although this can be changed by an --option) +
-/Volumes/Macintosh HD/opt/homebrew-cask/Caskroom +
- +
-------------------------------------------- +
- +
-#There is debate, mostly from MacPorts & Fink people +
-#about where to put package Managers: +
- +
-#Homebrew will cause problems when building software from source if it +
- is installed in /usr/local. +
-#This is the default, which is a bad choice as this path is in the default +
- search path of compilers and other tools. +
-#Therefore builds from other packaging software might pick up the wrong +
- dependency, using Homebrew's version instead of their own. +
-#Years ago, in the very beginning of the project, even MacPorts was using /usr/local. +
-#But it turned out not to cooperate with other tools as is documented in their FAQ. +
-#Unfortunately Homebrew developers didn't want to hear about +
- prior experiences and ignored such facts... +
-#In general, it is usually better to stick to one tool only to avoid all problems. +
-#MacPorts is doing their best to patch out any harcoded paths, +
- e.g. to /sw which is used by Fink. +
-#So usually it will work, but having anything installed in /usr/local +
- will definitely cause problems for it. +
- +
-@Raim on StackExchange +
-https://superuser.com/questions/181337 +
-/is-it-safe-to-install-both-homebrew-and-macports-on-the-same-machine +
- +
-#MacPorts addresses this too: +
-https://trac.macports.org/wiki/FAQ#defaultprefix +
- +
-------------------------------------------- +
- +
-#Braumeister has a search engine of Homebrew packages +
- +
-http://braumeister.org/ +
- +
-------------------------------------------- +
- +
-#Common Packages (Will be adding more, this is by no means +
-#exhaustive of what I have used in past). +
- +
-tree +
-webkit2png +
-graphicsmagick +
-git +
-python +
-python3 +
-watch +
-wget +
-automake +
-autoconf +
-htop +
-jpegoptim +
-imagemagick +
-fish (fish shell) +
-xquartz +
-Homebrew cask +
-ack (like grep) +
-git +
-bash-completion +
-bash completion script +
-colordiff +
-ffmpeg +
-htop +
-imagemagick +
-gawk +
-gnu-sed +
-cowsay +
-lftp +
-wget +
-axel +
-tree +
-unrar +
-rlwrap +
-readline wrap +
-tig +
-git (command line interface) +
-youtube-dl +
-lynx (web browser) +
-memcached (for caching on web server) +
-Alpine (new version of Pine) +
-mutt +
-vi +
-emacs +
-nano +
-python (add 3 for v.3) +
-pip +
-virtualenv +
-ruby +
-ruby-build (test versions) +
- +
-------------------------------------------- +
- +
-#Install GNU Essentials +
- +
-brew install coreutils +
- +
-#Add to PATH with TextWrangler or: +
-open /etc/paths +
-#Add the next line after /usr/bin +
-/usr/local/bin +
- +
-#Add to PATH with vi text editor using Terminal +
-sudo vi /etc/paths +
- +
-/usr/bin +
-/usr/local/bin (add here after OS X bin) +
-/bin +
-/usr/sbin +
-/sbin +
- +
-#Homebrew offers the following instructions about coreutils +
- +
-#All commands have been installed with the prefix 'g'+
- +
-#If you really need to use these commands with their normal name can +
-#add a "gnubin" directory to your PATH from your bashrc like +
-PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" +
- +
-#Additionally, you can access their man pages with normal names the +
-#"gnuman" directory to your MANPATH from your bashrc as well +
-MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH" +
- +
-#You can also use Text Wrangler to add the GNU commands to Man Pages (or use vi) +
-/etc/man.conf +
-#add the following in the Set up PATH to MANPATH mapping section +
-MANPATH_MAP /usr/local/opt/coreutils/libexec/gnubin +
- /usr/local/opt/coreutils/libexec/gnuman +
- +
-------------------------------------------- +
- +
-#More GNU commands, but duplicate ones +
- +
-brew tap homebrew/dupes +
- +
-brew install binutils +
-brew install diffutils +
-brew install ed --default-names +
-brew install findutils --with-default-names +
-brew install gawk +
-brew install gnu-indent --with-default-names +
-brew install gnu-sed --with-default-names +
-brew install gnu-tar --with-default-names +
-brew install gnu-which --with-default-names +
-brew install gnutls +
-brew install grep --with-default-names +
-brew install gzip +
-brew install screen +
-brew install watch +
-brew install wdiff --with-gettext +
-brew install wget +
- +
-#newer versions of tools already on OS X and GNU +
- +
-brew install bash +
-brew install emacs +
-brew install gdb   gdb requires further actions to make it work. See `brew info gdb`. +
-brew install gpatch +
-brew install m4 +
-brew install make +
-brew install nano +
- +
-#commands not on GNU but on OS X but might want newer +
- +
-brew install file-formula +
-brew install git +
-brew install less +
-brew install openssh +
-brew install perl518    must run "brew tap homebrew/versions" first! +
-brew install python +
-brew install rsync +
-brew install svn +
-brew install unzip +
-brew install vim --override-system-vi +
-brew install macvim --override-system-vim --custom-system-icons +
-brew install zsh +
- +
-------------------------------------------- +
- +
-#Adding scripts to my shell PATH so I can run form command line +
- +
-ln -s /Volumes/Cave/<path-to-script> /usr/local/bin/scriptname +
- +
-------------------------------------------- +
- +
-#To see what is currently installed and save text file in User Downloads +
- +
-brew list > ~/Downloads/brews.txt +
- +
-------------------------------------------- +
- +
-#Remember +
- +
-homebrew/science/metaphlan       Caskroom/cask/tap-bpm            Caskroom/cask/tuntap             Caskroom/cask/wiretap-studio    +
-Caskroom/cask/rcdefaultapp       Caskroom/cask/tapaal             Caskroom/cask/wavtap            +
-To install one of them, run (for example): +
-  brew install homebrew/science/metaphlan +
-     +
-------------------------------------------- +
- +
-Are you sure you want to uninstall Homebrew? [y/N+
-==> Removing Homebrew installation... +
-==> Removing empty directories... +
-==> Homebrew uninstalled! +
-The following possible Homebrew files were not deleted: +
-/usr/local/.DS_Store +
-/usr/local/bin/ +
-/usr/local/share/ +
-You may consider to remove them by yourself. +
-You may want to restore /usr/local's original permissions +
-  sudo chmod 0755 /usr/local +
-  sudo chgrp wheel /usr/local +
-   +
-------------------------------------------- +
- +
-#Permissions new on El Capitan, no editing /usr except custom below (allows everything) +
-#The second command allows creating user/group permissions +
-#The third restores root (I think) +
- +
-sudo chmod -R +a "$USER allow delete,readattr,writeattr,readextattr,writeextattr,readsecurity,writesecurity,chown,list,search,add_file,add_subdirectory,delete_child,file_inherit,directory_inherit"+
-sudo chown -R root:wheel /usr/local +
-sudo chmod -R -N /usr/local +
- +
-------------------------------------------- +
-   +
-#To install alternative repositories for later installation, such as: +
- +
-#Homebrew/homebrew-apache +
-#Homebrew/homebrew-binary +
-#Homebrew/homebrew-boneyard +
-#Homebrew/homebrew-completions +
-#Homebrew/homebrew-dupes +
-#Homebrew/homebrew-games +
-#Homebrew/homebrew-headonly +
-#Homebrew/homebrew-python +
-#Homebrew/homebrew-science +
-#Homebrew/homebrew-versions +
-#davidchall/homebrew-hep +
-#josegonzalez/homebrew-php +
- +
-brew tap Homebrew/homebrew-binary   +
-#etc., etc. +
- +
-#To install their packages, look inside the Taps folder in /usr/local +
- +
-brew install homebrew/homebrew-games/[name of package from step ^] +
- +
-#Some are not strict directory paths, but are abbreviations (most likely through the bin somehow) +
-brew install Caskroom/cask/[name of package from step ^ +
- +
-------------------------------------------- +
- +
-#Edits I need to do at Pure later ... +
- +
-To restore the stashed changes to /usr/local run: +
-  `cd /usr/local && git stash pop` +
-Updated Homebrew from 4ae26624 to ff9aa97d. +
-To restore the stashed changes to /usr/local/Library/Taps/davidchall/homebrew-hep run: +
-  `cd /usr/local/Library/Taps/davidchall/homebrew-hep && git stash pop` +
-To restore the stashed changes to /usr/local/Library/Taps/homebrew/homebrew-completions run+
-  `cd /usr/local/Library/Taps/homebrew/homebrew-completions && git stash pop` +
-To restore the stashed changes to /usr/local/Library/Taps/homebrew/homebrew-dupes run: +
-  `cd /usr/local/Library/Taps/homebrew/homebrew-dupes && git stash pop` +
-To restore the stashed changes to /usr/local/Library/Taps/homebrew/homebrew-games run: +
-  `cd /usr/local/Library/Taps/homebrew/homebrew-games && git stash pop` +
-To restore the stashed changes to /usr/local/Library/Taps/homebrew/homebrew-headonly run: +
-  `cd /usr/local/Library/Taps/homebrew/homebrew-headonly && git stash pop` +
-To restore the stashed changes to /usr/local/Library/Taps/homebrew/homebrew-python run: +
-  `cd /usr/local/Library/Taps/homebrew/homebrew-python && git stash pop` +
-To restore the stashed changes to /usr/local/Library/Taps/homebrew/homebrew-science run: +
-  `cd /usr/local/Library/Taps/homebrew/homebrew-science && git stash pop` +
-To restore the stashed changes to /usr/local/Library/Taps/homebrew/homebrew-versions run: +
-  `cd /usr/local/Library/Taps/homebrew/homebrew-versions && git stash pop` +
-To restore the stashed changes to /usr/local/Library/Taps/josegonzalez/homebrew-php run: +
-  `cd /usr/local/Library/Taps/josegonzalez/homebrew-php && git stash pop` +
-Updated 2 taps (caskroom/cask, josegonzalez/php). +
- +
-------------------------------------------- +
- +
-#To get private key from bitcoin console +
-#Navigate to bitcoin console +
- +
-walletpassphrase [enterpassword] +
-dumprivkey [enter public address] +
- +
-#Out comes the key +
- +
-------------------------------------------- +
- +
-#Review this later +
- +
-Pure:~ axes$ brew cleanup +
-Warning: Skipping gnutls: most recent version 3.3.20 not installed +
-Warning: Skipping openssl: most recent version 1.0.2e_1 not installed +
-Warning: Skipping youtube-dl: most recent version 2016.01.09 not installed +
-Removing: /Library/Caches/Homebrew/gnutls-3.3.18.el_capitan.bottle.tar.gz... (1.8M) +
-Removing: /Library/Caches/Homebrew/openssl-1.0.2e.el_capitan.bottle.tar.gz... (3.6M) +
-Removing: /Library/Caches/Homebrew/youtube-dl-2016.01.01.el_capitan.bottle.tar.gz... (1M) +
-==> This operation has freed approximately 6.4M of disk space. +
-Pure:~ axes$ brew install gnutls +
-Error: gnutls-3.3.18 already installed +
-To install this version, first `brew unlink gnutls` +
-Pure:~ axes$ brew unlink gnutls +
-Unlinking /usr/local/Cellar/gnutls/3.3.18... 1003 symlinks removed +
-Pure:~ axes$ brew unlink openssl +
-Unlinking /usr/local/Cellar/openssl/1.0.2e... 0 symlinks removed +
-Pure:~ axes$ brew unlink youtube-dl +
-Unlinking /usr/local/Cellar/youtube-dl/2016.01.01... 2 symlinks removed +
-Pure:~ axes$  +
- +
-------------------------------------------- +
- +
-#To add shell scripts to Terminal command, open bashrc, and add this to the fields +
- +
-export PATH="/path/to/dir:$PATH" +
- +
-#Then, restart Terminal by: +
- +
-source .bashrc +
- +
-#I also added the directory of my shell scripts to the path directory +
- +
-cd Volumes/Cave/etc/ +
-nano edit paths  +
- +
-#Then add a line to the scripts folder: +
- +
-/Volumes/Cave/Users/axes/Scripts +
- +
-#To make a script executable (not tested yet - old commands in fodler) +
- +
-chmod +x yourshellscript.sh +
- +
-------------------------------------------- +
- +
-#El Capitan Boot Volume +
- +
-sudo /Applications/Install\ OS\ X\ El\ Capitan\ GM\ Candidate.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ El\ Capitan\ GM\ Candidate.app --nointeraction +
- +
-------------------------------------------- +
- +
-#Server Details +
- +
-Shared Secret:  .-Sc0V*/3W~c-luD0mg3+
  
 +</dokuteaser>
  
 +===== Copyright =====
  
 +2024 (C) Jonathan Haack DBA Haack's Networking <webmaster@haacksnetworking.org>
  
 +//Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with all portions of this site being considered as //Invariant Sections//. A copy of the license is included below. \\
 +\\
 +//[[http://www.gnu.org/licenses/fdl-1.3.html|GNU Free Documentation License, Version 1.3]]. \\
 +\\
 +//{{ kids-new.jpg?direct&600 |}}
 +\\
 + --- //[[webmaster@haacksnetworking.org|oemb1905]] 2024/02/17 19:26//
start.1461214402.txt.gz · Last modified: 2018/11/25 01:33 (external edit)