环境:
[root@localhost ~]# hostnamectl
Static hostname: admin-instance-test-8.novalocal
Icon name: computer-vm
Chassis: vm
Machine ID: 1e4174276d824fa4a851e767b1b1b8a1
Boot ID: b3ee78ed84c74b1fafdc98daf7839622
Virtualization: kvm
Operating System: CentOS Linux 7 (AltArch)
CPE OS Name: cpe:/o:centos:centos:7:server
Kernel: Linux 3.10.0-1062.el7.ppc64le
Architecture: ppc64-le
[root@localhost ~]#
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (AltArch)
[root@localhost ~]#
yum源:
(默认yum源先备份一份)
mkdir /etc/yum.repos.d/default-repo.bak
mv /etc/yum.repos.d/CentOS* /etc/yum.repos.d/default-repo.bak
需要注意:这里配置阿里云yum源
vi /etc/yum.repos.d/CentOS-Base-Ali.repo
[base]
name=CentOS-$releasever - Base
baseurl=https://mirrors.aliyun.com/centos-altarch/$releasever/os/$basearch/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.aliyun.com/centos-altarch/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.aliyun.com/centos-altarch/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
enabled=1
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.aliyun.com/centos-altarch/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
然后,更新yum源
yum clean all && yum makecache fast
然后查看yum源
一、方案一:yum方式安装
1、yum安装(确保yum源正常)
yum -y install postgresql-server
2、初始化postgresql数据库
/usr/bin/postgresql-setup initdb
3、查看postgresql服务状态
systemctl status postgresql
4、启动postgresql服务,并查看服务状态
systemctl start postgresql
5、设置postgresql服务开机自启动
systemctl enable postgresql
到此,安装完毕
附:卸载postgresql数据库
-
停掉postgresql服务
systemctl stop postgresql
-
yum卸载
yum -y remove postgresql
-
查找postgresql残留文件
find / -name postgresql
然后一一删掉即可(可脚本删除)
方案一到此结束!
二、方案二:借助docker安装postgres容器
需要依赖docker环境,
参考1:CentOS7.7.1908-ppc64le成功安装docker
参考2:docker快速搭建postgresql(CentOS7)
1、拉取postgresql的docker镜像
docker pull postgres
2、查看docker镜像
docker images
3、创建并运行postgresql容器
docker run -d --name postgres -e POSTGRES_PASSWORD=123456 -p 1234:5432 postgres:latest
4、查看docker容器状态
docker ps -a
5、关掉postgresql容器
docker stop postgres
6、删除postgresql容器
docker rm postgres
方案二到此结束!
更多关于 power pc 64le 精彩内容,请看下方链接
Power PC 64 LE 云服务器安装合集
都看到最后了啦,如果觉得写得好的话呐
记得 一键三连 哦!点赞也行呐!