aws etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
aws etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

10 Nisan 2018 Salı

Linux System check


Linux System check in 60 seconds 

$uptime
The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.

$dmesg | tail
dmesg is used to examine or control the kernel ring buffer.
The default action is to display all messages from the kernel ring buffer.

$vmstat 1
 vmstat reports information about processes, memory, paging, block IO, traps, disks and cpu activity.

$mpstat -P ALL 1
The mpstat command writes to standard output activities for each available processor, processor 0 being the first one.  Global average activities among all processors are also reported.  The mpstat com‐
       mand can be used both on SMP and UP machines, but in the latter, only global average activities will be printed. If no activity has been selected, then the default report is the CPU utilization report.

$pidstat 1
 The pidstat command is used for monitoring individual tasks currently being managed by the Linux kernel.  It writes to standard output activities for every task selected with option -p or for every task
       managed  by  the  Linux kernel if option -p ALL has been used. Not selecting any tasks is equivalent to specifying -p ALL but only active tasks (tasks with non-zero statistics values) will appear in the
       report.

$iostat -xz 1
 The iostat command is used for monitoring system input/output device loading by observing the time the devices are active in relation to their  average  transfer  rates.  The  iostat  command  generates
       reports that can be used to change system configuration to better balance the input/output load between physical disks.

$free -m
free  displays  the  total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel. The information is gathered by parsing /proc/meminfo.

$sar -n DEV 1
$sar -n TCP,ETCP 1
The  sar command writes to standard output the contents of selected cumulative activity counters in the operating system. The accounting system, based on the values in the count and interval parameters,
       writes information the specified number of times spaced at the specified intervals in seconds.  If the interval parameter is set to zero, the sar command displays the average  statistics  for  the  time
       since  the system was started. If the interval parameter is specified without the count parameter, then reports are generated continuously.  The collected data can also be saved in the file specified by
       the -o filename flag, in addition to being displayed onto the screen. If filename is omitted, sar uses the standard system activity daily data file (see below).  By default all the data  available  from
       the kernel are saved in the data file.

28 Eylül 2017 Perşembe

PowerDNS Amazon Linux Installation

Standalone PowerDns & Poweradmin sqlite Installation notes;

Repository Configuration for Amazon Linux;


$ sudo curl -o /etc/yum.repos.d/powerdns-auth-40.repo https://repo.powerdns.com/repo-files/centos-auth-40.repo
$ sudo curl -o /etc/yum.repos.d/powerdns-rec-40.repo https://repo.powerdns.com/repo-files/centos-rec-40.repo
$ sudo vi /etc/yum.repos.d/powerdns-auth-40.repo
#baseurl=http://repo.powerdns.com/centos/$basearch/$releasever/auth-40
Replace  above to bottom url
baseurl=https://repo.powerdns.com/centos/x86_64/6Server/auth-40/
$ sudo vi /etc/yum.repos.d/powerdns-rec-40.repo
#baseurl=http://repo.powerdns.com/centos/$basearch/$releasever/rec-40
Replace  above to bottom url
baseurl=https://repo.powerdns.com/centos/x86_64/6Server/rec-40/
$sudo yum update

PowerDns Installation for Amazon Linux;

$sudo yum install pdns pdns-recursor pdns-tools pdns-backend-sqlite
$sudo mv /etc/pdns/pdns.conf /etc/pdns/pdns.conf.orig
$sudo mv /etc/pdns-recursor/recursor.conf /etc/pdns-recursor/recursor.conf.orig
$sudo vi /etc/pdns/pdns.conf
launch=gsqlite3
gsqlite3-database=/etc/pdns/pdns.sqlite3
allow-axfr-ips=0.0.0.0/0
disable-axfr=no
allow-recursion=0.0.0.0/0
recursor=127.0.0.1:5353

local-address=0.0.0.0
local-port=53

$sudo vi /etc/pdns-recursor/recursor.conf
local-address=127.0.0.1
local-port=5353
allow-from=0.0.0.0/0

$sudo sqlite3 /etc/pdns/pdns.sqlite3 < /usr/share/doc/pdns/schema.sqlite3.sql
$sudo chmod 0777 /etc/pdns/
$sudo chmod 0666 /etc/pdns/pdns.sqlite3
$sudo service pdns start
$sudo service pdns-recursor start

PowerAdmin Installation for Amazon Linux;

$sudo yum install httpd php php-pdo php-mcrypt
$ tar xvfz poweradmin-2.1.7.tgz
$sudo mv poweradmin-2.1.7 /var/www/html/poweradmin
$sudo chown -R apache:apache /var/www/html/poweradmin/
$sudo service httpd start

Installation will complete via web browser

Add to startup configuration;


$sudo chkconfig pdns on
$sudo chkconfig pdns-recursor on
$sudo chkconfig httpd on
$sudo chkconfig --list