Skip to content

Commit

Permalink
add new linux reference books
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaleao9923 committed Dec 3, 2024
1 parent 482ec7d commit e8129eb
Show file tree
Hide file tree
Showing 1,019 changed files with 25,326 additions and 0 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@
- [root vs. non-Privileged Users](#root-vs-non-privileged-users)
- [Running Commands Without Leaving a Trace](#running-commands-without-leaving-a-trace)
- [Terminals, Consoles, Shells and Commands](#terminals-consoles-shells-and-commands)
- [The Linux File System](#the-linux-file-system)
- [User Accounts Management](#user-accounts-management)
- [Linux File Permissions](#linux-file-permissions)
- [Linux Process Management](#linux-process-management)
- [Networking in Linux](#networking-in-linux)
- [Software Management](#software-management)
- [System Administration](#system-administration)
- [Bash Shell Scripting](#bash-shell-scripting)
- [Running Containerized Applications with Docker](#running-containerized-applications-with-docker)
- [Securing and Hardening a Linux System](#securing-and-hardening-a-linux-system)
- [Setting Up a Web and DNS Server](#setting-up-a-web-and-dns-server)
- [Automating Linux Administrative Tasks With Ansible](#automating-linux-administrative-tasks-with-ansible)
- [IPFS - The InterPlanetary File System](#ipfs---the-interplanetary-file-system)
- [SSH Public Key Authentication](#ssh-public-key-authentication)

# Course Outline

Expand Down Expand Up @@ -216,3 +230,31 @@ The `TAB` key is a powerful tool in the Linux terminal, providing various functi
## root vs. non-Privileged Users
## Running Commands Without Leaving a Trace
## Terminals, Consoles, Shells and Commands

# The Linux File System

# User Accounts Management

# Linux File Permissions

# Linux Process Management

# Networking in Linux

# Software Management

# System Administration

# Bash Shell Scripting

# Running Containerized Applications with Docker

# Securing and Hardening a Linux System

# Setting Up a Web and DNS Server

# Automating Linux Administrative Tasks With Ansible

# IPFS - The InterPlanetary File System

# SSH Public Key Authentication
17 changes: 17 additions & 0 deletions books/hands-on-enterprise-automation-on-linux/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
8 changes: 8 additions & 0 deletions books/hands-on-enterprise-automation-on-linux/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@



# Hands-On Enterprise Automation on Linux
### Download a free PDF

<i>If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.<br>Simply click on the link to claim your free PDF.</i>
<p align="center"> <a href="https://packt.link/free-ebook/9781789131611">https://packt.link/free-ebook/9781789131611 </a> </p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Instructions

Tested on:
- Ubuntu 18.04.2
- Ansible 2.8.4

Run this command:

ansible --version
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Instructions

Tested on:
- Ubuntu 18.04.2
- Ansible 2.8.4

Run this command:

ansible-playbook simple.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- name: Simple playbook
hosts: localhost
become: false

tasks:
- name: Show a message
debug:
msg: "Hello world!"
- name: Touch a file
file:
path: /tmp/foo
state: touch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Instructions

Tested on:
- Ubuntu 18.04.2
- Ansible 2.8.4

Run this command:

ansible-doc file
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Instructions

Tested on:
- Ubuntu 18.04.2
- Ansible 2.8.4

Run this command:

ansible-playbook -i hosts --ask-pass simple.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[test]
testhost1
testhost2
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- name: Simple playbook
hosts: all
become: false

tasks:
- name: Show a message
debug:
msg: "Hello world!"
- name: Touch a file
file:
path: /tmp/foo
state: touch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Instructions

Tested on:
- Ubuntu 18.04.2
- Ansible 2.8.4

Run this command:

ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa -q -N ''
ssh-copy-id testhost1
ssh-copy-id testhost2
ansible-playbook -i hosts simple.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[test]
testhost1
testhost2
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- name: Simple playbook
hosts: all
become: false

tasks:
- name: Show a message
debug:
msg: "Hello world!"
- name: Touch a file
file:
path: /tmp/foo
state: touch
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Instructions

Tested on:
- Ubuntu 18.04.2
- Ansible 2.8.4

Sample code only.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[test]
testhost1
testhost2

[test:vars]
ansible_user=bob
http_port=8080
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Instructions

Tested on:
- Ubuntu 18.04.2
- Ansible 2.8.4

Run this command:

ansible-playbook install-db.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: Install MariaDB Server
hosts: localhost
become: true

tasks:
- name: Install mariadb-server package
apt:
name: mariadb-server
update_cache: yes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Instructions

Tested on:
- Ubuntu 18.04.2
- Ansible 2.8.4

Run this command:

ansible-playbook install-db.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- name: Install MariaDB Server
hosts: localhost
become: true

roles:
- install-mariadb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- name: Install mariadb-server package
apt:
name: mariadb-server
update_cache: yes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Instructions

Tested on:
- Ubuntu 18.04.2
- Ansible 2.8.4

Run this command:

ansible-galaxy install -p roles/ mrlesmithjr.mariadb-mysql
ansible-playbook install-db.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: Install MariaDB Server
hosts: localhost
become: true

vars:
mariadb_root_password: cambiame

roles:
- mrlesmithjr.mariadb-mysql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Instructions

Tested on:
- Ubuntu 18.04.2
- Ansible 2.8.4

Run this command:

ansible-playbook simple.yml
ansible-playbook simple.yml -e "message=\"Hello from the CLI\""
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
- name: Simple playbook
hosts: localhost
become: false

vars:
message: "Life is beautiful!"

tasks:
- name: Show a message
debug:
msg: "{{ message }}"
- name: Touch a file
file:
path: /tmp/foo
state: touch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Instructions

Tested on:
- Ubuntu 18.04.2
- Ansible 2.8.4

Run this command:

ansible -m setup localhost
ansible-playbook simple.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- name: Simple playbook
hosts: localhost
become: false

tasks:
- name: Show a message
debug:
msg: "{{ ansible_distribution }}"
- name: Touch a file
file:
path: /tmp/foo
state: touch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Instructions

Tested on:
- Ubuntu 18.04.2
- Ansible 2.8.4

Run this command:

ansible-playbook apache-conf.yml
ansible-playbook apache-template-conf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
- name: Deploy and customize an Apache configuration
hosts: localhost
become: true

vars:
docroot: "/var/www/myexample"

tasks:
- name: Copy static configuration file to remote host
copy:
src: files/vhost.conf
dest: /etc/apache2/sites-available/my-vhost.conf
- name: Replace static DocumentRoot with variable contents
replace:
path: /etc/apache2/sites-available/my-vhost.conf
regexp: '^(\s+DocumentRoot)\s+.*$'
replace: '\1 {{ docroot }}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- name: Deploy and customize an Apache configuration
hosts: localhost
become: true

vars:
docroot: "/var/www/myexample"

tasks:
- name: Copy across and populate the template configuration
template:
src: templates/vhost.conf.j2
dest: /etc/apache2/sites-available/my-vhost.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<VirtualHost *:80>
DocumentRoot "/var/www/automation"
ServerName www.example.com
</VirtualHost>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<VirtualHost *:80>
DocumentRoot {{ docroot }}
ServerName www.example.com
</VirtualHost>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Instructions

Tested on:
- Ubuntu 18.04.2
- Ansible 2.8.4

Run this command:

ansible-playbook -i hosts site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[imagesetup]
192.168.81.141

[imagesetup:vars]
ansible_user=imagebuild
ansible_password=password
ansible_sudo_pass=password
Loading

0 comments on commit e8129eb

Please sign in to comment.