<?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>NoSQL &#8211; lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</title>
	<atom:link href="https://lifelinux.com/category/nosql/feed/" rel="self" type="application/rss+xml" />
	<link>https://lifelinux.com</link>
	<description>All About Linux !</description>
	<lastBuildDate>Thu, 20 Nov 2014 03:45:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.3</generator>
	<item>
		<title>How To Restore Default Permissions Of All Files Under / (ROOT)</title>
		<link>https://lifelinux.com/how-to-restore-default-permissions-of-all-files-under-root/</link>
					<comments>https://lifelinux.com/how-to-restore-default-permissions-of-all-files-under-root/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 20 Nov 2014 03:45:39 +0000</pubDate>
				<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[chown]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[single user mode]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1951</guid>

					<description><![CDATA[<p>Have you ever made a mistake and changed permissions of the folder and all it’s subfolders? And how to change back permissions of files/folders to default state ? Yesterday , I accidentally changed / (ROOT) permission to 777 with following command # chmod 777 -R / After that, All files and folders on my server [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-restore-default-permissions-of-all-files-under-root/">How To Restore Default Permissions Of All Files Under / (ROOT)</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>Have you ever made a mistake and changed permissions of the folder and all it’s subfolders? And how to change back permissions of files/folders to default state ?<br />
<span id="more-1951"></span></p>
<p>Yesterday , I accidentally changed / (ROOT) permission to 777 with following command</p>
<pre>
# chmod 777 -R /
</pre>
<p>After that, All files and folders on my server changed to 777 permissions. And I try to reboot my server, I can&#8217;t login into my server. It&#8217;s shown error: </p>
<pre>
Failed to start SSH server : Starting sshd:WARNING: UNPROTECTED PRIVATE KEY FILE! Permissions 0775 for '/etc/ssh/ssh_host_key' are too open. It is recommended that your private key files are NOT accessible by others. This private key will be ignored. bad permissions: ignore key: /etc/ssh/ssh_host_key Could not load host key: /etc/ssh/ssh_host_key
...
</pre>
<h2>How do I fix it ? </h2>
<p>If you can <a href="http://www.lifelinux.com/how-to-boot-into-single-user-mode-on-centos/">boot your system into Single User Mode</a>, then type 2 commands</p>
<pre>
# for p in $(rpm -qa); do rpm --setperms $p; done
# for p in $(rpm -qa); do rpm --setugids $p; done
</pre>
<p>Above command combination will reset all the permissions to the default permissions under CentOS / RHEL / Fedora Linux.</p>
<p>If you can&#8217;t boot into Single User Mode, Let boot from CentOS installation CD into <a href="https://www.centos.org/docs/5/html/Installation_Guide-en-US/s1-rescuemode-boot.html">Recuse Mode</a>, make sure that your system mounted into /mnt/sysimage, And type the following command</p>
<pre>
# chmod 7777 -R /mnt/sysimage/
</pre>
<p>Note: Permission is 7777 not 777<br />
To change all files and folder to &#8220;7777&#8221; permission. And reboot your system. After that, You can boot into Single User Mode and type above commands.</p>
<h2>Reset default permissions of all files and folders under /home/ </h2>
<p>Type the following commands</p>
<pre>
# cd /home/
# for p in $(ll); do chown $p.$p -R /home/$p; done
# find . -type d -print0 | xargs -0 chmod 755
# find . -type f -print0 | xargs -0 chmod 644
# chmod 700 *
</pre>
<h2>Reset default permissions of all files and folders of MySQL (/var/lib/mysql)</h2>
<p>Type the following commands</p>
<pre>
# chown mysql.mysql -R /var/lib/mysql
# cd /var/lib/mysql
# find . -type d -print0 | xargs -0 chmod 700
# find . -type f -print0 | xargs -0 chmod 660
# chmod 777 *.sock
</pre>
<p>Finally, restart MySQL with following command</p>
<pre>
# /etc/init.d/mysqld restart
</pre>
<g:plusone href="https://lifelinux.com/how-to-restore-default-permissions-of-all-files-under-root/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-restore-default-permissions-of-all-files-under-root/">How To Restore Default Permissions Of All Files Under / (ROOT)</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-restore-default-permissions-of-all-files-under-root/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Install MongoDB on Linux Using Yum Command</title>
		<link>https://lifelinux.com/install-mongodb-on-linux-using-yum-command/</link>
					<comments>https://lifelinux.com/install-mongodb-on-linux-using-yum-command/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Fri, 19 Aug 2011 05:57:18 +0000</pubDate>
				<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[install mongodb with yum]]></category>
		<category><![CDATA[install nosql]]></category>
		<category><![CDATA[yum install mongodb]]></category>
		<category><![CDATA[yum mongodb]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=927</guid>

					<description><![CDATA[<p>In a previous article called &#8220;Install MongoDB on Centos / RedHat&#8220;, I introduced how install MongoDB using binary package. In this article, i&#8217;ll introduce you to install MongoDB using yum command. The first, you need add the appropriate repo. Login root and type the following command # vi /etc/yum.repos.d/mongodb.repo Add the following content if you [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/install-mongodb-on-linux-using-yum-command/">Install MongoDB on Linux Using Yum Command</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>In a previous article called &#8220;<a href="http://www.lifelinux.com/install-mongodb-on-centos-redhat/">Install MongoDB on Centos / RedHat</a>&#8220;, I introduced how install MongoDB using binary package. In this article, i&#8217;ll introduce you to install MongoDB using yum command.</p>
<p>The first, you need add the appropriate repo. Login root and type the following command</p>
<pre># vi /etc/yum.repos.d/mongodb.repo</pre>
<p><span id="more-927"></span><br />
Add the following content if you are using 32 bit</p>
<pre>[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686
gpgcheck=0</pre>
<p>For 64 bit</p>
<pre>[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0</pre>
<p>To install the new MongoDB packages, type the following command</p>
<pre># yum install mongo-10gen mongo-10gen-server</pre>
<p>Type the following command to start MongoDB</p>
<pre># /etc/init.d/mongod start</pre>
<p>Turn on MongoDB when system startup</p>
<pre># chkconfig mongod on</pre>
<g:plusone href="https://lifelinux.com/install-mongodb-on-linux-using-yum-command/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/install-mongodb-on-linux-using-yum-command/">Install MongoDB on Linux Using Yum Command</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/install-mongodb-on-linux-using-yum-command/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Install MongoDB on Centos / RedHat</title>
		<link>https://lifelinux.com/install-mongodb-on-centos-redhat/</link>
					<comments>https://lifelinux.com/install-mongodb-on-centos-redhat/#comments</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Fri, 19 Aug 2011 00:38:37 +0000</pubDate>
				<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[install mongo driver]]></category>
		<category><![CDATA[install mongodb]]></category>
		<category><![CDATA[install mongodb on linux]]></category>
		<category><![CDATA[install php mongo]]></category>
		<category><![CDATA[mongodb on linux]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=906</guid>

					<description><![CDATA[<p>MongoDB (from &#8220;humongous&#8221;) is an open source, high-performance, schema-free, document-oriented database written in the C++ programming language. The database is document-oriented so it manages collections of JSON-like documents. Many applications can thus model data in a more natural way, as data can be nested in complex hierarchies and still be query-able and indexable. Install MongoDB [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/install-mongodb-on-centos-redhat/">Install MongoDB on Centos / RedHat</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p><strong>MongoDB</strong> (from &#8220;humongous&#8221;) is an open source, high-performance, schema-free, document-oriented database written in the C++ programming language. The database is document-oriented so it manages collections of JSON-like documents. Many applications can thus model data in a more natural way, as data can be nested in complex hierarchies and still be query-able and indexable.<span id="more-906"></span></p>
<h2>Install MongoDB</h2>
<p>Download the latest binaries from <a href="http://www.mongodb.org/downloads">mongodb.org</a>. When downloading MongoDB, ensure that you download a version that is compiled for the proper system architecture. (Please <a href="http://blog.mongodb.org/post/137788967/32-bit-limitations">note</a> that the 32-bit version of MongoDB has a database size limit of 2 gigabytes).</p>
<pre># wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-1.8.2.tgz
# tar zxvf mongodb-linux-x86_64-1.8.2.tgz
# mv mongodb-linux-x86_64-1.8.2 /mongodb</pre>
<p>Create folder /mongodb/data, it&#8217;s used to store all data in MongoDB</p>
<pre># mkdir /mongodb/data</pre>
<p>Create the file /mongodb/config and use the following example as a template:</p>
<pre>dbpath = /mongodb/data
logpath = /mongodb/mongodb.log
logappend = true
bind_ip = 127.0.0.1
port = 27017
fork = true
auth = true</pre>
<p>Create two scripts to start or stop the MongoDB process. To create start script, type the following command</p>
<pre># vi /mongodb/bin/start</pre>
<p>Add the following content</p>
<pre>#!/bin/sh
/mongodb/bin/mongod --config /mongodb/config \</pre>
<p>Create stop script</p>
<pre># vi /mongodb/bin/stop</pre>
<p>Add the following content</p>
<pre>#!/bin/bash
pid=`ps -o pid,command ax | grep mongod | awk '!/awk/ &amp;&amp; !/grep/ {print $1}'`;
if [ "${pid}" != "" ]; then
    kill -2 ${pid};
fi</pre>
<p>Set execute permission</p>
<pre># chmod +x /mongodb/bin/start
# chmod +x /mongodb/bin/stop</pre>
<p>After, create init script which provides a means for ensuring that MongoDB will start at boot. Type the following command</p>
<pre># vi /etc/init.d/mongodb</pre>
<p>Add the following content</p>
<pre>#! /bin/sh
#
# mongodb – this script starts and stops the mongodb daemon
#
# chkconfig: - 85 15
# description: MongoDB is a non-relational database storage system.
# processname: mongodb
# config: /opt/config/mongodb
# pidfile: /opt/mongodb/mongo.pid

PATH=/mongodb/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=mongodb

test -x $DAEMON || exit 0

set -e

case "$1" in
  start)
        echo -n "Starting MongoDB... "
        su - mongodb -c "/mongodb/bin/start"
        ;;
  stop)
        echo -n "Stopping MongoDB... "
        /mongodb/bin/stop
        ;;
      *)
            N=/etc/init.d/$NAME
            echo "Usage: $N {start|stop}" &gt;&amp;2
            exit 1
            ;;
    esac
exit 0</pre>
<h2>Install PHP Driver</h2>
<p>Once Mongo is installed we need to install the appropriate extension so that we can begin using it from within PHP. Luckily we can find the mongo extension through pecl.</p>
<pre># pecl install mongo</pre>
<p>Or you can also compile Mongo driver from the latest source code on <a href="http://github.com/mongodb/mongo-php-driver">Github</a></p>
<pre># yum install php53-devel
# wget https://github.com/mongodb/mongo-php-driver/tarball/master
# tar zxvf mongodb-mongo-php-driver-*.tar.gz
# cd mongodb-mongo-php-driver-*
# phpize
# ./configure
# make install</pre>
<p>Ater that, to load the extension on PHP startup, type the command</p>
<pre># echo "extension=mongo.so" &gt;&gt; /etc/php.ini</pre>
<g:plusone href="https://lifelinux.com/install-mongodb-on-centos-redhat/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/install-mongodb-on-centos-redhat/">Install MongoDB on Centos / RedHat</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/install-mongodb-on-centos-redhat/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
