{"id":17205,"date":"2015-06-16T11:46:05","date_gmt":"2015-06-16T16:46:05","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=17205"},"modified":"2022-06-03T03:44:19","modified_gmt":"2022-06-03T08:44:19","slug":"install-etherpad-on-a-centos-7-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/install-etherpad-on-a-centos-7-vps\/","title":{"rendered":"Install Etherpad on a CentOS 7 VPS"},"content":{"rendered":"
In this tutorial, we will explain how to install Etherpad on a CentOS 7 VPS. Etherpad is an Open Source online editor providing collaborative real-time editing. This guide should work on other Linux VPS<\/a> systems as well but was tested and written for CentOS 7 VPS<\/a>. MariaDB 5.5 is shipped in the default CentOS 7 repository, to install it just run:<\/p>\n To start the MariaDB service and enable it to start on boot, execute the following commands:<\/p>\n Run the following command to secure your installation:<\/p>\n Next, we need to create a database for our Etherpad instance.<\/p>\n To verify everything is done correctly, use the command To create a new system user for our Etherpad instance run the following commands:<\/p>\n The following commands are run as etherpad user. To switch to etherpad user run:<\/p>\n Clone the Etherpad source code to the Copy the default settings configuration file:<\/p>\n and change\/add:<\/p>\n Run the following command to install dependencies:<\/p>\n Start Etherpad for the first time:<\/p>\n If there are no errors, you may continue with the next step.<\/p>\n To create a new systemd service for Etherpad, open your editor of choice as a root or sudo user and create a new file:<\/p>\n and add the following code lines:<\/p>\n Start the Etherpad service and set it to start automatically on boot:<\/p>\n To verify the unit started, run Installing Nginx is pretty easy, just run the following command:<\/p>\n Next, create a new Nginx server block:<\/p>\n Activate the server block by restarting Nginx:<\/p>\n In the future, whenever you want to update the Etherpad to the latest version, just run That’s it. You have successfully installed Etherpad on your Centos VPS<\/a>. For more information about Etherpad, please refer to the Etherpad<\/a> website.<\/p>\n Of course you don\u2019t have to do any of this if you use one of our Linux VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to setup this for you. They are available 24×7 and will take care of your request immediately.<\/p>\n PS<\/span><\/strong>. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":" In this tutorial, we will explain how to install Etherpad on a CentOS 7 VPS. Etherpad is an Open Source … <\/p>\n
\n<\/p>\nLogin to your VPS via SSH<\/h4>\n
ssh user@vps<\/pre>\n
Update the system and install necessary packages<\/h4>\n
[user]$ sudo yum -y upgrade\r\n[user]$ sudo yum install curl vim gcc-c++ make<\/pre>\n
Install MariaDB<\/h4>\n
[user]$ sudo yum install mariadb-server<\/pre>\n
[user]$ sudo systemctl start mariadb.service\r\n[user]$ sudo systemctl enable mariadb.service\r\n<\/pre>\n
[user]$ sudo mysql_secure_installation<\/pre>\n
[user]$ mysql -uroot -p\r\nMariaDB [(none)]> CREATE DATABASE etherpad;\r\nMariaDB [(none)]> GRANT ALL PRIVILEGES ON etherpad.* TO 'etherpaduser'@'localhost' IDENTIFIED BY 'etherpaduser_passwd';\r\nMariaDB [(none)]> FLUSH PRIVILEGES;\r\nMariaDB [(none)]> \\q<\/pre>\n
Install the latest Node.js<\/h4>\n
[user]$ curl -sL https:\/\/rpm.nodesource.com\/setup | sudo bash -\r\n[user]$ sudo yum install -y nodejs<\/pre>\n
node --version<\/code>.
\nThe output should be similar to the following:<\/p>\n[user]$ node --version\r\nv0.10.38<\/pre>\n
Create Etherpad user<\/h4>\n
[user]$ sudo adduser --home \/opt\/etherpad --shell \/bin\/bash etherpad\r\n[user]$ sudo install -d -m 755 -o etherpad -g etherpad \/opt\/etherpad<\/pre>\n
Install Etherpad<\/h4>\n
[user]$ sudo su - etherpad<\/pre>\n
\/opt\/etherpad\/etherpad-lite<\/code> directory.<\/p>\n
[etherpad]$ git clone git:\/\/github.com\/ether\/etherpad-lite.git ~\/etherpad-lite<\/pre>\n
[user]$ cp ~\/etherpad-lite\/settings.json.template ~\/etherpad-lite\/settings.json<\/pre>\n
\n
\"ip\": \"0.0.0.0\"<\/code> to
\"ip\": \"127.0.0.1\"<\/code><\/li>\n
\"dbType\" : \"mysql\",\r\n \"dbSettings\" : {\r\n \"user\" : \"etherpaduser\",\r\n \"host\" : \"localhost\",\r\n \"password\": \"etherpaduser_passwd\",\r\n \"database\": \"etherpad\"\r\n },\r\n\r\n<\/pre>\n<\/li>\n
\"trustProxy\" : false<\/code> to
\"trustProxy\" : true<\/code><\/li>\n
\"users\": {\r\n \"admin\": {\r\n \"password\": \"__yourAdminPassword__\",\r\n \"is_admin\": true\r\n }\r\n },\r\n<\/pre>\n<\/li>\n<\/ul>\n
~\/etherpad-lite\/bin\/installDeps.sh<\/pre>\n
~\/etherpad-lite\/bin\/run.sh<\/pre>\n
Create a systemd service<\/h4>\n
[user]$ sudo vim \/etc\/systemd\/system\/etherpad.service<\/pre>\n
[Unit]\r\nDescription=Etherpad\r\nAfter=syslog.target network.target\r\n\r\n[Service]\r\nType=simple\r\nUser=etherpad\r\nGroup=etherpad\r\nExecStart=\/opt\/etherpad\/etherpad-lite\/bin\/run.sh\r\nRestart=always\r\n\r\n[Install]\r\nWantedBy=multi-user.target<\/pre>\n
[user]$ sudo systemctl enable etherpad.service\r\n[user]$ sudo systemctl start etherpad.service\r\n<\/pre>\n
journalctl -f -u etherpad.service<\/code> and you should see something like below:<\/p>\n
[user]$ journalctl -f -u etherpad.service\r\nMay 09 11:02:08 vps systemd[1]: Starting etherpad.service...\r\nMay 09 11:02:08 vps systemd[1]: Started etherpad.service.\r\nMay 09 11:02:08 vps run.sh[23118]: Ensure that all dependencies are up to date... If this is the first time you have run Etherpad please be patient.\r\n<\/pre>\n
Install and configure Nginx<\/h4>\n
[user]$ sudo apt-get install nginx<\/pre>\n
[user]$ sudo vim \/etc\/nginx\/sites-available\/myPad.com.conf<\/pre>\n
map $http_upgrade $connection_upgrade {\r\n default upgrade;\r\n '' close;\r\n}\r\n\r\nserver {\r\n server_name myPad.com;\r\n\r\n location \/ {\r\n proxy_set_header X-Real-IP $remote_addr;\r\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\r\n proxy_set_header Host $host;\r\n proxy_redirect off;\r\n proxy_read_timeout 300;\r\n proxy_pass http:\/\/localhost:9001\/;\r\n proxy_set_header Upgrade $http_upgrade;\r\n proxy_set_header Connection $connection_upgrade;\r\n }\r\n}\r\n<\/pre>\n
[user]$ sudo systemctl restart nginx<\/pre>\n
\/opt\/etherpad\/etherpad-lite && git pull origin<\/code> and restart the Etherpad service with
systemctl restart etherpad<\/code>.<\/p>\n
\n