Difference between revisions of "User:E.zn/eth--host"

From Media Design: Networked & Lens-Based wiki
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 12: Line 12:
  
 
<div style="width:85%">
 
<div style="width:85%">
 +
<br>
  
===___________________________________x===
+
===___________________________________node.js===
 
<br>
 
<br>
  
====_ _ _ _ _ ====
+
====_ _ _ _ _ download====
 +
<br>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">curl -fsSL https://deb.nodesource.com/setup_15.x | bash -</pre>
 +
 
 +
<br>
 +
====_ _ _ _ _ install====
 +
<br>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">apt-get install -y nodejs</pre>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">apt-get install -y build-essential</pre>
 
<br>
 
<br>
:: <code style="background-color:#DDE3DB; border-color:#DDE3DB; color:blue;">xx</code>
+
====_ _ _ _ _ link====
 +
<br>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">sudo ln -s /usr/bin/nodejs /usr/bin/node</pre>
  
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">x</pre>
+
<br>
  
 +
===___________________________________npm===
 +
<br>
  
===___________________________________node.js===
+
====_ _ _ _ _ install====
 
<br>
 
<br>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">apt update</pre>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">apt install aptitude</pre>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">aptitude install npm</pre>
  
====_ _ _ _ _ download====
+
<br>
 +
===___________________________________database===
 
<br>
 
<br>
  
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">curl -fsSL https://deb.nodesource.com/setup_15.x | bash -</pre>
+
====_ _ _ _ _ install mariadb====
 +
<br>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">apt install mariadb-server-10.3</pre>
  
::» »»»» src : [https://github.com/nodesource/distributions nodesource]
 
::» »»»» [https://explainshell.com/explain?cmd=curl+-fsSL+example.org more on -fsSL flag]
 
  
 +
====_ _ _ _ _ install php====
 +
<br>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">sudo apt -y install php7.3</pre>
 +
</div>
 +
<br>
 +
===___________________________________git===
 +
<br>
  
 
====_ _ _ _ _ install====
 
====_ _ _ _ _ install====
 
<br>
 
<br>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">aptitude install git</pre>
  
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">apt-get install -y nodejs</pre>
 
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">apt-get install -y build-essential</pre>
 
  
 +
===___________________________________etherpad===
 +
<br>
 +
 +
====_ _ _ _ _ download====
 +
<br>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">cd /opt</pre>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">sudo git clone https://github.com/ether/etherpad-lite.git</pre>
 +
 +
<br>
 +
====_ _ _ _ _ rename====
 +
<br>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">sudo mv etherpad-lite etherpad</pre>
 +
 +
<br>
 +
====_ _ _ _ _ create etherpad user====
 +
<br>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">sudo adduser --system --no-create-home --home=/opt/etherpad --group etherpad</pre>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">sudo chown -R etherpad:etherpad etherpad</pre>
 +
 +
<br>
 +
====_ _ _ _ _ settings for etherpad user====
 +
<br>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">cd etherpad</pre>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">sudo --user etherpad cp settings.json.template settings.json</pre>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">sudo --user etherpad nano settings.json</pre>
 +
<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:86%; margin-left:4%">
 +
 +
/*
 +
"dbSettings" : {                                  [
 +
                  "filename" : "var/dirty.db"    [ comment out this section
 +
                },                                [ by putting it inside /*  */
 +
*/                                                [
 +
 +
"dbType" : "mysql",                                [
 +
  "dbSettings" : {                                [ uncomment this part
 +
                    "user"    : "etherpaduser",    [ by removing /*  */ around it
 +
                    "host"    : "localhost",      [ 
 +
                    "password": "etherpassword",  [ < change the database password
 +
                    "database": "etherpad",        [ < change the database name
 +
                    "charset" : "utf8mb4"          [
 +
                  },                              [
 +
</pre>
 +
 +
<br>
 +
====_ _ _ _ _ create etherpad database====
 +
<br>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">sudo -i</pre>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">mysql</pre>
 +
<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:86%; margin-left:4%">
 +
mysql> create database etherpad;
 +
mysql> grant all on etherpad.* to 'etherpaduser'@'localhost' identified by 'etherpassword';
 +
mysql> flush privileges;
 +
 +
Ctrl+d
  
 +
mysql -u etherpaduser -p etherpad
  
</div>
+
exit
 +
</pre>
  
 +
<br>
 +
====_ _ _ _ _ run etherpad====
 +
<br>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">sudo --user etherpad bin/run.sh</pre>
 +
</pre>
  
 +
<br>
 +
====_ _ _ _ _ service file====
 +
<br>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">sudo nano /etc/systemd/system/etherpad.service</pre>
 +
</pre>
 +
<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:86%; margin-left:4%">
 +
[Service]
 +
Type=simple
 +
User=etherpad
 +
Group=etherpad
 +
WorkingDirectory=/opt/etherpad
 +
ExecStart=/usr/bin/nodejs /opt/etherpad/node_modules/ep_etherpad-lite/node/server.js
 +
Restart=always
  
 +
[Install]
 +
WantedBy=multi-user.target
 +
</pre>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">sudo systemctl start etherpad</pre>
 +
</pre>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">sudo systemctl status etherpad</pre>
 +
</pre>
 +
::<pre style="background-color:#F2F2F2; border-color:blue; color:red; width:90%">sudo systemctl enable etherpad</pre>
 +
</pre>
  
 +
<br>
 +
===___________________________________src===
 +
<br>
  
 +
::» »»»» [https://explainshell.com/explain?cmd=curl+-fsSL+example.org more on -fsSL flag]
 +
::» »»»»  [https://serverfault.com/questions/538803/nginx-reverse-ssl-proxy-with-multiple-subdomains Reverse proxy w/multiple subdomains]
 +
::» »»»»  [https://webmasters.stackexchange.com/questions/60133/difference-between-cname-and-subdomain DNS records : Subdomain // A/CNAME ]
 +
::» »»»»  [https://github.com/nodesource/distributions Nodejs install]
 +
::» »»»»  [https://www.howtoforge.com/tutorial/ubuntu-etherpad-editor-server-installation/ Nodejs / MySQL / Etherpad]
 +
::» »»»»  [https://github.com/ether/etherpad-lite Git : Etherped-lite]
 +
::» »»»»  [https://networksofonesown.constantvzw.org/etherbox/manual.html#build-your-own-etherbox Networks Of Ones Own - Etherpad install]
 +
<br>
 
[[Category:etherpad setup]]
 
[[Category:etherpad setup]]
 
[[Category:Tools]]
 
[[Category:Tools]]

Latest revision as of 13:19, 21 June 2021







___________________________________node.js


_ _ _ _ _ download


curl -fsSL https://deb.nodesource.com/setup_15.x | bash -


_ _ _ _ _ install


apt-get install -y nodejs
apt-get install -y build-essential


_ _ _ _ _ link


sudo ln -s /usr/bin/nodejs /usr/bin/node


___________________________________npm


_ _ _ _ _ install


apt update
apt install aptitude
aptitude install npm


___________________________________database


_ _ _ _ _ install mariadb


apt install mariadb-server-10.3


_ _ _ _ _ install php


sudo apt -y install php7.3


___________________________________git


_ _ _ _ _ install


aptitude install git


___________________________________etherpad


_ _ _ _ _ download


cd /opt
sudo git clone https://github.com/ether/etherpad-lite.git


_ _ _ _ _ rename


sudo mv etherpad-lite etherpad


_ _ _ _ _ create etherpad user


sudo adduser --system --no-create-home --home=/opt/etherpad --group etherpad
sudo chown -R etherpad:etherpad etherpad


_ _ _ _ _ settings for etherpad user


cd etherpad
sudo --user etherpad cp settings.json.template settings.json
sudo --user etherpad nano settings.json

/* 
"dbSettings" : {                                   [ 
                   "filename" : "var/dirty.db"     [ comment out this section
                 },                                [ by putting it inside /*   */
*/                                                 [

"dbType" : "mysql",                                [
   "dbSettings" : {                                [ uncomment this part 
                    "user"    : "etherpaduser",    [ by removing /*   */ around it
                    "host"    : "localhost",       [  
                    "password": "etherpassword",   [ < change the database password
                    "database": "etherpad",        [ < change the database name
                    "charset" : "utf8mb4"          [
                  },                               [


_ _ _ _ _ create etherpad database


sudo -i
mysql
mysql> create database etherpad;
mysql> grant all on etherpad.* to 'etherpaduser'@'localhost' identified by 'etherpassword';
mysql> flush privileges;

Ctrl+d

mysql -u etherpaduser -p etherpad

exit


_ _ _ _ _ run etherpad


sudo --user etherpad bin/run.sh


_ _ _ _ _ service file


sudo nano /etc/systemd/system/etherpad.service
[Service]
Type=simple
User=etherpad
Group=etherpad
WorkingDirectory=/opt/etherpad
ExecStart=/usr/bin/nodejs /opt/etherpad/node_modules/ep_etherpad-lite/node/server.js
Restart=always

[Install]
WantedBy=multi-user.target
sudo systemctl start etherpad
sudo systemctl status etherpad
sudo systemctl enable etherpad


___________________________________src


» »»»» more on -fsSL flag
» »»»» Reverse proxy w/multiple subdomains
» »»»» DNS records : Subdomain // A/CNAME
» »»»» Nodejs install
» »»»» Nodejs / MySQL / Etherpad
» »»»» Git : Etherped-lite
» »»»» Networks Of Ones Own - Etherpad install