<commit_before>#!/bin/bash

main() {
	echo "Install Linux, Apache, MySQL, PHP (LAMP) stack On CentOS 7"
	install_apache
	install_mysql
	install_php
	echo "Processing of LAMP is completed!"
}

install_apache() {
	echo "Install Apache and start the web service"
	yum install -y httpd >> /tmp/centos-lamp.log 2>&1
	systemctl start httpd.service >> /tmp/centos-lamp.log 2>&1
	systemctl enable httpd.service >> /tmp/centos-lamp.log 2>&1
}

install_mysql() {
	echo "Install MySQL (MariaDB) and start the database service"
	yum install -y mariadb-server mariadb >> /tmp/centos-lamp.log 2>&1
	systemctl start mariadb.service >> /tmp/centos-lamp.log 2>&1
	systemctl enable mariadb.service >> /tmp/centos-lamp.log 2>&1

# 	mysql_secure_installation <<EOF
# 
# y
# db2016
# db2016
# y
# y
# y
# y
# EOF

	mysql -sfu root < "UPDATE mysql.user SET Password=PASSWORD('<PASSWORD>') WHERE User='root';
	DELETE FROM mysql.user WHERE User='';
	DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');
	DROP DATABASE IF EXISTS test;
	DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%';
	FLUSH PRIVILEGES;"
}

install_php() {
	echo "Install PHP"
	yum install -y php php-pear php-mysql phpMyAdmin >> /tmp/centos-lamp.log 2>&1
	systemctl restart httpd.service >> /tmp/centos-lamp.log 2>&1
}

main
exit 0<commit_msg>fix bugs<commit_after>#!/bin/bash

main() {
	echo "Install Linux, Apache, MySQL, PHP (LAMP) stack On CentOS 7"
	install_apache
	install_mysql
	install_php
	echo "Processing of LAMP is completed!"
}

install_apache() {
	echo "Install Apache and start the web service"
	yum install -y httpd >> /tmp/centos-lamp.log 2>&1
	systemctl start httpd.service >> /tmp/centos-lamp.log 2>&1
	systemctl enable httpd.service >> /tmp/centos-lamp.log 2>&1
}

install_mysql() {
	echo "Install MySQL (MariaDB) and start the database service"
	yum install -y mariadb-server mariadb >> /tmp/centos-lamp.log 2>&1
	systemctl start mariadb.service >> /tmp/centos-lamp.log 2>&1
	systemctl enable mariadb.service >> /tmp/centos-lamp.log 2>&1

# 	mysql_secure_installation <<EOF
# 
# y
# db2016
# db2016
# y
# y
# y
# y
# EOF

	mysql -sfu root -e "UPDATE mysql.user SET Password=PASSWORD('<PASSWORD>') WHERE User='root';
	DELETE FROM mysql.user WHERE User='';
	DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');
	DROP DATABASE IF EXISTS test;
	DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%';
	FLUSH PRIVILEGES;"
}

install_php() {
	echo "Install PHP"
	yum install -y php php-pear php-mysql phpMyAdmin >> /tmp/centos-lamp.log 2>&1
	systemctl restart httpd.service >> /tmp/centos-lamp.log 2>&1
}

main
exit 0
{'fraction_non_alphanumeric': 0.13694507148231752, 'fraction_numerical': 0.024830699774266364, 'mean_word_length': 4.143133462282399, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2042258', 'n_tokens_mistral': 1055, 'n_tokens_neox': 996, 'n_words': 291}