forked from javanile/vtiger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevelop-install.sh
executable file
·25 lines (18 loc) · 961 Bytes
/
develop-install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
set -e
export DEBIAN_FRONTEND=noninteractive
apt-get update
echo "${DATABASE_PACKAGE} mysql-server/root_password password root" | debconf-set-selections
echo "${DATABASE_PACKAGE} mysql-server/root_password_again password root" | debconf-set-selections
apt-get install -y --no-install-recommends ${DATABASE_PACKAGE}
service mysql start
mysql -uroot -e "CREATE DATABASE IF NOT EXISTS vtiger; \
ALTER DATABASE vtiger CHARACTER SET utf8 COLLATE utf8_general_ci; \
CREATE USER 'vtiger'@'%' IDENTIFIED BY 'vtiger'; \
UPDATE mysql.user SET password = PASSWORD('vtiger') WHERE user = 'vtiger'; \
GRANT ALL PRIVILEGES ON *.* TO 'vtiger'@'%' WITH GRANT OPTION; \
FLUSH PRIVILEGES;"
service mysql stop
echo "[mysqld]" >> /etc/mysql/my.cnf
echo "sql_mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" >> /etc/mysql/my.cnf
service mysql start