Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
c288c4bc
Commit
c288c4bc
authored
Apr 02, 2017
by
Igor Pecovnik
Browse files
Change mysql to maria
parent
8cbdb798
Changes
1
Hide whitespace changes
Inline
Side-by-side
functions.sh
View file @
c288c4bc
...
...
@@ -5,7 +5,7 @@
# Very basic stuff
apt-get
-y
-qq
install
dialog whiptail lsb-release bc
apt-get
-y
-qq
install
dialog whiptail lsb-release bc
expect
--no-install-recommends
# gather some info
distribution
=
$(
lsb_release
-cs
)
...
...
@@ -405,7 +405,7 @@ install_packet "ntp ntpdate" "Install DASH and ntp service"
}
install_MySQL
(){
install_MySQL
_old
(){
#--------------------------------------------------------------------------------------------------------------------------------
# MYSQL
#--------------------------------------------------------------------------------------------------------------------------------
...
...
@@ -419,6 +419,43 @@ service mysql restart >> /dev/null
}
install_MySQL
(){
#--------------------------------------------------------------------------------------------------------------------------------
# Maria SQL
#--------------------------------------------------------------------------------------------------------------------------------
install_packet
"mariadb-client mariadb-server"
"Install Mysql client / server"
#Allow MySQL to listen on all interfaces
cp
/etc/mysql/my.cnf /etc/mysql/my.cnf.backup
sed
-i
's|bind-address = 127.0.0.1|#bind-address = 127.0.0.1|'
/etc/mysql/mariadb.conf.d/50-server.cnf
SECURE_MYSQL
=
$(
expect
-c
"
set timeout 3
spawn mysql_secure_installation
expect
\"
Enter current password for root (enter for none):
\"
send
\"\r\"
expect
\"
root password?
\"
send
\"
y
\r\"
expect
\"
New password:
\"
send
\"
$MYSQL_PASS
\r\"
expect
\"
Re-enter new password:
\"
send
\"
$MYSQL_PASS
\r\"
expect
\"
Remove anonymous users?
\"
send
\"
y
\r\"
expect
\"
Disallow root login remotely?
\"
send
\"
y
\r\"
expect
\"
Remove test database and access to it?
\"
send
\"
y
\r\"
expect
\"
Reload privilege tables now?
\"
send
\"
y
\r\"
expect eof
"
)
#
# Execution mysql_secure_installation
#
echo
"
${
SECURE_MYSQL
}
"
service mysql restart
>>
/dev/null
}
install_MySQLDovecot
(){
#--------------------------------------------------------------------------------------------------------------------------------
# Install Postfix, Dovecot, Saslauthd, phpMyAdmin, rkhunter, binutils
...
...
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