sudo yum -y update
curl -sL https://rpm.nodesource.com/setup_current.x | sudo bash - sudo yum install -y nodejs git
sudo mkdir /usr/local/etherpad sudo git clone --branch master https://github.com/ether/etherpad-lite.git /usr/local/etherpad/ sudo /usr/local/etherpad/bin/installDeps.sh sudo groupadd etherpad sudo useradd etherpad --system -g etherpad --home /var/etherpad sudo chown -R etherpad:etherpad /usr/local/etherpad
sudo vi /usr/lib/systemd/system/etherpad.service
:[Unit] Description=Etherpad-lite, the collaborative editor. After=syslog.target network.target [Service] Type=simple User=etherpad Group=etherpad WorkingDirectory=/usr/local/etherpad Environment=NODE_ENV=production ExecStart=/usr/bin/node --experimental-worker /usr/local/etherpad/node_modules/ep_etherpad-lite/node/server.js # use mysql plus a complete settings.json to avoid Service hold-off time over, scheduling restart. Restart=always [Install] WantedBy=multi-user.target
sudo chmod ugo+x /usr/lib/systemd/system/etherpad.service sudo systemctl enable etherpad sudo systemctl start etherpad
sudo yum -y install httpd mod_ssl
sudo vi /etc/httpd/conf/httpd.conf
Linux shell command with following contents:
Replace «Server Administrator Email address»
Replace «Website DNS»
#Listen 80 ServerAdmin <<Server Administrator Email address>> ServerName <<Website DNS>>:80
sudo systemctl enable httpd sudo systemctl start httpd
https://www.digicert.com/kb/csr-ssl-installation/apache-openssl.htm#ssl_certificate_install
https://support.cloudflare.com/hc/en-us/articles/115000479507-Managing-Cloudflare-Origin-CA-certificates
Replace «domain name» with your website's domain name
Replace «Paste Origin Certificate» with Origin Certificate generated in your CloudFlare account
Replace «Paste Private Key» with Private Key for Origin Certificate generated in your CloudFlare account
sudo mkdir /usr/local/ssl sudo vi /usr/local/ssl/<<domain name>>.crt <<Paste Origin Certificate>> sudo vi /usr/local/ssl/<<domain name>>.crt <<Paste Private Key>> sudo vi /usr/local/ssl/cloudflare.crt <<Paste CloudFlare certificate from below>>
https://support.cloudflare.com/hc/article_attachments/360037885371/origin_ca_rsa_root.pem
-----BEGIN CERTIFICATE----- MIIEADCCAuigAwIBAgIID+rOSdTGfG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WoQ wAB0pfJDAHJDXOTCWRyTeXOseeOi5Btj5CnEuw3P0oXqdqevM1/+uWp0CM35zgZ8 VD4aITxity0djzE6Qnx3Syzz+ZkoBgTnNum7d9A66/V636x4vTeqbZFBr9erJzgz hhurjcoacvRNhnjtDRM0dPeiCJ50CP3wEYuvUzDHUaowOsnLCjQIkWbR7Ni6KEIk MOz2U0OBSif3FTkhCgZWQKOOLo1P42jHC3ssUZAtVNXrCk3fw9/E15k8NPkBazZ6 0iykLhH1trywrKRMVw67F44IE8Y= -----END CERTIFICATE-----
sudo vi /etc/httpd/conf.d/ssl.conf
Linux shell command with following contents:Replace «domain name» with your website's domain name
SSLCertificateFile /usr/local/ssl/<<domain name>>.crt SSLCertificateKeyFile /usr/local/ssl/<<domain name>>.key SSLCertificateChainFile /usr/local/ssl/cloudflare.crt ProxyVia On ProxyRequests Off ProxyPreserveHost on <Location /> ProxyPass http://localhost:9001/ retry=0 timeout=30 ProxyPassReverse http://localhost:9001/ </Location> <Location /socket.io> # This is needed to handle the websocket transport through the proxy, since # etherpad does not use a specific sub-folder, such as /ws/ to handle this kind of traffic. # Taken from https://github.com/ether/etherpad-lite/issues/2318#issuecomment-63548542 # Thanks to beaugunderson for the semantics RewriteEngine On RewriteCond %{QUERY_STRING} transport=websocket [NC] RewriteRule /(.*) ws://localhost:9001/socket.io/$1 [P,L] ProxyPass http://localhost:9001/socket.io retry=0 timeout=30 ProxyPassReverse http://localhost:9001/socket.io </Location> <Proxy *> Options FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Proxy>
sudo systemctl restart httpd
sudo vi /usr/local/etherpad/settings.json
sudo systemctl daemon-reload && sudo systemctl restart etherpad