bugfix install compass onto centos7

1. change mariadb to mysql
2. delete the "exit 0" in cobbler.sh
3. enable rabbitmq service in dependency.sh

Change-Id: I56ac94460c772edd54b0ee6e28392964aa5aa582
Signed-off-by: baigk <baiguoku@huawei.com>
This commit is contained in:
baigk 2015-12-19 15:08:09 +08:00
parent 574a22e252
commit e557d06fd4
7 changed files with 17 additions and 22 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
set -e set -e
systemctl restart mariadb.service systemctl restart mysql.service
systemctl status mariadb.service || exit $? systemctl status mysql.service || exit $?
/opt/compass/bin/manage_db.py createdb /opt/compass/bin/manage_db.py createdb
/opt/compass/bin/clean_installers.py --noasync /opt/compass/bin/clean_installers.py --noasync
/opt/compass/bin/clean_installation_logs.py /opt/compass/bin/clean_installation_logs.py

View File

@ -144,20 +144,13 @@ chmod 644 /etc/httpd/conf.d/cobbler.conf
sudo cp -rn /etc/xinetd.d /root/backup/ sudo cp -rn /etc/xinetd.d /root/backup/
sudo cp $COMPASSDIR/misc/rsync /etc/xinetd.d/ sudo cp $COMPASSDIR/misc/rsync /etc/xinetd.d/
exit 0
#sudo sed -i 's/^@dists=/# @dists=/g' /etc/debmirror.conf #sudo sed -i 's/^@dists=/# @dists=/g' /etc/debmirror.conf
#sudo sed -i 's/^@arches=/# @arches=/g' /etc/debmirror.conf #sudo sed -i 's/^@arches=/# @arches=/g' /etc/debmirror.conf
sudo rm -rf /var/lib/cobbler/config/systems.d/* sudo rm -rf /var/lib/cobbler/config/systems.d/*
echo "disable iptables"
sudo systemctl stop firewalld sudo systemctl stop firewalld
if [[ "$?" == "0" ]]; then
echo "iptables is running"
exit 1
else
echo "iptables is already stopped"
fi
# echo "disable selinux temporarily" # echo "disable selinux temporarily"
# echo 0 > /selinux/enforce # echo 0 > /selinux/enforce

View File

@ -158,7 +158,7 @@ else
echo "redis has already started" echo "redis has already started"
fi fi
sudo systemctl status mariadb.service |grep running sudo systemctl status mysql.service |grep running
if [[ "$?" != "0" ]]; then if [[ "$?" != "0" ]]; then
echo "mysqld is not started" echo "mysqld is not started"
exit 1 exit 1

View File

@ -10,7 +10,9 @@ if [ "$tempest" == "true" ]; then
exit 1 exit 1
fi fi
fi fi
sudo yum install -y rsyslog logrotate ntp iproute openssh-clients python python-devel git wget syslinux amqp rabbitmq-server mod_wsgi httpd squid dhcp bind rsync yum-utils xinetd tftp-server gcc net-snmp-utils net-snmp net-snmp-python unzip openssl openssl098e ca-certificates mariadb mariadb-server mysql-devel python-virtualenv python-setuptools python-pip bc libselinux-python
sudo yum install http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm -y
sudo yum install -y rsyslog logrotate ntp iproute openssh-clients python python-devel git wget syslinux amqp rabbitmq-server mod_wsgi httpd squid dhcp bind rsync yum-utils xinetd tftp-server gcc net-snmp-utils net-snmp net-snmp-python unzip openssl openssl098e ca-certificates mysql-devel mysql-server mysql MySQL-python python-virtualenv python-setuptools python-pip bc libselinux-python
sudo yum --setopt=tsflags=noscripts -y remove redis sudo yum --setopt=tsflags=noscripts -y remove redis
sudo yum --enablerepo=remi,remi-test install -y redis sudo yum --enablerepo=remi,remi-test install -y redis
@ -54,5 +56,5 @@ sudo systemctl enable sshd.service
sudo systemctl enable rsyslog.service sudo systemctl enable rsyslog.service
sudo systemctl enable ntpd.service sudo systemctl enable ntpd.service
sudo systemctl enable redis.service sudo systemctl enable redis.service
sudo systemctl enable mariadb.service sudo systemctl enable mysql.service
sudo systemctl disable firewalld sudo systemctl enable rabbitmq-server.service

View File

@ -108,9 +108,9 @@ echo "update mysqld"
mkdir -p /var/log/mysql mkdir -p /var/log/mysql
chmod -R 777 /var/log/mysql chmod -R 777 /var/log/mysql
sleep 10 sleep 10
systemctl restart mariadb.service systemctl restart mysql.service
sudo sleep 10 sudo sleep 10
systemctl status mariadb.service systemctl status mysql.service
if [[ "$?" != "0" ]]; then if [[ "$?" != "0" ]]; then
echo "failed to restart mysqld" echo "failed to restart mysqld"
exit 1 exit 1
@ -144,9 +144,9 @@ if [[ "$?" != "0" ]]; then
else else
echo "mysql database set succeeded" echo "mysql database set succeeded"
fi fi
sudo systemctl restart mariadb.service sudo systemctl restart mysql.service
sudo sleep 10 sudo sleep 10
sudo systemctl status mariadb.service sudo systemctl status mysql.service
if [[ "$?" != "0" ]]; then if [[ "$?" != "0" ]]; then
echo "mysqld is not started" echo "mysqld is not started"
exit 1 exit 1

View File

@ -9,13 +9,13 @@ workon compass-core
RET=1 RET=1
while [[ RET -ne 0 ]]; do while [[ RET -ne 0 ]]; do
echo "waiting for mariadb to startup" echo "waiting for mysql to startup"
sleep 5 sleep 5
mysql -uroot -e "status" > /dev/null 2>&1 mysql -uroot -e "status" > /dev/null 2>&1
RET=$? RET=$?
done done
echo "mariadb started" echo "mysql started"
# set mysql with default username and password # set mysql with default username and password
mysqladmin -h127.0.0.1 --port=3306 -u root password root mysqladmin -h127.0.0.1 --port=3306 -u root password root

View File

@ -9,13 +9,13 @@ workon compass-core
RET=1 RET=1
while [[ RET -ne 0 ]]; do while [[ RET -ne 0 ]]; do
echo "waiting for mariadb to startup" echo "waiting for mysql to startup"
sleep 5 sleep 5
mysql -uroot -e "status" > /dev/null 2>&1 mysql -uroot -e "status" > /dev/null 2>&1
RET=$? RET=$?
done done
echo "mariadb started" echo "mysql started"
# set mysql with default username and password # set mysql with default username and password
mysqladmin -h127.0.0.1 --port=3306 -u root password root mysqladmin -h127.0.0.1 --port=3306 -u root password root