<?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>Sys Admin &#8211; lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</title>
	<atom:link href="https://lifelinux.com/category/sys-admin/feed/" rel="self" type="application/rss+xml" />
	<link>https://lifelinux.com</link>
	<description>All About Linux !</description>
	<lastBuildDate>Tue, 16 Feb 2016 07:01:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.18</generator>
	<item>
		<title>How To Create Socks (SSH Tunneling) As A Service By SSH Command On CentOS</title>
		<link>https://lifelinux.com/how-to-create-socks-ssh-tunneling-as-a-service-by-ssh-command-on-centos/</link>
					<comments>https://lifelinux.com/how-to-create-socks-ssh-tunneling-as-a-service-by-ssh-command-on-centos/#respond</comments>
		
		<dc:creator><![CDATA[Unix]]></dc:creator>
		<pubDate>Tue, 16 Feb 2016 06:58:51 +0000</pubDate>
				<category><![CDATA[Bash Shell]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[create socks with ssh]]></category>
		<category><![CDATA[create socks5]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=2108</guid>

					<description><![CDATA[<p>This guide will show you how to establish a secure connection for browsing the web through a tunnel between your computer and your server. With this method, you will set up a tunnel between your computer and your server. All your web traffic will be encrypted and forwarded from your server on to its final [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-create-socks-ssh-tunneling-as-a-service-by-ssh-command-on-centos/">How To Create Socks (SSH Tunneling) As A Service By SSH Command On CentOS</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>This guide will show you how to establish a secure connection for browsing the web through a tunnel between your computer and your server. With this method, you will set up a tunnel between your computer and your server. All your web traffic will be encrypted and forwarded from your server on to its final destination.<br />
<span id="more-2108"></span></p>
<p>Socket Secure (SOCKS) is an Internet protocol that exchanges network packets between a client and server through a proxy server. SOCKS5 additionally provides authentication so only authorized users may access a server. Practically, a SOCKS server proxies TCP connections to an arbitrary IP address, and provides a means for UDP packets to be forwarded.</p>
<p>It works by launching a SOCKS proxy server on your computer using SSH. It will listen on a local port and your browser will connect to the web using that service.</p>
<h2>Creating the SOCKS Server</h2>
<p>The first step is to create the SOCKS server and establish a connection to your server with following command</p>
<pre># ssh -fNT -D &lt;your_ip_server&gt;:&lt;define_socks_port&gt; &lt;user_name&gt;@&lt;your_ip_server&gt;
</pre>
<p><strong>Options</strong><br />
-f: go to background<br />
-N: do not execute a remote program<br />
-T: disable pseudo-tty allocation<br />
-D: Define port forwarding and talks to the clients via SOCSK5 or SOCKS4 protocols</p>
<h2>Running as a service</h2>
<p>The first, Create a user called name &#8220;socks&#8221; and setup this account login to your server via SSH private key without password.</p>
<pre># useradd socks
</pre>
<p>To setup this account login your service via SSH private key, please read this <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2">article</a></p>
<p>The second, Login with socks and type the following command</p>
<pre># mkdir /opt/socks
# chown root.root -R /opt/socks
# chmod 700 /opt/socks
# touch /opt/socks/run.sh
# chmod +x /opt/socks/run.sh
# cp -R /home/socks/.ssh/id_rsa /opt/socks/
</pre>
<p>Append bellow content to /opt/socks/run.sh</p>
<pre>#/bin/bash
IPS="1.1.1.1 2.2.2.2 3.3.3.3"
SOCKS_PORT=9999
SSH_PORT=22
SSH_USER=socks

# Auto get list IPs on your server
# IPS=`ifconfig | grep "inet a" | awk '{print $2}' | grep -v "127.0" | cut -d: -f2`

for IP in $IPS
do
        echo "Building socks $IP"
        ssh -D $IP:$SOCKS_PORT -fN -p $SSH_PORT  -i /opt/socks/id_rsa $SSH_USER@$IP
done
</pre>
<g:plusone href="https://lifelinux.com/how-to-create-socks-ssh-tunneling-as-a-service-by-ssh-command-on-centos/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-create-socks-ssh-tunneling-as-a-service-by-ssh-command-on-centos/">How To Create Socks (SSH Tunneling) As A Service By SSH Command On CentOS</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-create-socks-ssh-tunneling-as-a-service-by-ssh-command-on-centos/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Fix &#8220;EXT4-fs warning (device sdX): ext4_dx_add_entry: Directory index full!&#8221;</title>
		<link>https://lifelinux.com/how-to-fix-ext4-fs-warning-device-sdx-ext4_dx_add_entry-directory-index-full/</link>
					<comments>https://lifelinux.com/how-to-fix-ext4-fs-warning-device-sdx-ext4_dx_add_entry-directory-index-full/#respond</comments>
		
		<dc:creator><![CDATA[Unix]]></dc:creator>
		<pubDate>Sun, 04 Oct 2015 08:18:53 +0000</pubDate>
				<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[Directory index full]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=2077</guid>

					<description><![CDATA[<p>Recently, one of my servers has started to show this message in syslog: Aug 24 17:11:46 host-53-114 kernel: EXT4-fs warning (device md126p5): ext4_dx_add_entry: Directory index full! Aug 24 17:11:46 host-53-114 kernel: EXT4-fs warning (device md126p5): ext4_dx_add_entry: Directory index full! Aug 24 17:11:46 host-53-114 kernel: EXT4-fs warning (device md126p5): ext4_dx_add_entry: Directory index full! The message Directory [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-fix-ext4-fs-warning-device-sdx-ext4_dx_add_entry-directory-index-full/">How To Fix &#8220;EXT4-fs warning (device sdX): ext4_dx_add_entry: Directory index full!&#8221;</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>Recently, one of my servers has started to show this message in syslog:</p>
<pre>
Aug 24 17:11:46 host-53-114 kernel: EXT4-fs warning (device md126p5): ext4_dx_add_entry: Directory index full!
Aug 24 17:11:46 host-53-114 kernel: EXT4-fs warning (device md126p5): ext4_dx_add_entry: Directory index full!
Aug 24 17:11:46 host-53-114 kernel: EXT4-fs warning (device md126p5): ext4_dx_add_entry: Directory index full!
</pre>
<p><span id="more-2077"></span></p>
<p>The message Directory index full! sound like inode’s problem. Type the following command to check</p>
<pre>
# df -i
</pre>
<p>Output</p>
<pre>
Filesystem       Inodes    IUsed  IFree IUse% Mounted on
/dev/md126p5   29974528 29956913  17615  100% /
tmpfs           1003836    14913 988923    2% /dev/shm
/dev/md126p1     128016       44 127972    1% /boot
/dev/md126p3     262144       18 262126    1% /tmp
</pre>
<p>Maybe too much to fill up the inodes in the partition, so I need to find the directory</p>
<pre>
# cd /
# for dir in `ls -1`; do echo $dir; find ./$dir -type f|wc -l; done
</pre>
<p>Output</p>
<pre>
cache
33
db
0
empty
0
games
0
lib
4486
local
0
lock
11
log
104
mail
0
...
</pre>
<p>I found &#8220;/var/spool/postfix/maildrop/&#8221; has millions of files, so we need to delete. Have many case to delete millions of files but I highlight recommend following, the way is the fastest method to delete billions of files</p>
<pre>
# cd /var/spool/postfix/maildrop/
# nohup perl -e 'for(<*>){((stat)[9]<(unlink))}' &#038;
</pre>
<g:plusone href="https://lifelinux.com/how-to-fix-ext4-fs-warning-device-sdx-ext4_dx_add_entry-directory-index-full/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-fix-ext4-fs-warning-device-sdx-ext4_dx_add_entry-directory-index-full/">How To Fix &#8220;EXT4-fs warning (device sdX): ext4_dx_add_entry: Directory index full!&#8221;</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-fix-ext4-fs-warning-device-sdx-ext4_dx_add_entry-directory-index-full/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Test Disk I/O Performance With dd Command</title>
		<link>https://lifelinux.com/how-to-test-disk-io-performance-with-dd-command/</link>
					<comments>https://lifelinux.com/how-to-test-disk-io-performance-with-dd-command/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 11 Aug 2015 06:56:12 +0000</pubDate>
				<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[dd command]]></category>
		<category><![CDATA[io speed test]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1963</guid>

					<description><![CDATA[<p>How do I check the performance of a hard drive including the read and write speed on a Linux operating systems? dd command dd is a command-line utility for Unix and Unix-like operating systems whose primary purpose is to convert and copy files. In this tutorial I will show you how to use the dd [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-test-disk-io-performance-with-dd-command/">How To Test Disk I/O Performance With dd 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>How do I check the performance of a hard drive including the read and write speed on a Linux operating systems?<span id="more-1963"></span></p>
<h2>dd command</h2>
<p>dd is a command-line utility for Unix and Unix-like operating systems whose primary purpose is to convert and copy files.</p>
<p>In this tutorial I will show you how to use the dd command to test disk I/O performance.</p>
<p>Open a shell prompt or login to a remote server via ssh and type the following command</p>
<pre># dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
</pre>
<p>Sample outputs</p>
<pre>16384+0 records in
16384+0 records out
1073741824 bytes (1.1 GB) copied, 5.00633 s, 214 MB/s
</pre>
<p>Test on device</p>
<pre>ATA device, with non-removable media
	Model Number:       SAMSUNG MZ7WD120HCFV-00003              
	Serial Number:      S1FZNYAG402762      
	Firmware Revision:  DXM9203Q
	Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
</pre>
<h2>Understanding dd command options</h2>
<p><strong>if=/dev/zero:</strong> The name of the input file you want dd the read from.<br />
<strong>of=test:</strong> The name of the output file you want dd write the input file to.<br />
<strong>bs=64k</strong> (block-size) : Set the size of the block you want dd to use.<br />
<strong>count=16k</strong> (number of blocks): The number of blocks you want dd to read.<br />
<strong>conv=fdatasync</strong>: The flag conv=fdatasync tells dd to sync the write to disk before it exits. Without this flag, dd will perform the write but some of it will remain in memory, not giving you an accurate picture of the true write performance of the disk.</p>
<g:plusone href="https://lifelinux.com/how-to-test-disk-io-performance-with-dd-command/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-test-disk-io-performance-with-dd-command/">How To Test Disk I/O Performance With dd 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/how-to-test-disk-io-performance-with-dd-command/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Install Solr 4.10.4 On CentOS 6.5</title>
		<link>https://lifelinux.com/how-to-install-solr-4-10-4-on-centos-6-5/</link>
					<comments>https://lifelinux.com/how-to-install-solr-4-10-4-on-centos-6-5/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 16 Mar 2015 11:16:09 +0000</pubDate>
				<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[web programming]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[install solr 4.10.4]]></category>
		<category><![CDATA[install solr on centos]]></category>
		<category><![CDATA[java]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1955</guid>

					<description><![CDATA[<p>Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world&#8217;s largest internet sites. In this tutorial I will explain How to install Solr 4.10.4 on CentOS 6.5. The first of [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-install-solr-4-10-4-on-centos-6-5/">How To Install Solr 4.10.4 On CentOS 6.5</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><blockquote><p>Solr is highly reliable, scalable and fault tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world&#8217;s largest internet sites.</p></blockquote>
<p><span id="more-1955"></span></p>
<p>In this tutorial I will explain How to install Solr 4.10.4 on CentOS 6.5. The first of all, Login as root user.</p>
<h2>Installing JAVA</h2>
<p>To start things off first check if you have Java installed:</p>
<pre># which java
</pre>
<p>If you do not have Java installed check for latest version:</p>
<pre># yum list available | grep openjdk
</pre>
<p>Outputs</p>
<pre>java-1.6.0-openjdk.x86_64                  1:1.6.0.34-1.13.6.1.el6_6     updates
java-1.6.0-openjdk-demo.x86_64             1:1.6.0.34-1.13.6.1.el6_6     updates
java-1.6.0-openjdk-devel.x86_64            1:1.6.0.34-1.13.6.1.el6_6     updates
java-1.6.0-openjdk-javadoc.x86_64          1:1.6.0.34-1.13.6.1.el6_6     updates
java-1.6.0-openjdk-src.x86_64              1:1.6.0.34-1.13.6.1.el6_6     updates
java-1.7.0-openjdk-demo.x86_64             1:1.7.0.75-2.5.4.0.el6_6      updates
java-1.7.0-openjdk-devel.x86_64            1:1.7.0.75-2.5.4.0.el6_6      updates
java-1.7.0-openjdk-javadoc.noarch          1:1.7.0.75-2.5.4.0.el6_6      updates
java-1.7.0-openjdk-src.x86_64              1:1.7.0.75-2.5.4.0.el6_6      updates
java-1.8.0-openjdk.x86_64                  1:1.8.0.31-1.b13.el6_6        updates
java-1.8.0-openjdk-demo.x86_64             1:1.8.0.31-1.b13.el6_6        updates
java-1.8.0-openjdk-devel.x86_64            1:1.8.0.31-1.b13.el6_6        updates
java-1.8.0-openjdk-headless.x86_64         1:1.8.0.31-1.b13.el6_6        updates
java-1.8.0-openjdk-javadoc.noarch          1:1.8.0.31-1.b13.el6_6        updates
java-1.8.0-openjdk-src.x86_64              1:1.8.0.31-1.b13.el6_6        updates
</pre>
<p>Type the following command to install java</p>
<pre># yum install java-1.8.0-openjdk.x86_64
</pre>
<p>Finally, check Java version:</p>
<pre># java -version
java version "1.8.0_75"
OpenJDK Runtime Environment (rhel-2.5.4.0.el6_6-x86_64 u75-b13)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)
[root@host-129-19 ~]# 
</pre>
<h2>Installing Solr</h2>
<p>Install the latest version Solr release by downloading from http://www.us.apache.org/dist/lucene/solr/</p>
<pre># cd /opt/
# wget http://www.us.apache.org/dist/lucene/solr/4.10.4/solr-4.10.4.tgz
</pre>
<p>Extracting solr package:</p>
<pre># tar zxvf solr-4.10.4.tgz
# mv solr-4.10.4 solr
</pre>
<p>Renaming &#8220;example&#8221; directory to project name, example &#8220;core&#8221;:</p>
<pre># cd solr
# mv example core
</pre>
<h2>Running Solr</h2>
<p>You should now be able to test running the Solr server with following command</p>
<pre># cd /opt/solr/core
# java -jar start.jar
</pre>
<p>If everything works correctly you should be able to view the Solr server admin by going to:<br />
http://[server hostname or IP]:8983/solr/<br />
If this does not work try viewing the log /opt/solr/solr/logs/solr.log</p>
<h2>Auto Start Apache Solr</h2>
<p>First, create script for handling the Solr server service</p>
<pre># vi /etc/init.d/solr
</pre>
<p>And add the following script</p>
<pre>#!/bin/sh 
# chkconfig: 2345 95 20 
# description: Solr Server 
# Solr Server service start, stop, restart 
# @author Shay Anderson 10.13 

SOLR_DIR="/opt/solr/core" 
JAVA="/usr/bin/java -DSTOP.PORT=8079 -DSTOP.KEY=a09df7a0d -jar start.jar" 
LOG_FILE="/opt/solr/core/logs/solr-server.log" 

case $1 in 
      start) 
            echo "Starting Solr..." 
            cd $SOLR_DIR 
            $JAVA 2&gt; $LOG_FILE &amp; 
            sleep 3 
            ;; 
      stop) 
            echo "Stopping Solr..." 
            pkill -f start.jar &gt; /dev/null 
            RETVAL=$? 
            if [ $RETVAL -eq 0 ]; then 
                  echo "Stopped" 
            else 
                  echo "Failed to stop" 
            fi 
            ;; 
      restart) 
            $0 stop 
            sleep 2 
            $0 start 
            ;; 
      *) 
            echo "Usage: $0 [start|stop|restart]" 
            exit 1 
            ;; 
esac 

exit 0
</pre>
<p>To run Apache Solr by default when the system boots, type the following command</p>
<pre>
# chmod +x /etc/init.d/solr
# chkconfig --level 345 solr on
</pre>
<g:plusone href="https://lifelinux.com/how-to-install-solr-4-10-4-on-centos-6-5/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-install-solr-4-10-4-on-centos-6-5/">How To Install Solr 4.10.4 On CentOS 6.5</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-install-solr-4-10-4-on-centos-6-5/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<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>How To Install HHVM 3.2.0 On CentOS 6.5</title>
		<link>https://lifelinux.com/how-to-install-hhvm-3-2-0-on-centos-6-5/</link>
					<comments>https://lifelinux.com/how-to-install-hhvm-3-2-0-on-centos-6-5/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 06 Nov 2014 15:40:34 +0000</pubDate>
				<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[web programming]]></category>
		<category><![CDATA[WebServer]]></category>
		<category><![CDATA[HHVM]]></category>
		<category><![CDATA[intall hhvm]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[nginx + hhvm]]></category>
		<category><![CDATA[wget]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1945</guid>

					<description><![CDATA[<p>HipHop Virtual Machine (HHVM) is a process virtual machine based on just-in-time (JIT) compilation, serving as an execution engine for PHP and Hack programming languages. By using the principle of JIT compilation, executed PHP or Hack code is first transformed into intermediate HipHop bytecode (HHBC), which is then dynamically translated into the x86-64 machine code, [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-install-hhvm-3-2-0-on-centos-6-5/">How To Install HHVM 3.2.0 On CentOS 6.5</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>HipHop Virtual Machine (HHVM) is a process virtual machine based on just-in-time (JIT) compilation, serving as an execution engine for PHP and Hack programming languages. By using the principle of JIT compilation, executed PHP or Hack code is first transformed into intermediate HipHop bytecode (HHBC), which is then dynamically translated into the x86-64 machine code, optimized and natively executed.<br />
<span id="more-1945"></span><br />
According to their website, HHVM has realized over a 9x increase in web request throughput and over a 5x reduction in memory consumption for Facebook compared with the Zend PHP engine + APC (which is the current way of hosting a large majority of PHP applications).</p>
<h2>Installing HHVM</h2>
<p>Installing HHVM is quite straightforward and shouldn&#8217;t take more than a few minutes.<br />
Login as root and execute the following commands from the command line will have HHVM installed and ready:</p>
<pre>
# cd /etc/yum.repos.d
# wget http://www.hop5.in/yum/el6/hop5.repo
# yum install hhvm
</pre>
<p>Sample output</p>
<pre>
Dependencies Resolved

================================================================================
 Package                   Arch       Version                    Repository
                                                                           Size
================================================================================
Installing:
 hhvm                      x86_64     3.2.0-1.el6                hop5     9.6 M
Installing for dependencies:
 GConf2                    x86_64     2.28.0-6.el6               base     964 k
 ImageMagick               x86_64     6.8.6.3-4.el6              hop5     138 k
 ImageMagick-libs          x86_64     6.8.6.3-4.el6              hop5     1.9 M
 ORBit2                    x86_64     2.14.17-5.el6              base     168 k
 OpenEXR-libs              x86_64     1.6.1-8.1.el6              base     197 k
 boost                     x86_64     1.54.0-7.el6               hop5      32 k
 boost-atomic              x86_64     1.54.0-7.el6               hop5      34 k
 boost-chrono              x86_64     1.54.0-7.el6               hop5      40 k
 boost-context             x86_64     1.54.0-7.el6               hop5      33 k
 boost-date-time           x86_64     1.54.0-7.el6               hop5      47 k
 boost-filesystem          x86_64     1.54.0-7.el6               hop5      63 k
 boost-graph               x86_64     1.54.0-7.el6               hop5     126 k
 boost-iostreams           x86_64     1.54.0-7.el6               hop5      55 k
 boost-locale              x86_64     1.54.0-7.el6               hop5     251 k
 boost-log                 x86_64     1.54.0-7.el6               hop5     599 k
 boost-math                x86_64     1.54.0-7.el6               hop5     324 k
 boost-program-options     x86_64     1.54.0-7.el6               hop5     145 k
 boost-python              x86_64     1.54.0-7.el6               hop5     124 k
 boost-random              x86_64     1.54.0-7.el6               hop5      36 k
 boost-regex               x86_64     1.54.0-7.el6               hop5     298 k
 boost-serialization       x86_64     1.54.0-7.el6               hop5     155 k
 boost-signals             x86_64     1.54.0-7.el6               hop5      56 k
 boost-system              x86_64     1.54.0-7.el6               hop5      36 k
 boost-test                x86_64     1.54.0-7.el6               hop5     212 k
 boost-thread              x86_64     1.54.0-7.el6               hop5      55 k
 boost-timer               x86_64     1.54.0-7.el6               hop5      38 k
 boost-wave                x86_64     1.54.0-7.el6               hop5     198 k
 fftw                      x86_64     3.2.1-3.1.el6              base     1.2 M
 gd                        x86_64     2.0.35-11.el6              base     142 k
 ghostscript               x86_64     8.70-19.el6                base     4.4 M
 ghostscript-fonts         noarch     5.50-23.2.el6              base     590 k
 glog                      x86_64     0.3.2-1.el6                hop5      48 k
 ilmbase                   x86_64     1.0.1-6.1.el6              base      72 k
 jemalloc                  x86_64     3.6.0-1.el6                epel     100 k
 lcms2                     x86_64     2.3-2.el6                  epel     127 k
 libICE                    x86_64     1.0.6-1.el6                base      53 k
 libIDL                    x86_64     0.8.13-2.1.el6             base      83 k
 libSM                     x86_64     1.2.1-2.el6                base      37 k
 libXfont                  x86_64     1.4.5-3.el6_5              base     136 k
 libXt                     x86_64     1.1.4-6.1.el6              base     165 k
 libcroco                  x86_64     0.6.2-5.el6                base     100 k
 libdwarf                  x86_64     20140413-1.el6             epel     108 k
 libfontenc                x86_64     1.0.5-2.el6                base      24 k
 libgsf                    x86_64     1.14.15-5.el6              base     116 k
 libicu                    x86_64     4.2.1-9.1.el6_2            base     4.9 M
 libmcrypt                 x86_64     2.5.8-9.el6                epel      96 k
 libmemcached              x86_64     1.0.16-1.el6               hop5     208 k
 libmpc                    x86_64     0.8.3-0.3.svn855.el6       hop5      47 k
 librsvg2                  x86_64     2.26.0-14.el6              base     140 k
 libtool-ltdl              x86_64     2.4.2-21.el6               hop5      46 k
 libunwind                 x86_64     1.1-2.el6                  epel      54 k
 libwmf-lite               x86_64     0.2.8.4-23.el6             base      51 k
 libxslt                   x86_64     1.1.26-2.el6_3.1           base     452 k
 mysql                     x86_64     5.1.73-3.el6_5             base     894 k
 ocaml                     x86_64     3.12.1-12.el6              hop5     5.5 M
 ocaml-runtime             x86_64     3.12.1-12.el6              hop5     1.4 M
 oniguruma                 x86_64     5.9.1-3.1.el6              base     123 k
 sgml-common               noarch     0.6.3-33.el6               base      43 k
 tbb                       x86_64     4.0-7.20120408.el6         hop5     103 k
 unixODBC                  x86_64     2.2.14-14.el6              base     378 k
 urw-fonts                 noarch     2.4-10.el6                 base     3.1 M
 xorg-x11-font-utils       x86_64     1:7.2-11.el6               base      75 k
Updating for dependencies:
 cpp                       x86_64     4.8.2-8.el6                hop5     5.7 M
 curl                      x86_64     7.29.0-4.el6               hop5     256 k
 gcc                       x86_64     4.8.2-8.el6                hop5      17 M
 gcc-c++                   x86_64     4.8.2-8.el6                hop5     6.9 M
 libcurl                   x86_64     7.29.0-4.el6               hop5     198 k
 libcurl-devel             x86_64     7.29.0-4.el6               hop5     294 k
 libevent                  x86_64     1.4.14b-2.hphp.el6         hop5      66 k
 libgcc                    x86_64     4.8.2-8.el6                hop5      83 k
 libgomp                   x86_64     4.8.2-8.el6                hop5     100 k
 libstdc++                 x86_64     4.8.2-8.el6                hop5     289 k
 libstdc++-devel           x86_64     4.8.2-8.el6                hop5     1.5 M

Transaction Summary
================================================================================
Install      63 Package(s)
Upgrade      11 Package(s)

Total download size: 73 M
Is this ok [y/N]: <strong>y</strong>
</pre>
<p>To confirm that HHVM has been installed, type the following command:</p>
<pre>
# hhvm --version
</pre>
<p>This will show details of how the hhvm command can be used from the command line. Here is a sample screenshot that illustrates this:</p>
<pre>
HipHop VM 3.2.0 (rel)
Compiler: tags/HHVM-3.2.0-0-g01228273b8cf709aacbd3df1c51b1e690ecebac8
Repo schema: c52ba40f4a246d35a88f1dfc1daf959851ced8aa
</pre>
<h2>Using Nginx with HHVM</h2>
<p>If you are using Nginx with PHP-FPM, you&#8217;ll have to modify the configuration file to enable the use of HHVM.</p>
<p>Look for the following section and make sure it&#8217;s all uncommented (by remove a # at the beginning of each line)</p>
<pre>
location ~ \.php$ {
       fastcgi_pass 127.0.0.1:9000;
       fastcgi_index index.php;
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
       include fastcgi_params;
}
</pre>
<p>Create a file called name &#8220;hhsvr&#8221; to start or restart HHVM service</p>
<pre>
# vi /usr/bin/hhsrv
# chmod +x /usr/bin/hhsrv
</pre>
<p>Append </p>
<pre>
#!/bin/bash
LOG="/var/log/hhvm.log"
CMD="hhvm --mode server -vServer.Type=fastcgi -vServer.Port=9000"
if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
        echo "To restart HHVM: /usr/bin/hhsrv restart|stop\n"
        exit;
fi

# Restart HHVM
if [ "$1" == "restart" ]; then
        PID=$(ps aux | grep -v grep | grep hhvm | awk '{print $2}')
        echo "Restarting HHVM..."
        if [ "${PID}" != "" ]; then
                kill -9 ${PID}
        fi
        echo "Starting HHVM ..."
        ${CMD} > /dev/null 2>&1 &
        echo "DONE !!!"
fi

# Stop HHVM
if [ "$1" == "stop" ]; then
        PID=$(ps aux | grep -v grep | grep hhvm | awk '{print $2}')
        echo "Restarting HHVM..."
        if [ "${PID}" != "" ]; then
                kill -9 ${PID}
        fi
        echo "HHVM stopped !!!"
fi
</pre>
<p>Final, Type the following command to start HHVM</p>
<pre>
# hhsrv restart
</pre>
<g:plusone href="https://lifelinux.com/how-to-install-hhvm-3-2-0-on-centos-6-5/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-install-hhvm-3-2-0-on-centos-6-5/">How To Install HHVM 3.2.0 On CentOS 6.5</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-install-hhvm-3-2-0-on-centos-6-5/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How Do I Fix dataskq Causing High Load On DirectAdmin ?</title>
		<link>https://lifelinux.com/how-do-i-fix-dataskq-causing-high-load-on-directadmin/</link>
					<comments>https://lifelinux.com/how-do-i-fix-dataskq-causing-high-load-on-directadmin/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 28 Aug 2014 02:45:26 +0000</pubDate>
				<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[WebServer]]></category>
		<category><![CDATA[dataskq 100% CPU]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1923</guid>

					<description><![CDATA[<p>Today, When I go to DA Service Monitor, the top 5 processes are using 99.9% of the CPU and they&#8217;re all the same processes 11477 root 20 0 324m 196m 1580 R 53.3 5.2 17153:50 /usr/local/directadmin/dataskq 7738 root 20 0 315m 183m 1580 R 49.3 4.8 15702:50 /usr/local/directadmin/dataskq 17973 root 20 0 307m 170m 1592 [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-do-i-fix-dataskq-causing-high-load-on-directadmin/">How Do I Fix dataskq Causing High Load On DirectAdmin ?</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>Today, When I go to DA Service Monitor, the top 5 processes are using 99.9% of the CPU and they&#8217;re all the same processes</p>
<pre>
11477 root      20   0  324m 196m 1580 R 53.3  5.2  17153:50 /usr/local/directadmin/dataskq                                                                 
 7738 root      20   0  315m 183m 1580 R 49.3  4.8  15702:50 /usr/local/directadmin/dataskq                                                                 
17973 root      20   0  307m 170m 1592 R 59.5  4.5  14271:42 /usr/local/directadmin/dataskq                                                                 
15411 root      20   0  285m 159m 1592 R 58.9  4.2   9984:23 /usr/local/directadmin/dataskq                                                                 
18812 root      20   0  299m 158m 1592 R 50.0  4.2  12829:33 /usr/local/directadmin/dataskq                                                                 
32016 root      20   0  292m 146m 1592 R 49.7  3.8  11400:47 /usr/local/directadmin/dataskq                                                                 
10846 root      20   0  254m 125m 1592 R 61.8  3.3   8605:18 /usr/local/directadmin/dataskq                                                                 
22175 root      20   0  248m 114m 1592 R 54.9  3.0   7239:59 /usr/local/directadmin/dataskq                                                                 
28472 root      20   0  241m 104m 1592 R 52.6  2.7   5916:28 /usr/local/directadmin/dataskq                                                                 
 2738 root      20   0  239m  98m 1700 R 49.7  2.6   4753:17 /usr/local/directadmin/dataskq                                                                 
 7807 root      20   0  212m  84m 1836 R 49.3  2.2   3698:22 /usr/local/directadmin/dataskq                                                                 
11449 root      20   0  202m  75m 1836 R 49.7  2.0   1870:38 /usr/local/directadmin/dataskq                                                                 
 6370 root      20   0  205m  73m 1836 R 50.0  1.9   2744:47 /usr/local/directadmin/dataskq                                                                 
22093 root      20   0  178m  52m 1836 R 52.0  1.4   1042:42 /usr/local/directadmin/dataskq                                                                 
26249 root      20   0  152m  27m 1844 R 54.9  0.7 266:05.08 /usr/local/directadmin/dataskq
</pre>
<p><span id="more-1923"></span></p>
<p>My server is having high load and dataskq is on the ‘top’ list. All services was crashed. How do I fix this problem.</p>
<p>The first, I analytic a process to find problem with bellow command</p>
<pre>
# lsof -p 11477
</pre>
<p>Output</p>
<pre>
COMMAND   PID USER   FD   TYPE DEVICE  SIZE/OFF     NODE NAME
dataskq 11477 root  cwd    DIR  259,4      4096 21106008 /usr/local/directadmin
dataskq 11477 root  rtd    DIR  259,4      4096        2 /
dataskq 11477 root  txt    REG  259,4   8893140 21106014 /usr/local/directadmin/dataskq
dataskq 11477 root  mem    REG  259,4     65928  7602205 /lib64/libnss_files-2.12.so
dataskq 11477 root  mem    REG  259,4    122040  7602226 /lib64/libselinux.so.1
dataskq 11477 root  mem    REG  259,4     10192  7602373 /lib64/libkeyutils.so.1.3
dataskq 11477 root  mem    REG  259,4     43728  7602382 /lib64/libkrb5support.so.0.1
dataskq 11477 root  mem    REG  259,4    469528  7602181 /lib64/libfreebl3.so
dataskq 11477 root  mem    REG  259,4    277704  7602374 /lib64/libgssapi_krb5.so.2.2
dataskq 11477 root  mem    REG  259,4    142640  7602213 /lib64/libpthread-2.12.so
dataskq 11477 root  mem    REG  259,4   1921216  7602189 /lib64/libc-2.12.so
dataskq 11477 root  mem    REG  259,4     90880  7602578 /lib64/libgcc_s-4.4.7-20120601.so.1
dataskq 11477 root  mem    REG  259,4    596264  7602197 /lib64/libm-2.12.so
dataskq 11477 root  mem    REG  259,4    987096 21103632 /usr/lib64/libstdc++.so.6.0.13
dataskq 11477 root  mem    REG  259,4    110960  7602215 /lib64/libresolv-2.12.so
dataskq 11477 root  mem    REG  259,4     14664  7602247 /lib64/libcom_err.so.2.1
dataskq 11477 root  mem    REG  259,4    174840  7602378 /lib64/libk5crypto.so.3.1
dataskq 11477 root  mem    REG  259,4    941920  7602380 /lib64/libkrb5.so.3.3
dataskq 11477 root  mem    REG  259,4     19536  7602195 /lib64/libdl-2.12.so
dataskq 11477 root  mem    REG  259,4     98661 21106191 /usr/local/lib/libz.so.1.2.3
dataskq 11477 root  mem    REG  259,4   1950976 21104485 /usr/lib64/libcrypto.so.1.0.1e
dataskq 11477 root  mem    REG  259,4     40400  7602193 /lib64/libcrypt-2.12.so
dataskq 11477 root  mem    REG  259,4    437016 21104487 /usr/lib64/libssl.so.1.0.1e
dataskq 11477 root  mem    REG  259,4    154520  7602580 /lib64/ld-2.12.so
dataskq 11477 root    0r   REG  259,4      2795  8792180 /home/tmp/quota-dump (deleted)
dataskq 11477 root    1r   REG  259,4 710688943 21633577 /usr/local/directadmin/data/users/detvl/bandwidth.tally
</pre>
<p>And type the following command</p>
<pre>
# tail -n 10 /var/log/directadmin/errortaskq.log
</pre>
<p>Output</p>
<pre>
==> /var/log/directadmin/errortaskq.log <==
2014:08:28-09:07:38: Dataskq USR1 signal: Currently processing: Tally::get_bandwidth_breakdown(..., 0) for detvl : done reading, begin parsing
2014:08:28-09:07:38: Dataskq USR1 signal: Currently processing: Tally::get_bandwidth_breakdown(..., 0) for detvl : done reading, begin parsing
2014:08:28-09:07:38: Dataskq USR1 signal: Currently processing: Tally::get_bandwidth_breakdown(..., 0) for detvl : done reading, begin parsing
2014:08:28-09:07:38: Dataskq USR1 signal: Currently processing: Tally::get_bandwidth_breakdown(..., 0) for detvl : done reading, begin parsing
2014:08:28-09:07:38: Dataskq USR1 signal: Currently processing: Tally::get_bandwidth_breakdown(..., 0) for detvl : done reading, begin parsing
2014:08:28-09:07:38: Dataskq USR1 signal: Currently processing: Tally::get_bandwidth_breakdown(..., 0) for detvl : done reading, begin parsing
2014:08:28-09:07:38: Dataskq USR1 signal: Currently processing: Tally::get_bandwidth_breakdown(..., 0) for detvl : done reading, begin parsing
2014:08:28-09:07:38: Dataskq USR1 signal: Currently processing: Tally::get_bandwidth_breakdown(..., 0) for detvl : done reading, begin parsing
2014:08:28-09:07:38: Dataskq USR1 signal: Currently processing: Tally::get_bandwidth_breakdown(..., 0) for detvl : done reading, begin parsing
2014:08:28-09:07:38: Dataskq USR1 signal: Currently processing: Tally::get_bandwidth_breakdown(..., 0) for detvl : done reading, begin parsing
</pre>
<p>Maybe, I get problem with parser processing log. Next, I check size of "/usr/local/directadmin/data/users/detvl/bandwidth.tally". Type the following command</p>
<pre>
# du -sh /usr/local/directadmin/data/users/detvl/bandwidth.tally
</pre>
<p>Output</p>
<pre>
678M	/usr/local/directadmin/data/users/detvl/bandwidth.tally
</pre>
<p>It's very big. To solve the problem, The first I kill all dataskq processes with bellow command</p>
<pre>
# killall -USR1 dataskq
</pre>
<p>Or run script</p>
<pre>
#!/bin/bash
PIDS=`ps aux | grep dataskq | awk '{print $2}'`
for P in $PIDS
do
kill -9 $P
done
</pre>
<p>The second, I truncate log data of file bandwidth.tally, type the following command</p>
<pre>
# echo "" > /usr/local/directadmin/data/users/detvl/bandwidth.tally
</pre>
<p>Finally, I set priority to slow down the dataskq, type the following command</p>
<pre>
# vi /etc/cron.d/directadmin_cron
# Replace with
* * * * * root nice -n 19 /usr/local/directadmin/dataskq
</pre>
<g:plusone href="https://lifelinux.com/how-do-i-fix-dataskq-causing-high-load-on-directadmin/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-do-i-fix-dataskq-causing-high-load-on-directadmin/">How Do I Fix dataskq Causing High Load On DirectAdmin ?</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-do-i-fix-dataskq-causing-high-load-on-directadmin/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How Do I Fix &#8220;crontab: command not found&#8221;</title>
		<link>https://lifelinux.com/how-do-i-fix-crontab-command-not-found/</link>
					<comments>https://lifelinux.com/how-do-i-fix-crontab-command-not-found/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 22 Aug 2014 03:22:56 +0000</pubDate>
				<category><![CDATA[Sys Admin]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1918</guid>

					<description><![CDATA[<p>After I ordered new VPS (CentOS 6.x) on DigitalOcean (SSD Cloud VPS). I found that crontab is not installed on server, When I try to execute &#8220;crontab -e&#8221; command, I got following error # crontab -e -bash: crontab: command not found Installing crontab To install crontab command, I found it comes from cronie package. Type [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-do-i-fix-crontab-command-not-found/">How Do I Fix &#8220;crontab: command not found&#8221;</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>After I ordered new VPS (CentOS 6.x) on DigitalOcean (SSD Cloud VPS). I found that <strong>crontab</strong> is not installed on server, When I try to execute &#8220;crontab -e&#8221; command, I got following error</p>
<pre>
# crontab -e
-bash: crontab: command not found
</pre>
<p><span id="more-1918"></span></p>
<h2>Installing crontab</h2>
<p>To install crontab command, I found it comes from <strong>cronie</strong> package. Type the following command</p>
<pre>
# yum install cronie -y
</pre>
<p>Start it with command</p>
<pre>
# service <a href="http://www.lifelinux.com/how-to-startstoprestart-cron-service-in-linux/">crond start</a>
</pre>
<p>To make it persistent, so that it starts on boot, use:</p>
<pre>
# chkconfig crond on
</pre>
<h2>How to Add New Job in Crontab</h2>
<p>To add a new cron use crontab -e to edit it in editor and add cron as per your requirments. </p>
<pre>
# crontab -e
</pre>
<h2>Listing Jobs in Crontab</h2>
<p>To list the job scheduler under crontab, we can use -l command line switch with crontab command. For example to list jobs scheduled for current user</p>
<pre>
# crontab -l
</pre>
<p>To view jobs scheduled under other user specify username with -a switch like below.</p>
<pre>
# crontab -u <username> -l
</pre>
<g:plusone href="https://lifelinux.com/how-do-i-fix-crontab-command-not-found/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-do-i-fix-crontab-command-not-found/">How Do I Fix &#8220;crontab: command not found&#8221;</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-do-i-fix-crontab-command-not-found/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Install CentOS on UEFI systems</title>
		<link>https://lifelinux.com/how-to-install-centos-on-uefi-systems/</link>
					<comments>https://lifelinux.com/how-to-install-centos-on-uefi-systems/#comments</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Wed, 23 Jul 2014 00:28:53 +0000</pubDate>
				<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[/boot/efi partition]]></category>
		<category><![CDATA[UEFI systems]]></category>
		<category><![CDATA[vfat]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1913</guid>

					<description><![CDATA[<p>Yesterday, I&#8217;m tried to install CentOS 6.4 to my new server IBM X3650 M2 with Minimal CentOS 6.4. My Server has two SAS 15K RPM 146GB and setting up RAID 1 Mode. The CentOS installer shows up and I starts to setup the partition. When I click next button, it keeps showing &#8220;You have not [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-install-centos-on-uefi-systems/">How To Install CentOS on UEFI systems</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>Yesterday, I&#8217;m tried to install CentOS 6.4 to my new server <strong>IBM X3650 M2</strong> with Minimal CentOS 6.4. My Server has two SAS 15K RPM 146GB and setting up RAID 1 Mode.<br />
<span id="more-1913"></span><br />
The CentOS installer shows up and I starts to setup the partition. When I click next button, it keeps showing &#8220;You have not created /boot/efi partition&#8221;. So, what is /boot/efi partition ?</p>
<p>My server has UEFI firmware such as IBM X3650 M2, M3&#8230;, a replacement for the old BIOS (although it still has support for BIOS-only operating systems).</p>
<p>In BIOS systems, the bootloader is stored inside the MBR, in the zeroth sector of the disk. (The 512-byte MBR reserves 446 bytes for bootstrap code, the rest is used for partition information.) If the bootloader is too large, its MBR &#8220;stage1&#8221; code usually tries to find &#8220;stage2&#8221; files in your /boot partition.</p>
<p>In EFI or <strong>UEFI systems</strong>, the bootstrap code area in MBR is usually empty (most UEFI systems don&#8217;t even use MBR for partitioning, preferring GPT). Instead, all bootloaders are stored as ordinary .efi programs in an &#8220;EFI system partition&#8221;, which is a regular FAT32 partition with a special &#8220;partition type&#8221; in the partition table. If you have multiple operating systems, they share the same EFI system partition.</p>
<p>Often, <strong>UEFI systems</strong> have a &#8220;boot mode&#8221; switch in their settings screen, having options such as &#8220;UEFI only&#8221;, &#8220;Legacy (BIOS) only&#8221;, &#8220;BIOS, then UEFI&#8221;, or something similar.</p>
<p>I must create a /boot/efi/ partition of type VFAT and at least 100 MB in size as the first primary partition.</p>
<p>A /boot/efi/ partition (100 MB minimum) — the partition mounted on /boot/efi/ contains all the installed kernels, the initrd images, and ELILO configuration files.</p>
<p><strong>Where,</strong></p>
<p>vfat — The VFAT file system is a Linux file system that is compatible with Microsoft Windows long filenames on the FAT file system. This file system must be used for the /boot/efi/ partition on Itanium systems.</p>
<p><strong>Note:</strong> CentOS 6.4 Minimal CD will not install in UEFI mode<br />
I attempted to use minimal install CD to install on a system which uses UEFI to boot. I get an error &#8220;Error 15: File not found&#8221; and the system will not boot.</p>
<p><strong>To fix it, You choose some solutions</strong><br />
1. Editing the grub menu item at boot, to load the kernel from /isolinux instead of /images/pxeboot.<br />
2. Use DVD full installation<br />
3. Use CentOS 6.5 Minimal CD</p>
<g:plusone href="https://lifelinux.com/how-to-install-centos-on-uefi-systems/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-install-centos-on-uefi-systems/">How To Install CentOS on UEFI systems</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-install-centos-on-uefi-systems/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to erase BIOS/RAID metadata use Rescue Mode</title>
		<link>https://lifelinux.com/how-to-erase-biosraid-metadata-use-rescue-mode/</link>
					<comments>https://lifelinux.com/how-to-erase-biosraid-metadata-use-rescue-mode/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Sat, 21 Jun 2014 15:54:08 +0000</pubDate>
				<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[Disk sda contains BIOS RAID metadata]]></category>
		<category><![CDATA[Ignoring disk sda]]></category>
		<category><![CDATA[recognized BIOS RAID sets]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=1908</guid>

					<description><![CDATA[<p>I recently attempted to install a fresh CentOS use an old HDD, I got an error message Warning: Disk sda contains BIOS RAID metadata, but is not part of any recognized BIOS RAID sets. Ignoring disk sda To fix this so the installation lets us use the disks, we need to boot to some kind [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-erase-biosraid-metadata-use-rescue-mode/">How to erase BIOS/RAID metadata use Rescue Mode</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>I recently attempted to install a fresh CentOS use an old HDD, I got an error message</p>
<pre>
Warning: Disk sda contains BIOS RAID metadata, but is not part of any recognized BIOS RAID sets. Ignoring disk sda
</pre>
<p><span id="more-1908"></span><br />
To fix this so the installation lets us use the disks, we need to boot to some kind of linux console</p>
<p><strong>Step 1.</strong> Booting into Rescue Mode: To boot into rescue mode, you must be able to boot the system using the CentOS installation CD-ROM. Choose Rescue Mode on Menu options or type the following command at the installation boot prompt:<br />
linux rescue</p>
<p><strong>Step 2.</strong> Erasing BIOS metadata, you can choose one of 2 solutions bellow</p>
<p>1. Using dmraid command to erase BIOS metadata on disk</p>
<pre>
# dmraid -r -E /dev/sda
Do you really want to erase "pdc" ondisk metadata on /dev/sda ? [y/n] : y
</pre>
<p>2. Using dd command</p>
<pre>
# dd if=/dev/zero of=/dev/sda bs=512 seek=$(( $(blockdev --getsz /dev/sda) - 1024 )) count=1024
</pre>
<p>Replace sda with the disks on your computer (can be sdX or hdX, with X being any letter, depending on the port they are connected to and the order)</p>
<g:plusone href="https://lifelinux.com/how-to-erase-biosraid-metadata-use-rescue-mode/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-erase-biosraid-metadata-use-rescue-mode/">How to erase BIOS/RAID metadata use Rescue Mode</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-erase-biosraid-metadata-use-rescue-mode/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
