Difference between revisions of "CopyPasta"

From Da Nerd Mage Wiki
Jump to navigation Jump to search
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
= For doing basic setup of an LXC (or pretty much any Linux VM...): =
= For doing basic setup of an LXC (or pretty much any Linux VM...): =
I run this set of commands on nearly every new VM or LXC I spin up.  That way, I have a consistant environment to work in with all the tools I rely on.


Note: You CAN copyPasta groups of commands all at once. BUT: in this case, everything indented (after <code>su - '''yourname'''</code>) needs to be pasted AFTER that command has run.
Note: You CAN copyPasta groups of commands all at once. BUT: in this case, everything indented (after <code>su - '''yourname'''</code>) needs to be pasted AFTER that command has run.
Line 11: Line 12:
* <code>source .bashrc</code>
* <code>source .bashrc</code>
* <code>apt -y install gnupg tmux <span style="color: rgb(22, 145, 121);" >### Optional...</span></code>
* <code>apt -y install gnupg tmux <span style="color: rgb(22, 145, 121);" >### Optional...</span></code>
* <code>apt -y install qemu-guest-agent <span style="color: rgb(22, 145, 121);" >### Only on VMs. (Wish it worked for LXCs as well tho...)</span></code>
* <code>adduser '''yourname'''</code>
* <code>adduser '''yourname'''</code>
* <code>adduser '''yourname''' sudo</code>
* <code>adduser '''yourname''' sudo</code>
Line 20: Line 22:


= Useful console display for Proxmox Virtual Environment =
= Useful console display for Proxmox Virtual Environment =
I find it nice to have stats & such on the console of a server.  This way I can just look & see what's happening with the machine.


* <code>apt update</code>
* <code>apt update</code>
Line 38: Line 41:
Running <code>TMUX-console</code> at the console will create a formatted screen of useful system information that you can reach by attaching to the '''tmux''' session from a terminal (SSH) session.
Running <code>TMUX-console</code> at the console will create a formatted screen of useful system information that you can reach by attaching to the '''tmux''' session from a terminal (SSH) session.


= Installing Brave Browser =
= Simplified installation techniques & instructions =
Some cross-platform software seems to have Linux installation instructions written by people who have never actually used Linux.


* <code>sudo apt install apt-transport-https curl </code>
(Or, at least, people who believe in making life difficult...)
* <code>sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg <nowiki>https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg </nowiki></code>
* <code>echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] <nowiki>https://brave-browser-apt-release.s3.brave.com/</nowiki> stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list </code>
* <code>sudo apt update </code>
* <code>sudo apt install brave-browser </code>


= Installing TP-Link Omada SDN Controller on a Debian-based LXC =
So...


(Debian 12, 4GB RAM, 4 cores)
* [[Installing Brave Browser]]
* [[Installing TP-Link Omada SDN Controller on a Debian-based LXC]]


<span style="color: rgb(132, 63, 161);" >Start with the prerequisites:</span>
= Building/Installing things from source =
You may have noticed that the various distro repositories tend to have outdated versions of some (most) packages. While this makes perfect sense, sometimes you want the newest features & fixes. (Or maybe you just want to enable something that the repo managers figured wouldn't be useful...)


* <code>sudo apt update && sudo apt install openjdk-17-jre-headless jsvc curl gnupg -y</code>
Annoyingly, it is rather common for build instructions to suck really badly.
** <code>wget <nowiki>http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.23_amd64.deb</nowiki></code>
** <code>sudo dpkg -i libssl1.1_1.1.1-1ubuntu2.1~18.04.23_amd64.deb</code>
* <code>curl -fsSL <nowiki>https://www.mongodb.org/static/pgp/server-4.4.asc</nowiki> {{!}} sudo apt-key add -</code>
* <code>echo "deb [ arch=amd64,arm64 ] <nowiki>https://repo.mongodb.org/apt/ubuntu</nowiki> focal/mongodb-org/4.4 multiverse" {{!}} sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list</code>
* <code>sudo apt update && sudo apt install mongodb-org</code>
* <code>sudo systemctl start mongod.service</code>
* <code>sudo systemctl status mongod</code>
* <code>sudo systemctl enable mongod</code>
<span style="color: rgb(132, 63, 161);" >Install SDN:</span>


* <code>sudo wget wget <nowiki>https://static.tp-link.com/upload/software/2023/202312/20231201/Omada_SDN_Controller_v5.13.22_Linux_x64.tar.gz</nowiki></code>
So...
* <code>tar zxvf Omada_SDN_Controller_v5.12.7_linux_x64.tar.gz</code>
* <code>cd Omada_SDN_Controller_v5.12.7_linux_x64</code>
* <code>sudo bash ./install.sh</code>
or (Tho this seems to fail weirdly whenever they update the version while the tar.gz version doesn't):


* <code>wget <nowiki>https://static.tp-link.com/upload/software/2023/202312/20231201/Omada_SDN_Controller_v5.13.22_Linux_x64.deb</nowiki></code>
* [[Arp-Scan from Source{{!}}Arp-Scan]]
* <code>sudo dpkg -i ./Omada_SDN_Controller_v5.13.22_Linux_x64.deb</code>
* [[FreeCAD from Source{{!}}FreeCAD]]
https://'''SERVERADDRESS''':8043/
* [[KiCAD from Source{{!}}KiCAD]]
 
* [[Mosquitto from Source{{!}}Mosquitto]]
<span style="font-size: 18pt; color: rgb(132, 63, 161);">'''CERTS!!!'''</span>
 
You'll need to have your proper certs downloaded & then [https://support.tsplus.net/support/solutions/articles/44000038469-how-to-convert-different-ssl-https-certificate-formats-to-java-jks- mess with making a .PFX file from them]...
 
(Really, just Part B, Step 1 at that link.)
 
Then install/update via the UI & fully reboot the server/VM/LXC to activate it... :(

Latest revision as of 20:03, 4 March 2024

For doing basic setup of an LXC (or pretty much any Linux VM...):

I run this set of commands on nearly every new VM or LXC I spin up. That way, I have a consistant environment to work in with all the tools I rely on.

Note: You CAN copyPasta groups of commands all at once. BUT: in this case, everything indented (after su - yourname) needs to be pasted AFTER that command has run.

  • apt update
  • apt -y upgrade
  • apt -y install sudo vim curl mosquitto-clients
  • wget https://www.nerdmage.ca/Downloads/RootStuff/DOT.bashrc -O .bashrc
  • wget https://www.nerdmage.ca/Downloads/RootStuff/DOT.vimrc -O .vimrc
  • mkdir bin
  • source .bashrc
  • apt -y install gnupg tmux ### Optional...
  • apt -y install qemu-guest-agent ### Only on VMs. (Wish it worked for LXCs as well tho...)
  • adduser yourname
  • adduser yourname sudo
  • su - yourname
    • wget https://www.nerdmage.ca/Downloads/UserStuff/DOT.bashrc -O .bashrc
    • wget https://www.nerdmage.ca/Downloads/UserStuff/DOT.vimrc -O .vimrc
    • mkdir bin
    • source .bashrc

Useful console display for Proxmox Virtual Environment

I find it nice to have stats & such on the console of a server. This way I can just look & see what's happening with the machine.

  • apt update
  • apt -y upgrade
  • apt -y install tmux htop
  • cd /usr/local/bin
  • wget https://www.nerdmage.ca/Downloads/PVEStuff/bin/TMUX-console -O TMUX-console
  • wget https://www.nerdmage.ca/Downloads/PVEStuff/bin/TM-guestlist -O TM-guestlist
  • wget https://www.nerdmage.ca/Downloads/PVEStuff/bin/TM-clusterstatus -O TM-clusterstatus
  • wget https://www.nerdmage.ca/Downloads/PVEStuff/bin/TM-systemstatus -O TM-systemstatus
  • wget https://www.nerdmage.ca/Downloads/PVEStuff/bin/TM-UPSstatus -O TM-UPSstatus
  • wget https://www.nerdmage.ca/Downloads/PVEStuff/bin/TM-FixThis -O TM-FixThis
  • wget https://www.nerdmage.ca/Downloads/PVEStuff/bin/TM-ShowMe -O TM-ShowMe
  • chmod +x TM*

You will need to edit TM-UPSstatus to match local configurations (i.e. UPS name).

Running TMUX-console at the console will create a formatted screen of useful system information that you can reach by attaching to the tmux session from a terminal (SSH) session.

Simplified installation techniques & instructions

Some cross-platform software seems to have Linux installation instructions written by people who have never actually used Linux.

(Or, at least, people who believe in making life difficult...)

So...

Building/Installing things from source

You may have noticed that the various distro repositories tend to have outdated versions of some (most) packages. While this makes perfect sense, sometimes you want the newest features & fixes. (Or maybe you just want to enable something that the repo managers figured wouldn't be useful...)

Annoyingly, it is rather common for build instructions to suck really badly.

So...