postgresql,redis,nginx等安装

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/idwtwt/article/details/89680010

1 postgresql

安装10版本源

yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7.4-x86_64/pgdg-centos10-10-2.noarch.rpm

安装postgresql10

yum install postgresql10-server

初始化数据库

/usr/pgsql-10/bin/postgresql-10-setup initdb

设置开机启动和启动服务

systemctl enable postgresql-10 

设置数据库密码(系统用户密码和数据库密码)

passwd postgres
su - postgres 切换用户,执行后提示符会变为 ‘-bash-4.2$’,切换为UNIX风格的bash 
psql -U postgres 登录数据库,执行后提示符变为 ‘postgres=#’ 
ALTER USER postgres WITH PASSWORD ‘abc123’ 设置postgres用户密码 
\q 退出数据库

重启数据库

systemctl restart postgresql-10.service

2 redis

yum install redis
systemctl enable redis
systemctl start redis

3 nginx 

yum install nginx
systemctl enable nginx
systemctl start nginx

将le.conf文件(在源码的conf文件夹)拷贝到/etc/nginx/conf.d/

[root@VM_0_14_centos ~]# ls /etc/nginx/conf.d/
le.conf

猜你喜欢

转载自blog.csdn.net/idwtwt/article/details/89680010