Last active
September 6, 2017 15:50
-
-
Save BenMorel/d4472025fb9bdafce6f8f4441c3285be to your computer and use it in GitHub Desktop.
Quick setup of extra software on EL7 for a test environment. Note that this disables the MySQL root password, so this is *not* secure.
This file contains hidden or 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
set -e | |
sudo yum update -y | |
sudo yum install -y yum-utils wget | |
# EPEL repo | |
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
sudo yum-config-manager --enable epel | |
# Remi repo | |
sudo yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm | |
sudo yum-config-manager --enable remi | |
sudo yum-config-manager --enable remi-php71 | |
# MySQL repo | |
sudo yum install -y https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm | |
# Install PHP | |
sudo yum install -y php-cli php-pdo php-mysqlnd | |
# Install MySQL | |
sudo yum install -y mysql-community-server | |
sudo systemctl enable mysqld | |
sudo systemctl start mysqld | |
# Remove MYSQL password | |
password=$(grep 'temporary password' /var/log/mysqld.log | awk '{print $11}') | |
mysqladmin --user=root --password="$password" password aaBB@@cc1122 | |
mysql --user=root --password=aaBB@@cc1122 -e "UNINSTALL PLUGIN validate_password;" | |
mysqladmin --user=root --password="aaBB@@cc1122" password "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment