Categories

Archives

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

โปรแกรม Voice Activate Recorder ที่น่าสนใจ

ที่มา: https://www.snooper.se

LoRa WAN

LoRaWAN is a protocol designed for creating large-scale public networks; the technology allows for sensors to talk to the internet without 3G or WiFi. Community crowdsourced projects, such as The Things Network, aim to provide access to this technology by deploying gateways globally that others can freely connect to.

The purpose of this Instructable is to provide a guide for people to create their own outdoor LoRaWAN Gateway using off-the-shelf components, rather than purchasing a commercial offering. Many of the components used in this Instructable, such as the coax cables, can be substituted for cheaper alternatives (from sites like Ebay); however, for the purpose of this guide I tried to keep the number of suppliers to a minimum.Add TipAsk QuestionCommentDownload

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.Add Teacher Note

Step 1: Quick Overview of the Files:

Bom Part 1.csv – A list of parts sourced from Farnell.

Bom Part 2.csv – Other required parts sourced from places like Amazon.

Bracket.dxf – Template for the rear bracket. This is cut from a sheet of steel and will require a shear & bender.

Internal Plate.dxf – Internal plate for mounting the Raspberry Pi, this requires a lasercutter.

Hole Template.dxf – Template to help mark out the positioning of the bulkhead connectors.

Attachments

Add TipAsk QuestionCommentDownload

Step 2: Required Tools & Machines

  • Screwdriver (phillips)
  • Allen Keys
  • Drill
  • 12, 10, 8, 4mm drillbits
  • 22mm Hole Saw
  • M12 Tap & Holder
  • File / Deburring Tool
  • Fine Tooth Jigsaw / Rotary Multitool with small angle grinding attachment
  • RJ45 Crimping Tool, Connectors, Boots and Cable (a RJ45 cable tester is also handy!)
  • Sheet Metal Bender & Shear
  • Lasercutter (for producing the internal adapter plate)
  • A3 Printer (for printing templates 1:1)

Add TipAsk QuestionCommentDownload

Step 3: Bottom Holes in the Enclosure

Picture of Bottom Holes in the Enclosure
Picture of Bottom Holes in the Enclosure

Print or lasercut “hole template.dxf”. This template is used to help mark out the location of the bottom holes for the enclosure. Place the template against the top edge of one of the enclosure recesses, so that the holes are situated near the top of the enclosure. Now drill out these holes using the M12 (center hole) and M8 (side holes) drill bits. Use a file / deburring tool to clean up the holes.Add TipAsk QuestionCommentDownload

Step 4: Side Hole for Pressure Compensated Valve

Picture of Side Hole for Pressure Compensated Valve

Using the M10 drill bit, make a hole on one of the long-sides of the enclosure; this hole should be made near the top of the enclosure. Thread this hole using a M12 tap.Add TipAsk QuestionCommentDownload

Step 5: Install the First Set of Connectors

Picture of Install the First Set of Connectors

Install the nylon cable gland and the two SMA bulkhead connectors. The SMA bulkhead connectors should be installed, so that the small rubber o-ring’s are within the inside of the enclosure. If necessary, use a small file to enlarge the holes to size as ideally they should be a tight fit. Leave the pressure compensation valve uninstalled for now.Add TipAsk QuestionCommentDownload

Step 6: Install SMA Coax Cables

Picture of Install SMA Coax Cables

Install and tighten the two short SMA coax cables on the internal facing side of the SMA bulkhead connectors.Add TipAsk QuestionCommentDownload

Step 7: Lasercut the Acrylic and Install M2.5 Standoffs

Picture of Lasercut the Acrylic and Install M2.5 Standoffs

Using “Internal Plate .dxf”, lasercut the 6mm thick sheet of acrylic to create the internal adapter plate. Now install the M2.5 standoffs and lock them in place with the M2.5 nyloc nuts. If you are using standard nuts (rather than nyloc), a little bit of locktite is required. The rectangular cut-out should be on the left-hand side of the internal adapter piece.Add TipAsk QuestionCommentDownload

Step 8: Attach Raspberry PI 3 to the Internal Adapter Plate

Picture of Attach Raspberry PI 3 to the Internal Adapter Plate

It is easier to image and configure the Raspberry Pi now (step 21) prior to attaching it to the internal adapter plate. Once the Pi is set up, attach it to the standoffs and secure the Pi in place with the M2.5 screws. The Pi’s USB ports should face upwards and the HDMI port face away from the rectangular cut out, as shown in the picture. Once the Raspberry Pi is in place, connect the Linklabs shield to the Pi (its SMA connectors should face the HDMI side of the Raspberry Pi).Add TipAsk QuestionCommentDownload

Step 9: Install the Internal Adapter Plate

Picture of Install the Internal Adapter Plate

The internal adapter plate can now be installed into the enclosure. Secure it in place with the four M3 screws. If you wish you may tap the standoffs first, but I found the plastic soft enough to self-tap.Add TipAsk QuestionCommentDownload

Step 10: Install the Pressure Compensation Valve

Picture of Install the Pressure Compensation Valve

The pressure compensation valve can now be installed in the remaining hole that we made earlier.Add TipAsk QuestionCommentDownload

Step 11: Connect the Internal Coax Cables

Picture of Connect the Internal Coax Cables

The coax cables can now be connected to the Linklabs board. The GPS SMA connector should use the coax that runs to the left hand side bulkhead connector and the 868MHz SMA connector should run to the one on the right.Add TipAsk QuestionCommentDownload

Step 12: Prepare the Wall Bracket

Picture of Prepare the Wall Bracket

Print off “Bracket.dxf” onto a sheet of A3 paper at 1:1 scale. Cut out this template and glue it (with prit stick) to the sheet of stainless steel. Use this as a guide to cut out all of the required holes:

  • Use the 22mm hole drill for the largest hole
  • Use a M4 drill bit for the four smaller holes and the top (optional) wall bracket holes
  • Use a M8 drill for the remaining holes
  • Cut out the remaining bit of metal to make the wall connector holes (use a rotary multi-tool / fine tooth jigsaw) — this is optional based on your own needs
  • De-burr all of the holes

Use a shear to cut the sheet of steel to size and break the edge with a file (you should probably round off the corners too). Finally (once all the holes have been made!) use a former to make a 90degree bend in the metal. This bend should be placed between the top two holes (for the antennas) and the ‘wall holes’ – you can use the enclosure to help work out where to place this bend, keep in mind you need clearance for the antenna connectors!

Useful Note: We adapt the back of the “wall bracket” depending on what we wish to mount it too. For example we use metal pole clips to allow us to secure them to a pole mounted on a tripod for portable testing.Add TipAsk QuestionCommentDownload

Step 13: Secure the Wall Bracket to the Enclosure

Picture of Secure the Wall Bracket to the Enclosure

Secure the wall bracket to the back of the enclosure. You will need M4 bolts for this; again secure them in place with nyloc nuts / loctite.Add TipAsk QuestionCommentDownload

Step 14: Install the GPS Antenna

Picture of Install the GPS Antenna
Picture of Install the GPS Antenna
Picture of Install the GPS Antenna

Install the GPS antenna into the largest top hole and tighten the two nuts. Now install the 90′ TNC connector and finally the TNC to SMA connector. The SMA connector should face towards the direction of the second antenna hole.Add TipAsk QuestionCommentDownload

Step 15: Install the Bulkhead Jack SMA Cable

Picture of Install the Bulkhead Jack SMA Cable

Install the bulkhead jack SMA cable into the remaining antenna hole. You will need two M6 washers on either side of the metal bracket to help secure the connector; tighten the brass nut to lock everything in place.Add TipAsk QuestionCommentDownload

Step 16: Route the Coax Cables

Picture of Route the Coax Cables

Route both SMA coax cables and attach them to the bottom SMA bulkhead connectors; the coax for the GPS should run to the bulkhead on the left hand side of the enclosure and the coax for the 868MHz antenna should run to the bulkhead on the right hand side.Add TipAsk QuestionCommentDownload

Step 17: Install the Rubber Duck Antenna

Picture of Install the Rubber Duck Antenna

Install the 868MHz rubber duck antenna; this antenna should get you started and it is discrete.

You can replace it with a larger antenna, for example a Procom CXL900-3/L NType 824-894MHz collinear antenna; however antenna location (is it worth installing more shorter range gateway units vs a few larger ones?), suitable mounting brackets and local regulations should be considered before doing so.Add TipAsk QuestionCommentDownload

Step 18: Install the Enclosure Clips and Lid

Picture of Install the Enclosure Clips and Lid
Picture of Install the Enclosure Clips and Lid

Clip in place the two enclosure clips and attach the lid to one of them (We prefer the bottom one nearest the enclosure bulkhead connectors).Add TipAsk QuestionCommentDownload

Step 19: Crimp RJ45 Cable and Install POE Splitter

Picture of Crimp RJ45 Cable and Install POE Splitter

Run a suitable length of RJ45 cable through the cable gland and crimp the cable internally. Install the POE splitter (a bit of double-sided foam tape and help secure it) and connect the RJ45 cable to it. The splitter’s power and network connectors should run to the respective receptacles on the Raspberry Pi – be warned the power cable is a very tight fit!

Note: We have run these gateways with an Anker Astro E1 5200mAh battery placed where the POE splitter fits and have had the Raspberry Pi 3’s wireless connecting to a 3G/LTE hotspot (or old Android phone); this is useful if you wish to try out different places for siting the gateway before going to the hassle of installing it.Add TipAsk QuestionCommentDownload

Step 20: Hardware Complete

Picture of Hardware Complete

Finally your hardware is ready!Add TipAsk QuestionCommentDownload

Step 21: Software

Picture of Software

We recommended using Raspbian Jessie Lite as the operating system for the Raspberry Pi. The packages linked to here will set up an installation meant for The Things Network backend (protocol version 2). If you require protocol version three (which currently isn’t compatible with the Things Network), you will need to build the latest Gateway and Packet Forwarder binaries (https://github.com/Lora-net/).

  1. Download Raspbian Jessie Lite and flash the image to a SD card.
  2. Edit “config.txt” located in the boot partition and append the following:
# Enable SPI interface
dtparam=spi=on

# Enable GPS PPS

dtoverlay=pps-gpio,gpiopin=4

#Disable Bluetooth on pi 3

dtoverlay=pi3-miniuart-bt

3. Edit “cmdline.txt”; the contents of the file should currently look something like this:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait 

Remove all references to ttyAMA0. The file will now look something like this:

 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

4. Start / Reboot the Raspberry Pi. On first boot Raspbian will expand the root filesystem to the size of your SD card.

5. If you wish to use the .deb package that we have created to install the required binaries & services for the gateway then follow the next set of steps; otherwise now is the time to go and build from source. It can be useful to temporarily use a “root” privileged shell for the next set of steps:

sudo -s

6. Now create a file “/etc/apt/sources.list.d/lorawan.list” and append the following:

deb http://shed.kent.ac.uk/repos/apt/debian jessie main

7. You also need to get the repo keys:

 wget -O - https://shed.kent.ac.uk/repos/apt/conf/shed.gpg.key | apt-key add -

8. Now run this command:

apt-get install apt-transport-https ; apt-get update

9. Once the repositories have finished updating (hopefully without error), install the following packages:

apt-get install linklabslorawangateway pps-tools

10. If everything went without a hitch you will now have a gateway setup. The installation of the package “linklabslorawangateway” should set up files in “/opt/linklabs” and “/lib/systemd/system”. As part of the installation it will use your Pi’s mac address for the gateway’s ID; this can be overridden in the file “/opt/linklabs/config/local_conf.json”. Whilst not configured in this guide, pps-tools allows you (with an update to NTP) to use the GPS second pulse to keep a more accurate record of time on your gateway.

11. To connect to the Things Network you will want to modify “/opt/linklabs/config/global_conf.json”. Scroll down to the line:

"server_address": "shed.kent.ac.uk"

And for Europe change it too:

"server_address": "router.eu.thethings.network"

12. Reboot the Raspberry Pi and you should be good to go.

Useful Notes:

  1. The systemd linklabs.service calls the scripts “start.sh” and “stop.sh” located in the “/opt/linklabs/bin/” directory. It can be useful to modify these scripts for your specific needs.
  2. The Things Network guide recommends modifying “local_conf.json” for gateway specific settings; in our case we keep server settings in “global_conf.json” and only use “local_conf.json” for the Gateway ID – this is because we remotely manage our gateways from a configuration management tool called Salt Stack; you may wish to adjust these files to match the Things Network’s recommendations.
  3. Because the GPS unit is utilised by the packet_fowarder program, it will be unavailable for use by other services; such as NTP (however the time pulse is accessible) – you will still need to set coarse time from a network NTP server.

ที่มา: https://www.instructables.com/id/LoRaWAN-Gateway/

ปัญหา Access Denied บน Samba (CentOS 6)

Hi CentOS comm,

What is the possible problem on my secured samba share folder?
When I tried to access the folder using created user “user1” I got access denied response.
I know I typed in the correct password.

[root@localhost demo]# useradd user1
[root@localhost demo]# groupadd group1
[root@localhost demo]# usermod -a -G group1 user1
[root@localhost demo]# smbpasswd -a user1
New SMB password:
Retype new SMB password:
Added user user1.
[root@localhost demo]# mkdir /home/secure
[root@localhost demo]# chown -R user1:group1 /home/secure/
[root@localhost demo]# chmod -R 0770 /home/secure/
[root@localhost demo]# chcon -t samba_share_t /home/secure/
[root@localhost demo]# gedit /etc/samba/smb.conf

[Secure]
path = /home/secure
valid users = @smbgrp
browsable = yes
writable = yes
guest ok = no
read only = no

 

ทั้งนี้ ให้ Disable SELinux Policy

 

ที่มา: https://centos.org/forums/viewtopic.php?t=61160

RSYNC

Synchronizing folders with rsync

In this post I cover the basics of rsync, in preparation for a subsequent post that will cover backups and it’s use in conjunction with cronjobs to automatize the backup process. From the copying and synchronization of local files and folders, to it’s use for transfer information among computers. Its use as a daemon when SSH is unavailable was moved to it’s own section.

The basics of rsync

rsync is a very versatile copying and backup tool that is included by default in almost every Linux distribution. It can be used as an advanced copying tool, allowing us to copy files both locally and remotely. It can also be used as a backup tool. It supports the creation of incremental backups.

rsync counts with a famous delta-transfer algorithm that allows us to transfer new files as well as recent changes to existent files, while ignoring unchanged files. Additionally to this, the behavior of rsync can be throughly customized, helping us to automatize backups, it can also be run as a daemon to turn the computer into a host and allow rsync clients connect to it.

Besides the copying of local files and folders, rsync allow us to copy over SSH (Secure Shell), RSH (Remote Shell) and it can be run as a daemon in a computer and allow other computers to connect to it, when rsync is run as a daemon it listens to the port TCP 873.

When we use rsync as a daemon or when we use RSH, the data that is send between computers travels unencrypted, so, if you are transferring files between two computers in the same local network, this is useful, but this shouldn’t be used to transfer files over insecure networks, such as the Internet. For this purpose SSH is the way to go.

This is the main reason why I favor the use of SSH for my transfers, besides, since SSH is secure, many servers have the SSH daemon available. But the use of rsync as a daemon for transfers over fast connections, as is usually the case in a local network, is useful. I don’t have the RSH daemon running in my computers so you may find me a bit biased about SSH in the examples. The examples covering the transfer of files between two computers use SSH as the medium of transport, but in a separate post I cover the use of rsync as a daemon.

Copying local files and folders

To copy the contents of one local folder into another, replacing the files in the destination folder, we use:

rsync -rtv source_folder/ destination_folder/

In the source_folder notice that I added a slash at the end, doing this prevents a new folder from being created, if we don’t add the slash, a new folder named as the source folder will be created in the destination folder. So, if you want to copy the contents of a folder called Pictures into an existent folder which is also called Pictures but in a different location, you need to add the trailing slash, otherwise, a folder called Pictures is created inside the Pictures folder that we specify as destination.

rsync -rtv source/ destination/
A graphical representation of the results of rsync with a trailing slash in the source folder.rsync -rtv source destination/
A graphical representation of the results of rsync without a trailing slash in the source folder.

The parameter -r means recursive, this is, it will copy the contents of the source folder, as well as the contents of every folder inside it.

The parameter -t makes rsync preserve the modification times of the files that it copies from the source folder.

The parameter -v means verbose, this parameter will print information about the execution of the command, such as the files that are successfully transferred, so we can use this as a way to keep track of the progress of rsync.

This are the parameters that I frequently use, as I am usually backing up personal files and this doesn’t contain things such as symlinks, but another very useful parameter to use rsync with is the parameter -a.

rsync -av source/ destination/

The parameter -a also makes the copy recursive and preserve the modification times, but additionally it copies the symlinks that it encounters as symlinks, preserve the permissions, preserve the owner and group information, and preserve device and special files. This is useful if you are copying the entire home folder of a user, or if you are copying system folders somewhere else.

Dealing with whitespace and rare characters

We can escape spaces and rare characters just as in bash, by the use of \ before any whitespace and rare character. Additionally, we can use single quotes to enclose the string:

rsync -rtv so\{ur\ ce/ dest\ ina\{tion/
rsync -rtv 'so{ur ce/' 'dest ina{tion/'

Update the contents of a folder

In order to save bandwidth and time, we can avoid copying the files that we already have in the destination folder that have not been modified in the source folder. To do this, we can add the parameter -u to rsync, this will synchronize the destination folder with the source folder, this is where the delta-transfer algorithm enters. To synchronize two folders like this we use:

rsync -rtvu source_folder/ destination_folder/

By default, rsync will take into consideration the date of modification of the file and the size of the file to decide whether the file or part of it needs to be transferred or if the file can be left alone, but we can instead use a hash to decide whether the file is different or not. To do this we need to use the -c parameter, which will perform a checksum in the files to be transferred. This will skip any file where the checksum coincides.

rsync -rtvuc source_folder/ destination_folder/

Synchronizing two folders with rsync

To keep two folders in synchrony, not only do we need to add the new files in the source folder to the destination folder, as in the past topics, we also need to remove the files that are deleted in the source folder from the destination folder. rsync allow us to do this with the parameter --delete, this used in conjunction with the previously explained parameter -u that updates modified files allow us to keep two directories in synchrony while saving bandwidth.

rsync -rtvu --delete source_folder/ destination_folder/

The deletion process can take place in different moments of the transfer by adding some additional parameters:

  • rsync can look for missing files and delete them before it does the transfer process, this is the default behavior and can be set with --delete-before
  • rsync can look for missing files after the transfer is completed, with the parameter --delete-after
  • rsync can delete the files done during the transfer, when a file is found to be missing, it is deleted at that moment, we enable this behavior with --delete-during
  • rsync can do the transfer and find the missing files during this process, but instead of delete the files during this process, waits until it is finished and delete the files it found afterwards, this can be accomplished with --delete-delay

e.g.:

rsync -rtvu --delete-delay source_folder/ destination_folder/

Compressing the files while transferring them

To save some bandwidth, and usually it can save some time as well, we can compress the information being transfer, to accomplish this we need to add the parameter -z to rsync.

rsync -rtvz source_folder/ destination_folder/

Note, however, that if we are transferring a large number of small files over a fast connection, rsync may be slower with the parameter -z than without it, as it will take longer to compress every file before transfer it than just transferring over the files. Use this parameter if you have a a connection with limited speed between two computers, or if you need to save bandwidth.

Transferring files between two remote systems

rsync can copy files and synchronize a local folder with a remote folder in a system running the SSH daemon, the RSH daemon, or the rsync daemon. The examples here use SSH for the file transfers, but the same principles apply if you want to do this with rsync as a daemon in the host computer, read Running rsync as a daemon when ssh is not available further below for more information about this.

To transfer files between the local computer and a remote computer, we need to specify the address of the remote system, it may be a domain name, an IP address, or a the name of a server that we have already saved in our SSH config file (information about how to do this can be found in Defining SSH servers), followed by a colon, and the folder we want to use for the transfer. Note that rsync can not transfer files between two remote systems, only a local folder or a remote folder can be used in conjunction with a local folder. To do this we use:

Local folder to remote folder, using a domain, an IP address and a server defined in the SSH configuration file:
rsync -rtvz source_folder/ user@domain:/path/to/destination_folder/
rsync -rtvz source_folder/ user@xxx.xxx.xxx.xxx:/path/to/destination_folder/
rsync -rtvz source_folder/ server_name:/path/to/destination_folder/

Remote folder to local folder, using a domain, an IP address and a server defined in the SSH configuration file:
rsync -rtvz user@domain:/path/to/source_folder/ destination_folder/
rsync -rtvz user@xxx.xxx.xxx.xxx:/path/to/source_folder/ destination_folder/
rsync -rtvz server_name:/path/to/source_folder/ destination_folder/

Excluding files and directories

There are many cases in which we need to exclude certain files and directories from rsync, a common case is when we synchronize a local project with a remote repository or even with the live site, in this case we may want to exclude some development directories and some hidden files from being transfered over to the live site. Excluding files can be done with --exclude followed by the directory or the file that we want to exclude. The source folder or the destination folder can be a local folder or a remote folder as explained in the previous section.

rsync -rtv --exclude 'directory' source_folder/ destination_folder/
rsync -rtv --exclude 'file.txt' source_folder/ destination_folder/
rsync -rtv --exclude 'path/to/directory' source_folder/ destination_folder/
rsync -rtv --exclude 'path/to/file.txt' source_folder/ destination_folder/

The paths are relative to the folder from which we are calling rsync unless it starts with a slash, in which case the path would be absolute.

Another way to do this is to create a file with the list of both files and directories to exclude from rsync, as well as patterns (all files that would match the pattern would be excluded, *.txt would exclude any file with that extension), one per line, and call this file with --exclude-from followed by the file that we want to use for the exclusion of files. First, we create and edit this file in our favorite text editor, in this example I use gedit, but you may use kate, Vim, nano, or any other text editor:

touch excluded.txt
gedit excluded.txt

In this file we can add the following:

directory
relative/path/to/directory
file.txt
relative/path/to/file.txt
/home/juan/directory
/home/juan/file.txt
*.swp
And then we call rsync:

rsync -rvz --exclude-from 'excluded.txt' source_folder/ destination_folder/

In addition to delete files that have been removed from the source folder, as explained in Synchronizing two folders with rsyncrsync can delete files that are excluded from the transfer, we do this with the parameter --delete-excluded, e.g.:

rsync -rtv --exclude-from 'excluded.txt' --delete-excluded source/ destination/

This command would make rsync recursive, preserve the modification times from the source folder, increase verbosity, exclude all the files that match the patterns in the file excluded.txt, and delete all of this files that match the patternif they exist in the destination folder.

Running rsync as a daemon when ssh is not available

This was moved to it’s own section, Running rsync as a daemon.

Some additional rsync parameters

-t Preserves the modification times of the files that are being transferred.
-q Suppress any non-error message, this is the contrary to -v which increases the verbosity.
-d Transfer a directory without recursing, this is, only the files that are in the folder are transferred.
-l Copy the symlinks as symlinks.
-L Copy the file that a symlink is pointing to whenever it finds a symlink.
-W Copy whole files. When we are using the delta-transfer algorithm we only copy the part of the archive that was updated, sometimes this is not desired.
--progress Shows the progress of the files that are being transferred.
-h Shows the information that rsync provides us in a human readable format, the amounts are given in K’s, M’s, G’s and so on.

Footnotes

The amount of options that rsync provide us is immense, we can define exactly which files we want to transfer, what specific files we want to compress, what files we want to delete in the destination folder if this files exists, and we can deal with system files as well, for more information we can use man rsync and man rsyncd.conf

I leave the information concerning backups out of this post, as this will be covered, together with the automation of the backups, in an incoming post.

It is possible to run rsync on Windows with the use of cygwin, however I don’t have a Windows box available at the moment (nor do I plan to aquire one in the foreseeable future), so even thought I have done it I can’t post about this. If you run rsync as a service in Windows tho, you need to add the line “strict mode = false” in rsyncd.conf under the modules area, this will prevent rsync from checking the permissions in the secrets file and thus failing because they are not properly set (as they don’t work the same as in Linux).

This post may be updated if there is something to correct or to add a little more information if I see it necessary.

 

ที่มา: https://www.jveweb.net/en/archives/2010/11/synchronizing-folders-with-rsync.html

ตั้งความถี่ MT1000

CH ความถี่ อธิบาย Power
1 144.725 ศรีสะเกษ H
2 144.9375 E20AE,RAST L
3 145.7125 Repeater SSK H
4 144.900 แจ้งเหตุ H
5 145.000 ช่องเรียกขาน H
6 145.7750 Echolink SSK L
7 144.625 ศรีสะเกษ-กล้วยไม้ H
8 144.850 ศรีสะเกษ850 H
9 147.000 ศรีสะเกษ7 H
10 162.800 อพปร. H
11 152.850 โพธิ์ทอง H
12 144.425 SSTV L

คู่มือฝรั่ง Wheel Gravity Generator

Note: If you are not at all familiar with basic electronics, you might find it easier to follow parts of this chapter if you read chapter 12 first.

It is generally not realised that excess energy can be obtained from pulsing a flywheel or other gravitational device.

This fact has recently been stressed by Lawrence Tseung who refers to the extra energy obtained in this way as being “Lead-out” energy.   This gravitational feature has been part of university Engineering courses for decades, where it has been taught that the loading stress on a bridge caused by a load rolling across the bridge is far less than the stress caused if that same load were suddenly dropped on to the bridge. Continue reading คู่มือฝรั่ง Wheel Gravity Generator

Wind Generator

มอเตอร์พลังแม่เหล็ก

ความรู้กังหันลม อ.บรรจง

Enable SSL for apache server in 5 minutes

This post describe how to quickly enable SSL for apache web server under linux. This has been done on a clouded virtual machine, the Linux distribution is Ubuntu 12.04 LTS Server, the one provided by Amazon Aws or Microsoft Azure. This procedure may not work or may differ on older or different distribution.

What need to be in place ?

You need to already have apache server running on http port 80 (or whatever) and when you try to go to your website for example http://demo.hallard.me you should have the well know page

It works!

This is the default web page for this server.

The web server software is running but no content has been added, yet.

Once this is ok, just go to your server with ssh

What do to ?

Ok let’s start where we will put the certificates (in /etc/apache2/ssl)

now we generate the certicates, for 3 years (1095 days) under the folder we created above.

that will show the following, and ask you some questions.

The most important, is the Common Name, it should match the internet name FQDN (here demo.hallard.me)

Now we install the SSL mod for apache, this instruction pre configure the file /etc/apache2/ports.conf with some line and the important one that say Listen 443

We put the default-ssl site available creating a symbolic link

Now we edit the file default-ssl (or default-ssl.conf for new version) we have just enabled

Edit October 2014 : on new apache2 version, configuration files need to have .conf extension, so in this case the two previous commands are now :

End of Edit

and we change the two lines relative to SSLCertificate as follow :

Now restart apache server

now you can go with your favorite browser, in my example https://demo.hallard.me, the browser will warn you because it is a self signed certificate, but if you accept it you will now have the same famous “It works!” but with encryption. To avoid warning by browser, you can add the certificate to Trusted Root Certificate Authority of your computer. The procedure to to this depends on browser and operating system, so google is your friend.

Now it is safe that you force SSL encryption on each page that require authentication.

For example, for WordPress, add the following two lines (just after the other existing define lines in the file wp-config.php (located in wordpress installation dir)

This will force each login to use SSL and all admin site to use SSL

You can do the same for phpmyadmin adding to the file /etc/phpmyadmin/config.inc.php

 

Continue reading Enable SSL for apache server in 5 minutes