update install script
This commit is contained in:
parent
fb6d29106f
commit
4df4a481d7
|
@ -382,7 +382,7 @@ root@vps:~ cheat cat
|
|||
# Number all output lines:
|
||||
cat -n file
|
||||
```
|
||||
|
||||
|
||||
#### nanorc - Improved Nano Syntax Highlighting Files
|
||||
|
||||
[Github repository](https://github.com/scopatz/nanorc)
|
||||
|
|
|
@ -0,0 +1,190 @@
|
|||
[PHP]
|
||||
|
||||
engine = On
|
||||
short_open_tag = Off
|
||||
precision = 14
|
||||
output_buffering = 4096
|
||||
zlib.output_compression = Off
|
||||
implicit_flush = Off
|
||||
unserialize_callback_func =
|
||||
serialize_precision = -1
|
||||
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
|
||||
disable_classes =
|
||||
zend.enable_gc = On
|
||||
expose_php = Off
|
||||
max_execution_time = 300
|
||||
max_input_time = 600
|
||||
max_input_vars = 20000
|
||||
memory_limit = -1
|
||||
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
|
||||
display_errors = Off
|
||||
display_startup_errors = Off
|
||||
log_errors = On
|
||||
log_errors_max_len = 1024
|
||||
ignore_repeated_errors = Off
|
||||
ignore_repeated_source = Off
|
||||
report_memleaks = On
|
||||
track_errors = Off
|
||||
html_errors = On
|
||||
variables_order = "GPCS"
|
||||
request_order = "GP"
|
||||
register_argc_argv = Off
|
||||
auto_globals_jit = On
|
||||
post_max_size = 128M
|
||||
auto_prepend_file =
|
||||
auto_append_file =
|
||||
default_mimetype = "text/html"
|
||||
default_charset = "UTF-8"
|
||||
doc_root =
|
||||
user_dir =
|
||||
enable_dl = Off
|
||||
file_uploads = On
|
||||
upload_max_filesize = 128M
|
||||
max_file_uploads = 20
|
||||
allow_url_fopen = On
|
||||
allow_url_include = Off
|
||||
default_socket_timeout = 60
|
||||
|
||||
[CLI Server]
|
||||
cli_server.color = On
|
||||
|
||||
[Date]
|
||||
date.timezone = Europe/Paris
|
||||
|
||||
[filter]
|
||||
|
||||
[iconv]
|
||||
|
||||
[intl]
|
||||
|
||||
[sqlite3]
|
||||
|
||||
[Pcre]
|
||||
|
||||
[Pdo]
|
||||
|
||||
[Pdo_mysql]
|
||||
pdo_mysql.cache_size = 2000
|
||||
pdo_mysql.default_socket=
|
||||
|
||||
[Phar]
|
||||
|
||||
[mail function]
|
||||
SMTP = localhost
|
||||
smtp_port = 25
|
||||
mail.add_x_header = On
|
||||
|
||||
[SQL]
|
||||
sql.safe_mode = Off
|
||||
|
||||
[ODBC]
|
||||
odbc.allow_persistent = On
|
||||
odbc.check_persistent = On
|
||||
odbc.max_persistent = -1
|
||||
odbc.max_links = -1
|
||||
odbc.defaultlrl = 4096
|
||||
odbc.defaultbinmode = 1
|
||||
|
||||
[Interbase]
|
||||
ibase.allow_persistent = 1
|
||||
ibase.max_persistent = -1
|
||||
ibase.max_links = -1
|
||||
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
|
||||
ibase.dateformat = "%Y-%m-%d"
|
||||
ibase.timeformat = "%H:%M:%S"
|
||||
|
||||
[MySQLi]
|
||||
mysqli.max_persistent = -1
|
||||
mysqli.allow_persistent = On
|
||||
mysqli.max_links = -1
|
||||
mysqli.cache_size = 2000
|
||||
mysqli.default_port = 3306
|
||||
mysqli.default_socket =
|
||||
mysqli.default_host =
|
||||
mysqli.default_user =
|
||||
mysqli.default_pw =
|
||||
mysqli.reconnect = Off
|
||||
|
||||
[mysqlnd]
|
||||
mysqlnd.collect_statistics = On
|
||||
mysqlnd.collect_memory_statistics = Off
|
||||
|
||||
[OCI8]
|
||||
|
||||
[PostgreSQL]
|
||||
pgsql.allow_persistent = On
|
||||
pgsql.auto_reset_persistent = Off
|
||||
pgsql.max_persistent = -1
|
||||
pgsql.max_links = -1
|
||||
pgsql.ignore_notice = 0
|
||||
pgsql.log_notice = 0
|
||||
|
||||
[bcmath]
|
||||
bcmath.scale = 0
|
||||
|
||||
[browscap]
|
||||
|
||||
[Session]
|
||||
session.save_handler = files
|
||||
session.use_strict_mode = 0
|
||||
session.use_cookies = 1
|
||||
session.cookie_secure = 1
|
||||
session.use_only_cookies = 1
|
||||
session.name = PHPSESSID
|
||||
session.auto_start = 0
|
||||
session.cookie_lifetime = 0
|
||||
session.cookie_path = /
|
||||
session.cookie_domain =
|
||||
session.cookie_httponly = 1
|
||||
session.serialize_handler = php
|
||||
session.gc_probability = 0
|
||||
session.gc_divisor = 1000
|
||||
session.gc_maxlifetime = 1440
|
||||
session.referer_check =
|
||||
session.cache_limiter = nocache
|
||||
session.cache_expire = 180
|
||||
session.use_trans_sid = 0
|
||||
session.sid_length = 26
|
||||
session.trans_sid_tags = "a=href,area=href,frame=src,form="
|
||||
session.sid_bits_per_character = 5
|
||||
|
||||
[Assertion]
|
||||
zend.assertions = -1
|
||||
|
||||
[COM]
|
||||
|
||||
[mbstring]
|
||||
|
||||
[gd]
|
||||
|
||||
[exif]
|
||||
|
||||
[Tidy]
|
||||
tidy.clean_output = Off
|
||||
|
||||
[soap]
|
||||
soap.wsdl_cache_enabled=1
|
||||
soap.wsdl_cache_dir="/tmp"
|
||||
soap.wsdl_cache_ttl=86400
|
||||
soap.wsdl_cache_limit = 5
|
||||
|
||||
[sysvshm]
|
||||
|
||||
[ldap]
|
||||
ldap.max_links = -1
|
||||
|
||||
[mcrypt]
|
||||
|
||||
[dba]
|
||||
|
||||
[opcache]
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.interned_strings_buffer=8
|
||||
opcache.max_accelerated_files=10000
|
||||
opcache.memory_consumption=256
|
||||
opcache.save_comments=1
|
||||
opcache.revalidate_freq=1
|
||||
|
||||
[curl]
|
||||
[openssl]
|
|
@ -26,7 +26,6 @@ ignore_repeated_source = Off
|
|||
report_memleaks = On
|
||||
track_errors = Off
|
||||
html_errors = On
|
||||
|
||||
variables_order = "GPCS"
|
||||
request_order = "GP"
|
||||
register_argc_argv = Off
|
||||
|
@ -52,211 +51,133 @@ cli_server.color = On
|
|||
[Date]
|
||||
date.timezone = Europe/Paris
|
||||
|
||||
|
||||
[filter]
|
||||
|
||||
[iconv]
|
||||
|
||||
[intl]
|
||||
|
||||
|
||||
[sqlite3]
|
||||
|
||||
[Pcre]
|
||||
|
||||
|
||||
[Pdo]
|
||||
|
||||
[Pdo_mysql]
|
||||
|
||||
pdo_mysql.cache_size = 2000
|
||||
|
||||
pdo_mysql.default_socket=
|
||||
|
||||
[Phar]
|
||||
|
||||
[mail function]
|
||||
|
||||
SMTP = localhost
|
||||
smtp_port = 25
|
||||
mail.add_x_header = On
|
||||
|
||||
|
||||
[SQL]
|
||||
|
||||
sql.safe_mode = Off
|
||||
|
||||
[ODBC]
|
||||
|
||||
odbc.allow_persistent = On
|
||||
|
||||
odbc.check_persistent = On
|
||||
|
||||
odbc.max_persistent = -1
|
||||
|
||||
odbc.max_links = -1
|
||||
|
||||
odbc.defaultlrl = 4096
|
||||
|
||||
odbc.defaultbinmode = 1
|
||||
|
||||
[Interbase]
|
||||
|
||||
ibase.allow_persistent = 1
|
||||
|
||||
ibase.max_persistent = -1
|
||||
|
||||
ibase.max_links = -1
|
||||
|
||||
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
|
||||
|
||||
ibase.dateformat = "%Y-%m-%d"
|
||||
|
||||
ibase.timeformat = "%H:%M:%S"
|
||||
|
||||
[MySQLi]
|
||||
|
||||
mysqli.max_persistent = -1
|
||||
|
||||
|
||||
mysqli.allow_persistent = On
|
||||
|
||||
mysqli.max_links = -1
|
||||
|
||||
mysqli.cache_size = 2000
|
||||
|
||||
|
||||
mysqli.default_port = 3306
|
||||
|
||||
mysqli.default_socket =
|
||||
|
||||
mysqli.default_host =
|
||||
|
||||
mysqli.default_user =
|
||||
|
||||
mysqli.default_pw =
|
||||
|
||||
mysqli.reconnect = Off
|
||||
|
||||
[mysqlnd]
|
||||
|
||||
mysqlnd.collect_statistics = On
|
||||
|
||||
mysqlnd.collect_memory_statistics = Off
|
||||
|
||||
|
||||
|
||||
[OCI8]
|
||||
|
||||
[PostgreSQL]
|
||||
|
||||
pgsql.allow_persistent = On
|
||||
|
||||
pgsql.auto_reset_persistent = Off
|
||||
|
||||
pgsql.max_persistent = -1
|
||||
|
||||
pgsql.max_links = -1
|
||||
|
||||
pgsql.ignore_notice = 0
|
||||
|
||||
pgsql.log_notice = 0
|
||||
|
||||
[bcmath]
|
||||
|
||||
bcmath.scale = 0
|
||||
|
||||
[browscap]
|
||||
|
||||
[Session]
|
||||
|
||||
session.save_handler = files
|
||||
|
||||
session.use_strict_mode = 0
|
||||
|
||||
session.use_cookies = 1
|
||||
|
||||
session.cookie_secure = 1
|
||||
|
||||
session.use_only_cookies = 1
|
||||
|
||||
session.name = PHPSESSID
|
||||
|
||||
session.auto_start = 0
|
||||
|
||||
session.cookie_lifetime = 0
|
||||
|
||||
session.cookie_path = /
|
||||
|
||||
session.cookie_domain =
|
||||
|
||||
session.cookie_httponly = 1
|
||||
|
||||
session.serialize_handler = php
|
||||
|
||||
session.gc_probability = 0
|
||||
|
||||
|
||||
session.gc_divisor = 1000
|
||||
|
||||
session.gc_maxlifetime = 1440
|
||||
|
||||
session.referer_check =
|
||||
|
||||
session.cache_limiter = nocache
|
||||
|
||||
session.cache_expire = 180
|
||||
|
||||
session.use_trans_sid = 0
|
||||
|
||||
session.sid_length = 26
|
||||
|
||||
session.trans_sid_tags = "a=href,area=href,frame=src,form="
|
||||
|
||||
session.sid_bits_per_character = 5
|
||||
|
||||
[Assertion]
|
||||
|
||||
zend.assertions = -1
|
||||
|
||||
[COM]
|
||||
|
||||
[mbstring]
|
||||
|
||||
|
||||
[gd]
|
||||
|
||||
|
||||
[exif]
|
||||
|
||||
|
||||
[Tidy]
|
||||
|
||||
tidy.clean_output = Off
|
||||
|
||||
[soap]
|
||||
|
||||
soap.wsdl_cache_enabled=1
|
||||
|
||||
soap.wsdl_cache_dir="/tmp"
|
||||
|
||||
soap.wsdl_cache_ttl=86400
|
||||
|
||||
soap.wsdl_cache_limit = 5
|
||||
|
||||
[sysvshm]
|
||||
|
||||
[ldap]
|
||||
|
||||
ldap.max_links = -1
|
||||
|
||||
[mcrypt]
|
||||
|
||||
[dba]
|
||||
|
||||
|
||||
[opcache]
|
||||
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.interned_strings_buffer=8
|
||||
|
@ -267,5 +188,4 @@ opcache.revalidate_freq=1
|
|||
|
||||
[curl]
|
||||
|
||||
|
||||
[openssl]
|
||||
|
|
|
@ -0,0 +1,185 @@
|
|||
[PHP]
|
||||
|
||||
engine = On
|
||||
short_open_tag = Off
|
||||
precision = 14
|
||||
output_buffering = 4096
|
||||
zlib.output_compression = Off
|
||||
implicit_flush = Off
|
||||
unserialize_callback_func =
|
||||
serialize_precision = -1
|
||||
disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
|
||||
disable_classes =
|
||||
zend.enable_gc = On
|
||||
expose_php = Off
|
||||
max_execution_time = 300
|
||||
max_input_vars = 10000
|
||||
max_input_time = 600
|
||||
memory_limit = -1
|
||||
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
|
||||
display_errors = Off
|
||||
display_startup_errors = Off
|
||||
log_errors = On
|
||||
log_errors_max_len = 1024
|
||||
ignore_repeated_errors = Off
|
||||
ignore_repeated_source = Off
|
||||
report_memleaks = On
|
||||
html_errors = On
|
||||
variables_order = "GPCS"
|
||||
request_order = "GP"
|
||||
register_argc_argv = Off
|
||||
auto_globals_jit = On
|
||||
post_max_size = 128M
|
||||
auto_prepend_file =
|
||||
auto_append_file =
|
||||
default_mimetype = "text/html"
|
||||
default_charset = "UTF-8"
|
||||
doc_root =
|
||||
user_dir =
|
||||
enable_dl = Off
|
||||
file_uploads = On
|
||||
upload_max_filesize = 128M
|
||||
max_file_uploads = 20
|
||||
allow_url_fopen = On
|
||||
allow_url_include = Off
|
||||
default_socket_timeout = 60
|
||||
|
||||
[CLI Server]
|
||||
cli_server.color = On
|
||||
|
||||
[Date]
|
||||
date.timezone = Europe/Paris
|
||||
|
||||
[filter]
|
||||
|
||||
[iconv]
|
||||
|
||||
[intl]
|
||||
|
||||
[sqlite3]
|
||||
|
||||
[Pcre]
|
||||
|
||||
[Pdo]
|
||||
|
||||
[Pdo_mysql]
|
||||
pdo_mysql.cache_size = 2000
|
||||
pdo_mysql.default_socket=
|
||||
|
||||
[Phar]
|
||||
|
||||
[mail function]
|
||||
SMTP = localhost
|
||||
smtp_port = 25
|
||||
mail.add_x_header = On
|
||||
|
||||
[ODBC]
|
||||
odbc.allow_persistent = On
|
||||
odbc.check_persistent = On
|
||||
odbc.max_persistent = -1
|
||||
odbc.max_links = -1
|
||||
odbc.defaultlrl = 4096
|
||||
odbc.defaultbinmode = 1
|
||||
|
||||
[Interbase]
|
||||
ibase.allow_persistent = 1
|
||||
ibase.max_persistent = -1
|
||||
ibase.max_links = -1
|
||||
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
|
||||
ibase.dateformat = "%Y-%m-%d"
|
||||
ibase.timeformat = "%H:%M:%S"
|
||||
|
||||
[MySQLi]
|
||||
mysqli.max_persistent = -1
|
||||
mysqli.allow_persistent = On
|
||||
mysqli.max_links = -1
|
||||
mysqli.cache_size = 2000
|
||||
mysqli.default_port = 3306
|
||||
mysqli.default_socket =
|
||||
mysqli.default_host =
|
||||
mysqli.default_user =
|
||||
mysqli.default_pw =
|
||||
mysqli.reconnect = Off
|
||||
|
||||
[mysqlnd]
|
||||
mysqlnd.collect_statistics = On
|
||||
mysqlnd.collect_memory_statistics = Off
|
||||
|
||||
[OCI8]
|
||||
|
||||
[PostgreSQL]
|
||||
pgsql.allow_persistent = On
|
||||
pgsql.auto_reset_persistent = Off
|
||||
pgsql.max_persistent = -1
|
||||
pgsql.max_links = -1
|
||||
pgsql.ignore_notice = 0
|
||||
pgsql.log_notice = 0
|
||||
|
||||
[bcmath]
|
||||
bcmath.scale = 0
|
||||
|
||||
[browscap]
|
||||
|
||||
[Session]
|
||||
session.save_handler = files
|
||||
session.use_strict_mode = 0
|
||||
session.use_cookies = 1
|
||||
session.cookie_secure = 1
|
||||
session.use_only_cookies = 1
|
||||
session.name = PHPSESSID
|
||||
session.auto_start = 0
|
||||
session.cookie_lifetime = 0
|
||||
session.cookie_path = /
|
||||
session.cookie_domain =
|
||||
session.cookie_httponly =
|
||||
session.serialize_handler = php
|
||||
session.gc_probability = 0
|
||||
session.gc_divisor = 1000
|
||||
session.gc_maxlifetime = 1440
|
||||
session.referer_check =
|
||||
session.cache_limiter = nocache
|
||||
session.cache_expire = 180
|
||||
session.use_trans_sid = 0
|
||||
session.sid_length = 26
|
||||
session.trans_sid_tags = "a=href,area=href,frame=src,form="
|
||||
session.sid_bits_per_character = 5
|
||||
|
||||
[Assertion]
|
||||
zend.assertions = -1
|
||||
|
||||
[COM]
|
||||
|
||||
[mbstring]
|
||||
|
||||
[gd]
|
||||
|
||||
[exif]
|
||||
|
||||
[Tidy]
|
||||
tidy.clean_output = Off
|
||||
|
||||
[soap]
|
||||
soap.wsdl_cache_enabled=1
|
||||
soap.wsdl_cache_dir="/tmp"
|
||||
soap.wsdl_cache_ttl=86400
|
||||
soap.wsdl_cache_limit = 5
|
||||
|
||||
[sysvshm]
|
||||
|
||||
[ldap]
|
||||
ldap.max_links = -1
|
||||
|
||||
[dba]
|
||||
|
||||
[opcache]
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.interned_strings_buffer=8
|
||||
opcache.max_accelerated_files=10000
|
||||
opcache.memory_consumption=256
|
||||
opcache.save_comments=1
|
||||
opcache.revalidate_freq=1
|
||||
|
||||
[curl]
|
||||
|
||||
[openssl]
|
|
@ -1,4 +1,5 @@
|
|||
[PHP]
|
||||
|
||||
engine = On
|
||||
short_open_tag = Off
|
||||
precision = 14
|
||||
|
|
259
scripts/init.sh
259
scripts/init.sh
|
@ -1,16 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
# automated EasyEngine server configuration script
|
||||
# dev currently in progress, not ready to be used
|
||||
# currently in progress, not ready to be used in production yet
|
||||
|
||||
CSI="\\033["
|
||||
CEND="${CSI}0m"
|
||||
CRED="${CSI}1;31m"
|
||||
CGREEN="${CSI}1;32m"
|
||||
|
||||
##################################
|
||||
# Variables
|
||||
##################################
|
||||
|
||||
EE_DASH_VER="1.0"
|
||||
EXTPLORER_VER="2.1.10"
|
||||
BASH_SNIPPETS_VER="1.22.0"
|
||||
|
||||
##################################
|
||||
# Check if user is root
|
||||
##################################
|
||||
|
||||
# Check if user is root
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo "Error: You must be root to run this script, please use the root user to install the software."
|
||||
exit 1
|
||||
|
@ -18,22 +27,25 @@ fi
|
|||
|
||||
clear
|
||||
|
||||
# additionals modules choice
|
||||
##################################
|
||||
# Welcome
|
||||
##################################
|
||||
|
||||
|
||||
echo ""
|
||||
echo "Welcome to ubuntu-nginx-web-server install script."
|
||||
echo ""
|
||||
|
||||
#####
|
||||
##################################
|
||||
# Update packages
|
||||
#####
|
||||
##################################
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade -y && apt-get autoremove -y && apt-get clean
|
||||
|
||||
#####
|
||||
##################################
|
||||
# UFW
|
||||
#####
|
||||
##################################
|
||||
|
||||
if [ ! -d /etc/ufw ];
|
||||
then
|
||||
|
@ -56,7 +68,6 @@ ufw allow 873
|
|||
ufw allow 123
|
||||
ufw allow 22222
|
||||
|
||||
|
||||
# optional for monitoring
|
||||
|
||||
ufw allow 161
|
||||
|
@ -67,47 +78,46 @@ ufw allow 10050
|
|||
|
||||
ufw allow 49000:50000/tcp
|
||||
|
||||
|
||||
#ufw enable
|
||||
|
||||
#####
|
||||
##################################
|
||||
# Useful packages
|
||||
#####
|
||||
##################################
|
||||
|
||||
sudo apt-get install haveged curl git unzip zip fail2ban htop nload nmon ntp -y
|
||||
|
||||
#####
|
||||
##################################
|
||||
# ntp time
|
||||
#####
|
||||
##################################
|
||||
|
||||
sudo systemctl enable ntp
|
||||
|
||||
#####
|
||||
##################################
|
||||
# Sysctl tweaks + open_files limits
|
||||
#####
|
||||
##################################
|
||||
|
||||
sudo modprobe tcp_htcp
|
||||
wget -O /etc/sysctl.conf https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/sysctl.conf
|
||||
sysctl -p
|
||||
wget -O /etc/security/limits.conf https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/security/limits.conf
|
||||
|
||||
#####
|
||||
##################################
|
||||
# Redis transparent_hugepage
|
||||
#####
|
||||
##################################
|
||||
|
||||
echo never > /sys/kernel/mm/transparent_hugepage/enabled
|
||||
|
||||
#####
|
||||
##################################
|
||||
# Add MariaDB 10.3 repository
|
||||
#####
|
||||
##################################
|
||||
|
||||
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup \
|
||||
| sudo bash -s -- --mariadb-server-version=10.3 --skip-maxscale -y
|
||||
sudo apt-get update
|
||||
|
||||
#####
|
||||
##################################
|
||||
# MariaDB 10.3 install
|
||||
#####
|
||||
##################################
|
||||
|
||||
#ROOT_SQL_PASS=""
|
||||
#export DEBIAN_FRONTEND=noninteractive
|
||||
|
@ -115,18 +125,16 @@ sudo apt-get update
|
|||
#sudo debconf-set-selections <<< 'mariadb-server-10.3 mysql-server/root_password_again password $ROOT_SQL_PASS'
|
||||
sudo apt-get install -y mariadb-server
|
||||
|
||||
|
||||
|
||||
#cat <<EOF >~/.my.cnf
|
||||
#grep -c <<EOF >~/.my.cnf
|
||||
# [client]
|
||||
# user= root
|
||||
# password= $ROOT_SQL_PASS
|
||||
#EOF
|
||||
#cp ~/.my.cnf /etc/mysql/conf.d/my.cnf
|
||||
|
||||
#####
|
||||
##################################
|
||||
# MariaDB tweaks
|
||||
#####
|
||||
##################################
|
||||
|
||||
wget -O /etc/mysql/my.cnf https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/mysql/my.cnf
|
||||
|
||||
|
@ -140,96 +148,117 @@ sudo systemctl daemon-reload
|
|||
|
||||
sudo service mysql start
|
||||
|
||||
#####
|
||||
##################################
|
||||
# EasyEngine automated install
|
||||
#####
|
||||
##################################
|
||||
|
||||
sudo bash -c 'echo -e "[user]\n\tname = $USER\n\temail = $USER@$HOSTNAME" > $HOME/.gitconfig'
|
||||
sudo wget -qO ee rt.cx/ee && sudo bash ee
|
||||
|
||||
source /etc/bash_completion.d/ee_auto.rc
|
||||
|
||||
#####
|
||||
##################################
|
||||
# EasyEngine stacks install
|
||||
#####
|
||||
##################################
|
||||
|
||||
ee stack install
|
||||
ee stack install --php7 --redis --admin --phpredisadmin
|
||||
|
||||
|
||||
#####
|
||||
##################################
|
||||
# Fix phpmyadmin install
|
||||
#####
|
||||
##################################
|
||||
|
||||
cd ~/ ||exit
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
mv composer.phar /usr/bin/composer
|
||||
sudo -u www-data composer update -d /var/www/22222/htdocs/db/pma/
|
||||
chown www-data:www-data /var/www
|
||||
sudo -u www-data -H composer update -d /var/www/22222/htdocs/db/pma/
|
||||
|
||||
#####
|
||||
##################################
|
||||
# Allow www-data shell access for SFTP + add .bashrc settings et completion
|
||||
#####
|
||||
##################################
|
||||
|
||||
usermod -s /bin/bash www-data
|
||||
chown www-data:www-data /var/www
|
||||
|
||||
wget -O /etc/bash_completion.d/wp-completion.bash https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash
|
||||
wget -O /var/www/.profile https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/docs/files/var/www/.profile
|
||||
wget -O /var/www/.bashrc https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/docs/files/var/www/.bashrc
|
||||
wget -O /etc/bash_completion.d/wp-completion.bash https://raw.githubusercontent.com/wp-cli/wp-cli/files/utils/wp-completion.bash
|
||||
wget -O /var/www/.profile https://virtubox.github.io/ubuntu-nginx-web-server/files/docs/files/var/www/.profile
|
||||
wget -O /var/www/.bashrc https://virtubox.github.io/ubuntu-nginx-web-server/files/docs/files/var/www/.bashrc
|
||||
|
||||
chown www-data:www-data /var/www/.profile
|
||||
chown www-data:www-data /var/www/.bashrc
|
||||
|
||||
#####
|
||||
##################################
|
||||
# Install php7.1-fpm
|
||||
#####
|
||||
##################################
|
||||
|
||||
sudo apt-get 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 php7.1-xsl
|
||||
|
||||
sudo 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
|
||||
|
||||
sudo wget -O /etc/php/7.1/fpm/php.ini https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/php/7.1/fpm/php.ini
|
||||
sudo wget -O /etc/php/7.1/fpm/pool.d/www.conf https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/php/7.1/fpm/pool.d/www.conf
|
||||
|
||||
sudo wget -O /etc/php/7.1/fpm/php.ini https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/php/7.1/fpm/php.ini
|
||||
wget -O /etc/php/7.1/cli/php.ini https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/php/7.1/cli/php.ini
|
||||
sudo service php7.1-fpm restart
|
||||
|
||||
#####
|
||||
##################################
|
||||
# Install php7.2-fpm
|
||||
#####
|
||||
##################################
|
||||
|
||||
sudo apt-get 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/php/7.2/fpm/pool.d/www.conf https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/php/7.2/fpm/pool.d/www.conf
|
||||
wget -O /etc/php/7.2/cli/php.ini https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/php/7.2/cli/php.ini
|
||||
service php7.2-fpm restart
|
||||
|
||||
##################################
|
||||
# Update php7.0-fpm config
|
||||
##################################
|
||||
|
||||
wget -O /etc/php/7.0/cli/php.ini https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/php/7.0/cli/php.ini
|
||||
wget -O /etc/php/7.0/fpm/php.ini https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/php/7.0/fpm/php.ini
|
||||
|
||||
##################################
|
||||
# Compile latest nginx release from source
|
||||
##################################
|
||||
|
||||
bash <(wget -O - https://raw.githubusercontent.com/VirtuBox/nginx-ee/master/nginx-build.sh)
|
||||
|
||||
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
|
||||
##################################
|
||||
# Add nginx additional conf
|
||||
##################################
|
||||
|
||||
# php7.1 & 7.2 common configurations
|
||||
|
||||
cd /etc/nginx/common || exit
|
||||
wget https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/common.zip
|
||||
wget https://virtubox.github.io/ubuntu-nginx-web-server/files/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
|
||||
|
||||
# optimized nginx.config
|
||||
wget -O /etc/nginx/nginx.conf https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/nginx/nginx.conf
|
||||
|
||||
wget -O /etc/nginx/sites-available/default https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/nginx/sites-available/default
|
||||
|
||||
# add netdata, php7.1 and php7.2 upstream
|
||||
wget -O /etc/nginx/conf.d/upstream.conf https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/nginx/conf.d/upstream.conf
|
||||
# check nginx configuration
|
||||
CONF_22222=$(grep -c netdata /etc/nginx/sites-available/22222)
|
||||
CONF_UPSTREAM=$(grep -c /etc/nginx/conf.d/upstream.conf)
|
||||
CONF_DEFAULT=$(grep -c /etc/nginx/sites-available/default)
|
||||
|
||||
# add nginx reverse-proxy for netdata on https://yourserver.hostname:22222/netdata/
|
||||
wget -O /etc/nginx/sites-available/22222 https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/nginx/sites-available/22222
|
||||
if [[ "$CONF_22222" = 0 ]]
|
||||
then
|
||||
# add nginx reverse-proxy for netdata on https://yourserver.hostname:22222/netdata/
|
||||
sudo wget -O /etc/nginx/sites-available/22222 https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/nginx/sites-available/22222
|
||||
fi
|
||||
|
||||
if [[ "$CONF_UPSTREAM" = 0 ]]
|
||||
then
|
||||
# add netdata, php7.1 and php7.2 upstream
|
||||
sudo wget -O /etc/nginx/conf.d/upstream.conf https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/nginx/conf.d/upstream.conf
|
||||
fi
|
||||
|
||||
if [[ "$CONF_DEFAULT" = 0 ]]
|
||||
then
|
||||
# additional nginx logrep -cion for monitoring
|
||||
sudo wget -O /etc/nginx/sites-available/default https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/nginx/sites-available/default
|
||||
fi
|
||||
|
||||
# 1) add webp mapping
|
||||
wget -O /etc/nginx/conf.d/webp.conf https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/nginx/conf.d/webp.conf
|
||||
|
@ -247,23 +276,60 @@ wget -O /etc/nginx/common/wpcommon-php72.conf https://virtubox.github.io/ubuntu-
|
|||
nginx -t
|
||||
service nginx reload
|
||||
|
||||
wget https://raw.githubusercontent.com/scopatz/nanorc/master/install.sh -O- | sh
|
||||
##################################
|
||||
# Add fail2ban configurations
|
||||
##################################
|
||||
|
||||
wget -O /etc/fail2ban/filter.d/ddos.conf https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/fail2ban/filter.d/ddos.conf
|
||||
wget -O /etc/fail2ban/filter.d/ee-wordpress.conf https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/fail2ban/filter.d/ee-wordpress.conf
|
||||
wget -O /etc/fail2ban/jail.d/custom.conf https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/fail2ban/jail.d/custom.conf
|
||||
wget -O /etc/fail2ban/jail.d/ddos.conf https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/fail2ban/jail.d/ddos.conf
|
||||
|
||||
sudo fail2ban-client reload
|
||||
|
||||
##################################
|
||||
# Add nanorc
|
||||
##################################
|
||||
|
||||
wget https://raw.githubusercontent.com/scopatz/nanorc/files/install.sh -O- | sh
|
||||
|
||||
sudo -u www-data -H wget https://raw.githubusercontent.com/scopatz/nanorc/files/install.sh -O- | sh
|
||||
|
||||
##################################
|
||||
# Install cheat
|
||||
##################################
|
||||
|
||||
git clone https://github.com/alexanderepstein/Bash-Snippets
|
||||
cd Bash-Snippets || exit
|
||||
git checkout v$BASH_SNIPPETS_VER
|
||||
./install.sh cheat
|
||||
|
||||
##################################
|
||||
# Install ucaresystem
|
||||
##################################
|
||||
|
||||
sudo add-apt-repository ppa:utappia/stable -y
|
||||
sudo
|
||||
sudo apt install ucaresystem-core -y
|
||||
sudo apt-get update
|
||||
sudo apt-get install ucaresystem-core -y
|
||||
|
||||
|
||||
# ProFTPd
|
||||
##################################
|
||||
# Install ProFTPd
|
||||
##################################
|
||||
|
||||
sudo apt install proftpd -y
|
||||
|
||||
# secure proftpd and enable PassivePorts
|
||||
|
||||
sed -i 's/# DefaultRoot/DefaultRoot/' /etc/proftpd/proftpd.conf
|
||||
sed -i 's/# RequireValidShell/RequireValidShell/' /etc/proftpd/proftpd.conf
|
||||
sed -i 's/# PassivePorts 49152 65534/PassivePorts 49000 50000/' /etc/proftpd/proftpd.conf
|
||||
|
||||
sudo service proftpd restart
|
||||
|
||||
##################################
|
||||
# Install Netdata
|
||||
##################################
|
||||
|
||||
if [ ! -d /etc/netdata ];
|
||||
then
|
||||
|
||||
|
@ -277,55 +343,34 @@ bash <(curl -Ss https://my-netdata.io/kickstart.sh) all --dont-wait
|
|||
echo 1 >/sys/kernel/mm/ksm/run
|
||||
echo 1000 >/sys/kernel/mm/ksm/sleep_millisecs
|
||||
|
||||
## disable email notifications
|
||||
sed -i 's/SEND_EMAIL="YES"/SEND_EMAIL="NO"/' /etc/netdata/health_alarm_notify.conf
|
||||
service netdata restart
|
||||
## disable email notifigrep -cions
|
||||
sudo sed -i 's/SEND_EMAIL="YES"/SEND_EMAIL="NO"/' /etc/netdata/health_alarm_notify.conf
|
||||
sudo service netdata restart
|
||||
|
||||
fi
|
||||
|
||||
# nginx configuration setup
|
||||
|
||||
# check nginx configuration
|
||||
CONF_22222=$(cat /etc/nginx/sites-available/22222 | grep netdata | wc -l)
|
||||
CONF_UPSTREAM=$(cat /etc/nginx/conf.d/upstream.conf | grep netdata | wc -l )
|
||||
CONF_DEFAULT=$(cat /etc/nginx/sites-available/default | grep status | wc -l)
|
||||
|
||||
if "$CONF_22222" = 0;
|
||||
then
|
||||
sudo wget -O /etc/nginx/sites-available/22222 https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/nginx/sites-available/22222
|
||||
fi
|
||||
|
||||
if "$CONF_UPSTREAM" = 0;
|
||||
then
|
||||
sudo wget -O /etc/nginx/conf.d/upstream.conf https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/nginx/conf.d/upstream.conf
|
||||
fi
|
||||
|
||||
if "$CONF_DEFAULT" = 0;
|
||||
then
|
||||
sudo wget -O /etc/nginx/sites-available/default https://virtubox.github.io/ubuntu-nginx-web-server/files/etc/nginx/sites-available/default
|
||||
fi
|
||||
|
||||
|
||||
# extplorer install if needed
|
||||
##################################
|
||||
# Install eXtplorer
|
||||
##################################
|
||||
|
||||
if [ ! -d /var/www/22222/htdocs/files ];
|
||||
then
|
||||
|
||||
mkdir /var/www/22222/htdocs/files
|
||||
wget http://extplorer.net/attachments/download/74/eXtplorer_2.1.10.zip -O /var/www/22222/htdocs/files/ex.zip
|
||||
wget http://extplorer.net/attachments/download/74/eXtplorer_$EXTPLORER_VER.zip -O /var/www/22222/htdocs/files/ex.zip
|
||||
cd /var/www/22222/htdocs/files && unzip ex.zip && rm ex.zip
|
||||
fi
|
||||
|
||||
# easyengine dashboard install/update
|
||||
##################################
|
||||
# Install EasyEngine Dashboard
|
||||
##################################
|
||||
|
||||
cd /var/www/22222 || exit
|
||||
if [ -f easyengine-dashboard-master.zip ];
|
||||
then
|
||||
sudo rm easyengine-dashboard-master.zip
|
||||
fi
|
||||
|
||||
## download latest version of EasyEngine-dashboard
|
||||
wget https://codeload.github.com/VirtuBox/easyengine-dashboard/zip/master -O easyengine-dashboard.zip
|
||||
wget https://github.com/VirtuBox/easyengine-dashboard/archive/v$EE_DASH_VER.zip -O easyengine-dashboard.zip
|
||||
unzip easyengine-dashboard.zip
|
||||
sudo cp -rf easyengine-dashboard-master/* /var/www/22222/htdocs/
|
||||
sudo cp -rf easyengine-dashboard-$EE_DASH_VER/* /var/www/22222/htdocs/
|
||||
sudo chown -R www-data:www-data /var/www/22222/htdocs
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue