Feeds:
பதிவுகள்
பின்னூட்டங்கள்

Required OS: Ubuntu 18.04 LTS

Target redis version: 3.0.6

1. Install required softwares and tools

sudo apt update

sudo apt install redis-server ruby redis-tools

Master Nodes: 

  • redis-master1 – 192.168.1.101
  • redis-master2 – 192.168.1.102
  • redis-master3 – 192.168.1.103

2. IP Address of the nodes

Slave Nodes

  • redis-slave1 – 192.168.1.104
  • redis-slave2 – 192.168.1.105
  • redis-slave3 – 192.168.1.106

3. To Create Redis Cluster (master-master-master) download following ruby tool ( so install redis library from gem repo)

wget https://github.com/seekasia/redis/raw/master/src/redis-trib-pass.rb

chmod +x redis-trib-pass.rb

sudo gem install redis -v 3.0.6

sudo ./redis-trib-pass.rb help

grep requirepass /etc/redis/redis.conf

requirepass mypassword

sudo ./redis-trib-pass.rb create –auth <cluter-password> MASTER1-IP:PortNo MASTER2-IP:PortNo …

sudo ./redis-trib-pass.rb create –auth mypassword 192.168.1.101:6379 192.168.1.102:6379 192.168.1.103:6379

4. Create slave for each master (master-slave):

In-order to create a master-slave cluster, you need to findout the master nodes ID, here is how to find

sudo redis-cli

auth mypassword

OK

> cluster nodes

note down the master-id and use it for master-slave creation

./redis-trib-pass.rb add-node –auth <cluster-password> –slave –master-id <master-node-uuid> SALVE-IP:PortNo MasterIP:PortNo

./redis-trib-pass.rb add-node –auth mypassword –slave –master-id 71d9ebaf2fb102959a3110a875800afb8472c747 192.168.1.104:6379 192.168.1.101:6379
./redis-trib-pass.rb add-node –auth mypassword –slave –master-id 53b90750c271adadb7934d36bb8e5f23fb3f4896 192.168.1.105:6379 192.168.1.102:6379
./redis-trib-pass.rb add-node –auth mypassword –slave –master-id d680676797c6c6bfae3a7d86e8a298e5fd9338c2 192.168.1.106:6379 192.168.1.103:6379

Here

71d9ebaf2fb102959a3110a875800afb8472c747 => redis-master1 ID

53b90750c271adadb7934d36bb8e5f23fb3f4896 => redis-master2 ID

d680676797c6c6bfae3a7d86e8a298e5fd9338c2 => redis-master3 ID

5. Verify cluster setup

sudo redis-cli

auth mypassword

OK

> cluster nodes

ரேபிட்எம்கியூ என்பது Erlang நிரலாக்க மொழியில் எழுதப்பட்ட ஒரு வகை தகவல் தரகர்(message broker) திறமூல மென்பொருள் ஆகும்.

ரேபிட்எம்கியூ கொத்தை அமைப்பதற்கு முன் உபுண்டு இயங்குதளத்தின் பொதி பட்டியலை புதுப்பிக்க பின்வரும் கட்டளைகளை இயக்குக.

sudo apt-get update
or
sudo apt update

ரேபிட்எம்கியூ சேவகன் பொதியை  நிறுவுக:

sudo apt-get install rabbitmq-server -y
or
sudo apt insatll rabbitmq-server -y

கட்டகத் தேவைுகள்:

3 கனிணிகள் மற்றும் அவை மூன்றும் ஒரே பிணையத்தின் கீழ் இணைந்திருத்தல் அவசியம்

rabbitmq1: 10.0.0.11/24 , rabbitmq2:10.0.0.12/24, மற்றும் rabbitmq3:10.0.0.13/24

3 கணினிகளிலும் /etc/hosts கோப்பில் பின்வரும் வரிகளைச் சேர்க்கவும்

10.0.0.11 rabbitmq1
10.0.0.12 rabbitmq2
10.0.0.13 rabbitmq3

மேற்கண்ட பொதியை நிறுவியப்பின்பு ரேபிட்எம்கியூ  சேவை இயக்கத்தில் இருக்கும். அதை அறிய பின்வரும் கட்டளைகளை செயல்படுத்தவும்,

root@arunx:~# rabbitmqctl status
Status of node ‘rabbit@arunx’ …
[{pid,28824},
{running_applications,
[{rabbitmq_management,”RabbitMQ Management Console”,”3.2.4″},
{rabbitmq_web_dispatch,”RabbitMQ Web Dispatcher”,”3.2.4″},
{webmachine,”webmachine”,”1.10.3-rmq3.2.4-gite9359c7″},
{mochiweb,”MochiMedia Web Server”,”2.7.0-rmq3.2.4-git680dba8″},
{rabbitmq_management_agent,”RabbitMQ Management Agent”,”3.2.4″},
{rabbitmq_web_stomp,”Rabbit WEB-STOMP – WebSockets to Stomp adapter”,
“3.2.4”},
{rabbitmq_stomp,”Embedded Rabbit Stomp Adapter”,”3.2.4″},
{rabbit,”RabbitMQ”,”3.2.4″},
{os_mon,”CPO CXC 138 46″,”2.2.14″},
{inets,”INETS CXC 138 49″,”5.9.7″},
{xmerl,”XML parser”,”1.3.5″},
{mnesia,”MNESIA CXC 138 12″,”4.11″},
{amqp_client,”RabbitMQ AMQP Client”,”3.2.4″},
{cowboy,”Small, fast, modular HTTP server.”,”0.5.0-rmq3.2.4-git4b93c2d”},
{sockjs,”SockJS”,”0.3.4-rmq3.2.4-git3132eb9″},
{sasl,”SASL CXC 138 11″,”2.3.4″},
{stdlib,”ERTS CXC 138 10″,”1.19.4″},
{kernel,”ERTS CXC 138 10″,”2.16.4″}]},
{os,{unix,linux}},
{erlang_version,
“Erlang R16B03 (erts-5.10.4) [64-bit] [async-threads:30] [kernel-poll:true]\n”},
{memory,
[{total,40754216},
{connection_procs,5264},
{queue_procs,5264},
{plugins,492720},
{other_proc,14611872},
{mnesia,94088},
{mgmt_db,8880},
{msg_index,33584},
{other_ets,1120832},
{binary,9696},
{code,19915177},
{atom,703377},
{other_system,3753462}]},
{vm_memory_high_watermark,0.4},
{vm_memory_limit,3349366374},
{disk_free_limit,50000000},
{disk_free,72792330240},
{file_descriptors,
[{total_limit,924},{total_used,4},{sockets_limit,829},{sockets_used,2}]},
{processes,[{limit,1048576},{used,314}]},
{run_queue,0},
{uptime,63398}]
…done.

ரேபிட்எம்கியூ கொத்தைக் கட்டமை / Configure RabbitMQ Cluster:

கொத்தைக் கட்டமைக்க 3 கணினிகள் தேவை rabbitmq1, rabbitmq2, மற்றும் rabbitmq3

rabbitmq1:

rabbitmq1 கணினியில் ரேபிட்எம்கியூ செயலிச் வேவையை நிறுத்துக

root@rabbitmq1:~# rabbitmqctl stop_app
​root@rabbitmq1:~# rabbitmqctl join_cluster rabbit@rabbitmq3
root@rabbitmq1:~# rabbitmqctl cluster_status
Cluster status of node ‘rabbit@rabbitmq2‘ …
[{nodes,[{disc,[‘rabbit@cdn-test1′,’rabbit@cdn-test2’,’rabbit@rabbitmq1‘]}]},
{running_nodes,[‘rabbit@cdn-test1′,’rabbit@cdn-test2’,’rabbit@rabbitmq1‘]},
{partitions,[]}]
…done.

rabbitmq2:

rabbitmq2 கணினியில் ரேபிட்எம்கியூ செயலிச் வேவையை நிறுத்துக

root@rabbitmq2:~# rabbitmqctl stop_app
​root@rabbitmq2:~# rabbitmqctl join_cluster rabbit@rabbitmq3
root@rabbitmq2:~# rabbitmqctl cluster_status
Cluster status of node ‘rabbit@rabbitmq2‘ …
[{nodes,[{disc,[‘rabbit@cdn-test1′,’rabbit@cdn-test2’,’rabbit@rabbitmq2‘]}]},
{running_nodes,[‘rabbit@cdn-test1′,’rabbit@cdn-test2’,’rabbit@rabbitmq2‘]},
{partitions,[]}]
…done.

First Clone your repo as shown below

git clone https://github.com/thamizha/thamizha-solthiruthi.git
As shown below, first enter 

git credential-store --file ~/.my-repo-credentials store
protocol=https
host=github.com
username=<your-github-username>
Hit Enter button now, you will exit from stdin and your settings will be stored. for further access to git for updates or code commits, it won't ask for password.

Credits: https://cinhtau.net/2018/02/06/configure-git-credentials/

How to install varnishbeat?

What is varnishbeat?

Beat is a elasticsearch beat plugin to ship the varnish shared memory(VSM) to Elasticsearch or Logstash or Apache Kafka or Redis or Local File system.

Reference: https://github.com/phenomenes/varnishbeat

 

Assumption:

I assume that you already installed varnish-cache and ELK on separate machines.

https://www.elastic.co/

https://www.varnish-cache.org/docs/5.0/installation/install.html#debian-ubuntu

 

Install GO 1.6+ on Varnish Cache instance

Follow the instruction as given in my blog post below

https://thangamaniarun.wordpress.com/2017/01/09/how-to-install-go-1-6-on-ubuntu-14-04-onwards/

Install Varnishbeat

Make sure go compiler and go env settings is already in place and git client installed on your varnish system.

# go version
go version go1.6 linux/amd64

#apt-get install -y git

# export | grep GO
declare -x GOPATH=”/root/varnishbeat”
declare -x GOROOT=”/root/go”

Install varnish beat now

#  go get github.com/phenomenes/varnishbeat

 

Run varnishbeat now

# /root/varnishbeat/bin/varnishbeat –help
Usage of /root/varnishbeat/bin/varnishbeat:
  -E value
        Configuration overwrite (default null)
  -N    Disable actual publishing for testing
  -c path
        Configuration file path (default /root/varnishbeat/bin/varnishbeat.yml)
  -configtest
        Test configuration and exit.
  -cpuprofile string
        Write cpu profile to file
  -d string
        Enable certain debug selectors
  -e    Log to stderr and disable syslog/file output
  -httpprof string
        Start pprof http server
  -memprofile string
        Write memory profile to this file
  -path.config value
        Configuration path
  -path.data value
        Data path
  -path.home value
        Home path
  -path.logs value
        Logs path
  -v    Log at INFO level
  -version
        Print the version and exit

 

வன்முறை குற்றங்களில் இந்தியர்களின் நிலை மிகவும் மோசமாக இருப்பது ஓர் அபாய அறிவிப்பு என்கிறார் சுவராம் மனித உரிமை இயக்கத்தின் தலைவர் கா. ஆறுமுகம்.

வன்முறை குற்றங்களுக்காக கைதாகும் மூவறில் ஒருவர் இந்தியர். மக்கள் தொகையில் சுமார் 7.2 விழுக்காடு சிறுபான்மையாக உள்ள இந்தியர்கள் வன்முறை குற்றங்களுக்காக கைதாகுபவர்களில் 33 விழுக்காடாக இருப்பது நமது சமூகம் ஒரு குற்றவாளிகளை கொண்டுள்ள சமூகம் என்ற முத்திரையை குத்துகிறது என்கிறார்.

இது நாடும் நமது சமுக தலைவர்களும் நமக்கிழைத்த ஒரு மாபெரும் கொடூரமான தண்டனை என்று அரசாங்கத்தையும் இந்திய அரசியல் தலைவர்களையும் கடுமையாக சாடுகிறார் ஆறுமுகம். “இவர்கள் வெட்கப்பட வேண்டும்”, என்கிறார்.

crime1கொலை, கற்பழிப்பு, ஆயுதம் தாங்கி கொள்ளை, குண்டர் கும்பலுடன் கொள்ளை, கடுமையான காயம் விளைவிக்கும் வகையிலான தாக்குதல் போன்ற குற்றசெயல்களுக்காக கடந்த ஆண்டு கைதான 23,186 நபர்களில் 7,746 நபர்கள் இந்தியர்கள், 2,774 சீனர்கள் 12,666 மலாய்கார்ர்கள். மக்கள் தொகையில் சீனர்கள் 23.7 விழுக்காடு மலாய்காரர்கள் 55.1 விழுக்காடாகும்.

இந்த தகவல்கள் கடந்த ஏப்ரல் 15-ஆம் தேதி உள்துறை அமைச்சரால் நாடாளுமன்றத்தில் எழுத்து மூலமாக வழங்கப்பட்டதாகும்.

இதற்கு முன்பு உள்ள ஒரு பழைய தகவல், 2004-இல் சிப்பாங் ரெங்கத்தில் அவசர கால சட்டத்தின் (EO) கீழ் தடுப்புகாவலில் இருந்த 702 நபர்களில் 316 பேர் இந்தியர்கள், 111 சீனர்கள், மீதம் 111 பேர் மலாய்காரர்கள். இது 45 விழுக்காடாகும். அதே காலக்கட்டத்தில் குண்டர்கும்பல் சார்பான அரசாங்க அறிக்கை (Journal of the KL Royal Malaysia Police College, No 4, 2005) அடையாளம் காணப்பட்ட 123 குண்டர் கும்பல்களில் 92 இந்தியர்களுடையது என்கிறது.

இந்த வன்முறைகளால் அதிகமாக பாதிப்படைவதும் இந்தியர்கள்தான் என் கிறார் ஆறுமுகம். நெகிரி செம்பிலானின் 2014-இல் நடத்தப்பட்ட ஓர் ஆய்வில் (Health and the Environment Journal 2014, Vol 5, No2, PP41-56 –USM)   வன்முறையால் பாதிக்கப் பட்ட 193 நபர்களில் 73 நபர்கள் இந்தியர்காள், அதாவது 38 விழுகாட்டினர் இந்தியர்கள்.

கோடாரியே காம்பை வெட்டும் இந்த வேதனையான நிலைக்கான காரணங்களை கண்டு பிடிப்பது ஒரு ராக்கெட் அறிவியல் கிடையாது, என்கிறார் வழக்கறிஞருமான ஆறுமுகம்.

பலவகையான ஆய்வுகளை பல்கலைகழகங்களும், சமூக இயக்கங்களும், மஇகா உட்பட அரசாங்க குற்றவியல் பிரிவுகளும் மேற்கொண்டு காரணங்களை தொகுத்துள்ளன.

1 hindrafதோட்டப்புறத்திலிருந்து நாட்டின் மேம்பாட்டுக்காக வெளியேற்றப்பட்ட மக்கள், வீடுகளையும் வேலையையும் மட்டும் இழக்கவில்லை, அவர்கள் தங்களின் வாழ்வியலுக்கு நம்பிக்கை கொடுத்து வந்த பால் மரங்கள், செம்பணைமரங்கள், கோயில், சுற்றார், உற்றார் உறவினர், பழக்க வழக்கமாகி போன தோட்டப்புற பண்பாடு இவற்றை இழந்ததால் உருவான வாழ்வு மாற்றம் அவர்களை வெருமையாக்கியது, ஒதுக்கியது. நகர்புற வாழ்க்கைக்கு தகுந்த வருமானம் அற்ற சுழல் ஒருபுறம். மறுபுறம் குறைந்த சம்பள கீழ்மட்ட வேலைகள் அவர்களை மேலும் வறுமையில் தள்ளியது.

குழந்தைகளுக்கு முறையான கல்வி பெற வாய்ப்பில்லாத சூழல், கல்வி தேர்ச்சியில் மாணவர்களை பின்தங்க வைத்தது அல்லது அவர்கள் பள்ளிகளை விட்டு நின்று விட்டனர் அல்லது நீக்கப்பட்டனர்.

மனோவியல் தாக்கமும் மதிக்கப்படாத சூழலும் தாழ்வு மனப்பாண்மைக்கு வித்திட்டது. ஒரு நம்பிக்கையற்ற சூழல் இவர்களை கவ்வியது. முறையான வாழ்கை கிடைக்காது என்ற எண்ண உருவாக, நீதியாகவும் நேர்மையாகவும் வாழ வேண்டிய வாய்ப்புகள் கை நழுவின. இவை குற்றவாளிகள் உருவாகும் சூழ்நிலைகளை அதிகப்படுதியது.

அதோடு அரசாங்கத்தின் குற்றவியல் பிரிவின் ஆய்வின் படி (Journal of the KL Royal Malaysia Police College, No 4, 2005) 2003-இல் சிறையில் இருந்த 49,243 கைதிகளில் 90 விழுக்காட்டினரின் மாதாந்திர சம்பளம் ரிம 1,000 க்கு குறைவானது என்கிறது. இது வறுமை ஒரு முக்கியமான காரணம் என்பதை உறுதிப் படுத்துகிறது.

அரசாங்கமும் அரசியல் தலைவரும் அடைபடையான காரணங்களை அறிந்தவர்கள். ஆனால், கொள்கை அளவில் அதிகமாக எதையும் செய்யவில்லை. புண்ணுக்கு மருந்துபோடும் போக்கோடு செயல்படும் இவர்கள், பள்ளிகளைவிட சிறைசாலைகளைதான் அதிகம் கட்டுவார்கள். இவர்கள்தான் குற்றவாளிகளை உருவாக்கும் குற்றவாளிகள் என்கிறார் ஆறுமுகம்.

கட்டுரையின் மூலம்: https://malaysiaindru.my/123039

Video Capture Sequence of V4L2 IOCTL Calls

Optional IOCTL

1. VIDIOC_QUERYCAP    | struct v4l2_capability
2. VIDIOC_CROPCAP    | struct v4l2_cropcap
3. VIDIOC_ENUM_FMT    | struct v4l2_fmtdesc

Necessary IOCTL

Initialize Video Device
1. VIDEOIC_S_FMT     | struct v4l2_format
2. VIDEOIC_G_FMT     | struct v4l2_format

Memory Mapping/Buffering
3. VIDEOIC_REQBUFS    | struct v4l2_requestbuffers
4. VIDEOIC_QUERYBUF    | struct v4l2_buffer

Start Capturing
5. VIDEOIC_QBUF        | struct v4l2_buffer
6. VIDEOIC_STREAMON    | struct v4l2_buffer

Exchanging Buffer
7. VIDEOIC_DQBUF
8. VIDEOIC_QBUF

Stop Capturing
9. VIDEOIC_STREAMOFF

Porting OpenvSwitch to FitPC2i is not a quite easy job.

FitPC2i Spec:

  • Intel(R) Atom(TM) CPU Z530 @ 1.60GHz
  • 1 GB RAM
  • 500GB HDD
  • 2 NIC(RealTek)

step0
Install Ubuntu 12.04-5 Server Linux on FitPC2i from here

step0.1
#Make sure you are connected to Internet. In my case connected eth1(eth0) to Internet
sudo dhclient eth0

setp0.2
#Ping thamizha.org
ping thamizha.org
64 bytes from pages.github.com (xxx.yyy.zzz.aaa): icmp_req=1 ttl=56 time=268 ms

step1
sudo apt-get install -y automake autoconf uml-utilities git libtool python-simplejson pkg-config build-essential

step2
wget http://openvswitch.org/releases/openvswitch-2.3.0.tar.gz
tar zxvf openvswitch-2.3.0.tar.gz
cd openvswitch-2.3.0

step3
./boot.sh
./configure –with-linux=/lib/modules/`uname -r`/build

step4
#It might take 8-10 minutes to compile.
make

step5
#If you want to install to system follow next step
make install

step6
#Load the OVS Kernel Module
insmod datapath/linux/openvswitch.ko

Now you are ready to create vSwitch on FitPC2i

கணினித்  தமிழுக்குச்  சப்பான் தமிழ்ச்  சங்கத்தின் பங்களிப்பு

கணினித் தமிழின் பங்கை மேம்படுத்தும் முயற்சியின் முதற்கட்டமாக ஆவணக்களம் எனும் தளம்மூலம் தமிழ் விக்கிப்பீடியாவிற்கு நமது பங்களிப்பைத் தொடங்குவோம்

தங்களுக்கும் விக்கிப்பீடியா தமிழில் கட்டுரைகள் உருவாக்க விருப்பமா?

எளிய zoom விளக்கக் கலந்தாய்வுக் காணொளிமூலம் விக்கிப்பீடியா தமிழ்க் கட்டுரைகள் எழுதும் பயிற்சிபற்றி விளக்க உள்ளோம்.

சிறப்பு விருந்தினர்

முனைவர் திரு.செ.இரா.செல்வக்குமார்

மின்னியல் கணினி பொறியியல்துறை

வட்டார்லூ பல்கலைக்கழகம், கனடா

நிகழ்வு நேரம்

தேதி : 19 ஜூலை ஞாயிறு (19 Jul Sunday)

நேரம்  : காலை 10.30 Hrs JST முதல் (10.30 Hrs JST)

நிகழ்வு விளக்கம்:

1. விக்கிப்பீடியா தமிழ்த் கட்டுரைகள் – உருவாகும் விதம்பற்றி விக்கிப்பீடியாவில் பணிபுரியும் கல்வியாளர் உரை

  – புதிய கட்டுரைகள் எழுதுதல்

  –  தரவுகள் & சான்றுகள் சேர்த்தல் (citations)

  –  பழைய கட்டுரைகள் தமிழாக்கம்

2. விக்கிபீடியா உள்ளடக்கங்கள் – எழுதுமுறை, பதிவேற்றும் & அனுபவப்பகிர்வு –  சப்பான் தமிழ்ச் சங்கம்

3. சப்பான் தமிழ்ச் சங்கத்தின்

           –  தரச்சோதனை & செயல்முறை (Process)

           – இலக்கு

           – சான்றிதழ்கள்/ பரிசுகள்

4. பங்கெடுப்போர் எழுத விரும்பும் கட்டுரை வகைகள் (எடுத்துக்காட்டுகள்) உங்கள் பெயர் மற்றும் பங்கெடுப்பு விவரங்களைக் கீழே உள்ள படிவத்தில் நிரப்பவும். https://forms.gle/CH3yzvdhcd88NooLA 

சுமார் 50 பேர் Zoom இணையக் கூட்டத்தில் பங்கெடுத்தனர்

பிழைகள்/Error: dmesg கட்டளையின் கடைசி 4 வரிகள்

[ 306.140067] EXT4-fs (vda1): error count since last fsck: 2
[ 306.140096] EXT4-fs (vda1): initial error at time 1522993704: __ext4_get_inode_loc:4100: inode 6555: block 570
[ 306.140104] EXT4-fs (vda1): last error at time 1522993704: ext4_reserve_inode_write:5151: inode 6555: block 570
[10263.817652] EXT4-fs (vda1): Couldn’t remount RDWR because of unprocessed orphan inode list. Please umount/remount instead

தீர்வு/Solution:

கனிணியின் சேமிப்பக முறைமை சேதமடைந்ததால் மேற்கொண்டு கோப்புகளை உருவாக்கவோ மாற்றவோ முடியாது. ஆகவே கோப்பு முறைமையை  பின்வரும் கட்டளை வரிகளைக்  கொண்டு சரி செய்தல் அவசியம்

Since your file system is in read-only mode, you can not just remount with RW permissions. First, you must clean the orphaned inodes from your file system.

sudo su –

fsck -y /dev/vda1

#Here sda/vda means your hard-disk device name 1-partition number

Download

# curl -O https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz
# cd ~/

Install GO 1.6

To Install extract the tar file and add the envrionment paths to your .bashrc file or directly into bash shell to run go

# tar -zxvf go1.6.linux-amd64.tar.gz
# export GOROOT=$HOME/go
# export GOPATH=$HOME/go-project
# export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

Verify GO installation

# go version
go version go1.6 linux/amd64

Go Installation Done!. Go get github.com/go/projects and test it.

 

Host Details

smtp-host: 10.0.0.100 [ubuntu 14.04]
client-host: 10.0.0.50 [ubuntu 14.04]
relayhost: Pub IP address [Your/ISP relay host IP]
Error: Relay access denied @client-host

1st Try: Send Email from Command Line Telnet

ubuntu@client-host:~$ telnet stmp-host 25
Trying 10.0.0.50…
Connected to stmp-host.
Escape character is ‘^]’.
220 stmp-host ESMTP Postfix (Ubuntu)
MAIL FROM: sender@myemaildomain.com.jp
250 2.1.0 Ok
RCPT TO: receiver@myemaildomain.com.jp
454 4.7.1 <receiver@myemaildomain.com.jp>: Relay access denied

Error @ SMTP Server: /var/log/mail.log

Dec  7 12:50:33 smtp-host postfix/smtpd[26446]: connect from client-host[10.0.0.50]
Dec  7 12:51:40 smtp-host postfix/smtpd[26446]: NOQUEUE: reject: RCPT from client-host[10.0.0.50]: 454 4.7.1 <receiver@myemaildomain.com.jp>: Relay access denied; from=<sender@myemaildomain.com.jp> to=<receiver@myemaildomain.com.jp> proto=SMTP helo=<myemaildomain.com.jp>
Dec  7 12:51:58 smtp-host postfix/smtpd[26446]: disconnect from client-host[10.0.0.50]

 

Current /etc/postfix/main.cf config @ smtp-host:

# This file is managed by salt – do not edit localy, changes will be overwritten.
#
# See /usr/share/postfix/main.cf.dist for a commented, more complete version

# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA’s job.
append_dot_mydomain = no

# Uncomment the next line to generate “delayed mail” warnings
#delay_warning_time = 4h

readme_directory = no

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = client-host
myorigin = client-host
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

mydestination = mail.1nc, localhost.localdomain, localhost, client-host
relayhost = relayhost-ip-address
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128  192.168.1.0/24
mailbox_size_limit = 0
recipient_delimiter = +

Soultion:

Allow Client network 10.0.0.0/24 in smtp-hos: /etc/postfix/main.cf

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128  192.168.1.0/24

To

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128  192.168.1.0/24 10.0.0.0/24

sudo service postfix restart

2nd Try: Send Email from Command Line Telnet

ubuntu@client-host:~$ telnet smtp-host 25
Trying 10.0.0.100…
Connected to smtp-host.
Escape character is ‘^]’.
220 smtp-host ESMTP Postfix (Ubuntu)
HELO myemaildomain.com.jp
250 smtp-host
MAIL FROM: sender@myemaildomain.com.jp
250 2.1.0 Ok
RCPT TO: receiver@myemaildomain.com.jp
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
Subject: Test Email
Please Confirm..Testing
Bye from e-mail client host
Thanks
.
250 2.0.0 Ok: queued as 0B81B46041
QUIT
221 2.0.0 Bye
Connection closed by foreign host.

E-mail Sent – Successfully

Dec  7 13:42:08 smtp-host postfix/smtpd[26971]: connect from client-host[10.0.0.50]
Dec  7 13:42:08 smtp-host postfix/smtpd[26971]: 0B81B46041: client=client-host[10.0.0.50]
Dec  7 13:42:08 smtp-host postfix/cleanup[26976]: 0B81B46041: message-id=<642190740.2.1481089328039.JavaMail.root@client-host>
Dec  7 13:42:08 smtp-host postfix/qmgr[26941]: 0B81B46041: from=<sender@myemaildomain.com.jp>, size=666, nrcpt=1 (queue active)
Dec  7 13:42:08 smtp-host postfix/smtpd[26971]: disconnect from client-host[10.0.0.50]
Dec  7 13:42:08 smtp-host postfix/smtp[26978]: 0B81B46041: to=<receiver@myemaildomain.com.jp>, relay=relayhost-ip-address[relayhost-ip-address]:25, delay=0.19, delays=0.01/0/0.01/0.17, dsn=2.6.0, status=sent (250 2.6.0 <642190740.2.1481089328039.JavaMail.root@client-host> [InternalId=720659] Queued mail for delivery)
Dec  7 13:42:08 smtp-host postfix/qmgr[26941]: 0B81B46041: removed

 

Thats all, the above setup was tested using LXC containers on Ubuntu 14.04 LTS.

What is Keepalived ?

Keepalived is a routing software written in C. The main goal of this project is to provide simple and robust facilities for loadbalancing and high-availability to Linux system and Linux based infrastructures. Loadbalancing framework relies on well-known and widely used Linux Virtual Server (IPVS) kernel module providing Layer4 loadbalancing. Keepalived implements a set of checkers to dynamically and adaptively maintain and manage loadbalanced server pool according their health. On the other hand high-availability is achieved by VRRP protocol. VRRP is a fundamental brick for router failover.

Visit here for more details : http://www.keepalived.org/

Pre-requirements

  1. Additional Packages required to build/compile keepalived from sourcesudo apt-get install build-essential libssl-dev keepalived psmisc
  2. Move Installed keepalivedmv /usr/sbin/keepalived /usr/sbin/keepalived.orig
  3. Change keepalived service script:

    vi /etc/init.d/keepalived

    Modify the path: “DAEMON=/usr/sbin/keepalived” to “DAEMON=/usr/local/sbin/keepalived”

  4. Need Additional 1 Virtual IP(VIP) address on top of existing IP

Download Source Code

sudo apt-get install wget

wget wget http://www.keepalived.org/software/keepalived-1.2.13.tar.gz

tar -zxvf keepalived-1.2.13.tar.gz

Build and Install from Source Code

cd keepalived-1.2.13
./configure
make
make install
keepalived -v
Keepalived v1.2.13 (11/30,2016)

Start Keepalived

/etc/init.d/keepalived start

Or

service keepalived start/restart/stop

Error :

Nov 30 15:25:39 node-2 Keepalived[14392]: Starting Keepalived v1.2.13 (11/30,2016)
Nov 30 15:25:39 node-2 Keepalived[14393]: Starting Healthcheck child process, pid=14395
Nov 30 15:25:39 node-2 Keepalived[14393]: Starting VRRP child process, pid=14396
Nov 30 15:25:39 node-2 Keepalived_healthcheckers[14395]: Initializing ipvs 2.6
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Registering Kernel netlink reflector
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Registering Kernel netlink command channel
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Registering gratuitous ARP shared channel
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Opening file ‘/etc/keepalived/keepalived.conf’.
Nov 30 15:25:39 node-2 modprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file ‘/lib/modules/3.19.0-26-generic/modules.dep.bin’
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Configuration is using : 63166 Bytes
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: Using LinkWatch kernel netlink reflector…
Nov 30 15:25:39 node-2 Keepalived_vrrp[14396]: VRRP_Instance(V1) Entering BACKUP STATE
Nov 30 15:25:39 node-2 Keepalived_healthcheckers[14395]: IPVS: Can’t initialize ipvs: Protocol not available
Nov 30 15:25:39 node-2 Keepalived[14393]: Healthcheck child process(14395) died: Respawning

Solution:

sudo modprobe ip_vs

service keepalived restart

Further Details will be updated, stay tuned.

 

 

Install MySQL 5.6.x

I have installed Ubuntu 14.10 server x64 on my server. After the installation I installed MySQL Server 5.6.34

sudo apt-get install mysql-server-5.6 mysql-client-5.6 mysql-client-core-5.6

Installation was successful but I noticed the following issues with MySQL-5.6. Using sudo service mysql start and sudo service mysql stop the database starts and stops correctly. But when I use sudo /etc/init.d/mysql stop the database service stops and than it gets spawn again automatically without any user input. Using ps -A | grep mysql I noticed that the spawn gets a new PID.

Have you noticed this issue with mysql. For the same reason mysqladmin -u root -p shutdown does the same thing as sudo /etc/init.d/mysql stop

 

Solution

sudo stop mysql

That’s it. Mysql process stopped without any error.

Sources:

http://www.itfromscratch.com/how-to-stop-the-percona-mysql-server/
http://askubuntu.com/questions/399537/mysql-script-does-not-stop-reboots-mysql

 

திருக்குறள் :: பொருட்பால் :: அரசியல் :: அறிவுடைமை: 423

எப்பொருள் யார்யார்வாய்க் கேட்பினும் அப்பொருள்
மெய்ப்பொருள் காண்ப தறிவு.

எந்தவொரு பொருள்குறித்து எவர் எதைச் சொன்னாலும், அதை அப்படியே நம்பி ஏற்றுக் கொள்ளாமல் உண்மை எது என்பதை ஆராய்ந்து தெளிவதுதான் அறிவுடைமையாகும்.

 

What is Nginx ?

nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server, originally written by Igor Sysoev. For a long time, it has been running on many heavily loaded Russian sites including Yandex, Mail.Ru, VK, and Rambler. According to Netcraft, nginx served or proxied 27.80% busiest sites in October 2016. Here are some of the success stories: Netflix, WordPress.com, FastMail.FM.

The sources and documentation are distributed under the 2-clause BSD-like license.

Community website here.

Commercial support is available from Nginx, Inc.

How to Install Nginx from Ubuntu repository ?

sudo apt-get install nginx
nginx -v
nginx version: nginx/1.4.6

Here 1.4.6 is very old and stable release of Nginx. So then how to install the latest version.

Install Nginx Version 1.9.x/1.10.x/1.11.x:

Add repository URLs to “/etc/apt/sources.list.d/nginx.list”
deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx
debsrc http://nginx.org/packages/mainline/ubuntu/ trusty nginx

Now add nginx signing key

wget q O http://nginx.org/keys/nginx_signing.key | sudo aptkey add

Update your system to latest package in nginx repos
sudo apt-get update
Install latest nginx
sudo apt-get install nginx
Now you can see v1.11.5 has been installed on you machine
nginx -v
nginx version: nginx/1.11.5