申通ubuntu1804快速装postgresql redis mq vsftp

先eri docker一套初始化

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

apt-get update

apt-get install -y postgresql-11

pg_ctlcluster 11 main start

 

su - postgres

psql

create user onlydev with password 'only1234';

GRANT "postgres" TO "onlydev";

ALTER ROLE "onlydev" CREATEDB;

CREATE DATABASE "bossdev"
WITH
ENCODING = 'UTF8'
;

 

create user onlyqa with password 'only5678';

GRANT "postgres" TO "onlyqa";

ALTER ROLE "onlyqa" CREATEDB;

CREATE DATABASE "bossqa"
WITH
ENCODING = 'UTF8'
;

 

alter user postgres with password '123456abcD';

 

echo "host all all 0.0.0.0/0 md5">>/etc/postgresql/11/main/pg_hba.conf

cp /etc/postgresql/11/main/postgresql.conf  /etc/postgresql/11/main/postgresql.conf.bak

sed -i -e "s/#listen_addresses = 'localhost'/listen_addresses = '*'/g" -e 's/max_connections = 100/max_connections = 5000/' -e 's/shared_buffers = 128MB/shared_buffers = 7GB/' -e "s@Etc/UTC@Asia/Shanghai@g" /etc/postgresql/11/main/postgresql.conf 

pg_ctlcluster 11 main restart

 

-----------------------------------------------

redis:

vim /root/redis.conf

appendonly yes

 

 docker run -p 26379:6379 --name redispre -v /root/redispre/data:/data -v /root/redis.conf:/etc/redis/redis.conf -d redis:6.2.6 redis-server /etc/redis/redis.conf

 

-----------------------------------------------

mq:

docker run -dit --name rabbitmq -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin -p 15672:15672 -p 5672:5672 rabbitmq:3.8.0-management

发票:

wget www.alexman.cn/rabbitmq_delayed_message_exchange-3.8.0.ez

docker cp rabbitmq_delayed_message_exchange-3.8.0.ez  invoicerabbitmq:/plugins

docker exec -it invoicerabbitmq /bin/bash

rabbitmq-plugins enable rabbitmq_delayed_message_exchange

 

---------------------------------------------

ftp

 docker run -d -v /root/prebossfile:/home/vsftpd  -p 20:20 -p 21:21 -p 31100-31110:31100-31110  -e FTP_USER=boss_ftpuser -e FTP_PASS='ZLF@onlyedu-0411'  -e PASV_ADDRESS=10.68.3.3 -e PASV_MIN_PORT=31100 -e PASV_MAX_PORT=31110  --name prevsftpd --restart=always fauria/vsftpd

 

posted @ 2023-09-15 15:51  alexhe  阅读(16)  评论(0编辑  收藏  举报