基础环境:
yum -y update
reboot
yum -y install gcc glibc-devel make ncurses-devel openssl-devel xmlto perl wget lrzsz zip unzip net-tools libselinux-python vim
(安装一下基础依赖环境)
postgresql安装:
pgdg-centos94-9.4-2.noarch.rpm 2018-Feb-26 20:38:47 5.3K application/x-redhat-package-manager
pgdg-centos94-9.4-3.noarch.rpm 2018-Feb-26 20:38:48 5.4K application/x-redhat-package-manager
yum install https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-2.noarch.rpm
yum install postgresql94
yum install postgresql94-server
以root执行:
/usr/pgsql-9.4/bin/postgresql94-setup initdb
systemctl enable postgresql-9.4
systemctl start postgresql-9.4
如果遇到启动失败,删除rm -rf /var/lib/pgsql/9.4/data//pg_log (参考网上,个人未遇到)
重新初始化数据库
/usr/pgsql-9.4/bin/postgresql94-setup initdb
Initializing database … OK
检查服务状态:
# systemctl status postgresql-9.4
检查端口号:
# netstat -anp|grep 5432
创建用户:
su – postgres
psql
CREATE ROLE awx CREATEDB PASSWORD ‘admin’ LOGIN;
\q
修改配置文件
sed -i ‘s#peer#md5#g’ /var/lib/pgsql/9.4/data/pg_hba.conf
sed -i ‘s#ident#md5#g’ /var/lib/pgsql/9.4/data/pg_hba.conf
exit #退出postgres用户
rabbitmq安装:
未选择最新版,安装总是报erlang版本过低,由于ansible对rabbitmq版本无较高要求,选择rabbitmq和erlang兼容版本,有兴趣的可以试试最新版。
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/rabbitmq_v3_6_5/rabbitmq-server-3.6.5-1.noarch.rpm
下载erlang
wget http://www.rabbitmq.com/releases/erlang/erlang-18.1-1.el6.x86_64.rpm
安装(注意顺序,不要颠倒)
rpm -ivh erlang-18.1-1.el6.x86_64.rpm
yum install -y rabbitmq-server-3.6.5-1.noarch.rpm
尝试启动
systemctl enable rabbitmq-server
systemctl start rabbitmq-server
如果报错,执行journalctl -xe 检查报错信息,一般是hostname问题
如无问题,添加用户admin,密码admin123,并将admin添加至管理员组
rabbitmqctl add_user admin admin123
rabbitmqctl set_user_tags admin administrato
启用WEB管理
rabbitmq-plugins enable rabbitmq_management
至此,就可以用过浏览器访问rabbitmq了。
http://ip:15672
(notepad++无法加载图片,不想上传)
原文地址:http://blog.51cto.com/951295286/2141567