#curl -s-L https://rpm.nodesource.com/setup_6.x | bash - curl -s -L https://rpm.nodesource.com/setup_6.x | bash - cat>test1<<EOF 這是一個由shell建立的文件 this is a file created by shell. we want to make a good world. EOF cat>/etc/yum.repos.d/nginx.repo<<EOF [nginx] name=nginx repo baseurl=http://nginx.org/packages/OS/7/$basearch/ gpgcheck=0 enabled=1 EOF cat>/etc/nginx/nginx.conf<<EOF user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; include /etc/nginx/conf.d/*.conf; } EOF yum install epel-release yum install postgresql postgresql-server service postgresql initdb chkconfig postgresql on cat>/var/lib/pgsql/data/pg_hba.conf<<EOF host all all 127.0.0.1/32 trust host all all ::1/128 trust EOF service postgresql restart cd /tmp su - postgres -c psql "CREATE DATABASE onlyoffice;" su - postgres -c psql "CREATE USER onlyoffice WITH password 'onlyoffice';" su - postgres -c psql "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;" #postgres psql -c onlyoffice #postgres psql -c createdb onlyoffice #postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';" #postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice" yum install redis service redis start systemctl enable redis yum install rabbitmq-server service rabbitmq-server start systemctl enable rabbitmq-server yum install http://download.onlyoffice.com/repo/centos/main/noarch/onlyoffice-repo.noarch.rpm yum install onlyoffice-documentserver service supervisord start systemctl enable supervisord service nginx start systemctl enable nginx export DS_PORT=88 :<< ' ....被註釋的多行內容 ' echo" For PostgreSQL: · Host: localhost · Database: onlyoffice · User: onlyoffice · Password: onlyoffice For Redis: · Host: localhost For RabbitMQ: · Host: localhost · User: guest · Password: guest " bash documentserver-configure.sh yum install firewalld systemctl start firewalld systemctl enable firewalld systemctl status firewalld firewall-cmd --zone=public --add-port=80/tcp --permanent firewall-cmd --reload echo 'SELINUX=disabled'>/etc/selinux/config
有Bugnode
用docker安裝
——端口:89linux
yum -y update yum -y install docker echo "測試寫文件" cat>/etc/docker/daemon.json<<EOF { "registry-mirrors":["https://pee6w651.mirror.aliyuncs.com"] } EOF systemctl daemon-reload systemctl restart docker systemctl restart docker.service docker run -i -t -d -p 89:80 --restart=always onlyoffice/documentserver systemctl enable docker.service systemctl enable docker systemctl stop firewalld systemctl disable firewalld reboot