Monday 1 December 2014

The Must Have Script For A Moxa V2616A Industrial Computer

For anyone who gets their hands on a MOXA v2616A industrial Computer,  this script will automatically update the system with the MOXA repos as well an ip subnet etc.
Change the IP and Default Gateway to suit your needs.

Copy and Paste the below script
Save the File to .sh 
Give the file execution permissions
Execute the script as root or with sudo


#!/bin/bash
ifconfig eth0 192.168.1.1
route add default gw 192.168.1.254
echo "nameserver 192.168.1.254" > /etc/resolv.conf
cd /opt
apt-get install -y unzip
wget http://www.moxa.com/drivers/UC/V2616A/V2616A-LX_V1.0_Utility_MOXA_SYS_DEB_KEY.zip
unzip V2616A-LX_V1.0_Utility_MOXA_SYS_DEB_KEY.zip
rm -rf V2615A-LX_V1.0_Utility_MOXA_SYS_DEB_KEY.zip
cd V2616A-LX_V1.0_Utility_MOXA_SYS_DEB_KEY
mv NEW-MOXA-SYS-DEBIAN-KEY NEW-MOXA-SYS-DEBIAN-KEY.gpg
apt-key add NEW-MOXA-SYS-DEBIAN-KEY.gpg
echo "#Moxa Repos" >> /etc/apt/sources.list
echo "deb http://debian.moxa.com/debian wheezy main" >> /etc/apt/sources.list
echo "#Backported packages for Debian 7 'Wheezy'" >> /etc/apt/sources.list
echo "deb http://http.debian.net/debian/ wheezy-backports main contrib" >> /etc/apt/sources.list
apt-get update
apt-get install -y linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')
echo "#Virtual Box Repos"
echo "deb http://download.virtualbox.org/virtualbox/debian wheezy contrib" >> /etc/apt/sources.list
cd /opt
wget "http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc" >> /etc/apt/sources.list
apt-key add oracle_vbox.asc
apt-get update
apt-get -t wheezy-backports install virtualbox-4.3 curl git zsh -y
apt-get upgrade -y
curl -L http://install.ohmyz.sh | sh
chsh -s /bin/zsh






1 comment:

  1. This blog is very important for those who are looking for a script to update the system of their Moxa V2616A Industrial Computer. The V2616A series of embedded computers are equipped with Intel Core i5/i7 processor that features a 2 RS-232/422/485 serial ports, dual gigabit LAN ports, 3 USB 2.0 ports, and dual VGA/DVI-D video outputs to make the device more useful. The V2616A computer has important sections of EN 50155, covering operating temperature, power input voltage, surge, ESD and vibration, as well as conformal coating and power insulation to be suited for a variety of industrial computer applications. But every device has needed to update to makes the system new and fix the bugs if any. So this blog share the good news! This update includes the MOXA repos as well an IP subnet etc. You can copy and paste the script in the blog to the notepad then save the file into an extension of .sh. after saving it; you can give the file execution permissions to perform the script as root or with Sudo command.

    ReplyDelete