The best place to *find* answers to programming/development questions, imo, however it's the *worst* place to *ask* questions (if your first question/comment doesn't get any up-rating/response, then u can't ask anymore questions--ridiculously unrealistic), but again, a great reference for *finding* answers.

My Music (Nickleus)

20130221

how to install RHQ and create default rhq postgresql database

documentation:
https://docs.jboss.org/author/display/RHQ/Running+The+Installer
https://docs.jboss.org/author/display/RHQ/Running+the+RHQ+Server

install postgresql:
sudo apt-get install postgresql
sudo passwd postgres
sudo adduser rhqadmin
su - postgres
psql template1
create database rhq;
\q
psql rhq
create user rhqadmin with password 'mysecretpw';
grant all privileges on database rhq to rhqadmin;
\q
exit


fyi: how to log into the database:
su - rhqadmin
psql -d rhq -U rhqadmin


set RHQ_SERVER_JAVA_HOME in ~/.bashrc:
echo "export RHQ_SERVER_JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64" >> ~/.bashrc
source ~/.bashrc


generate encoded password value for <rhq-install-dir>/bin/rhq-server.properties > rhq.server.database.password (line 8):
cd ~/Downloads/rhq-server-4.5.1/bin
chmod +x generate-db-password.sh
./generate-db-password.sh --dbpassword=mysecretpw


// output
Encoded password: 5190c896b298c0f6d669b731438ce42e331761a902fa3908


paste this encoded value into <rhq-install-dir>/bin/rhq-server.properties > rhq.server.database.password (line 8)



NOTE: rhq-server.properties : DO NOT PUT rhq.autoinstall.enabled=true , leave it as "false"


start rhq server:
./rhq-server.sh start


open in web browser:
http://localhost:7080


click the link to continue installation

enter the clear-text db password (not the encoded one)

click "test connection"

click "install server"


login:
username: rhqadmin
password: rhqadmin


change the default password:
administration > users
click "rhqadmin"
change password
save

No comments:

Post a Comment