This file contains hidden or 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
| Ansible playbook to setup HTTPS using Let's encrypt on nginx. | |
| The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS. | |
| The server pass A rating on [SSL Labs](https://www.ssllabs.com/). | |
| To use: | |
| 1. Install [Ansible](https://www.ansible.com/) | |
| 2. Setup an Ubuntu 16.04 server accessible over ssh | |
| 3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain | |
| 4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder) |
This file contains hidden or 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
| ##If general mysql logging is enabled then we can check the queries in the log file or table based what we have mentioned in the config. Check what is enabled with the following command | |
| mysql> show variables like 'general_log%'; | |
| mysql> show variables like 'log_output%'; | |
| ##If we need query history in table then | |
| Execute SET GLOBAL log_output = 'TABLE'; | |
| Execute SET GLOBAL general_log = 'ON'; |
This file contains hidden or 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
| # Resize root partition (or how to remove the default /home partition) on CentOS 7 online | |
| This requires you to be able to ssh into the instance using the root user account and that no services be running as users out of /home on the target machine. | |
| The examples are from a default installation with no customation-you NEED to know what you're working with for volumes/partitions to not horribly break things. | |
| By default, CentOS 7 uses XFS for the file system and Logical Volume Manager (LVM), creating 3 partitions: `/`,`/home` and | |
| ## Step 1 - Copy /home Contents | |
| To backup the contents of /home, do the following: | |
| ```bash |
This file contains hidden or 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
| sudo apt-get update | |
| sudo apt-get install nodejs | |
| sudo apt-get install npm | |
| ## Use n module from npm in order to upgrade node | |
| sudo npm cache clean -f | |
| sudo npm install -g n | |
| sudo n stable |
This file contains hidden or 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
| #!/bin/bash | |
| sudo apt-get update -y | |
| sudo apt-get install python-pip -y | |
| sudo apt-get install ruby -y | |
| sudo apt-get install wget -y | |
| wget https://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/install | |
| apt-add-repository ppa:brightbox/ruby-ng -y | |
| apt-get update | |
| apt-get install ruby2.2 ruby2.2-dev -y | |
| chmod +x ./install |
This file contains hidden or 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
| <powershell> | |
| iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) | |
| choco install python -y | |
| (new-object net.webclient).DownloadFile('https://s3.amazonaws.com/aws-cli/AWSCLI64.msi','c:\AWSCLI64.msi') | |
| msiexec.exe /i 'C:\AWSCLI64.msi' /qn | |
| </powershell> |
This file contains hidden or 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
| $LocalTempDir = $env:TEMP; $ChromeInstaller = "ChromeInstaller.exe"; (new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', "$LocalTempDir\$ChromeInstaller"); & "$LocalTempDir\$ChromeInstaller" /silent /install; $Process2Monitor = "ChromeInstaller"; Do { $ProcessesFound = Get-Process | ?{$Process2Monitor -contains $_.Name} | Select-Object -ExpandProperty Name; If ($ProcessesFound) { "Still running: $($ProcessesFound -join ', ')" | Write-Host; Start-Sleep -Seconds 2 } else { rm "$LocalTempDir\$ChromeInstaller" -ErrorAction SilentlyContinue -Verbose } } Until (!$ProcessesFound) |