<?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>EmbLogic &#187; sandeep.singh</title>
	<atom:link href="https://www.emblogic.com/blog/author/sandeep-singh/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>NFS SERVER CONFIGURATION</title>
		<link>https://www.emblogic.com/blog/12/nfs-server-configuration/</link>
		<comments>https://www.emblogic.com/blog/12/nfs-server-configuration/#comments</comments>
		<pubDate>Mon, 30 Dec 2013 08:05:00 +0000</pubDate>
		<dc:creator><![CDATA[sandeep.singh]]></dc:creator>
				<category><![CDATA[Project 00: Linux System / Network Administration]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7930</guid>
		<description><![CDATA[NFS, or Network File System, is a server-client protocol for sharing files between computers on a common network. NFS enables you to mount a file system on a remote computer as if it were local to your own system. You &#8230; <a href="https://www.emblogic.com/blog/12/nfs-server-configuration/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>NFS, or Network File System, is a server-client protocol for sharing files between computers on a common network. NFS enables you to mount a file system on a remote computer as if it were local to your own system. You can then directly access any of the files on that remote file system. The server and client do not have to use the same operating system. The client system just needs to be running an NFS client compatible with the NFS server.</p>
<p>&nbsp;</p>
<p>For example NFS server could be a Linux system and Unix could be a client. But it can’t be a window system because window is not NFS compatible. The NFS server exports one or more directories to the client systems, and the client systems mount one or more of the shared directories to local directories called mount points. After the share is mounted, all I/O operations are written back to the server, and all clients notice the change as if it occurred on the local filesystem.</p>
<p>&nbsp;</p>
<p>A manual refresh is not needed because the client accesses the remote filesystem as if it were local.because access is granted by IP address, a username and password are not required. However, there are security risks to consider because the NFS server knows nothing about the users on the client system.</p>
<p>&nbsp;</p>
<p><span style="font-size: large"><strong>Configure nfs server </strong></span></p>
<p>&nbsp;</p>
<ul>
<li>Network configuration in Linux</li>
</ul>
<p>&nbsp;</p>
<ol>
<li>A linux server with ip address 192.168.0.254 and hostname Server</li>
<li>A linux client with ip address 192.168.0.1 and hostname Client1</li>
<li>Updated /etc/hosts file on both linux system</li>
<li>Running portmap and xinetd services</li>
<li>Firewall should be off on server</li>
</ol>
<p>&nbsp;</p>
<ul>
<li>Three rpm are required to configure nfs server. <strong>nfs, portmap, xinetd </strong>check them if not found then install</li>
</ul>
<ol>
<li>Now check <strong>nfs, portmap, xinetd</strong> service in system service it should be on</li>
</ol>
<pre>#setup
Select <strong> System service</strong>
from list
[*]portmap [*]xinetd [*]nfs</pre>
<p>2.Now restart <strong>xinetd</strong> and <strong>portmap</strong> service</p>
<ol>
<li>To keep on these services after reboot on then via <strong>chkconfig</strong> command</li>
<li>After <strong>reboot</strong> verify their status. It must be in<strong> running</strong> condition</li>
<li>now create a <strong>/data</strong> directory and grant full permission to it</li>
<li>now open <strong>/etc/exports</strong> filesave file with <strong>:wq</strong> and exit</li>
<li>also restart <strong>nfs daemons</strong> with <strong>expotfs</strong></li>
</ol>
<p>&nbsp;</p>
<ol start="6">
<li>verify with <strong>showmount</strong> command that you have successfully shared <strong>data folder</strong></li>
</ol>
<h3><strong><span style="font-size: large">configure client system</span></strong></h3>
<ol>
<li>ping form <strong>nfs server</strong> and check the<strong> share folder</strong></li>
<li><strong>now mount this share folder on mnt mount point. To test this share folder change directory to mnt and create a test file</strong></li>
<li><strong>After use you should always unmount from mnt mount point</strong></li>
<li><strong>create a mount point, by making a directory </strong></li>
<li><strong>now open /etc/fstab file </strong></li>
<li><strong>after reboot check /temp directory it should show all the shared data</strong></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/nfs-server-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FTP SERVER CONFIGURATION (Batch-20.02.36)</title>
		<link>https://www.emblogic.com/blog/12/ftp-server-configuration-batch-20-02-36/</link>
		<comments>https://www.emblogic.com/blog/12/ftp-server-configuration-batch-20-02-36/#comments</comments>
		<pubDate>Sat, 07 Dec 2013 05:22:01 +0000</pubDate>
		<dc:creator><![CDATA[sandeep.singh]]></dc:creator>
				<category><![CDATA[Project 00: Linux System / Network Administration]]></category>
		<category><![CDATA[Ftp server]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7706</guid>
		<description><![CDATA[FTP SERVER CONFIGURATION (Batch-20.02.36) Any Linux system can operate as an FTP server. It has to run only the server software—an FTP daemon with the appropriate configuration. Transfers are made between user accounts on client and server systems. A user &#8230; <a href="https://www.emblogic.com/blog/12/ftp-server-configuration-batch-20-02-36/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span style="font-size: medium"><strong>FTP SERVER CONFIGURATION (Batch-20.02.36)</strong></span></p>
<p>Any Linux system can operate as an FTP server. It has to run only the server software—an FTP daemon with the appropriate configuration. Transfers are made between user accounts on client and server systems. A user on the remote system has to log in to an account on a server and can then transfer files to and from that account&#8217;s directories only.</p>
<p>A special kind of user account, named <strong>ftp</strong>, allows any user to log in to it with the username <strong>“anonymous.”</strong> This account has its own set of directories and files that are considered public, available to anyone on the network who wants to download them.</p>
<p>The numerous FTP sites on the Internet are FTP servers supporting FTP user accounts with anonymous login. Any Linux system can be configured to support anonymous FTP access, turning them into network FTP sites. Such sites can work on an intranet or on the Internet.</p>
<h3>1.Configuring the ftp Server</h3>
<p>The <strong>vsftpd</strong> RPM package is required to configure a Red Hat Enterprise Linux system as an ftp server. If it is not already installed, install it with <strong>rpm</strong> commands as described in our pervious article. After it is installed, start the service as root with the command <strong>service vsftpd start</strong> . The system is now an <strong>ftp server</strong> and can accept connections. To configure the server to automatically start the service at boot time, execute the command <strong>chkconfig vsftpd on</strong> as root. To stop the server, execute the command<strong> service vsftpd stop.</strong> To verify that the server is running, use the command <strong>service vsftpd status</strong>.</p>
<h3>2.Configure vsftpd server</h3>
<p>In this example we will configure a <strong>vsftpd</strong> server and will transfer files from client side.</p>
<p>For this example we are using three systems one linux server one linux clients and one windows xp clients.</p>
<p>&nbsp;</p>
<ul>
<li>A linux server with ip address 192.168.0.254 and hostname Server</li>
<li>A linux client with ip address 192.168.0.1 and hostname Client1</li>
<li>A window client with ip address 192.168.0.2 and hostname Client2</li>
<li>Updated /etc/hosts file on both linux system</li>
<li>Running portmap and xinetd services</li>
<li>Firewall should be off on server</li>
</ul>
<h3>4.Check LAN card driver is installed or not.</h3>
<p>LAN driver is the top most part for network. To check it run <strong>setup</strong> command</p>
<p>Select <strong>network configuration</strong> from list.</p>
<h3>5.Check firewall status</h3>
<p>Firewall is the necessary security part of Linux system which is connected to Internet. But in exam we are not going to use Internet so it’s good practice to disable it.</p>
<p><span style="font-size: medium"><strong>6.To disable firewall run </strong></span><strong><span style="font-size: medium"><strong>setup</strong></span></strong><span style="font-size: medium"><strong> commands.</strong></span></p>
<ul>
<li>Now select <strong>firewall configuration</strong> from list and click on <strong>run tool.</strong></li>
<li><strong>Select disable and click on ok and quit to return on command prompt.</strong></li>
<li><strong>System reboot require to take effect so reboot system with reboot -f commands.</strong></li>
<li></li>
</ul>
<h3><strong>7.Check portmap and xinetd package status</strong></h3>
<p>Almost every Linux server needs these two rpm to function properly. First check that these rpm are install or not. If no rpm is install then install them via <strong>rpm</strong> commands.</p>
<ul>
<li><strong>If you have rpm then check there status via setup commands.</strong></li>
<li><strong>Now select system service from menu.</strong></li>
<li><strong>put a star in front the portmap service.</strong></li>
<li><strong>Now put star in front the xinetd service.</strong></li>
<li><strong>Click on ok and select quit to come back on command prompt.</strong></li>
</ul>
<p><span style="font-size: medium"><strong>8.Now restart these two service.</strong></span></p>
<ul>
<li><strong>To keep on these services after reboot on then via chkconfig command.</strong></li>
<li><strong>After reboot verify their status. It must be in running condition.</strong></li>
<li><strong>Once you have successfully completed these steps you are ready to configure the Linux server .</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/ftp-server-configuration-batch-20-02-36/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interprocess communication</title>
		<link>https://www.emblogic.com/blog/11/interprocess-communication/</link>
		<comments>https://www.emblogic.com/blog/11/interprocess-communication/#comments</comments>
		<pubDate>Tue, 26 Nov 2013 04:57:14 +0000</pubDate>
		<dc:creator><![CDATA[sandeep.singh]]></dc:creator>
				<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7567</guid>
		<description><![CDATA[Interprocess Communication Interprocess communication is a technique used for exchange of data between two process and threads.The process can be run on same computer or via internet.IPC  is a mechanism through which two process communicates.Signals are used in IPC to &#8230; <a href="https://www.emblogic.com/blog/11/interprocess-communication/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span style="text-decoration: underline">Interprocess Communication</span></p>
<p>Interprocess communication is a technique used for exchange of data between two process and threads.The process can be run on same computer or via internet.IPC  is a mechanism through which two process communicates.Signals are used in IPC to send notification to a <a title="Process (computing)" href="http://en.wikipedia.org/wiki/Process_(computing)">process</a> or to specific <a title="Thread (computer science)" href="http://en.wikipedia.org/wiki/Thread_(computer_science)">thread</a> within the same process in order to notify it of an event that occurred. When a signal is sent, the operating system interrupts the target process&#8217;s normal <a title="Control flow" href="http://en.wikipedia.org/wiki/Control_flow">flow of execution</a> to deliver the signal. Execution can be interrupted during any <a title="Atomic operation" href="http://en.wikipedia.org/wiki/Atomic_operation">non-atomic instruction</a>. If the process has previously registered a signal handler, that routine is executed. Otherwise, the default signal handler is executed.IPC are implemented through Pipe,Fifo,Semaphores,Shared memory,Message queue.</p>
<ul>
<li><strong>The pipe call:</strong> function provide a means to transfer data between two programs without invoking the shell to interpret the request command.It also give control over the reading and writing.The pipe function has the following prototype.</li>
</ul>
<p><strong>#include&lt;unistd.h&gt;</strong></p>
<p><strong>Int pipe(int pipe_descriptor[2]);</strong></p>
<p>&nbsp;</p>
<p>Pipe is passed apointer to an array of two integer file descriptor.It is important to realize that this is a file descriptor, not a file stream.So we must use low level read and write call to access the data.The real advantage of pipe comes when you wish to pass data beween two process.When a program creates a new process using the fork call,the descriptor that is open previously will remain open.By creating a pipe in the original process and forking to create  anew process.We can pass data from one process to another process down the pipe.By using the <strong>fork( )</strong> call ,it creates the new child process.By using the <strong>execl( )</strong> command we can replace the whole line with with other program.</p>
<p>You can create a pipe using the following syntax.</p>
<p><strong>if(pipe(file_pipes)==0),</strong>creates a pipe.</p>
<p>To write the data into the file descriptor use the sysntax.</p>
<p><strong>Write(file_pipes[1],some_data,strlen(some_data));</strong></p>
<p>To read the data from the file descriptor use the following syntax.</p>
<p><strong>Read(file_pipes[0],buffer,BUFSIZ);</strong></p>
<p>On success the syntax is <strong>exit(EXIT_SUCCESS);</strong> On failure the sysntax is<strong> exit(EXIT_FAILURE);</strong></p>
<p>The program creates a pipe with the pipe call,it then use a fork call to create the new  process.The parent write the data in to the pipe and child process read the data from the pipe.Both the parent and child will exit after the one read and write.The pipe call is us to allow the child to be a different program from its parent rather than just a process running the same program.</p>
<p>&nbsp;</p>
<p><strong>FIFO:</strong> Named pipes (or FIFO) are variants of pipe that allow communication between processes that are not related to each other. The processes communicate using named pipes by opening a special file known as a FIFO file. One process opens the FIFO file from writing while the other process opens the same file for reading. Thus any data written by the former process gets streamed through a pipe to the latter process. The FIFO file on disk acts as the contract between the two processes that wish to communicate.</p>
<p><strong>Creat:</strong> A FIFO is created by the mkfifo function:</p>
<p>#include &lt;sys/types.h&gt;</p>
<p>#include &lt;sys/stat.h&gt;</p>
<p>int mkfifo(const char *pathname, mode_t mode);</p>
<p><strong>Open</strong>: mkfifo tries to create a new FIFO. If the FIFO already exists, then an EEXIST error is returned. To open an existing FIFO, use open(), fopen() or freopen()</p>
<p><strong>Close</strong>: to close an open FIFO, use close(). To delete a created FIFO, use unlink().</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/11/interprocess-communication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
