<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Nodebb论坛安装过程记录]]></title><description><![CDATA[<p dir="auto"><a href="https://docs.nodebb.org/installing/os/ubuntu/" rel="nofollow ugc">https://docs.nodebb.org/installing/os/ubuntu/</a><br />
1.环境：Ubuntu 18.04  内存需要512MB以上。<br />
2.安装Node<br />
当前只能使用12版本　不能使用14版本</p>
<pre><code>$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
$ sudo apt-get install -y nodejs
</code></pre>
<p dir="auto">3.安装MongoDB</p>
<pre><code>$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
$ echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
$ sudo apt-get update
$ sudo apt-get install -y mongodb-org
$ sudo systemctl start mongod
$ sudo systemctl status mongod
</code></pre>
<p dir="auto">配置数据库：</p>
<pre><code>$ mongo
&gt; use admin
&gt; db.createUser( { user: "admin", pwd: "&lt;Enter a secure password&gt;", roles: [ { role: "root", db: "admin" } ] } )
&gt; use nodebb
&gt; db.createUser( { user: "nodebb", pwd: "&lt;Enter a secure password&gt;", roles: [ { role: "readWrite", db: "nodebb" }, { role: "clusterMonitor", db: "admin" } ] } )
&gt; quit()
$ sudo systemctl restart mongod
$ mongo -u admin -p your_password --authenticationDatabase=admin
</code></pre>
<p dir="auto">4.安装Nodebb</p>
<pre><code>$ git clone -b v1.13.x https://github.com/NodeBB/NodeBB.git nodebb
$ cd nodebb
</code></pre>
<p dir="auto"><strong>Git安装现在不知道什么原因，比较慢，可以用浏览器下载代码。</strong><br />
$ ./nodebb setup  （如果卡死　可以使用npm install访问淘宝安装）<br />
这个步骤会用npm安装node modules　经常卡死，建议使用淘宝镜像：<br />
npm config set registry <a href="http://registry.npm.taobao.org" rel="nofollow ugc">http://registry.npm.taobao.org</a><br />
配置后如果下载卡死，稍等一下。<br />
将config.json中的url改为服务器的IP，否则websocket会报错。<br />
最后启动服务<br />
$ ./nodebb start<br />
5.使用nginx代理<br />
$ cd /etc/nginx/sites-available<br />
$ sudo nano nodebb<br />
$ cd ../sites-enabled<br />
$ sudo ln -s ../sites-available/nodebb</p>
<pre><code>server {
    listen 80;

    server_name forum.example.com;

    location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;

        proxy_pass http://127.0.0.1:4567;
        proxy_redirect off;

        # Socket.IO Support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}
</code></pre>
<p dir="auto">$ sudo systemctl reload nginx</p>
<p dir="auto">===================================================<br />
修复无法上传图片的问题：<br />
下载　libvips-8.9.2　（ubuntu 18.04默认的版本太低　需要源码安装）<br />
sudo apt-get install gtk-doc-tools<br />
sudo apt-get install gobject-introspection<br />
./autogen.sh<br />
make  &amp;&amp; sudo make install<br />
创建usrlocal.conf 内容为　/usr/local/lib  将该文件放到　/etc/ld.so.conf.d<br />
npm install sharp@0.24.0</p>
]]></description><link>http://an.forum.genostack.com/topic/2/nodebb论坛安装过程记录</link><generator>RSS for Node</generator><lastBuildDate>Sat, 13 Jun 2026 12:30:19 GMT</lastBuildDate><atom:link href="http://an.forum.genostack.com/topic/2.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 18 Jul 2020 06:29:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Nodebb论坛安装过程记录 on Sun, 07 Feb 2021 01:43:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://an.forum.genostack.com/uid/3">@ice-melt</a></p>
<p dir="auto">另外还有论坛网页经常显示连接已断开的问题，<br />
解决方法：<br />
将 nodebb论坛的<code>config.json</code>中的 <code>url</code> 修改的和 nginx 的一致<br />
example：</p>
<pre><code>cat /etc/nginx/sites-enabled/nodebb
...
server_name an.forum.genostack.com;
...

cat /path/to/nodebb/config.json
...
"url": "http://an.forum.genostack.com",
...
</code></pre>
]]></description><link>http://an.forum.genostack.com/post/403</link><guid isPermaLink="true">http://an.forum.genostack.com/post/403</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Sun, 07 Feb 2021 01:43:39 GMT</pubDate></item><item><title><![CDATA[Reply to Nodebb论坛安装过程记录 on Fri, 05 Feb 2021 07:41:45 GMT]]></title><description><![CDATA[<p dir="auto">升级过程<br />
千万要记得先备份数据  特别是public里面的上传的数据！！<br />
<a href="https://docs.nodebb.org/configuring/upgrade/" rel="nofollow ugc">https://docs.nodebb.org/configuring/upgrade/</a><br />
Upgrading NodeBB<br />
NodeBB's periodic releases are located in the Releases. These releases contain what is usually considered the most bug-free code, and is designed to be used on production-level instances of NodeBB.</p>
<p dir="auto">You can utilise git to install a specific version of NodeBB, and upgrade periodically as new releases are made.</p>
<p dir="auto">To obtain the latest fixes and features, you can also git clone the latest version directly from the repository (master branch), although its stability cannot be guaranteed. Core developers will attempt to ensure that every commit results in a working client, even if individual features may not be 100% complete.</p>
<p dir="auto">As always, the NodeBB team is not responsible for any misadventures, loss of data, data corruption, or any other bad things that may arise due to a botched upgrade - so please don't forget to back up before beginning!</p>
<p dir="auto">Upgrade Path<br />
NodeBB's upgrade path is designed so that upgrading between versions is straightforward.</p>
<p dir="auto">Upgrade Steps</p>
<ol>
<li>Shut down your forum<br />
While it is possible to upgrade NodeBB while it is running, it is definitely not recommended, particularly if it is an active forum:</li>
</ol>
<p dir="auto">$ cd /path/to/nodebb<br />
$ ./nodebb stop<br />
2. Back up your data<br />
Backing up Redis<br />
As with all upgrades, the first step is to back up your data! Nobody likes database corruption/misplacement.</p>
<p dir="auto">All of the textual data stored in NodeBB is found in a .rdb file. On typical installs of Redis, the main database is found at /var/lib/redis/dump.rdb.</p>
<p dir="auto">Store this file somewhere safe.</p>
<p dir="auto">Backing up MongoDB<br />
To run a backup of your complete MongoDB you can simply run</p>
<p dir="auto">mongodump</p>
<p dir="auto">which will create a directory structure that can be restored with the mongorestore command.</p>
<p dir="auto">It is recommended that you first shut down your database. On Debian / Ubuntu it's likely to be: sudo service mongodb stop</p>
<p dir="auto">Store this file somewhere safe.</p>
<p dir="auto">Uploads<br />
Uploaded images and files are stored in /public/uploads. Feel free to back up this folder too:</p>
<p dir="auto">cd /path/to/nodebb/public<br />
tar -czf ~/nodebb_assets.tar.gz ./uploads<br />
3. Grab the latest and greatest code<br />
Navigate to your NodeBB: $ cd /path/to/nodebb.</p>
<p dir="auto">If you are upgrading from a lower branch to a higher branch, switch branches as necessary. Make sure you are completely up-to-date on your current branch!.</p>
<p dir="auto">For example, if upgrading from v1.11.1 to v1.12.0:</p>
<p dir="auto">$ git fetch    # Grab the latest code from the NodeBB Repository<br />
$ git checkout v1.12.x    # Type this as-is! Not v1.12.0 but "v1.12.x"!<br />
$ git merge origin/v1.12.x<br />
If not upgrading between branches (e.g. v1.12.0 to v1.12.1, just run the following commands:</p>
<p dir="auto">$ git fetch<br />
$ git reset --hard origin/v1.12.x    # Replace v1.12.x with the branch name!<br />
This should retrieve the latest (and greatest) version of NodeBB from the repository.</p>
<p dir="auto">Don't know what branch you are on? Execute git rev-parse --abbrev-ref HEAD to find out.</p>
<p dir="auto">Alternatively, download and extract the latest versioned copy of the code from the Releases Page. Overwrite any files as necessary. This method is not supported.</p>
<ol start="4">
<li>Run the NodeBB upgrade script<br />
This script will install any missing dependencies, upgrade any plugins or themes (if an upgrade is available), and migrate the database if necessary.</li>
</ol>
<p dir="auto">$ ./nodebb upgrade<br />
Note: ./nodebb upgrade is only available after v0.3.0. If you are running an earlier version, run these instead:</p>
<p dir="auto">npm install<br />
ls -d node_modules/nodebb* | xargs -n1 basename | xargs npm update<br />
node app --upgrade<br />
5. Start up NodeBB &amp; Test!<br />
You should now be running the latest version of NodeBB.</p>
]]></description><link>http://an.forum.genostack.com/post/388</link><guid isPermaLink="true">http://an.forum.genostack.com/post/388</guid><dc:creator><![CDATA[anneng]]></dc:creator><pubDate>Fri, 05 Feb 2021 07:41:45 GMT</pubDate></item><item><title><![CDATA[Reply to Nodebb论坛安装过程记录 on Wed, 03 Feb 2021 06:59:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://an.forum.genostack.com/uid/1">@anneng</a> 在 <a href="/post/2">Nodebb论坛安装过程记录</a> 中说：</p>
<blockquote>
<p dir="auto">sudo apt-get update</p>
</blockquote>
<p dir="auto">使用此命令报错，报错信息如下：</p>
<h2>问题1</h2>
<pre><code>E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
</code></pre>
<p dir="auto">解决方法：</p>
<pre><code>sudo fuser -vki /var/lib/apt/lists/lock
</code></pre>
<blockquote>
<p dir="auto">最好多次使用此命令，把占用的进程全部kill,再进行<code>sudo apt-get update</code>等操作</p>
</blockquote>
<h2>问题2</h2>
<pre><code>W: Target Packages (stable/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list.d/docker.list:1
W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list.d/docker.list:1
W: Target Translations (stable/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list.d/docker.list:1
W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list.d/docker.list:1
W: Target CNF (stable/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list.d/docker.list:1
W: Target CNF (stable/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:50 and /etc/apt/sources.list.d/docker.list:1

</code></pre>
<p dir="auto">解决方法：<br />
应该是源配置重复了，按提示进入文件查看并修改</p>
<blockquote>
<p dir="auto">最好多次使用此命令，把占用的进程全部kill,再进行<code>sudo apt-get update</code>等操作</p>
</blockquote>
]]></description><link>http://an.forum.genostack.com/post/381</link><guid isPermaLink="true">http://an.forum.genostack.com/post/381</guid><dc:creator><![CDATA[ice-melt]]></dc:creator><pubDate>Wed, 03 Feb 2021 06:59:14 GMT</pubDate></item></channel></rss>