
fi
# if specified JON user is not present, we must create it
/bin/egrep -i "^$JON_USER" /etc/passwd > /dev/null
if [ $? != 0 ]; then
echo " - Specified JON local user does not exist; hence, it will be created."
RECREATE_USER=1
fi
# get jon and pop it into a new jon user directory
echo " * Purging any old installs and downloading JON..."
jon_uninstall
if [ $RECREATE_USER -eq 1 ]; then
userdel -f $JON_USER
rm -rf /home/$JON_USER
useradd $JON_USER -p $1$1o751Xnc$kmQKHj6gtZ50IILNkHkkF0
# mkdir /home/$JON_USER/$JON_ROOT
# chown ${JON_USER}.${JON_USER} /home/$JON_USER/$JON_ROOT
fi
wget $SOA_PI_URL -O ./jon_soa_plugin.zip
wget $EAP_PI_URL -O ./jon_eap_plugin.zip
wget $EWS_PI_URL -O ./jon_ews_plugin.zip
wget $JON_URL -O ./jon.zip
chown $JON_USER ./jon_soa_plugin.zip
chown $JON_USER ./jon_eap_plugin.zip
chown $JON_USER ./jon_ews_plugin.zip
chown $JON_USER ./jon.zip
mv ./jon.zip /home/$JON_USER
mv ./jon_soa_plugin.zip /home/$JON_USER
mv ./jon_eap_plugin.zip /home/$JON_USER
mv ./jon_ews_plugin.zip /home/$JON_USER
# start postgres
echo " * Configuring Postgres..."
service postgresql initdb
service postgresql start
# rig postgres
su - postgres -c "psql -c \"CREATE USER rhqadmin WITH PASSWORD 'rhqadmin';\""
su - postgres -c "psql -c \"CREATE DATABASE rhq;\""
su - postgres -c "psql -c \"GRANT ALL PRIVILEGES ON DATABASE rhq to rhqadmin;\""
echo "
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# \"local\" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
99 www.redhat.com
Comentarios a estos manuales