Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wtlinux_server_setup
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
w4t
wtlinux_server_setup
Commits
dee0c34f
Commit
dee0c34f
authored
Mar 15, 2025
by
w4t
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wtserver 0.54
parent
1616e0c7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
78 deletions
+101
-78
TO-DO.md
TO-DO.md
+10
-0
install_antivirus.sh
distros/debian12/install_antivirus.sh
+4
-5
install_mta.sh
distros/debian12/install_mta.sh
+85
-71
install_mysql.sh
distros/debian12/install_mysql.sh
+2
-2
No files found.
TO-DO.md
View file @
dee0c34f
...
...
@@ -13,3 +13,13 @@ My to-do list for the ispconfig3 installer script.
Suggestions? feel free to comment.
sok hozzáférési hiba...
doveadm fts rescan -A >> $PROGRAMS_INSTALL_LOG_FILES 2>&1
# Adds unindexed files to the fts database
#
#
*
`-q`
: Queues the indexing to be run by indexer process. (will background the indexing)
#
*
`-A`
: All users
#
* `'*
'
`
: All folders
doveadm index -A -q
\*
>> $PROGRAMS_INSTALL_LOG_FILES 2>&1
distros/debian12/install_antivirus.sh
View file @
dee0c34f
...
...
@@ -28,10 +28,9 @@ InstallAntiVirus() {
if
[[
"
$(
which named
)
"
==
""
]]
;
then
apt_install unbound
fi
CODENAME
=
`
lsb_release
-c
-s
`
curl https://rspamd.com/apt-stable/gpg.key | apt-key add -
echo
"deb [arch=amd64] http://rspamd.com/apt-stable/
$CODENAME
main"
>
/etc/apt/sources.list.d/rspamd.list
echo
"deb-src [arch=amd64] http://rspamd.com/apt-stable/
$CODENAME
main"
>>
/etc/apt/sources.list.d/rspamd.list
curl https://rspamd.com/apt-stable/gpg.key | gpg
--dearmor
>
/etc/apt/trusted.gpg.d/rspamd.gpg
echo
"deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rspamd.gpg] http://rspamd.com/apt-stable/
$(
lsb_release
-cs
)
main"
>
/etc/apt/sources.list.d/rspamd.list
echo
"deb-src [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/rspamd.gpg] http://rspamd.com/apt-stable/
$(
lsb_release
-cs
)
main"
>>
/etc/apt/sources.list.d/rspamd.list
apt_update
apt_install rspamd
echo
'servers = "127.0.0.1";'
>
/etc/rspamd/local.d/redis.conf
...
...
@@ -46,7 +45,7 @@ InstallAntiVirus() {
fi
echo
-n
-e
"
$IDENTATION_LVL_1
Installing AntiVirus utilities (ClamAV) (This take some time. Don't abort it!)..."
apt_install clamav clamav-daemon unzip bzip2 arj nomarch lzop cabextract p7zip p7zip-full lrzip apt-listchanges libnet-ldap-perl libauthen-sasl-perl clamav-docs daemon libclam
unrar9
libio-string-perl libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl libdbd-mysql-perl unrar-free unp lz4 liblz4-tool rpm2cpio tnef unp
apt_install clamav clamav-daemon unzip bzip2 arj nomarch lzop cabextract p7zip p7zip-full lrzip apt-listchanges libnet-ldap-perl libauthen-sasl-perl clamav-docs daemon libclam
unrar11
libio-string-perl libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl libdbd-mysql-perl unrar-free unp lz4 liblz4-tool rpm2cpio tnef unp
echo
-e
" [
${
green
}
DONE
${
NC
}
] "
echo
-n
-e
"
$IDENTATION_LVL_1
Configure AntiVirus ... "
...
...
distros/debian12/install_mta.sh
View file @
dee0c34f
...
...
@@ -366,7 +366,7 @@ EOF
# Restart services
restart_service dovecot
echo
-e
"[
${
green
}
DONE
${
NC
}
]"
# IMAP search with xapian
# --------------------------------
#
...
...
@@ -376,75 +376,8 @@ EOF
# fts xapian might be a good match. See https://github.com/grosjo/fts-xapian
# Install and configure fts-xapian for better search performance
echo
-n
-e
"
$IDENTATION_LVL_2
Installing fts-xapian... "
apt_install dovecot-fts-xapian
# Update the dovecot plugin configuration
#sed -i "s/#mail_plugins =\(.*\)/mail_plugins =\1 \$mail_plugins quota/" /etc/dovecot/conf.d/10-mail.conf
if
!
grep
-q
"mail_plugins.* fts fts_xapian"
/etc/dovecot/conf.d/10-mail.conf
;
then
sed
-i
"s/
\(
mail_plugins =.*
\)
/
\1\n
mail_plugins =
\$
mail_plugins fts fts_xapian/"
/etc/dovecot/conf.d/10-mail.conf
fi
# Install cronjobs to keep FTS up to date
hide_output
install
-m
755
$APWD
/conf/cron/miab_dovecot /etc/cron.daily/
# Install files
if
[
!
-f
/usr/lib/dovecot/decode2text.sh
]
;
then
cp
-f
/usr/share/doc/dovecot-core/examples/decode2text.sh /usr/lib/dovecot
fi
# Install text decoder utilities
apt_install poppler-utils catdoc unzip
# Create configuration file
cat
>
/etc/dovecot/conf.d/90-plugin-fts.conf
<<
EOF
;
plugin {
plugin = fts fts_xapian
fts = xapian
fts_xapian = partial=3 full=20 verbose=0
fts_autoindex = yes
fts_enforced = yes
fts_autoindex_exclude =
\T
rash
fts_autoindex_exclude2 =
\J
unk
fts_autoindex_exclude3 =
\S
pam
fts_decoder = decode2text
}
service indexer-worker {
vsz_limit = 2G
}
service decode2text {
executable = script /usr/lib/dovecot/decode2text.sh
user = dovecot
unix_listener decode2text {
mode = 0666
}
}
EOF
restart_service dovecot
# Kickoff building the index
# Per doveadm-fts manpage: Scan what mails exist in the full text search index
# and compare those to what actually exist in mailboxes.
# This removes mails from the index that have already been expunged and makes
# sure that the next doveadm index will index all the missing mails (if any).
#hide_output doveadm fts rescan -A
doveadm fts rescan
-A
>>
$PROGRAMS_INSTALL_LOG_FILES
2>&1
# Adds unindexed files to the fts database
#
# * `-q`: Queues the indexing to be run by indexer process. (will background the indexing)
# * `-A`: All users
# * `'*'`: All folders
#doveadm index -A -q \* >> $PROGRAMS_INSTALL_LOG_FILES 2>&1
#Not work
#Installdovecot-fts-xapian
### Additional modifications
...
...
@@ -455,7 +388,7 @@ EOF
hide_output
install
-m
755
$APWD
/conf/cron/miab_clean_mail /etc/cron.weekly/
# Reduce logs by not logging mail output in syslog
sed
-i
"s/
\*\.\*
;auth,authpriv.none.*
\-\/
var
\/
log
\/
syslog/
\*\.\*
;mail,auth,authpriv.none
\-\/
var
\/
log
\/
syslog/g"
/etc/rsyslog.d/50-default.conf
#
sed -i "s/\*\.\*;auth,authpriv.none.*\-\/var\/log\/syslog/\*\.\*;mail,auth,authpriv.none \-\/var\/log\/syslog/g" /etc/rsyslog.d/50-default.conf
# Reduce logs by only logging ufw in ufw.log
sed
-i
"s/#
\&
stop/
\&
stop/g"
/etc/rsyslog.d/20-ufw.conf
...
...
@@ -510,3 +443,84 @@ EOF
MeasureTimeDuration
$START_TIME
}
Installdovecot-fts-xapian
()
{
# IMAP search with xapian
# --------------------------------
#
# By default dovecot uses its own Squat search index that has awful performance
# on large mailboxes and is obsolete. Dovecot 2.1+ has support for using Lucene
# internally. Solr uses too much memory. Same goes for elasticsearch.
# fts xapian might be a good match. See https://github.com/grosjo/fts-xapian
# Install and configure fts-xapian for better search performance
echo
-n
-e
"
$IDENTATION_LVL_2
Installing fts-xapian... "
apt_install dovecot-fts-xapian
# Update the dovecot plugin configuration
#sed -i "s/#mail_plugins =\(.*\)/mail_plugins =\1 \$mail_plugins quota/" /etc/dovecot/conf.d/10-mail.conf
if
!
grep
-q
"mail_plugins.* fts fts_xapian"
/etc/dovecot/conf.d/10-mail.conf
;
then
sed
-i
"s/
\(
mail_plugins =.*
\)
/
\1\n
mail_plugins =
\$
mail_plugins fts fts_xapian/"
/etc/dovecot/conf.d/10-mail.conf
fi
# Install cronjobs to keep FTS up to date
hide_output
install
-m
755
$APWD
/conf/cron/miab_dovecot /etc/cron.daily/
# Install files
if
[
!
-f
/usr/lib/dovecot/decode2text.sh
]
;
then
cp
-f
/usr/share/doc/dovecot-core/examples/decode2text.sh /usr/lib/dovecot
fi
# Install text decoder utilities
apt_install poppler-utils catdoc unzip
# Create configuration file
cat
>
/etc/dovecot/conf.d/90-plugin-fts.conf
<<
EOF
;
plugin {
plugin = fts fts_xapian
fts = xapian
fts_xapian = partial=3 full=20 verbose=0
fts_autoindex = yes
fts_enforced = yes
fts_autoindex_exclude =
\T
rash
fts_autoindex_exclude2 =
\J
unk
fts_autoindex_exclude3 =
\S
pam
fts_decoder = decode2text
}
service indexer-worker {
vsz_limit = 2G
}
service decode2text {
executable = script /usr/lib/dovecot/decode2text.sh
user = dovecot
unix_listener decode2text {
mode = 0666
}
}
EOF
restart_service dovecot
# Kickoff building the index
# Per doveadm-fts manpage: Scan what mails exist in the full text search index
# and compare those to what actually exist in mailboxes.
# This removes mails from the index that have already been expunged and makes
# sure that the next doveadm index will index all the missing mails (if any).
#hide_output doveadm fts rescan -A
doveadm fts rescan
-A
>>
$PROGRAMS_INSTALL_LOG_FILES
2>&1
# Adds unindexed files to the fts database
#
# * `-q`: Queues the indexing to be run by indexer process. (will background the indexing)
# * `-A`: All users
# * `'*'`: All folders
doveadm index
-A
-q
\*
>>
$PROGRAMS_INSTALL_LOG_FILES
2>&1
}
distros/debian12/install_mysql.sh
View file @
dee0c34f
...
...
@@ -155,8 +155,8 @@ default-authentication-plugin=mysql_native_password
echo
-n
-e
"
$IDENTATION_LVL_1
Installing MariaDB Server & Client... "
apt_install software-properties-common dirmngr apt-transport-https
apt-key adv
--fetch-keys
'https://mariadb.org/mariadb_release_signing_key.asc'
>>
$PROGRAMS_INSTALL_LOG_FILES
2>&1
yes
| add-apt-repository
'deb [arch=amd64] http://mariadb.mirrors.ovh.net/MariaDB/repo/11.8.1/debian bookworm main'
>>
$PROGRAMS_INSTALL_LOG_FILES
2>&1
curl https://mariadb.org/mariadb_release_signing_key.asc | gpg
--dearmor
>
/etc/apt/trusted.gpg.d/mariadb.gpg
echo
"deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/mariadb.gpg] http://mariadb.mirrors.ovh.net/MariaDB/repo/11.8.1/debian
$(
lsb_release
-cs
)
main"
>
/etc/apt/sources.list.d/mariadb.list
apt_update
apt_install mariadb-client mariadb-server
echo
-e
"[
${
green
}
DONE
${
NC
}
]"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment