mirror of
https://github.com/moparisthebest/mailiverse
synced 2024-11-23 17:12:16 -05:00
adds setting up mysql
This commit is contained in:
parent
b3e71b26fd
commit
79fe8b00b4
@ -31,6 +31,9 @@ to the target machine.
|
||||
installing off of. Take a look at "enable_ec2_login" for what this means.
|
||||
|
||||
|
||||
6. You MUST have your passwords setup, if you are just running this as a test it is easiest to run
|
||||
"make" from within the mailiverse/passwords directory. This will create passwords using /dev/urandom
|
||||
|
||||
---
|
||||
|
||||
Ok now you are ready to go.
|
||||
@ -39,6 +42,13 @@ from the install directory type in
|
||||
|
||||
./setup-server YOUR-SERVER-IP-NAME-WHATEVER
|
||||
|
||||
and it should create the various accounts for the system and enable ssh publickey access to them.
|
||||
it should download apache james and enable it
|
||||
and it should
|
||||
|
||||
1. create the various accounts for the system and enable ssh publickey access to them
|
||||
from the computer/account you are running on now
|
||||
|
||||
2. it should download apache james
|
||||
|
||||
4. it should download and install java (oracle, don't use others with apache james, they crash)
|
||||
|
||||
3. it should download and install mysql and set up the users and databases.
|
||||
|
23
install/setup-mysql
Executable file
23
install/setup-mysql
Executable file
@ -0,0 +1,23 @@
|
||||
set -x
|
||||
|
||||
source requirements/server_root_account
|
||||
|
||||
MAIL_PASSWORD=`cat ../passwords/mail`
|
||||
MAIL_EXTRA_PASSWORD=`cat ../passwords/mail_extra`
|
||||
JAMES_PASSWORD=`cat ../passwords/james`
|
||||
CAPTCHA_PASSWORD=`cat ../passwords/captcha`
|
||||
|
||||
M_HOST=$1
|
||||
|
||||
`\
|
||||
sed \
|
||||
-e ''s/MAIL_PASSWORD/$MAIL_PASSWORD/'' \
|
||||
-e ''s/MAIL_EXTRA_PASSWORD/$MAIL_EXTRA_PASSWORD/'' \
|
||||
-e ''s/JAMES_PASSWORD/$JAMES_PASSWORD/'' \
|
||||
-e ''s/CAPTCHA_PASSWORD/$CAPTCHA_PASSWORD/'' \
|
||||
setup-mysql.sql.template > setup-mysql.sql \
|
||||
`
|
||||
|
||||
scp setup-mysql.remote $M_ROOT@$M_HOST:
|
||||
scp setup-mysql.sql $M_ROOT@$M_HOST:
|
||||
ssh $M_ROOT@$M_HOST ./setup-mysql.remote
|
6
install/setup-mysql.remote
Executable file
6
install/setup-mysql.remote
Executable file
@ -0,0 +1,6 @@
|
||||
set -x
|
||||
|
||||
sudo apt-get install mysql-server --yes
|
||||
|
||||
mysql -u root < setup-mysql.sql
|
||||
rm setup-mysql.sql
|
14
install/setup-mysql.sql.template
Normal file
14
install/setup-mysql.sql.template
Normal file
@ -0,0 +1,14 @@
|
||||
CREATE DATABASE mail CHARACTER SET utf8;
|
||||
CREATE DATABASE mail_extra CHARACTER SET utf8;
|
||||
CREATE DATABASE captcha CHARACTER SET utf8;
|
||||
CREATE DATABASE james CHARACTER SET utf8;
|
||||
|
||||
CREATE USER 'mail'@'localhost' IDENTIFIED BY 'MAIL_PASSWORD';
|
||||
CREATE USER 'mail_extra'@'localhost' IDENTIFIED BY 'MAIL_EXTRA_PASSWORD';
|
||||
CREATE USER 'captcha'@'localhost' IDENTIFIED BY 'CAPTCHA_PASSWORD';
|
||||
CREATE USER 'james'@'localhost' IDENTIFIED BY 'JAMES_PASSWORD';
|
||||
|
||||
GRANT ALL PRIVILEGES ON *.mail TO 'mail'@'localhost';
|
||||
GRANT ALL PRIVILEGES ON *.mail_extra TO 'mail_extra'@'localhost';
|
||||
GRANT ALL PRIVILEGES ON *.captcha TO 'captcha'@'localhost';
|
||||
GRANT ALL PRIVILEGES ON *.james TO 'james'@'localhost';
|
@ -7,4 +7,4 @@ M_HOST=$1
|
||||
./create-server-accounts $M_HOST
|
||||
./setup-james $M_HOST
|
||||
./setup-java $M_HOST
|
||||
|
||||
./setup-mysql $M_HOST
|
||||
|
Loading…
Reference in New Issue
Block a user