<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>wiki.js installation Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/wiki-js-installation/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Thu, 26 Dec 2019 23:43:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How To Install wiki.js on CentOS 8</title>
		<link>https://www.osradar.com/how-to-install-wiki-js-on-centos-8/</link>
					<comments>https://www.osradar.com/how-to-install-wiki-js-on-centos-8/#respond</comments>
		
		<dc:creator><![CDATA[sabi]]></dc:creator>
		<pubDate>Sat, 04 Jan 2020 02:49:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[how to install wiki.js on centos 8]]></category>
		<category><![CDATA[wiki.js]]></category>
		<category><![CDATA[wiki.js installation]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=17010</guid>

					<description><![CDATA[<p>What is Wiki.js? Wiki.js is a modern open source wiki application used to write all documentation &#38; web content in the widely used and simple Markdown format using the built-in visual editor. It was built on Node.js, Git, and Markdown. Wiki.js allows the saving of your content directly into Markdown (.md) files &#38; it synced [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-wiki-js-on-centos-8/">How To Install wiki.js on CentOS 8</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h3><strong>What is Wiki.js?</strong></h3>



<p>Wiki.js is a modern open source wiki application used to write all documentation &amp; web content in the widely used and simple Markdown format using the built-in visual editor. It was built on Node.js, Git, and Markdown. Wiki.js allows the saving of your content directly into Markdown (.md) files &amp; it synced with your remote Git repository. </p>



<p> Here are some salient features of wiki.js</p>



<h3><strong>Salient Features of Wiki.js</strong></h3>



<ul><li>Easy &amp; free to use</li><li>Open source product</li><li>Specially designed for the modern web</li><li>Add, edit or delete content in simple Markdown format</li><li>Integrated Access Control: Local db or external authentication providers like Microsoft Account, Google Account, Facebook, Github etc.</li><li>It is light &amp; more powerful.</li><li>having built-in search engine.</li></ul>



<h3><strong>Requirements:</strong></h3>



<ul><li>Minimum Node.js 10.x </li><li>Redis cache</li><li>Minimimum Git 2.x</li><li>Git repo (public or private) (optional)</li></ul>



<h3><strong>Installing Wiki.js on CentOS 8 </strong></h3>



<h3><strong>Step 1: Updating your system </strong></h3>



<pre class="wp-block-verse">sudo yum -y update</pre>



<p>Setting time zone.</p>



<pre class="wp-block-verse">sudo timedatectl list-timezones<br>sudo timedatectl set-timezone 'Asia/Karachi'</pre>



<h3><strong>Step 2: Install Requirements</strong></h3>



<p>Install the required package for wiki.js</p>



<p><strong>1.Installing git, unzip and epel-release</strong></p>



<pre class="wp-block-verse">sudo yum install -y epel-release git vim wget curl unzip socat</pre>



<p><strong>2.Installing Node.js</strong></p>



<pre class="wp-block-verse">curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -<br>sudo yum install -y nodejs nginx</pre>



<p><strong>3.Installing MariaDB server.</strong></p>



<pre class="wp-block-verse">sudo yum -y install @mariadb<br>sudo systemctl enable --now mariadb<br>sudo mysql_secure_installation</pre>



<p>After installation of MariaDB, create DB user and db.</p>



<pre class="wp-block-verse">$ mysql -u root -p<br> CREATE DATABASE wiki;<br> GRANT ALL PRIVILEGES ON wiki.* TO 'wikijs'@'localhost' IDENTIFIED BY '<strong>Your_Password_Here</strong>';<br> FLUSH PRIVILEGES;<br> QUIT;</pre>



<p><strong>4.Installing Redis</strong></p>



<pre class="wp-block-verse">sudo yum -y install redis<br>sudo systemctl enable --now redis</pre>



<p>Check that redis is working properly</p>



<pre class="wp-block-verse">[sabi@localhost ~]$ systemctl status redis<br> ● redis.service - Redis persistent key-value database<br>    Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor prese&gt;<br>   Drop-In: /etc/systemd/system/redis.service.d<br>            └─limit.conf<br>    Active: <strong>active (running)</strong> since Tue 2019-12-24 06:28:41 PKT; 13s ago<br>  Main PID: 12599 (redis-server)<br>     Tasks: 4 (limit: 4922)<br>    Memory: 3.4M<br>    CGroup: /system.slice/redis.service<br>            └─12599 /usr/bin/redis-server 127.0.0.1:6379<br> Dec 24 06:28:41 localhost.localdomain systemd[1]: Starting Redis persistent key&gt;<br> Dec 24 06:28:41 localhost.localdomain systemd[1]: Started Redis persistent key-&gt;<br> lines 1-13/13 (END)</pre>



<p>Now, we move towards the installation of wiki.js on centos 8 by updating our system.</p>



<h3><strong>Step 3: Creat a dedicated user for Wiki.js </strong></h3>



<p>You will require a dedicated user for running wiki.js application. </p>



<pre class="wp-block-verse">sudo groupadd --system wiki<br>sudo useradd -s /sbin/nologin --system -g wiki wiki</pre>



<h3><strong>Step 4: Download Wiki.js</strong></h3>



<p>You can download the latest release of Wiki.js from the Github release page.</p>



<pre class="wp-block-verse">curl -s https://api.github.com/repos/Requarks/wiki/releases/latest \<br>  | grep browser_download_url \<br>  | grep -v windows \<br>  | cut -d '"' -f 4 \<br>  | wget -qi -</pre>



<p>After the download get completed, extract the packages to your desired location.</p>



<pre class="wp-block-verse">sudo mkdir /srv/wiki<br>sudo tar zxf wiki-js.tar.gz -C /srv/wiki</pre>



<p>Now, create a configuration file from the provided template.</p>



<pre class="wp-block-verse">cd /srv/wiki<br>sudo cp config.sample.yml config.yml</pre>



<p>Edit the configuration file and provide the details about DB, redis and ports.</p>



<pre class="wp-block-verse">#<br> Wiki.js - CONFIGURATION<br> #<br> Full documentation + examples:<br> https://docs.requarks.io/install<br> ---------------------------------------------------------------------<br> Port the server should listen to<br> ---------------------------------------------------------------------<br> port: 3000<br> ---------------------------------------------------------------------<br> Database<br> ---------------------------------------------------------------------<br> Supported Database Engines:<br> - postgres = PostgreSQL 9.5 or later<br> - mysql = MySQL 8.0 or later (5.7.8 partially supported, refer to docs)<br> - mariadb = MariaDB 10.2.7 or later<br> - mssql = MS SQL Server 2012 or later<br> - sqlite = SQLite 3.9 or later<br> db:<br>   type: postgres<br>   # PostgreSQL / MySQL / MariaDB / MS SQL Server only:<br>host: localhost<br>   port: 5432<br>   user: wikijs<br>   pass: wikijsrocks<br>   db: wiki<br>   ssl: false<br>   # SQLite only:<br>   storage: path/to/database.sqlite<br> #<br> ADVANCED OPTIONS<br> #<br> Do not change unless you know what you are doing!<br> ---------------------------------------------------------------------<br> SSL/TLS Settings<br> ---------------------------------------------------------------------<br> Consider using a reverse proxy (e.g. nginx) if you require more<br> advanced options than those provided below.<br> ssl:<br>   enabled: false<br> # Certificate format, either 'pem' or 'pfx':<br>   format: pem<br>Using PEM format:<br> key: path/to/key.pem<br>   cert: path/to/cert.pem<br>   # Using PFX format:<br>   pfx: path/to/cert.pfx<br>   # Passphrase when using encrypted PEM / PFX keys (default: null):<br>   passphrase: null<br>   # Diffie Hellman parameters, with key length being greater or equal<br>   # to 1024 bits (default: null):<br>   dhparam: null<br> # Listen on this HTTP port and redirect all requests to HTTPS.<br>   # Set to false to disable (default: 80):<br>   redirectNonSSLPort: 80<br> ---------------------------------------------------------------------<br> Database Pool Options<br> ---------------------------------------------------------------------<br> Refer to https://github.com/vincit/tarn.js for all possible options<br> pool:<br>   # min: 2<br>   # max: 10<br> ---------------------------------------------------------------------<br>IP address the server should listen to<br> ---------------------------------------------------------------------<br> Leave 0.0.0.0 for all interfaces<br> bindIP: 0.0.0.0<br> ---------------------------------------------------------------------<br> Log Level<br> ---------------------------------------------------------------------<br> Possible values: error, warn, info (default), verbose, debug, silly<br> logLevel: info<br> ---------------------------------------------------------------------<br> Upload Limits<br> ---------------------------------------------------------------------<br> If you're using a reverse-proxy in front of Wiki.js, you must also<br> change your proxy upload limits!<br> uploads:<br>   # Maximum upload size in bytes per file (default: 5242880 (5 MB))<br>   maxFileSize: 5242880<br>   # Maximum file uploads per request (default: 20)<br>   maxFiles: 10<br>---------------------------------------------------------------------<br> Offline Mode<br> ---------------------------------------------------------------------<br> If your server cannot access the internet. Set to true and manually<br> download the offline files for sideloading.<br> offline: false<br> ---------------------------------------------------------------------<br> Data Path<br> ---------------------------------------------------------------------<br> Writeable data path for Wiki.js, mainly for cache and user uploads.<br> dataPath: ./data<br>                                                               113,1         Bot</pre>



<p>After finishing all these, its time to test the Wiki.js configuration</p>



<p>Type the below command to test configuration.  You will see the output similar to the image below: </p>



<pre class="wp-block-verse">[sabi@localhost wiki]$ sudo node server<br> [sudo] password for sabi: <br> Loading configuration from /srv/wiki/config.yml… OK<br> 2019-12-24T01:40:42.220Z [MASTER] info: =======================================<br> 2019-12-24T01:40:42.223Z [MASTER] info: = Wiki.js 2.0.12 ======================<br> 2019-12-24T01:40:42.223Z [MASTER] info: =======================================<br> 2019-12-24T01:40:42.223Z [MASTER] info: Initializing…<br> 2019-12-24T01:40:42.842Z [MASTER] info: Connecting to database…</pre>



<h2><strong>Step 5: Configure Wiki.js service</strong></h2>



<p>Run the below command to run Wiki.js application as a service.</p>



<pre class="wp-block-verse">sudo vim/etc/systemd/system/wiki.service</pre>



<p>Paste the given data to the file.</p>



<pre class="wp-block-verse">[Unit]<br> Description=Wiki.js<br> After=network.target<br> [Service]<br> Type=simple<br> ExecStart=/usr/bin/node server<br> Restart=always<br> User=wiki<br> Environment=NODE_ENV=production<br> WorkingDirectory=/srv/wiki<br> [Install]<br> WantedBy=multi-user.target</pre>



<p>Allow user permission for the directory.</p>



<pre class="wp-block-verse">sudo chown -R wiki:wiki /srv/wiki</pre>



<p>Reload &amp; start services.</p>



<pre class="wp-block-verse">sudo systemctl daemon-reload<br>sudo systemctl enable --now wiki.service</pre>



<p>Make sure that status is working</p>



<pre class="wp-block-verse">systemctl status wiki</pre>



<p>Bind the service to TCP port 3000</p>



<pre class="wp-block-verse">$ ss -tunelp | grep 3000<br>tcp   LISTEN  0       128                  0.0.0.0:3000           0.0.0.0:*      uid:977 ino:283510 sk:e &lt;-&gt;  </pre>



<h3><strong>Step 6: Install and Configure Nginx reverse proxy</strong></h3>



<p>Run the given command to install nginx services.</p>



<pre class="wp-block-verse">sudo yum -y install nginx<br>sudo systemctl enable --now nginx</pre>



<p>Allow firewall.</p>



<pre class="wp-block-verse">sudo firewall-cmd --add-service=http --permanent<br>sudo firewall-cmd --reload</pre>



<p>Configure SELinux</p>



<pre class="wp-block-verse">sudo semanage port -a -t http_port_t -p tcp 3000<br>sudo setsebool -P httpd_can_network_connect 1</pre>



<p>Create new configuration file for wiki.js</p>



<pre class="wp-block-verse">sudo vim /etc/nginx/conf.d/wikijs.conf</pre>



<p>Now, add the below data into it.</p>



<pre class="wp-block-verse">server {<br>     listen      80;<br>     server_name wiki.example.com;<br> <code>location / {     proxy_set_header Host $http_host;     proxy_set_header X-Real-IP $remote_addr;     proxy_pass http://127.0.0.1:3000;     proxy_http_version 1.1;     proxy_set_header Upgrade $http_upgrade;     proxy_set_header Connection "upgrade";     proxy_next_upstream error timeout http_502 http_503 http_504; }</code><br> }</pre>



<p>Check the nginx configuration file and restart services.</p>



<pre class="wp-block-verse">$ sudo nginx -t<br>nginx: the configuration file /etc/nginx/nginx.conf syntax is ok<br>nginx: configuration file /etc/nginx/nginx.conf test is successful<br><br>$ sudo systemctl restart nginx</pre>



<p>Now, open the URL on the web browser to finish Wiki.Js installation on CentOS 8.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="695" height="425" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/12/wiki.js-setup-1.jpg" alt="" class="wp-image-17042" srcset="https://www.osradar.com/wp-content/uploads/2019/12/wiki.js-setup-1.jpg 695w, https://www.osradar.com/wp-content/uploads/2019/12/wiki.js-setup-1-300x183.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/12/wiki.js-setup-1-687x420.jpg 687w" sizes="(max-width: 695px) 100vw, 695px" /></figure></div>



<p>Provide credential details and Click &#8220;<strong>Install</strong>&#8221; button.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="682" height="168" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/12/install.jpg" alt="" class="wp-image-17041" srcset="https://www.osradar.com/wp-content/uploads/2019/12/install.jpg 682w, https://www.osradar.com/wp-content/uploads/2019/12/install-300x74.jpg 300w" sizes="(max-width: 682px) 100vw, 682px" /></figure>



<p>It will finalize your Installation.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="634" height="261" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/12/wait-for-installation-to-finish.jpg" alt="" class="wp-image-17043" srcset="https://www.osradar.com/wp-content/uploads/2019/12/wait-for-installation-to-finish.jpg 634w, https://www.osradar.com/wp-content/uploads/2019/12/wait-for-installation-to-finish-300x124.jpg 300w" sizes="(max-width: 634px) 100vw, 634px" /></figure></div>



<p>Provide the details to login.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="676" height="387" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/12/login.jpg" alt="" class="wp-image-17044" srcset="https://www.osradar.com/wp-content/uploads/2019/12/login.jpg 676w, https://www.osradar.com/wp-content/uploads/2019/12/login-300x172.jpg 300w" sizes="(max-width: 676px) 100vw, 676px" /></figure></div>



<p>Click on Create Home Page.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" width="648" height="299" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/12/create-homepage.jpg" alt="" class="wp-image-17045" srcset="https://www.osradar.com/wp-content/uploads/2019/12/create-homepage.jpg 648w, https://www.osradar.com/wp-content/uploads/2019/12/create-homepage-300x138.jpg 300w" sizes="(max-width: 648px) 100vw, 648px" /></figure></div>



<p>Congratulations! You have successfully installed wiki.js on your CentOS 8. Enjoy it!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-wiki-js-on-centos-8/">How To Install wiki.js on CentOS 8</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-wiki-js-on-centos-8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
