Created
March 30, 2017 23:02
-
-
Save mgilank/3d554d6a716bcd8a4c15043bea9c6de6 to your computer and use it in GitHub Desktop.
change vestacp to mariadb 10.2 and adding adding http2
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
# currently vesta doesnt include mariadb 10.2 and http2, which is for http2 is already ready here https://github.com/serghey-rodin/vesta/pull/1114 | |
#/bin sh | |
clear | |
echo ' __ ______ ______ ____ ____ ____ ____ ______' | |
echo ' / / / ____/ /_ __/ / __ \ / __ \ / __ ) / _/ /_ __/' | |
echo ' __ / / / __/ / / / / / / / /_/ / / __ | / / / / ' | |
echo ' / /_/ / / /___ / / / /_/ / / _, _/ / /_/ / _/ / / / ' | |
echo ' \____/ /_____/ /_/ \____/ /_/ |_| /_____/ /___/ /_/ ' | |
echo -e "\n\n" | |
# Defning return code check function | |
check_result() { | |
if [ $1 -ne 0 ]; then | |
echo "Error: $2" | |
exit $1 | |
fi | |
} | |
# Creating temporary file | |
tmpfile=$(mktemp -p /tmp) | |
echo "Stopping mysql service" | |
/etc/init.d/mysqld stop | |
echo 'Menambahkan MariaDB Repo' | |
mariarepo='/etc/yum.repos.d/MariaDB10.repo' | |
echo "[mariadb]" > $mariarepo | |
echo "name = MariaDB" >> $mariarepo | |
echo "baseurl = http://yum.mariadb.org/10.2/centos6-amd64/" >> $mariarepo | |
echo "gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB" >> $mariarepo | |
echo "gpgcheck=1" >> $mariarepo | |
rpm -qa > $tmpfile | |
for pkg in MariaDB; do | |
if [ ! -z "$(grep $pkg $tmpfile)" ]; then | |
conflicts="$pkg $conflicts" | |
fi | |
done | |
if [ ! -z "$conflicts" ] && [ -z "$force" ]; then | |
echo 'MariaDB telah terinstall dalam sistem.' | |
check_result $? "MariaDB telah terinstall dalam sistem." | |
else | |
echo 'Menghapus Mysql' | |
yum remove -y mysql mysql-server mysql-client | |
echo 'Install MariaDB' | |
yum install -y MariaDB-server MariaDB-client | |
chmod 0777 /var/log/ | |
echo 'Restart MariaDB' | |
/etc/init.d/mysql restart | |
echo 'Upgrade installasi' | |
mysql_upgrade | |
fi | |
echo 'install & konfig http2' | |
wget https://raw.githubusercontent.com/robindirksen1/vesta/085924c5d290a320842c662c9f248c51456b9371/install/rhel/6/templates/web/nginx/http2.stpl -O /usr/local/vesta/data/templates/web/nginx/http2.stpl | |
wget https://raw.githubusercontent.com/robindirksen1/vesta/f46e7cfb1dc35b290a1657de4b0694508dd54e14/install/rhel/6/templates/web/nginx/http2.tpl -O /usr/local/vesta/data/templates/web/nginx/http2.tpl | |
service vesta restart | |
echo -e "\n\n" | |
echo 'Install Multi PHP 5.4 5.5 5.6 7.0' | |
wget http://mirror.skamasle.com/vestacp/PHP/sk-phpinstaller_beta02_3.sh && bash sk-phpinstaller_beta02_3.sh | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment