replace cheat install with pip by bash-snippets
This commit is contained in:
parent
ecf2272124
commit
fc0059b2b3
42
README.md
42
README.md
|
@ -15,7 +15,7 @@ apt-get update && apt-get upgrade -y && apt-get autoremove -y && apt-get clean
|
|||
|
||||
**Install useful packages**
|
||||
```
|
||||
sudo apt install haveged curl git unzip zip fail2ban python-pip python-setuptools htop -y
|
||||
sudo apt install haveged curl git unzip zip fail2ban htop -y
|
||||
```
|
||||
|
||||
**Tweak Kernel** [sysctl.conf](https://github.com/VirtuBox/ubuntu-nginx-web-server/blob/master/etc/sysctl.conf) &
|
||||
|
@ -147,13 +147,15 @@ service nginx reload
|
|||
|
||||
## Optional tools
|
||||
|
||||
**Install acme.sh v2**
|
||||
### Acme.sh
|
||||
[Github repository](https://github.com/Neilpang/acme.sh)
|
||||
```
|
||||
wget -O - https://get.acme.sh | sh
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
**Install netdata monitoring and set custom settings**
|
||||
### netdata
|
||||
[Github repository](https://github.com/firehol/netdata)
|
||||
```
|
||||
bash <(curl -Ss https://my-netdata.io/kickstart.sh) all
|
||||
|
||||
|
@ -166,20 +168,30 @@ wget -O /etc/netdata/health_alarm_notify.conf https://raw.githubusercontent.com/
|
|||
|
||||
```
|
||||
|
||||
**Install cheat**
|
||||
```
|
||||
pip install cheat
|
||||
### bash-snippets
|
||||
[Github repository](https://github.com/alexanderepstein/Bash-Snippets)
|
||||
```bash
|
||||
sudo add-apt-repository ppa:navanchauhan/bash-snippets
|
||||
sudo apt update
|
||||
sudo apt install bash-snippets
|
||||
```
|
||||
usage : cheat command
|
||||
example :
|
||||
```
|
||||
~# cheat cat
|
||||
# Display the contents of a file
|
||||
cat /path/to/foo
|
||||
|
||||
# Display contents with line numbers
|
||||
cat -n /path/to/foo
|
||||
```bash
|
||||
root@vps:~ cheat cat
|
||||
# cat
|
||||
|
||||
# Display contents with line numbers (blank lines excluded)
|
||||
cat -b /path/to/foo
|
||||
# Print and concatenate files.
|
||||
|
||||
# Print the contents of a file to the standard output:
|
||||
cat file
|
||||
|
||||
# Concatenate several files into the target file:
|
||||
cat file1 file2 > target_file
|
||||
|
||||
# Append several files into the target file:
|
||||
cat file1 file2 >> target_file
|
||||
|
||||
# Number all output lines:
|
||||
cat -n file
|
||||
```
|
||||
|
|
|
@ -15,7 +15,7 @@ apt-get update && apt-get upgrade -y && apt-get autoremove -y && apt-get clean
|
|||
|
||||
**Install useful packages**
|
||||
```
|
||||
sudo apt install haveged curl git unzip zip fail2ban python-pip python-setuptools htop -y
|
||||
sudo apt install haveged curl git unzip zip fail2ban htop -y
|
||||
```
|
||||
|
||||
**Tweak Kernel** [sysctl.conf](https://github.com/VirtuBox/ubuntu-nginx-web-server/blob/master/etc/sysctl.conf) &
|
||||
|
@ -147,13 +147,15 @@ service nginx reload
|
|||
|
||||
## Optional tools
|
||||
|
||||
**Install acme.sh v2**
|
||||
### Acme.sh
|
||||
[Github repository](https://github.com/Neilpang/acme.sh)
|
||||
```
|
||||
wget -O - https://get.acme.sh | sh
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
**Install netdata monitoring and set custom settings**
|
||||
### netdata
|
||||
[Github repository](https://github.com/firehol/netdata)
|
||||
```
|
||||
bash <(curl -Ss https://my-netdata.io/kickstart.sh) all
|
||||
|
||||
|
@ -166,20 +168,30 @@ wget -O /etc/netdata/health_alarm_notify.conf https://raw.githubusercontent.com/
|
|||
|
||||
```
|
||||
|
||||
**Install cheat**
|
||||
```
|
||||
pip install cheat
|
||||
### bash-snippets
|
||||
[Github repository](https://github.com/alexanderepstein/Bash-Snippets)
|
||||
```bash
|
||||
sudo add-apt-repository ppa:navanchauhan/bash-snippets
|
||||
sudo apt update
|
||||
sudo apt install bash-snippets
|
||||
```
|
||||
usage : cheat command
|
||||
example :
|
||||
```
|
||||
~# cheat cat
|
||||
# Display the contents of a file
|
||||
cat /path/to/foo
|
||||
|
||||
# Display contents with line numbers
|
||||
cat -n /path/to/foo
|
||||
```bash
|
||||
root@vps:~ cheat cat
|
||||
# cat
|
||||
|
||||
# Display contents with line numbers (blank lines excluded)
|
||||
cat -b /path/to/foo
|
||||
# Print and concatenate files.
|
||||
|
||||
# Print the contents of a file to the standard output:
|
||||
cat file
|
||||
|
||||
# Concatenate several files into the target file:
|
||||
cat file1 file2 > target_file
|
||||
|
||||
# Append several files into the target file:
|
||||
cat file1 file2 >> target_file
|
||||
|
||||
# Number all output lines:
|
||||
cat -n file
|
||||
```
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
#!/bin/bash
|
||||
|
||||
apt-get update && apt-get upgrade -y && apt-get autoremove -y && apt-get clean
|
||||
|
||||
sudo apt install haveged curl git unzip zip fail2ban htop -y
|
||||
|
||||
wget -O /etc/sysctl.conf https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/sysctl.conf
|
||||
sysctl -p
|
||||
wget -O /etc/security/limits.conf https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/security/limits.conf
|
||||
|
||||
wget -O /etc/ssh/sshd_config https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/ssh/sshd_config
|
||||
|
||||
echo never > /sys/kernel/mm/transparent_hugepage/enabled
|
||||
|
||||
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup \
|
||||
| sudo bash -s -- --mariadb-server-version=10.2 --skip-maxscale -y
|
||||
sudo apt update
|
||||
sudo apt install mariadb-server -y
|
||||
|
||||
wget -qO ee rt.cx/ee && bash ee
|
||||
|
||||
ee stack install
|
||||
ee stack install --php7 --redis --admin --phpredisadmin
|
||||
|
||||
bash <(wget --no-check-certificate -O - https://git.virtubox.net/virtubox/debian-config/raw/master/composer.sh)
|
||||
sudo -u www-data composer update -d /var/www/22222/htdocs/db/pma/
|
||||
sudo wp --allow-root cli update --nightly
|
||||
|
||||
usermod -s /bin/bash www-data
|
||||
|
||||
apt update && apt install php7.1-fpm php7.1-cli php7.1-zip php7.1-opcache php7.1-mysql php7.1-mcrypt php7.1-mbstring php7.1-json php7.1-intl \
|
||||
php7.1-gd php7.1-curl php7.1-bz2 php7.1-xml php7.1-tidy php7.1-soap php7.1-bcmath -y
|
||||
|
||||
wget -O /etc/php/7.1/fpm/pool.d/www.conf https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/php/7.1/fpm/pool.d/www.conf
|
||||
service php7.1-fpm restart
|
||||
|
||||
apt update && apt install php7.2-fpm php7.2-xml php7.2-bz2 php7.2-zip php7.2-mysql php7.2-intl php7.2-gd php7.2-curl php7.2-soap php7.2-mbstring -y
|
||||
|
||||
wget -O /etc/php/7.2/fpm/pool.d/www.conf https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/php/7.2/fpm/pool.d/www.conf
|
||||
service php7.2-fpm restart
|
||||
|
||||
wget -O /etc/nginx/conf.d/upstream.conf https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/nginx/conf.d/upstream.conf
|
||||
service nginx reload
|
||||
|
||||
cd /etc/nginx/common || exit
|
||||
wget https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/common.zip
|
||||
unzip common.zip
|
||||
|
||||
wget -O /etc/php/7.0/cli/php.ini https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/php/7.0/cli/php.ini
|
||||
wget -O /etc/php/7.0/fpm/php.ini https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/php/7.0/fpm/php.ini
|
||||
|
||||
wget -O /etc/fail2ban/filter.d/ddos.conf https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/fail2ban/filter.d/ddos.conf
|
||||
wget -O /etc/fail2ban/filter.d/ee-wordpress.conf https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/fail2ban/filter.d/ee-wordpress.conf
|
||||
wget -O /etc/fail2ban/jail.d/custom.conf https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/fail2ban/jail.d/custom.conf
|
||||
wget -O /etc/fail2ban/jail.d/ddos.conf https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/fail2ban/jail.d/ddos.conf
|
||||
|
||||
fail2ban-client reload
|
||||
|
||||
wget -O /etc/nginx/nginx.conf https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/nginx/nginx-intermediate.conf
|
||||
|
||||
wget -O /etc/nginx/sites-available/default https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/nginx/sites-available/default
|
||||
|
||||
wget -O /etc/nginx/sites-available/22222 https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/nginx/sites-available/22222
|
||||
|
||||
wget -O /etc/nginx/common/wpcommon-php7.conf https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/nginx/common/wpcommon-php7.conf
|
||||
|
||||
wget -O /etc/nginx/common/wpcommon-php71.conf https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/nginx/common/wpcommon-php71.conf
|
||||
|
||||
wget -O - https://get.acme.sh | sh
|
Loading…
Reference in New Issue