×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Bash
Posted by: Vincent Dagonneau
Added: Jun 8, 2016 12:10 PM
Modified: Jun 8, 2016 12:11 PM
Views: 7
Tags: no tags
  1. #!/bin/bash
  2. #
  3. # Script to install a new shared database for Openstack
  4.  
  5. IP=$(ip -4 addr show dev eth0 | grep inet | cut -f6 -d" " | cut -d"/" -f1)
  6.  
  7. sudo apt-get install software-properties-common
  8. sudo add-apt-repository cloud-archive:mitaka
  9. sudo apt-get update && sudo apt-get dist-upgrade
  10.  
  11. sudo apt-get install mariadb-server python-pymysql
  12.  
  13. echo "[mysqld]
  14. bind-address = ${IP}
  15. default-storage-engine = innodb
  16. innodb_file_per_table
  17. collation-server = utf8_general_ci
  18. character-set-server = utf8"  | sudo tee /etc/mysql/conf.d/openstack.cnf
  19.  
  20. sudo mysql_secure_installation