Last active
March 9, 2017 15:39
-
-
Save elmijo/2adbafa2f8d8d36e8bc875768f8a34f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
echo "configuring.." | |
sudo echo mysql-server mysql-server/root_password select 123456 | debconf-set-selections | |
sudo echo mysql-server mysql-server/root_password_again select 123456 | debconf-set-selections | |
echo "installing..." | |
sudo apt-get install postgresql postgresql-client pgadmin3 mysql-server mysql-client mysql-workbench -y | |
sudo -u postgres psql -U postgres -d postgres -c "alter user postgres password '123456';" | |
sudo updatedb | |
sudo sed -i '85s/peer/md5/' $(locate --regexp=pg_hba.conf$ --limit=1) | |
sudo sed -i '90s/peer/md5/' $(locate --regexp=pg_hba.conf$ --limit=1) | |
sudo service postgresql restart | |
echo "finish!!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the simple way to use
curl -sSo- https://gist.githubusercontent.com/ElMijo/2adbafa2f8d8d36e8bc875768f8a34f2/raw/26a5473976eca021e917fa3b6dcaaa438bca8804/ubuntu-install-database.sh | sudo sh