-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
258 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# sysadmin-scripts | ||
|
||
just a collection of my scripts or scripts i've customized... | ||
|
||
licenses and descriptions in individual script files. | ||
|
||
# sysadmin-scripts | ||
|
||
just a collection of my scripts or scripts i've customized... | ||
|
||
licenses and descriptions in individual script files. | ||
|
||
[linux notes](./linux/README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# basic linux install setup notes | ||
|
||
## install utils | ||
(yum = apt on debian/ubuntu, etc) | ||
|
||
sudo yum install -y cockpit cockpit-docker | ||
sudo yum install -y htop | ||
sudo yum install -y tree #-L 2 | ||
|
||
## prevent memory hangs in prod (n.b. ensure monitoring) | ||
https://linuxize.com/post/create-a-linux-swap-file/ | ||
|
||
sudo fallocate -l 1G /swapfile | ||
sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576 | ||
sudo chmod 600 /swapfile | ||
sudo mkswap /swapfile | ||
sudo swapon /swapfile | ||
|
||
modify `/etc/fstab` with `/swapfile swap swap defaults 0 0` | ||
|
||
verify with `sudo swapon --show` | ||
|
||
## ufw | ||
https://www.digitalocean.com/community/tutorials/ufw-essentials-common-firewall-rules-and-commands | ||
|
||
sudo ufw allow ssh <MYIP> | ||
sudo ufw allow http https | ||
ufw enable | ||
|
||
## nginx | ||
http://nginx.org/en/docs/beginners_guide.html#proxy | ||
|
||
## docker | ||
|
||
docker update --restart=unless_stopped container_name | ||
docker top container_name | ||
|
||
## AWS linux | ||
|
||
# sudo yum-config-manager --enable epel | ||
sudo yum update | ||
sudo yum install inotify-tools | ||
|
||
(persist: update `/etc/yum.repos.d/epel.repo` - epel section, change `enabled=0` to `=1`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
# Based on http://msdn.microsoft.com/en-us/library/dn568015.aspx | ||
|
||
# Run me elevated, and w/prerequisites as listed in article: | ||
# http://go.microsoft.com/fwlink/p/?LinkId=286152 | ||
# http://go.microsoft.com/fwlink/p/?linkid=236297 (64b) | ||
# http://go.microsoft.com/fwlink/p/?LinkId=255251 | ||
# http://go.microsoft.com/fwlink/p/?LinkId=532439 | ||
# Don't forget the Session Killers section when done. | ||
|
||
# Establish Tenant Info | ||
Import-Module MsOnline | ||
$tenant = read-host "tenant ID - e.g. https://(THIS).sharepoint.com:" | ||
read-host "Next step will ask for 365 user/pass" | ||
$cred = get-credential | ||
|
||
# SharePoint Connection | ||
Import-Module Microsoft.Online.SharePoint.PowerShell | ||
$spAdminUrl = "https://" + $tenant + "-admin.sharepoint.com" | ||
Connect-SPOService -url $spAdminUrl -credential $cred | ||
get-sposite | ||
Connect-MsolService -credential $cred | ||
|
||
# Skype for Business Online Connection | ||
# note: A warning about increasing the WSMan NetworkDelayms value is expected the first time you connect and should be ignored. | ||
Import-Module SkypeOnlineConnector | ||
$sfboSession = New-CsOnlineSession -Credential $credential | ||
Import-PSSession $sfboSession | ||
|
||
# Exchange Connection | ||
$exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://outlook.office365.com/powershell-liveid/" -Credential $credential -Authentication "Basic" -AllowRedirection | ||
Import-PSSession $exchangeSession -DisableNameChecking | ||
|
||
# Security and Compliance Center | ||
$ccSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $credential -Authentication Basic -AllowRedirection | ||
# prefix means: Get-RoleGroup becomes Get-ccRoleGroup | ||
Import-PSSession $ccSession -Prefix cc | ||
|
||
# Session Killers | ||
Disconnect-SPOService | ||
Remove-PSSession $sfboSession | ||
Remove-PSSession $exchangeSession | ||
# Based on http://msdn.microsoft.com/en-us/library/dn568015.aspx | ||
|
||
# Run me elevated, and w/prerequisites as listed in article: | ||
# http://go.microsoft.com/fwlink/p/?LinkId=286152 | ||
# http://go.microsoft.com/fwlink/p/?linkid=236297 (64b) | ||
# http://go.microsoft.com/fwlink/p/?LinkId=255251 | ||
# http://go.microsoft.com/fwlink/p/?LinkId=532439 | ||
# Don't forget the Session Killers section when done. | ||
|
||
# Establish Tenant Info | ||
Import-Module MsOnline | ||
$tenant = read-host "tenant ID - e.g. https://(THIS).sharepoint.com:" | ||
read-host "Next step will ask for 365 user/pass" | ||
$cred = get-credential | ||
|
||
# SharePoint Connection | ||
Import-Module Microsoft.Online.SharePoint.PowerShell | ||
$spAdminUrl = "https://" + $tenant + "-admin.sharepoint.com" | ||
Connect-SPOService -url $spAdminUrl -credential $cred | ||
get-sposite | ||
Connect-MsolService -credential $cred | ||
|
||
# Skype for Business Online Connection | ||
# note: A warning about increasing the WSMan NetworkDelayms value is expected the first time you connect and should be ignored. | ||
Import-Module SkypeOnlineConnector | ||
$sfboSession = New-CsOnlineSession -Credential $credential | ||
Import-PSSession $sfboSession | ||
|
||
# Exchange Connection | ||
$exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://outlook.office365.com/powershell-liveid/" -Credential $credential -Authentication "Basic" -AllowRedirection | ||
Import-PSSession $exchangeSession -DisableNameChecking | ||
|
||
# Security and Compliance Center | ||
$ccSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $credential -Authentication Basic -AllowRedirection | ||
# prefix means: Get-RoleGroup becomes Get-ccRoleGroup | ||
Import-PSSession $ccSession -Prefix cc | ||
|
||
# Session Killers | ||
Disconnect-SPOService | ||
Remove-PSSession $sfboSession | ||
Remove-PSSession $exchangeSession | ||
Remove-PSSession $ccSession |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,43 @@ | ||
#### my services / devices | ||
cinst -y lastpass | ||
cinst -y googlechrome | ||
cinst -y dropbox # this prompts for login (but chocolatey ignores it) | ||
cinst -y itunes | ||
cinst -y spotify | ||
|
||
#### sys / file utils | ||
cinst -y vlc | ||
cinst -y sysinternals | ||
cinst -y rdcman | ||
cinst -y greenshot | ||
cinst -y 7zip.install | ||
cinst -y treesizefree | ||
cinst -y winmerge | ||
cinst -y fiddler | ||
cinst -y imageresizer -version 3.0.4442.6002 | ||
#USE BASH INSTEAD: cinst -y winscp baretail #(WINDOWS SUBSYSTEM FOR LINUX) | ||
#optional: virtualbox speccy winscp nmap | ||
#manual install: mouserecorder.com | ||
|
||
#### creative or developer | ||
cinst -y git | ||
cinst -y paint.net | ||
cinst -y firefox | ||
cinst -y nodejs.install | ||
cinst -y visualstudiocode | ||
cinst -y webstorm | ||
cinst -y sublimetext3 | ||
cinst -y sourcetree | ||
#MANUAL/fail: | ||
#linqpad4?, githubforwindows?, SP designer? sharepointmanager2013?, fl studio? | ||
#Licensed: Office, Adobe CS, NCH Debut, biztree, balsamiq, pianoteq? | ||
|
||
#Powershell Config | ||
find-module sharepointpnppowershellonline | install-module | ||
update-help | ||
|
||
echo "Phew. Done. Don't skip a reboot... :)" | ||
pause | ||
#### my services / devices | ||
cinst -y microsoft-edge | ||
cinst -y spotify | ||
|
||
#### sys / file utils | ||
cinst -y vlc | ||
cinst -y sysinternals | ||
cinst -y rdcman | ||
cinst -y 7zip.install | ||
cinst -y treesizefree | ||
cinst -y winmerge | ||
cinst -y winscp | ||
cinst -y fiddler | ||
cinst -y paint.net | ||
# cinst -y baretail # can use bash 'tail' instead | ||
# cinst -y virtualbox | ||
# cinst -y wireshark | ||
|
||
#### dev | ||
cinst -y git | ||
cinst -y nodejs.install | ||
cinst -y yarn | ||
cinst -y python3 | ||
cinst -y vscode | ||
cinst -y visualstudio2017buildtools | ||
cinst -y azure-cli | ||
cinst -y sql-server-management-studio | ||
# cinst -y hostsman | ||
# cinst -y firefox | ||
# cinst -y docker-desktop | ||
|
||
#### collab | ||
cinst -y slack | ||
cinst -y microsoft-teams | ||
# Licensed: https://office.com, biztree, balsamiq, pianoteq | ||
|
||
|
||
#Powershell Config | ||
find-module sharepointpnppowershellonline | install-module | ||
update-help | ||
|
||
echo "Phew. Done. Don't skip a reboot... :)" | ||
pause |
Oops, something went wrong.