Moxa Technologies EM-1240-LX user manual Enabling and Disabling Daemons, Example default enable

Page 35

EM-1240-LX User’s Manual

Configuring EM-1240-LX

Enabling and Disabling Daemons

The following daemons are enabled when the EM-1240-LX boots up for the first time.

y

SNMP Agent daemon:

snmpd

y Telnet Server / Client daemon:

telnetd

y

Internet Daemons:

inetd

y FTP Server / Client daemon:

ftpd

y

WWW Server daemon:

boa

ATTENTION

How to enable/disable telnet/ftp server

a.Edit the file ‘/etc/inetd.conf’

Example (default enable):

discard dgram udp wait root /bin/discard discard stream tcp nowait root /bin/discard telnet stream tcp nowait root /bin/telnetd ftp stream tcp nowait root /bin/ftpd -l

b.Disable the daemon by typing ‘#’ in front of the first character of the row.

How to enable/disable /etc/inittab www server

a.Edit the file ‘/etc/inittab’

b.Disable the www service by typing “#” in front of the first character of the row.

How to enable Network Time Protocol

ntpdate is a time adjusting client utility. The EM-1240-LX plays the role of Time client, and sends requests to the Network Time Server to request the correct time.

Set the time server address for adjusting the system time with the command:

/>ntpdate ntp_server_ip

Save the system time to the hardware’s real time clock, with the command:

/>hwclock -w

Visit http://www.ntp/org for a recommended public NTP server list.

How to update the system time periodically via Network Time Protocol

1.Create a shell script file that includes the following description.

#!/bin/sh

ntpdate ntp_server_ip hwclock –w

sleep 100 Å The min time is 100ms.

2.Save and make this shell script executable by typing chmod 755 <shell-script_name>

Edit the file ‘/etc/inittab’ by adding the following line:

ntp: unknown: /directory/<shell_script_name>

4-2

Image 35
Contents First Edition, November EM-1240-LX User’s ManualCopyright Notice Table of Contents Chapter EM-1240-LX Device API Introduction EM-1240-LX Package ChecklistProduct Features OverviewHardware Specifications Product SpecificationsSoftware Specifications EM-1240 Development Kit Embedded Module Hardware Block Diagram AppearanceEM-1240 Embedded Module EM-1240 Development Kit Dimensions Wiring Requirements Installing the EM-1240-LXLED Indicators Grounding the EM-1240-LX Connecting Data Transmission CablesConnecting the Power Connecting to a Serial Device Connecting to the NetworkSerial Console Port Reset ButtonInternal SD Socket Additional FunctionsReal-time Clock Getting Started Console Port Powering on the EM-1240-LXConnecting the EM-1240-LX to a PC 192.168.4.127 255.255.255.0 Default IP Address Default NetmaskTelnet 192.168.3.127 255.255.255.0Configuring the Ethernet Interface Dhcpcd -p -a eth0 & dhcpcd -p -a eth1 Ifconfig eth0Installing a Secure Digital SD Memory Card #mount -t iso9660 /dev/cdrom /mnt/cdrom Installing the EM-1240-LX Tool ChainDeveloping Your Applications StepEM-1240-LX User’s Manual PATH=/usr/local/arm-elf/bin$PATH Compiling Hello.c#make Uploading Hello to the EM-1240-LX# chmod 755 hello #./hello Running Hello on the EM-1240-LXCflags = Make File Example CodeSoftware Package EM-1240-LX Software Architecture Additional information about JFFS2 is available at Flash Context Flash Address Size Access controlJournaling Flash File System JFFS2 Bin Dev EM-1240-LX Software PackagePtyp0 Ppp Pio Rtc Ram1 Ram0 Null Kmem Mem Cua0 Console Tty ‰ Iptables ‰ NAT Configuring the EM-1240-LXEnabling and Disabling Daemons Example default enableAdding a Web Default Home Page addressLocal Host Packets Examples Define policy rules, and Append or delete rulesUsage Define policy for chain rules NAT Example Enabling NAT at BootupDial-in Service Configuring Dial-in/Dial-out ServiceConfiguring PPPoE Dial-out ServiceDynamic Driver Module Load/Unload How to Mount a Remote NFS ServerCd ramdisk Ramdiskupkernel em1240-1.x.bin /ramdiskrebootUpgrading the Kernel UpramdiskUpramdisk Cd ramdisk Upgrading the Root File System & User DirectoryRamdiskbackupfs /ramdisk/usrdisk-backup User Directory Backup-EM-1240-LX to PCChecking the Kernel and Root File System Versions Loading Factory DefaultsMirroring the Application Program and Configuration Autostarting User Applications on BootupCat /etc/version FsversionEM-1240-LX Device API Uart Interface RTC Real-time ClockBuzzer UC Finder Windows UC Finder EM-1240-LX User’s Manual UC Finder EM-1240-LX User’s Manual UC Finder Linux UC Finder Editor System CommandsBusybox µClinux normal command utility collection File managerMoxa Special Utilities NetworkProcess OtherSnmp Agent with MIB II & RS-232 Like Group Ip MIB Tcp MIB Udp MIB Snmp Agent with MIB II & RS-232 Like GroupRFC1317 RS-232 like group supported variables Rs232 MIB Snmp MIBEM-1240-LX FAQ Service Information Following services are provided Moxa Internet ServicesMoxa Product † EM-1240-LX Serial Number Problem Report FormProduct Return Procedure