Centos8 work

来自ling
跳转至: 导航搜索
docker start onlyoffice-mysql-server
docker start onlyoffice-document-server
docker start onlyoffice-mail-server
docker start onlyoffice-community-server

docker stop onlyoffice-community-server
docker stop onlyoffice-document-server
docker stop onlyoffice-mysql-server
docker stop onlyoffice-mail-server

vm创建新的磁盘,通过工具disk挂载

fdisk -l
lsblk -fmp
mkdir /data
mount /dev/sdb /data
mount /dev/sdb ling-cloud
sudo ln -s /data /alidata

https://www.jianshu.com/p/b6a7313def5e

vi /etc/fstab
UUID=0f69af12-109f-4061-95b0-739c4e305489 /data                   ext4     defaults        0 0


sudo tee /etc/docker/daemon.json <<-'EOF'
{
"insecure-registries": ["192.168.121.226"],"graph":"/data/tools/docker","registry-mirrors": ["https://3ue1wki2.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

磁盘扩容

https://help.aliyun.com/document_detail/113316.htm?spm=a2c4g.11186623.2.27.fc781ce3r9zIja#concept-syg-jxz-2hb

df- h
resize2fs /dev/sdb
df- h

powerdesk

CREATE SMALLFILE TABLESPACE "PD_DATA" 
DATAFILE 'D:\oracle\product\10.2.0\oradata\XE\PD_DATA_data.dbf'
SIZE 100M AUTOEXTEND ON NEXT 2048K MAXSIZE UNLIMITED 
LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

CREATE SMALLFILE TABLESPACE "PD_INDEX" 
DATAFILE 'D:\oracle\product\10.2.0\oradata\XE\PD_INDEX.dbf'
SIZE 100M AUTOEXTEND ON NEXT 2048K MAXSIZE UNLIMITED 
LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;


CREATE SMALLFILE TABLESPACE "PD_TEMP" 
DATAFILE 'D:\oracle\product\10.2.0\oradata\XE\PD_TEMP.dbf'
SIZE 100M AUTOEXTEND ON NEXT 2048K MAXSIZE UNLIMITED 
LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;


create user powerdesk
  identified by "powerlong5175"
  quota unlimited on PD_DATA
  quota unlimited on PD_INDEX;
-- Grant/Revoke role privileges 
grant connect to powerdesk;
grant resource to powerdesk;
grant dba to powerdesk;

docker

sudo docker run --net onlyoffice -i -t -d  --name onlyoffice-mysql-server -p 3307:3306 \
 -v /app/onlyoffice/mysql/conf.d:/etc/mysql/conf.d \
 -v /app/onlyoffice/mysql/data:/var/lib/mysql \
 -v /app/onlyoffice/mysql/initdb:/docker-entrypoint-initdb.d \
 -v /app/onlyoffice/mysql/logs:/var/log/mysql \
 -e MYSQL_ROOT_PASSWORD=my-secret-pw \
 -e MYSQL_DATABASE=onlyoffice \
 mysql:5.7


sudo docker run --net onlyoffice -i -t -d --name onlyoffice-document-server -p 59:443 \
    -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice  \
    -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  \
    -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \
    -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \
    onlyoffice/documentserver


sudo docker run --init --net onlyoffice --privileged -i -t -d --name onlyoffice-mail-server -p 25:25 -p 143:143 -p 587:587 \
 -e MYSQL_SERVER=onlyoffice-mysql-server \
 -e MYSQL_SERVER_PORT=3306 \
 -e MYSQL_ROOT_USER=root \
 -e MYSQL_ROOT_PASSWD=my-secret-pw \
 -e MYSQL_SERVER_DB_NAME=onlyoffice_mailserver \
 -v /app/onlyoffice/MailServer/data:/var/vmail \
 -v /app/onlyoffice/MailServer/data/certs:/etc/pki/tls/mailserver \
 -v /app/onlyoffice/MailServer/logs:/var/log \
 -h yourdomain.com \
 onlyoffice/mailserver

Where ${MAIL_SERVER_IP} is the IP address for Mail Server. You can easily get it using the command:

docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' onlyoffice-mail-server


sudo docker run --net onlyoffice -i -t -d --name onlyoffice-community-server -p 60:80 -p 1443:443 -p 5222:5222 \
 -e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \
 -e MYSQL_SERVER_DB_NAME=onlyoffice \
 -e MYSQL_SERVER_HOST=onlyoffice-mysql-server \
 -e MYSQL_SERVER_USER=onlyoffice_user \
 -e MYSQL_SERVER_PASS=onlyoffice_pass \
 -e DOCUMENT_SERVER_PORT_80_TCP_ADDR=onlyoffice-document-server \
 -e MAIL_SERVER_API_HOST=${MAIL_SERVER_IP} \
 -e MAIL_SERVER_DB_HOST=onlyoffice-mysql-server \
 -e MAIL_SERVER_DB_NAME=onlyoffice_mailserver \
 -e MAIL_SERVER_DB_PORT=3306 \
 -e MAIL_SERVER_DB_USER=root \
 -e MAIL_SERVER_DB_PASS=my-secret-pw \
 -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
 -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
 onlyoffice/communityserver:10.5.3.1172

从节点

保证每个机器的vi /etc/hostname和vi /etc/hosts 正确 vi /etc/sysconfig/network-scripts/ifcfg-ens32

service network restart或/etc/init.d/network restart
tee /etc/sysconfig/network-scripts/ifcfg-ens33 <<-'EOF'
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens32"
UUID="d031d9ed-6bf9-40b5-bb5a-e1c81c4d3150"
DEVICE="ens32"
ONBOOT="yes"
IPADDR=192.168.74.150
NETMASK=255.255.255.0
GATEWAY=192.168.74.2
DNS1=192.168.74.2
DNS2=8.8.8.8
EOF