Wednesday, April 18, 2018

Centos and Redhat EL firewall port opening


http://ask.xmodulo.com/open-port-firewall-centos-rhel.html

Centos 7
To open up a new port (e.g., TCP/80) permanently, use these commands.
$ sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
$ sudo firewall-cmd --reload 
 
Check the updated rules with:
$ firewall-cmd --list-all
 
Centos 6, iptables
Use iptables command to open up a new TCP/UDP port in the firewall. To save the updated rule permanently, you need the second command.
$ sudo iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT
$ sudo service iptables save 
 
Start / Stop / disable firewall completely
 
 

-30-

Sunday, April 15, 2018

Installing lamp and webmin on raspbian


Another writeup on installing a lamp server setup on a Raspberry Pi.  Probably need a 3 or 3+ to have any real justification, YMMV



sudo groupadd -f -g33 www-data
sudo apt-get update
sudo apt-get install apache2 php5 libapache2-mod-php5
sudo apt-get install mysql-server mysql-client php5-mysql
sudo apt-get  install  phpmyadmin
sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl \
libpam-runtime libio-pty-perl apt-show-versions python 
 

webmin:

mkdir webmin
cd webmin
wget http://prdownloads.sourceforge.net/webadmin/webmin-1.580.tar.gz
gunzip webmin-1.580.tar.gz
tar xf webmin-1.580.tar
cd webmin-1.580
sudo ./setup.sh /usr/local/webmin
 
http://yourPiipaddress:10000 
 

*****************
another install page for raspbian
*****************
http://www.instructables.com/id/Adding-Webmin-to-manage-a-Raspberry-Pi/

-30-

Monday, March 12, 2018

Setting up motion camera software on raspbian


Raspbian has gotten the motion daemon integrated in, but all is not smooth yet.

you need to enable the raspberry pi camera with configuration changes to be sure that it is enabled.

0.0 create a boot media with latest raspbian, write on windows as needed

0.1 for newest stretch version of raspberry pi, enable wifi if necessary.
0.1a   with the media mounted on the creation host
0.1a.1   touch /boot/ssh to make sure ssh is enabled after boot
0.1a.2   put in wpa_supplicant.conf as needed

0.9 log in once booted up

1. sudo apt-get update

2. sudo apt-get -y install motion

3. in raspi-config
3a   set timezone
3b   set hostname
3c   enable camera
3d   resize media if using standard initial raspbian release image from 1.5mb

4.  change /etc/motion/motion.conf
4a.  change to allow non local control page access 8080
4b.  change to allow non local camera stream access 8081
4c.  change to run daemon if started manually

5. add  bcm2835-v4l2 to /etc/modules to get
5a. change /etc/default/motion to auto start
5b. set to get systemctl to start @ boot   sudo systemctl enable motion
5c. change permissions on /var/log/motion/motion so daemonized motion can access it
5d. change permissions on /var/lib/motion directory so daemonized motion can access it

6. sudo service motion start

7.  some reboots will be required.

00 optional

00.1  command;
          vcgencmd get_camera
       will show whether camera is supported and detected

Note for headless setup

on the boot volume (on system creating boot media)

Must be done before first boot.  Will not work subsequently (for the ssh enable)

touch /boot/ssh

Create wireless connection if need be.  This is the only way to start a pi zerow headless.
Contents of /etc/wpa_supplicant/wpa_supplicant.conf:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="YOUR_SSID_HERE"
    psk="YOUR_SECRET_PASSPHRASE_HERE"
    id_str="SOME_DESCRIPTIVE_NAME"
}
30

monitoring udev when doing hot plug with USB


Ran across the command

udevadm monitor

when looking for answers to problems with an attached raspberry pi device.  Clueless answer, but interesting tool for some other video stuff later.

30

Saturday, March 3, 2018

Workaround for when windows shares have bad credentials


Not sure if this is the correct way to remove badly credentialed shares, but a start

When you have a device on a network share and get the login incorrect, there seems to be no way to remove the bad "guess" or login so you can retry or correctly enter a password.  This is via the GUI access to shares.

This may be a way to force the credential to go away, by using a command line net command to remove it.  Untried thus far, but may work.

Execute "net use" in windows cmd box.
It will display all the links.
Run following command to remove your PI's link:

net use /D \\192.168.0.165\share

Then retry the access.
30
 

Thursday, February 22, 2018

Saturday, February 17, 2018

Microdata 1600 compatable parts






THIS PART CAME FROM A FULLY FUNCTIONAL, PERFECTLY RUNNING MIYANO JNC-35/45T CNC LATHE THAT WE DISMANTLED. WE HAVE THE VIDEO OF THE MACHINE RUNNING.

search ebay for miyano JNC-35/45T CNC

Cincinnati Milacron Acramatic clone of some sort

30