linux: Upgrade xdebug on Ubuntu 14.04

Follow these steps to upgrade xdebug on Ubuntu 14.04

 

  1. php -i > ~/phpinfo
  2. Copy content of ~/phpinfo and paste into http://xdebug.org/wizard.php
  3. Follow those steps:

    1. Download xdebug-2.3.3.tgz
    2. tar -xvf xdebug-2.3.3.tgz
    3. cd xdebug-2.3.3/
    4. phpize && ./configure && make
    5. sudo cp modules/xdebug.so /usr/lib/php5/20131226/

 

ArchLinux: Running jenkins as another user

To minimize maintenance I wanted to run Jenkins as a different user that I already use for other services, as to avoid permission control hell and ssh-config hell as well.

So here's what I did:

 

Let's say the user you want is called "johndoe" and it has an userid=2000 and groupid=2004 in your box, do this:

1. Edit /etc/password

jenkins:x:2000:2004::/var/lib/jenkins:/bin/bash

 

 

2. Change permissions so they reflect the new ID

 

chown jenkins:jenkins -Rv /var/cache/jenkins/
chown -Rv jenkins:jenkins /var/lib/enkins/

 

 

I wrote this last minute and after altering things for the second time, (things got a bit reverted after upgrading Jenkins in my Archlinux home server); so let me know if this doesn't work for you and I'll check.

 

 

Mapping multiple domains to different nodejs ports using nginx

At the moment of this writing, I only have one VPS, so it wouldn't take long for me to be running more than 1 node app in it.

Since I want to keep all of them working in this semi-production environment (and in a box I have at home). node cannot be using the same port and I don't want to keep stop/restarting an app everytime I'm working on it.

 

Since I've been pretty happy using nginx as a reverse proxy for Apache and a nodejs, then I decided to keep using it and figure how to have multiple nodejs apps running.

 

My scenario, (YMMV):

– I want to have mutiple domains resolving to the same box

– I don't want to change the URL for socket.io

– I know I need to use different ports for different nodejs apps

 

So after googling for a while and discovering that IF is evil. I stumble upon "map" which let me do exactly what I wanted:

Here's the relevant sections of nginx.com (the names have been changed to protect the innocents)

 

http {
.
.
.
    map $http_host $custom_nodejs_port {
        default 50000;
        domain1.com   50000;
        domain2.com   30000;
    }
.
.

server {
        location /socket.io/ {
            rewrite ^/node(.*)$ $1 break;
            proxy_pass http://127.0.0.1:$custom_nodejs_port;

            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";

            proxy_set_header Host $host;
        }
.
.
}

This way I can have multiple nodejs applications running in different ports and nginx will map connections to different domains to them.

The only downside is that I need to reload the config and it's not automatic. Maybe soon…..

 

 

 

Archlinux: Setting up SALT Stack

Setup a salt stack server to keep all your computers properly configure when you reformat them:

 

 

1. Install SALT on a box that is accessible from anywhere that will become your salt master:

 

# pacman -S salt
resolving dependencies...
looking for inter-conflicts...

Packages (19): apache-libcloud-0.14.1-1  libsodium-0.5.0-1  libxslt-1.1.28-3  libyaml-0.1.6-1  python2-crypto-2.6.1-2  python2-jinja-2.7.3-1 python2-lxml-3.3.5-1  python2-m2crypto-0.22.3-1  python2-markupsafe-0.23-1  python2-msgpack-0.4.2-1  python2-psutil-2.1.1-1 python2-pyzmq-14.3.0-1  python2-requests-2.3.0-1  python2-setuptools-4.0.1-1  python2-systemd-212-2  python2-yaml-3.11-1  sshpass-1.05-1 zeromq-4.0.4-3  salt-2014.1.4-1

Total Download Size:    6.72 MiB
Total Installed Size:   43.49 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages ...
 python2-crypto-2.6.1-2-x86_64                                     374.6 KiB   916K/s 00:00 [######################################################] 100%
 python2-setuptools-4.0.1-1-any                                    319.4 KiB  3.80M/s 00:00 [######################################################] 100%
 python2-markupsafe-0.23-1-x86_64                                   23.2 KiB  0.00B/s 00:00 [######################################################] 100%
 libxslt-1.1.28-3-x86_64                                           352.2 KiB  4.25M/s 00:00 [######################################################] 100%
 python2-lxml-3.3.5-1-x86_64                                       659.8 KiB  7.76M/s 00:00 [######################################################] 100%
 python2-jinja-2.7.3-1-any                                         255.6 KiB   250M/s 00:00 [######################################################] 100%
 python2-m2crypto-0.22.3-1-x86_64                                  173.6 KiB  0.00B/s 00:00 [######################################################] 100%
 python2-msgpack-0.4.2-1-x86_64                                     54.2 KiB  0.00B/s 00:00 [######################################################] 100%
 python2-psutil-2.1.1-1-x86_64                                      88.0 KiB  0.00B/s 00:00 [######################################################] 100%
 libsodium-0.5.0-1-x86_64                                          141.0 KiB  0.00B/s 00:00 [######################################################] 100%
 zeromq-4.0.4-3-x86_64                                             532.6 KiB   130M/s 00:00 [######################################################] 100%
 python2-pyzmq-14.3.0-1-x86_64                                     262.8 KiB   128M/s 00:00 [######################################################] 100%
 python2-systemd-212-2-x86_64                                       42.1 KiB  0.00B/s 00:00 [######################################################] 100%
 python2-requests-2.3.0-1-any                                      304.4 KiB   149M/s 00:00 [######################################################] 100%
 libyaml-0.1.6-1-x86_64                                             53.0 KiB  0.00B/s 00:00 [######################################################] 100%
 python2-yaml-3.11-1-x86_64                                        127.0 KiB  62.0M/s 00:00 [######################################################] 100%
 apache-libcloud-0.14.1-1-any                                      935.8 KiB  10.9M/s 00:00 [######################################################] 100%
 sshpass-1.05-1-x86_64                                               6.9 KiB  0.00B/s 00:00 [######################################################] 100%
 salt-2014.1.4-1-any                                                 2.1 MiB  12.9M/s 00:00 [######################################################] 100%
(19/19) checking keys in keyring                                                            [######################################################] 100%
(19/19) checking package integrity                                                          [######################################################] 100%
(19/19) loading package files                                                               [######################################################] 100%
(19/19) checking for file conflicts                                                         [######################################################] 100%
(19/19) checking available disk space                                                       [######################################################] 100%
( 1/19) installing python2-crypto                                                           [######################################################] 100%
( 2/19) installing python2-setuptools                                                       [######################################################] 100%
( 3/19) installing python2-markupsafe                                                       [######################################################] 100%
( 4/19) installing python2-jinja                                                            [######################################################] 100%
( 5/19) installing python2-m2crypto                                                         [######################################################] 100%
( 6/19) installing python2-msgpack                                                          [######################################################] 100%
( 7/19) installing python2-psutil                                                           [######################################################] 100%
( 8/19) installing libsodium                                                                [######################################################] 100%
( 9/19) installing zeromq                                                                   [######################################################] 100%
(10/19) installing python2-pyzmq                                                            [######################################################] 100%
(11/19) installing libxslt                                                                  [######################################################] 100%
(12/19) installing python2-lxml                                                             [######################################################] 100%
Optional dependencies for python2-lxml
    python2-beautifulsoup3: support for parsing not well formed HTML
    python-lxml-docs: offline docs
(13/19) installing python2-systemd                                                          [######################################################] 100%
(14/19) installing python2-requests                                                         [######################################################] 100%
Optional dependencies for python2-requests
    python2-ndg-httpsclient: HTTPS requests with SNI support
    python2-grequests: asynchronous requests with gevent
(15/19) installing libyaml                                                                  [######################################################] 100%
(16/19) installing python2-yaml                                                             [######################################################] 100%
==> Note that even though this package uses libyaml library,
==> slower pure python implementation is used by default.
==> See http://pyyaml.org/wiki/PyYAMLDocumentation
(17/19) installing apache-libcloud                                                          [######################################################] 100%
(18/19) installing sshpass                                                                  [######################################################] 100%
(19/19) installing salt                                                                     [######################################################] 100%
Optional dependencies for salt
    dmidecode: decode SMBIOS/DMI tables
[root@www ~]#

 

 

2. Create a folder to store your Salt states:

 

# mkdir -p /srv/salt

 

 

3. Create a few simple files to get started:

# cat top.sls
base:
  '*':
    - yajl
    - ntp
    - ssh

 

# cat yajl.sls
yajl:
  pkg:
    - name: yajl
    - installed

 

# cat ntp.sls
ntp:
  service:
    - name: ntpd
    - running
    - enable: True
    - reload: True
    - watch:
      - pkg: ntp
  pkg:
    - installed

 

 

# cat ssh.sls
ssh:
  service:
    - name: sshd
    - running
    - enable: True
    - reload: True
    - watch:
      - pkg: ssh
  pkg:
    - name: openssh
    - installed

 

 

4. Give it a try:

 

# salt-call --local state.highstate

 

You should see something like this:

 

 

[WARNING ] Although 'lspci' was found in path, the current user cannot execute it. Grains output might not be accurate.
[WARNING ] Although 'lspci' was found in path, the current user cannot execute it. Grains output might not be accurate.
[INFO    ] Loading fresh modules for state activity
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/modules'
[INFO    ] Syncing modules for environment 'base'
[INFO    ] Loading cache from salt://_modules, for base)
[INFO    ] Caching directory '_modules/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/states'
[INFO    ] Syncing states for environment 'base'
[INFO    ] Loading cache from salt://_states, for base)
[INFO    ] Caching directory '_states/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/grains'
[INFO    ] Syncing grains for environment 'base'
[INFO    ] Loading cache from salt://_grains, for base)
[INFO    ] Caching directory '_grains/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/renderers'
[INFO    ] Syncing renderers for environment 'base'
[INFO    ] Loading cache from salt://_renderers, for base)
[INFO    ] Caching directory '_renderers/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/returners'
[INFO    ] Syncing returners for environment 'base'
[INFO    ] Loading cache from salt://_returners, for base)
[INFO    ] Caching directory '_returners/' for environment 'base'
[INFO    ] Creating module dir '/var/cache/salt/minion/extmods/outputters'
[INFO    ] Syncing outputters for environment 'base'
[INFO    ] Loading cache from salt://_outputters, for base)
[INFO    ] Caching directory '_outputters/' for environment 'base'
[INFO    ] Loading fresh modules for state activity
[INFO    ] Running state [yajl] at time 11:58:06.699941
[INFO    ] Executing state pkg.installed for yajl
[INFO    ] Executing command 'pacman -Q' in directory '/root'
[INFO    ] Package yajl is already installed
[INFO    ] Completed state [yajl] at time 11:58:06.736884
[INFO    ] Running state [ntp] at time 11:58:06.737394
[INFO    ] Executing state pkg.installed for ntp
[INFO    ] Package ntp is already installed
[INFO    ] Completed state [ntp] at time 11:58:06.738743
[INFO    ] Running state [ntpd] at time 11:58:06.739000
[INFO    ] Executing state service.running for ntpd
[INFO    ] Executing command 'systemctl --full list-unit-files | col -b' in directory '/root'
[INFO    ] stdout: UNIT FILE                   STATE
proc-sys-fs-binfmt_misc.automount       static
org.freedesktop.hostname1.busname       static
org.freedesktop.locale1.busname           static
org.freedesktop.login1.busname           static
org.freedesktop.machine1.busname       static
org.freedesktop.timedate1.busname       static
dev-hugepages.mount               static
dev-mqueue.mount               static
proc-sys-fs-binfmt_misc.mount           static
sys-fs-fuse-connections.mount           static
sys-kernel-config.mount               static
sys-kernel-debug.mount               static
tmp.mount                   static
systemd-ask-password-console.path       static
systemd-ask-password-wall.path           static
session-368.scope               static
session-415.scope               static
session-785.scope               static
session-787.scope               static
[email protected]                   disabled
blk-availability.service           disabled
console-getty.service               disabled
console-shell.service               disabled
[email protected]           static
cronie.service                   disabled
dbus-org.freedesktop.hostname1.service       static
dbus-org.freedesktop.locale1.service       static
dbus-org.freedesktop.login1.service       static
dbus-org.freedesktop.machine1.service       static
dbus-org.freedesktop.timedate1.service       static
dbus.service                   static
debug-shell.service               disabled
dhcpcd.service                   disabled
[email protected]                   disabled
dm-event.service               disabled
emergency.service               static
ftpd.service                   disabled
[email protected]                   enabled
[email protected]               static
gpm.service                   disabled
haveged.service                   disabled
httpd.service                   enabled
initrd-cleanup.service               static
initrd-parse-etc.service           static
initrd-switch-root.service           static
initrd-udevadm-cleanup-db.service       static
ip6tables.service               disabled
iptables.service               disabled
kmod-static-nodes.service           static
krb5-kadmind.service               disabled
krb5-kdc.service               disabled
krb5-kpropd.service               disabled
[email protected]               static
logrotate.service               static
lvm2-lvmetad.service               disabled
lvm2-monitor.service               disabled
[email protected]               static
man-db.service                   static
mdadm.service                   disabled
[email protected]                   static
mkinitcpio-generate-shutdown-ramfs.service static
mysqld.service                   enabled
neo4j.service                   disabled
[email protected]               disabled
[email protected]               disabled
netctl-sleep.service               disabled
netctl.service                   disabled
[email protected]                   static
netctl@ethernet\x2dstatic.service       enabled
nginx.service                   enabled
nscd.service                   disabled
ntpd.service                   enabled
ntpdate.service                   disabled
pkgstats.service               static
postgresql.service               enabled
[email protected]                   disabled
quotaon.service                   static
redis.service                   enabled
rescue.service                   static
[email protected]                   static
[email protected]                   static
rsyncd.service                   disabled
[email protected]                   static
salt-master.service               disabled
salt-minion.service               disabled
salt-syndic.service               disabled
[email protected]               disabled
shadow.service                   static
sshd.service                   enabled
[email protected]                   static
sshdgenkeys.service               enabled
systemd-ask-password-console.service       static
systemd-ask-password-wall.service       static
[email protected]           static
systemd-binfmt.service               static
systemd-fsck-root.service           static
[email protected]               static
systemd-halt.service               static
systemd-hibernate.service           static
systemd-hostnamed.service           static
systemd-hybrid-sleep.service           static
systemd-initctl.service               static
systemd-journal-flush.service           static
systemd-journal-gatewayd.service       static
systemd-journald.service           static
systemd-kexec.service               static
systemd-localed.service               static
systemd-logind.service               static
systemd-machined.service           static
systemd-modules-load.service           static
systemd-networkd-wait-online.service       enabled
systemd-networkd.service           enabled
[email protected]               disabled
systemd-poweroff.service           static
systemd-quotacheck.service           static
systemd-random-seed.service           static
systemd-readahead-collect.service       disabled
systemd-readahead-done.service           static
systemd-readahead-drop.service           disabled
systemd-readahead-replay.service       disabled
systemd-reboot.service               static
systemd-remount-fs.service           static
systemd-resolved.service           disabled
[email protected]               static
systemd-shutdownd.service           static
systemd-suspend.service               static
systemd-sysctl.service               static
systemd-timedated.service           static
systemd-timesyncd.service           disabled
systemd-tmpfiles-clean.service           static
systemd-tmpfiles-setup-dev.service       static
systemd-tmpfiles-setup.service           static
systemd-udev-settle.service           static
systemd-udev-trigger.service           static
systemd-udevd.service               static
systemd-update-utmp-runlevel.service       static
systemd-update-utmp.service           static
systemd-user-sessions.service           static
systemd-vconsole-setup.service           static
talk.service                   static
[email protected]                   static
[email protected]                   static
uuidd.service                   static
-.slice                       static
machine.slice                   static
system.slice                   static
user.slice                   static
dbus.socket                   static
dm-event.socket                   static
git-daemon.socket               disabled
krb5-kpropd.socket               disabled
lvm2-lvmetad.socket               static
rlogin.socket                   disabled
rsh.socket                   disabled
rsyncd.socket                   disabled
sshd.socket                   disabled
syslog.socket                   static
systemd-initctl.socket               static
systemd-journal-gatewayd.socket           disabled
systemd-journald.socket               static
systemd-shutdownd.socket           static
systemd-udevd-control.socket           static
systemd-udevd-kernel.socket           static
talk.socket                   disabled
telnet.socket                   disabled
uuidd.socket                   disabled
basic.target                   static
bluetooth.target               static
busnames.target                   static
cryptsetup.target               static
ctrl-alt-del.target               disabled
default.target                   static
emergency.target               static
final.target                   static
getty.target                   static
graphical.target               static
halt.target                   disabled
hibernate.target               static
hybrid-sleep.target               static
initrd-fs.target               static
initrd-root-fs.target               static
initrd-switch-root.target           static
initrd.target                   static
kexec.target                   disabled
local-fs-pre.target               static
local-fs.target                   static
multi-user.target               static
network-online.target               static
network.target                   static
nss-lookup.target               static
nss-user-lookup.target               static
paths.target                   static
poweroff.target                   disabled
printer.target                   static
reboot.target                   disabled
remote-fs-pre.target               static
remote-fs.target               enabled
rescue.target                   disabled
rpcbind.target                   static
shutdown.target                   static
sigpwr.target                   static
sleep.target                   static
slices.target                   static
smartcard.target               static
sockets.target                   static
sound.target                   static
suspend.target                   static
swap.target                   static
sysinit.target                   static
system-update.target               static
time-sync.target               static
timers.target                   static
umount.target                   static
logrotate.timer                   static
man-db.timer                   static
pkgstats.timer                   static
shadow.timer                   static
systemd-readahead-done.timer           static
systemd-tmpfiles-clean.timer           static

219 unit files listed.
[INFO    ] Executing command 'systemctl --full list-unit-files | col -b' in directory '/root'
[INFO    ] stdout: UNIT FILE                   STATE
proc-sys-fs-binfmt_misc.automount       static
org.freedesktop.hostname1.busname       static
org.freedesktop.locale1.busname           static
org.freedesktop.login1.busname           static
org.freedesktop.machine1.busname       static
org.freedesktop.timedate1.busname       static
dev-hugepages.mount               static
dev-mqueue.mount               static
proc-sys-fs-binfmt_misc.mount           static
sys-fs-fuse-connections.mount           static
sys-kernel-config.mount               static
sys-kernel-debug.mount               static
tmp.mount                   static
systemd-ask-password-console.path       static
systemd-ask-password-wall.path           static
session-368.scope               static
session-415.scope               static
session-785.scope               static
session-787.scope               static
[email protected]                   disabled
blk-availability.service           disabled
console-getty.service               disabled
console-shell.service               disabled
[email protected]           static
cronie.service                   disabled
dbus-org.freedesktop.hostname1.service       static
dbus-org.freedesktop.locale1.service       static
dbus-org.freedesktop.login1.service       static
dbus-org.freedesktop.machine1.service       static
dbus-org.freedesktop.timedate1.service       static
dbus.service                   static
debug-shell.service               disabled
dhcpcd.service                   disabled
[email protected]                   disabled
dm-event.service               disabled
emergency.service               static
ftpd.service                   disabled
[email protected]                   enabled
[email protected]               static
gpm.service                   disabled
haveged.service                   disabled
httpd.service                   enabled
initrd-cleanup.service               static
initrd-parse-etc.service           static
initrd-switch-root.service           static
initrd-udevadm-cleanup-db.service       static
ip6tables.service               disabled
iptables.service               disabled
kmod-static-nodes.service           static
krb5-kadmind.service               disabled
krb5-kdc.service               disabled
krb5-kpropd.service               disabled
[email protected]               static
logrotate.service               static
lvm2-lvmetad.service               disabled
lvm2-monitor.service               disabled
[email protected]               static
man-db.service                   static
mdadm.service                   disabled
[email protected]                   static
mkinitcpio-generate-shutdown-ramfs.service static
mysqld.service                   enabled
neo4j.service                   disabled
[email protected]               disabled
[email protected]               disabled
netctl-sleep.service               disabled
netctl.service                   disabled
[email protected]                   static
netctl@ethernet\x2dstatic.service       enabled
nginx.service                   enabled
nscd.service                   disabled
ntpd.service                   enabled
ntpdate.service                   disabled
pkgstats.service               static
postgresql.service               enabled
[email protected]                   disabled
quotaon.service                   static
redis.service                   enabled
rescue.service                   static
[email protected]                   static
[email protected]                   static
rsyncd.service                   disabled
[email protected]                   static
salt-master.service               disabled
salt-minion.service               disabled
salt-syndic.service               disabled
[email protected]               disabled
shadow.service                   static
sshd.service                   enabled
[email protected]                   static
sshdgenkeys.service               enabled
systemd-ask-password-console.service       static
systemd-ask-password-wall.service       static
[email protected]           static
systemd-binfmt.service               static
systemd-fsck-root.service           static
[email protected]               static
systemd-halt.service               static
systemd-hibernate.service           static
systemd-hostnamed.service           static
systemd-hybrid-sleep.service           static
systemd-initctl.service               static
systemd-journal-flush.service           static
systemd-journal-gatewayd.service       static
systemd-journald.service           static
systemd-kexec.service               static
systemd-localed.service               static
systemd-logind.service               static
systemd-machined.service           static
systemd-modules-load.service           static
systemd-networkd-wait-online.service       enabled
systemd-networkd.service           enabled
[email protected]               disabled
systemd-poweroff.service           static
systemd-quotacheck.service           static
systemd-random-seed.service           static
systemd-readahead-collect.service       disabled
systemd-readahead-done.service           static
systemd-readahead-drop.service           disabled
systemd-readahead-replay.service       disabled
systemd-reboot.service               static
systemd-remount-fs.service           static
systemd-resolved.service           disabled
[email protected]               static
systemd-shutdownd.service           static
systemd-suspend.service               static
systemd-sysctl.service               static
systemd-timedated.service           static
systemd-timesyncd.service           disabled
systemd-tmpfiles-clean.service           static
systemd-tmpfiles-setup-dev.service       static
systemd-tmpfiles-setup.service           static
systemd-udev-settle.service           static
systemd-udev-trigger.service           static
systemd-udevd.service               static
systemd-update-utmp-runlevel.service       static
systemd-update-utmp.service           static
systemd-user-sessions.service           static
systemd-vconsole-setup.service           static
talk.service                   static
[email protected]                   static
[email protected]                   static
uuidd.service                   static
-.slice                       static
machine.slice                   static
system.slice                   static
user.slice                   static
dbus.socket                   static
dm-event.socket                   static
git-daemon.socket               disabled
krb5-kpropd.socket               disabled
lvm2-lvmetad.socket               static
rlogin.socket                   disabled
rsh.socket                   disabled
rsyncd.socket                   disabled
sshd.socket                   disabled
syslog.socket                   static
systemd-initctl.socket               static
systemd-journal-gatewayd.socket           disabled
systemd-journald.socket               static
systemd-shutdownd.socket           static
systemd-udevd-control.socket           static
systemd-udevd-kernel.socket           static
talk.socket                   disabled
telnet.socket                   disabled
uuidd.socket                   disabled
basic.target                   static
bluetooth.target               static
busnames.target                   static
cryptsetup.target               static
ctrl-alt-del.target               disabled
default.target                   static
emergency.target               static
final.target                   static
getty.target                   static
graphical.target               static
halt.target                   disabled
hibernate.target               static
hybrid-sleep.target               static
initrd-fs.target               static
initrd-root-fs.target               static
initrd-switch-root.target           static
initrd.target                   static
kexec.target                   disabled
local-fs-pre.target               static
local-fs.target                   static
multi-user.target               static
network-online.target               static
network.target                   static
nss-lookup.target               static
nss-user-lookup.target               static
paths.target                   static
poweroff.target                   disabled
printer.target                   static
reboot.target                   disabled
remote-fs-pre.target               static
remote-fs.target               enabled
rescue.target                   disabled
rpcbind.target                   static
shutdown.target                   static
sigpwr.target                   static
sleep.target                   static
slices.target                   static
smartcard.target               static
sockets.target                   static
sound.target                   static
suspend.target                   static
swap.target                   static
sysinit.target                   static
system-update.target               static
time-sync.target               static
timers.target                   static
umount.target                   static
logrotate.timer                   static
man-db.timer                   static
pkgstats.timer                   static
shadow.timer                   static
systemd-readahead-done.timer           static
systemd-tmpfiles-clean.timer           static

219 unit files listed.
[INFO    ] Executing command 'systemctl status ntpd.service' in directory '/root'
[INFO    ] output: * ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
   Active: active (running) since Thu 2014-04-17 13:56:27 PDT; 1 months 23 days ago
 Main PID: 2340 (ntpd)
   CGroup: /system.slice/ntpd.service
           `-2340 /usr/bin/ntpd -g -u ntp:ntp -p /run/ntpd.pid

Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listen and drop on 1 v6wildcard :: UDP 123
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listen normally on 2 lo 127.0.0.1 UDP 123
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listen normally on 3 eth0 173.230.149.180 UDP 123
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listen normally on 4 lo ::1 UDP 123
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listen normally on 5 eth0 2600:3c01::f03c:91ff:fe70:fbd0 UDP 123
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listen normally on 6 eth0 fe80::f03c:91ff:fe70:fbd0 UDP 123
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listen normally on 7 eth0 2600:3c01:e000:87::2 UDP 123
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listen normally on 8 eth0 2600:3c01:e000:87::1 UDP 123
Apr 17 13:56:27 www.in.sert.co.in systemd[1]: Started Network Time Service.
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: peers refreshed
Apr 17 13:56:27 www.in.sert.co.in ntpd[2340]: Listening on routing socket on fd #25 for interface updates
[INFO    ] Executing command 'systemctl is-active ntpd.service' in directory '/root'
[INFO    ] output: active
[INFO    ] Executing command 'systemctl --full list-unit-files | col -b' in directory '/root'
[INFO    ] stdout: UNIT FILE                   STATE
proc-sys-fs-binfmt_misc.automount       static
org.freedesktop.hostname1.busname       static
org.freedesktop.locale1.busname           static
org.freedesktop.login1.busname           static
org.freedesktop.machine1.busname       static
org.freedesktop.timedate1.busname       static
dev-hugepages.mount               static
dev-mqueue.mount               static
proc-sys-fs-binfmt_misc.mount           static
sys-fs-fuse-connections.mount           static
sys-kernel-config.mount               static
sys-kernel-debug.mount               static
tmp.mount                   static
systemd-ask-password-console.path       static
systemd-ask-password-wall.path           static
session-368.scope               static
session-415.scope               static
session-785.scope               static
session-787.scope               static
[email protected]                   disabled
blk-availability.service           disabled
console-getty.service               disabled
console-shell.service               disabled
[email protected]           static
cronie.service                   disabled
dbus-org.freedesktop.hostname1.service       static
dbus-org.freedesktop.locale1.service       static
dbus-org.freedesktop.login1.service       static
dbus-org.freedesktop.machine1.service       static
dbus-org.freedesktop.timedate1.service       static
dbus.service                   static
debug-shell.service               disabled
dhcpcd.service                   disabled
[email protected]                   disabled
dm-event.service               disabled
emergency.service               static
ftpd.service                   disabled
[email protected]                   enabled
[email protected]               static
gpm.service                   disabled
haveged.service                   disabled
httpd.service                   enabled
initrd-cleanup.service               static
initrd-parse-etc.service           static
initrd-switch-root.service           static
initrd-udevadm-cleanup-db.service       static
ip6tables.service               disabled
iptables.service               disabled
kmod-static-nodes.service           static
krb5-kadmind.service               disabled
krb5-kdc.service               disabled
krb5-kpropd.service               disabled
[email protected]               static
logrotate.service               static
lvm2-lvmetad.service               disabled
lvm2-monitor.service               disabled
[email protected]               static
man-db.service                   static
mdadm.service                   disabled
[email protected]                   static
mkinitcpio-generate-shutdown-ramfs.service static
mysqld.service                   enabled
neo4j.service                   disabled
[email protected]               disabled
[email protected]               disabled
netctl-sleep.service               disabled
netctl.service                   disabled
[email protected]                   static
netctl@ethernet\x2dstatic.service       enabled
nginx.service                   enabled
nscd.service                   disabled
ntpd.service                   enabled
ntpdate.service                   disabled
pkgstats.service               static
postgresql.service               enabled
[email protected]                   disabled
quotaon.service                   static
redis.service                   enabled
rescue.service                   static
[email protected]                   static
[email protected]                   static
rsyncd.service                   disabled
[email protected]                   static
salt-master.service               disabled
salt-minion.service               disabled
salt-syndic.service               disabled
[email protected]               disabled
shadow.service                   static
sshd.service                   enabled
[email protected]                   static
sshdgenkeys.service               enabled
systemd-ask-password-console.service       static
systemd-ask-password-wall.service       static
[email protected]           static
systemd-binfmt.service               static
systemd-fsck-root.service           static
[email protected]               static
systemd-halt.service               static
systemd-hibernate.service           static
systemd-hostnamed.service           static
systemd-hybrid-sleep.service           static
systemd-initctl.service               static
systemd-journal-flush.service           static
systemd-journal-gatewayd.service       static
systemd-journald.service           static
systemd-kexec.service               static
systemd-localed.service               static
systemd-logind.service               static
systemd-machined.service           static
systemd-modules-load.service           static
systemd-networkd-wait-online.service       enabled
systemd-networkd.service           enabled
[email protected]               disabled
systemd-poweroff.service           static
systemd-quotacheck.service           static
systemd-random-seed.service           static
systemd-readahead-collect.service       disabled
systemd-readahead-done.service           static
systemd-readahead-drop.service           disabled
systemd-readahead-replay.service       disabled
systemd-reboot.service               static
systemd-remount-fs.service           static
systemd-resolved.service           disabled
[email protected]               static
systemd-shutdownd.service           static
systemd-suspend.service               static
systemd-sysctl.service               static
systemd-timedated.service           static
systemd-timesyncd.service           disabled
systemd-tmpfiles-clean.service           static
systemd-tmpfiles-setup-dev.service       static
systemd-tmpfiles-setup.service           static
systemd-udev-settle.service           static
systemd-udev-trigger.service           static
systemd-udevd.service               static
systemd-update-utmp-runlevel.service       static
systemd-update-utmp.service           static
systemd-user-sessions.service           static
systemd-vconsole-setup.service           static
talk.service                   static
[email protected]                   static
[email protected]                   static
uuidd.service                   static
-.slice                       static
machine.slice                   static
system.slice                   static
user.slice                   static
dbus.socket                   static
dm-event.socket                   static
git-daemon.socket               disabled
krb5-kpropd.socket               disabled
lvm2-lvmetad.socket               static
rlogin.socket                   disabled
rsh.socket                   disabled
rsyncd.socket                   disabled
sshd.socket                   disabled
syslog.socket                   static
systemd-initctl.socket               static
systemd-journal-gatewayd.socket           disabled
systemd-journald.socket               static
systemd-shutdownd.socket           static
systemd-udevd-control.socket           static
systemd-udevd-kernel.socket           static
talk.socket                   disabled
telnet.socket                   disabled
uuidd.socket                   disabled
basic.target                   static
bluetooth.target               static
busnames.target                   static
cryptsetup.target               static
ctrl-alt-del.target               disabled
default.target                   static
emergency.target               static
final.target                   static
getty.target                   static
graphical.target               static
halt.target                   disabled
hibernate.target               static
hybrid-sleep.target               static
initrd-fs.target               static
initrd-root-fs.target               static
initrd-switch-root.target           static
initrd.target                   static
kexec.target                   disabled
local-fs-pre.target               static
local-fs.target                   static
multi-user.target               static
network-online.target               static
network.target                   static
nss-lookup.target               static
nss-user-lookup.target               static
paths.target                   static
poweroff.target                   disabled
printer.target                   static
reboot.target                   disabled
remote-fs-pre.target               static
remote-fs.target               enabled
rescue.target                   disabled
rpcbind.target                   static
shutdown.target                   static
sigpwr.target                   static
sleep.target                   static
slices.target                   static
smartcard.target               static
sockets.target                   static
sound.target                   static
suspend.target                   static
swap.target                   static
sysinit.target                   static
system-update.target               static
time-sync.target               static
timers.target                   static
umount.target                   static
logrotate.timer                   static
man-db.timer                   static
pkgstats.timer                   static
shadow.timer                   static
systemd-readahead-done.timer           static
systemd-tmpfiles-clean.timer           static

219 unit files listed.
[INFO    ] Executing command 'systemctl is-enabled ntpd.service' in directory '/root'
[INFO    ] output: enabled
[INFO    ] Service ntpd is already enabled, and is in the desired state
[INFO    ] Completed state [ntpd] at time 11:58:07.117368
[INFO    ] Running state [openssh] at time 11:58:07.118257
[INFO    ] Executing state pkg.installed for openssh
[INFO    ] Package openssh is already installed
[INFO    ] Completed state [openssh] at time 11:58:07.120638
[INFO    ] Running state [sshd] at time 11:58:07.121005
[INFO    ] Executing state service.running for sshd
[INFO    ] Executing command 'systemctl --full list-unit-files | col -b' in directory '/root'
[INFO    ] stdout: UNIT FILE                   STATE
proc-sys-fs-binfmt_misc.automount       static
org.freedesktop.hostname1.busname       static
org.freedesktop.locale1.busname           static
org.freedesktop.login1.busname           static
org.freedesktop.machine1.busname       static
org.freedesktop.timedate1.busname       static
dev-hugepages.mount               static
dev-mqueue.mount               static
proc-sys-fs-binfmt_misc.mount           static
sys-fs-fuse-connections.mount           static
sys-kernel-config.mount               static
sys-kernel-debug.mount               static
tmp.mount                   static
systemd-ask-password-console.path       static
systemd-ask-password-wall.path           static
session-368.scope               static
session-415.scope               static
session-785.scope               static
session-787.scope               static
[email protected]                   disabled
blk-availability.service           disabled
console-getty.service               disabled
console-shell.service               disabled
[email protected]           static
cronie.service                   disabled
dbus-org.freedesktop.hostname1.service       static
dbus-org.freedesktop.locale1.service       static
dbus-org.freedesktop.login1.service       static
dbus-org.freedesktop.machine1.service       static
dbus-org.freedesktop.timedate1.service       static
dbus.service                   static
debug-shell.service               disabled
dhcpcd.service                   disabled
[email protected]                   disabled
dm-event.service               disabled
emergency.service               static
ftpd.service                   disabled
[email protected]                   enabled
[email protected]               static
gpm.service                   disabled
haveged.service                   disabled
httpd.service                   enabled
initrd-cleanup.service               static
initrd-parse-etc.service           static
initrd-switch-root.service           static
initrd-udevadm-cleanup-db.service       static
ip6tables.service               disabled
iptables.service               disabled
kmod-static-nodes.service           static
krb5-kadmind.service               disabled
krb5-kdc.service               disabled
krb5-kpropd.service               disabled
[email protected]               static
logrotate.service               static
lvm2-lvmetad.service               disabled
lvm2-monitor.service               disabled
[email protected]               static
man-db.service                   static
mdadm.service                   disabled
[email protected]                   static
mkinitcpio-generate-shutdown-ramfs.service static
mysqld.service                   enabled
neo4j.service                   disabled
[email protected]               disabled
[email protected]               disabled
netctl-sleep.service               disabled
netctl.service                   disabled
[email protected]                   static
netctl@ethernet\x2dstatic.service       enabled
nginx.service                   enabled
nscd.service                   disabled
ntpd.service                   enabled
ntpdate.service                   disabled
pkgstats.service               static
postgresql.service               enabled
[email protected]                   disabled
quotaon.service                   static
redis.service                   enabled
rescue.service                   static
[email protected]                   static
[email protected]                   static
rsyncd.service                   disabled
[email protected]                   static
salt-master.service               disabled
salt-minion.service               disabled
salt-syndic.service               disabled
[email protected]               disabled
shadow.service                   static
sshd.service                   enabled
[email protected]                   static
sshdgenkeys.service               enabled
systemd-ask-password-console.service       static
systemd-ask-password-wall.service       static
[email protected]           static
systemd-binfmt.service               static
systemd-fsck-root.service           static
[email protected]               static
systemd-halt.service               static
systemd-hibernate.service           static
systemd-hostnamed.service           static
systemd-hybrid-sleep.service           static
systemd-initctl.service               static
systemd-journal-flush.service           static
systemd-journal-gatewayd.service       static
systemd-journald.service           static
systemd-kexec.service               static
systemd-localed.service               static
systemd-logind.service               static
systemd-machined.service           static
systemd-modules-load.service           static
systemd-networkd-wait-online.service       enabled
systemd-networkd.service           enabled
[email protected]               disabled
systemd-poweroff.service           static
systemd-quotacheck.service           static
systemd-random-seed.service           static
systemd-readahead-collect.service       disabled
systemd-readahead-done.service           static
systemd-readahead-drop.service           disabled
systemd-readahead-replay.service       disabled
systemd-reboot.service               static
systemd-remount-fs.service           static
systemd-resolved.service           disabled
[email protected]               static
systemd-shutdownd.service           static
systemd-suspend.service               static
systemd-sysctl.service               static
systemd-timedated.service           static
systemd-timesyncd.service           disabled
systemd-tmpfiles-clean.service           static
systemd-tmpfiles-setup-dev.service       static
systemd-tmpfiles-setup.service           static
systemd-udev-settle.service           static
systemd-udev-trigger.service           static
systemd-udevd.service               static
systemd-update-utmp-runlevel.service       static
systemd-update-utmp.service           static
systemd-user-sessions.service           static
systemd-vconsole-setup.service           static
talk.service                   static
[email protected]                   static
[email protected]                   static
uuidd.service                   static
-.slice                       static
machine.slice                   static
system.slice                   static
user.slice                   static
dbus.socket                   static
dm-event.socket                   static
git-daemon.socket               disabled
krb5-kpropd.socket               disabled
lvm2-lvmetad.socket               static
rlogin.socket                   disabled
rsh.socket                   disabled
rsyncd.socket                   disabled
sshd.socket                   disabled
syslog.socket                   static
systemd-initctl.socket               static
systemd-journal-gatewayd.socket           disabled
systemd-journald.socket               static
systemd-shutdownd.socket           static
systemd-udevd-control.socket           static
systemd-udevd-kernel.socket           static
talk.socket                   disabled
telnet.socket                   disabled
uuidd.socket                   disabled
basic.target                   static
bluetooth.target               static
busnames.target                   static
cryptsetup.target               static
ctrl-alt-del.target               disabled
default.target                   static
emergency.target               static
final.target                   static
getty.target                   static
graphical.target               static
halt.target                   disabled
hibernate.target               static
hybrid-sleep.target               static
initrd-fs.target               static
initrd-root-fs.target               static
initrd-switch-root.target           static
initrd.target                   static
kexec.target                   disabled
local-fs-pre.target               static
local-fs.target                   static
multi-user.target               static
network-online.target               static
network.target                   static
nss-lookup.target               static
nss-user-lookup.target               static
paths.target                   static
poweroff.target                   disabled
printer.target                   static
reboot.target                   disabled
remote-fs-pre.target               static
remote-fs.target               enabled
rescue.target                   disabled
rpcbind.target                   static
shutdown.target                   static
sigpwr.target                   static
sleep.target                   static
slices.target                   static
smartcard.target               static
sockets.target                   static
sound.target                   static
suspend.target                   static
swap.target                   static
sysinit.target                   static
system-update.target               static
time-sync.target               static
timers.target                   static
umount.target                   static
logrotate.timer                   static
man-db.timer                   static
pkgstats.timer                   static
shadow.timer                   static
systemd-readahead-done.timer           static
systemd-tmpfiles-clean.timer           static

219 unit files listed.
[INFO    ] Executing command 'systemctl --full list-unit-files | col -b' in directory '/root'
[INFO    ] stdout: UNIT FILE                   STATE
proc-sys-fs-binfmt_misc.automount       static
org.freedesktop.hostname1.busname       static
org.freedesktop.locale1.busname           static
org.freedesktop.login1.busname           static
org.freedesktop.machine1.busname       static
org.freedesktop.timedate1.busname       static
dev-hugepages.mount               static
dev-mqueue.mount               static
proc-sys-fs-binfmt_misc.mount           static
sys-fs-fuse-connections.mount           static
sys-kernel-config.mount               static
sys-kernel-debug.mount               static
tmp.mount                   static
systemd-ask-password-console.path       static
systemd-ask-password-wall.path           static
session-368.scope               static
session-415.scope               static
session-785.scope               static
session-787.scope               static
[email protected]                   disabled
blk-availability.service           disabled
console-getty.service               disabled
console-shell.service               disabled
[email protected]           static
cronie.service                   disabled
dbus-org.freedesktop.hostname1.service       static
dbus-org.freedesktop.locale1.service       static
dbus-org.freedesktop.login1.service       static
dbus-org.freedesktop.machine1.service       static
dbus-org.freedesktop.timedate1.service       static
dbus.service                   static
debug-shell.service               disabled
dhcpcd.service                   disabled
[email protected]                   disabled
dm-event.service               disabled
emergency.service               static
ftpd.service                   disabled
[email protected]                   enabled
[email protected]               static
gpm.service                   disabled
haveged.service                   disabled
httpd.service                   enabled
initrd-cleanup.service               static
initrd-parse-etc.service           static
initrd-switch-root.service           static
initrd-udevadm-cleanup-db.service       static
ip6tables.service               disabled
iptables.service               disabled
kmod-static-nodes.service           static
krb5-kadmind.service               disabled
krb5-kdc.service               disabled
krb5-kpropd.service               disabled
[email protected]               static
logrotate.service               static
lvm2-lvmetad.service               disabled
lvm2-monitor.service               disabled
[email protected]               static
man-db.service                   static
mdadm.service                   disabled
[email protected]                   static
mkinitcpio-generate-shutdown-ramfs.service static
mysqld.service                   enabled
neo4j.service                   disabled
[email protected]               disabled
[email protected]               disabled
netctl-sleep.service               disabled
netctl.service                   disabled
[email protected]                   static
netctl@ethernet\x2dstatic.service       enabled
nginx.service                   enabled
nscd.service                   disabled
ntpd.service                   enabled
ntpdate.service                   disabled
pkgstats.service               static
postgresql.service               enabled
[email protected]                   disabled
quotaon.service                   static
redis.service                   enabled
rescue.service                   static
[email protected]                   static
[email protected]                   static
rsyncd.service                   disabled
[email protected]                   static
salt-master.service               disabled
salt-minion.service               disabled
salt-syndic.service               disabled
[email protected]               disabled
shadow.service                   static
sshd.service                   enabled
[email protected]                   static
sshdgenkeys.service               enabled
systemd-ask-password-console.service       static
systemd-ask-password-wall.service       static
[email protected]           static
systemd-binfmt.service               static
systemd-fsck-root.service           static
[email protected]               static
systemd-halt.service               static
systemd-hibernate.service           static
systemd-hostnamed.service           static
systemd-hybrid-sleep.service           static
systemd-initctl.service               static
systemd-journal-flush.service           static
systemd-journal-gatewayd.service       static
systemd-journald.service           static
systemd-kexec.service               static
systemd-localed.service               static
systemd-logind.service               static
systemd-machined.service           static
systemd-modules-load.service           static
systemd-networkd-wait-online.service       enabled
systemd-networkd.service           enabled
[email protected]               disabled
systemd-poweroff.service           static
systemd-quotacheck.service           static
systemd-random-seed.service           static
systemd-readahead-collect.service       disabled
systemd-readahead-done.service           static
systemd-readahead-drop.service           disabled
systemd-readahead-replay.service       disabled
systemd-reboot.service               static
systemd-remount-fs.service           static
systemd-resolved.service           disabled
[email protected]               static
systemd-shutdownd.service           static
systemd-suspend.service               static
systemd-sysctl.service               static
systemd-timedated.service           static
systemd-timesyncd.service           disabled
systemd-tmpfiles-clean.service           static
systemd-tmpfiles-setup-dev.service       static
systemd-tmpfiles-setup.service           static
systemd-udev-settle.service           static
systemd-udev-trigger.service           static
systemd-udevd.service               static
systemd-update-utmp-runlevel.service       static
systemd-update-utmp.service           static
systemd-user-sessions.service           static
systemd-vconsole-setup.service           static
talk.service                   static
[email protected]                   static
[email protected]                   static
uuidd.service                   static
-.slice                       static
machine.slice                   static
system.slice                   static
user.slice                   static
dbus.socket                   static
dm-event.socket                   static
git-daemon.socket               disabled
krb5-kpropd.socket               disabled
lvm2-lvmetad.socket               static
rlogin.socket                   disabled
rsh.socket                   disabled
rsyncd.socket                   disabled
sshd.socket                   disabled
syslog.socket                   static
systemd-initctl.socket               static
systemd-journal-gatewayd.socket           disabled
systemd-journald.socket               static
systemd-shutdownd.socket           static
systemd-udevd-control.socket           static
systemd-udevd-kernel.socket           static
talk.socket                   disabled
telnet.socket                   disabled
uuidd.socket                   disabled
basic.target                   static
bluetooth.target               static
busnames.target                   static
cryptsetup.target               static
ctrl-alt-del.target               disabled
default.target                   static
emergency.target               static
final.target                   static
getty.target                   static
graphical.target               static
halt.target                   disabled
hibernate.target               static
hybrid-sleep.target               static
initrd-fs.target               static
initrd-root-fs.target               static
initrd-switch-root.target           static
initrd.target                   static
kexec.target                   disabled
local-fs-pre.target               static
local-fs.target                   static
multi-user.target               static
network-online.target               static
network.target                   static
nss-lookup.target               static
nss-user-lookup.target               static
paths.target                   static
poweroff.target                   disabled
printer.target                   static
reboot.target                   disabled
remote-fs-pre.target               static
remote-fs.target               enabled
rescue.target                   disabled
rpcbind.target                   static
shutdown.target                   static
sigpwr.target                   static
sleep.target                   static
slices.target                   static
smartcard.target               static
sockets.target                   static
sound.target                   static
suspend.target                   static
swap.target                   static
sysinit.target                   static
system-update.target               static
time-sync.target               static
timers.target                   static
umount.target                   static
logrotate.timer                   static
man-db.timer                   static
pkgstats.timer                   static
shadow.timer                   static
systemd-readahead-done.timer           static
systemd-tmpfiles-clean.timer           static

219 unit files listed.
[INFO    ] Executing command 'systemctl status sshd.service' in directory '/root'
[INFO    ] output: * sshd.service - OpenSSH Daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled)
   Active: active (running) since Thu 2014-04-17 13:56:27 PDT; 1 months 23 days ago
 Main PID: 2335 (sshd)
   CGroup: /system.slice/sshd.service
           `-2335 /usr/bin/sshd -D

Jun 10 10:46:44 www.in.sert.co.in sshd[10088]: Failed password for httpd from 72.34.113.100 port 8697 ssh2
Jun 10 10:46:49 www.in.sert.co.in sshd[10088]: Accepted password for httpd from 72.34.113.100 port 8697 ssh2
Jun 10 10:46:49 www.in.sert.co.in sshd[10088]: pam_unix(sshd:session): session opened for user httpd by (uid=0)
Jun 10 10:50:15 www.in.sert.co.in sshd[10140]: Accepted password for root from 72.34.113.100 port 6222 ssh2
Jun 10 10:50:15 www.in.sert.co.in sshd[10140]: pam_unix(sshd:session): session opened for user root by (uid=0)
Jun 10 10:51:09 www.in.sert.co.in sshd[10163]: Connection closed by 72.34.113.100 [preauth]
Jun 10 10:51:18 www.in.sert.co.in sshd[10170]: Accepted publickey for root from 72.34.113.100 port 20639 ssh2: RSA 9c:7e:03:28:f9:b8:94:54:de:33:7e:0f:8a:64:b5:a5
Jun 10 10:51:18 www.in.sert.co.in sshd[10170]: pam_unix(sshd:session): session opened for user root by (uid=0)
Jun 10 10:56:40 www.in.sert.co.in sshd[10995]: Accepted publickey for root from 72.34.113.100 port 34042 ssh2: RSA 9c:7e:03:28:f9:b8:94:54:de:33:7e:0f:8a:64:b5:a5
Jun 10 10:56:40 www.in.sert.co.in sshd[10995]: pam_unix(sshd:session): session opened for user root by (uid=0)
[INFO    ] Executing command 'systemctl is-active sshd.service' in directory '/root'
[INFO    ] output: active
[INFO    ] Executing command 'systemctl --full list-unit-files | col -b' in directory '/root'
[INFO    ] stdout: UNIT FILE                   STATE
proc-sys-fs-binfmt_misc.automount       static
org.freedesktop.hostname1.busname       static
org.freedesktop.locale1.busname           static
org.freedesktop.login1.busname           static
org.freedesktop.machine1.busname       static
org.freedesktop.timedate1.busname       static
dev-hugepages.mount               static
dev-mqueue.mount               static
proc-sys-fs-binfmt_misc.mount           static
sys-fs-fuse-connections.mount           static
sys-kernel-config.mount               static
sys-kernel-debug.mount               static
tmp.mount                   static
systemd-ask-password-console.path       static
systemd-ask-password-wall.path           static
session-368.scope               static
session-415.scope               static
session-785.scope               static
session-787.scope               static
[email protected]                   disabled
blk-availability.service           disabled
console-getty.service               disabled
console-shell.service               disabled
[email protected]           static
cronie.service                   disabled
dbus-org.freedesktop.hostname1.service       static
dbus-org.freedesktop.locale1.service       static
dbus-org.freedesktop.login1.service       static
dbus-org.freedesktop.machine1.service       static
dbus-org.freedesktop.timedate1.service       static
dbus.service                   static
debug-shell.service               disabled
dhcpcd.service                   disabled
[email protected]                   disabled
dm-event.service               disabled
emergency.service               static
ftpd.service                   disabled
[email protected]                   enabled
[email protected]               static
gpm.service                   disabled
haveged.service                   disabled
httpd.service                   enabled
initrd-cleanup.service               static
initrd-parse-etc.service           static
initrd-switch-root.service           static
initrd-udevadm-cleanup-db.service       static
ip6tables.service               disabled
iptables.service               disabled
kmod-static-nodes.service           static
krb5-kadmind.service               disabled
krb5-kdc.service               disabled
krb5-kpropd.service               disabled
[email protected]               static
logrotate.service               static
lvm2-lvmetad.service               disabled
lvm2-monitor.service               disabled
[email protected]               static
man-db.service                   static
mdadm.service                   disabled
[email protected]                   static
mkinitcpio-generate-shutdown-ramfs.service static
mysqld.service                   enabled
neo4j.service                   disabled
[email protected]               disabled
[email protected]               disabled
netctl-sleep.service               disabled
netctl.service                   disabled
[email protected]                   static
netctl@ethernet\x2dstatic.service       enabled
nginx.service                   enabled
nscd.service                   disabled
ntpd.service                   enabled
ntpdate.service                   disabled
pkgstats.service               static
postgresql.service               enabled
[email protected]                   disabled
quotaon.service                   static
redis.service                   enabled
rescue.service                   static
[email protected]                   static
[email protected]                   static
rsyncd.service                   disabled
[email protected]                   static
salt-master.service               disabled
salt-minion.service               disabled
salt-syndic.service               disabled
[email protected]               disabled
shadow.service                   static
sshd.service                   enabled
[email protected]                   static
sshdgenkeys.service               enabled
systemd-ask-password-console.service       static
systemd-ask-password-wall.service       static
[email protected]           static
systemd-binfmt.service               static
systemd-fsck-root.service           static
[email protected]               static
systemd-halt.service               static
systemd-hibernate.service           static
systemd-hostnamed.service           static
systemd-hybrid-sleep.service           static
systemd-initctl.service               static
systemd-journal-flush.service           static
systemd-journal-gatewayd.service       static
systemd-journald.service           static
systemd-kexec.service               static
systemd-localed.service               static
systemd-logind.service               static
systemd-machined.service           static
systemd-modules-load.service           static
systemd-networkd-wait-online.service       enabled
systemd-networkd.service           enabled
[email protected]               disabled
systemd-poweroff.service           static
systemd-quotacheck.service           static
systemd-random-seed.service           static
systemd-readahead-collect.service       disabled
systemd-readahead-done.service           static
systemd-readahead-drop.service           disabled
systemd-readahead-replay.service       disabled
systemd-reboot.service               static
systemd-remount-fs.service           static
systemd-resolved.service           disabled
[email protected]               static
systemd-shutdownd.service           static
systemd-suspend.service               static
systemd-sysctl.service               static
systemd-timedated.service           static
systemd-timesyncd.service           disabled
systemd-tmpfiles-clean.service           static
systemd-tmpfiles-setup-dev.service       static
systemd-tmpfiles-setup.service           static
systemd-udev-settle.service           static
systemd-udev-trigger.service           static
systemd-udevd.service               static
systemd-update-utmp-runlevel.service       static
systemd-update-utmp.service           static
systemd-user-sessions.service           static
systemd-vconsole-setup.service           static
talk.service                   static
[email protected]                   static
[email protected]                   static
uuidd.service                   static
-.slice                       static
machine.slice                   static
system.slice                   static
user.slice                   static
dbus.socket                   static
dm-event.socket                   static
git-daemon.socket               disabled
krb5-kpropd.socket               disabled
lvm2-lvmetad.socket               static
rlogin.socket                   disabled
rsh.socket                   disabled
rsyncd.socket                   disabled
sshd.socket                   disabled
syslog.socket                   static
systemd-initctl.socket               static
systemd-journal-gatewayd.socket           disabled
systemd-journald.socket               static
systemd-shutdownd.socket           static
systemd-udevd-control.socket           static
systemd-udevd-kernel.socket           static
talk.socket                   disabled
telnet.socket                   disabled
uuidd.socket                   disabled
basic.target                   static
bluetooth.target               static
busnames.target                   static
cryptsetup.target               static
ctrl-alt-del.target               disabled
default.target                   static
emergency.target               static
final.target                   static
getty.target                   static
graphical.target               static
halt.target                   disabled
hibernate.target               static
hybrid-sleep.target               static
initrd-fs.target               static
initrd-root-fs.target               static
initrd-switch-root.target           static
initrd.target                   static
kexec.target                   disabled
local-fs-pre.target               static
local-fs.target                   static
multi-user.target               static
network-online.target               static
network.target                   static
nss-lookup.target               static
nss-user-lookup.target               static
paths.target                   static
poweroff.target                   disabled
printer.target                   static
reboot.target                   disabled
remote-fs-pre.target               static
remote-fs.target               enabled
rescue.target                   disabled
rpcbind.target                   static
shutdown.target                   static
sigpwr.target                   static
sleep.target                   static
slices.target                   static
smartcard.target               static
sockets.target                   static
sound.target                   static
suspend.target                   static
swap.target                   static
sysinit.target                   static
system-update.target               static
time-sync.target               static
timers.target                   static
umount.target                   static
logrotate.timer                   static
man-db.timer                   static
pkgstats.timer                   static
shadow.timer                   static
systemd-readahead-done.timer           static
systemd-tmpfiles-clean.timer           static

219 unit files listed.
[INFO    ] Executing command 'systemctl is-enabled sshd.service' in directory '/root'
[INFO    ] output: enabled
[INFO    ] Service sshd is already enabled, and is in the desired state
[INFO    ] Completed state [sshd] at time 11:58:07.510376
local:
----------
          ID: yajl
    Function: pkg.installed
      Result: True
     Comment: Package yajl is already installed
     Changes:
----------
          ID: ntp
    Function: pkg.installed
      Result: True
     Comment: Package ntp is already installed
     Changes:
----------
          ID: ntp
    Function: service.running
        Name: ntpd
      Result: True
     Comment: Service ntpd is already enabled, and is in the desired state
     Changes:
----------
          ID: ssh
    Function: pkg.installed
        Name: openssh
      Result: True
     Comment: Package openssh is already installed
     Changes:
----------
          ID: ssh
    Function: service.running
        Name: sshd
      Result: True
     Comment: Service sshd is already enabled, and is in the desired state
     Changes:

Summary
------------
Succeeded: 5
Failed:    0
------------
Total:     5
[root@www salt]#

 

 

 

5. Start the salt-master service and enable it:

 

# systemctl start salt-master
# systemctl enable salt-master
ln -s '/usr/lib/systemd/system/salt-master.service' '/etc/systemd/system/multi-user.target.wants/salt-master.service'

 

 

Now you're ready to start setting up your first minion.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

New laptop: Lenovo y510p

I just got a brand new laptop, a Lenovo ideapad y510p. I plan on installing and using Arch Linux on it, so bookmark this post so you can follow my progress (and also contribute if you have tried before)

I'll create separate posts so this doesn't become a super boring long article and helps you find what each person is having trouble with.

Shell: xargs with a pipe to send logs to logstash

I have been playing with Logstash this weekend and I believe I have everything setup the way I want, so to put Kibana 3 to que test, I wanted to inject all my MediaTemple logs into Logstash to start searching and get used to querying Kibana.

Hence something like this was used:

 

find . -name '*.processed' -print0 | xargs -I {} -0 -i sh -c 'cat {} | netcat 127.0.0.1 50000'

 

This will find all my logs ending in ".processed" send them to xargs that will cat each file and pipe it to netcat to my logstash instance listening on port 50000.

 

I'l post my conf files here, but there's nothing to fancy and their documentation is fantastic if I take too long to post.

 

 

MediaTemple: Enable Imagick on your GS

Here's how to enable Imagick on your GS:

 

1. Download the latest stable from

http://pecl.php.net/package/imagick

 

2. Create folder to store the compiled module:

mkdir /home/$SITEID/data/lib
mkdir /home/$SITEID/data/lib/php/

 

 

3. Uncompress it

tar -xvzf imagick-3.1.2.tgz
cd imagick-3.1.2

 

4. Configure it with phpize (I'm using php 5.5.5 on my GS)

phpize –with-php-config=/usr/local/php-5.5.5/bin/php-config

 

5. 

 

 

 

references;

 

Firefox: Bring the http back to URL bar

I don't like the fact that Firefox hides the "http://" from the URL bar and when I copy and paste the URL, it adds that back; thus stressing my copy-and-pasted skills up.

To go back to the previous behavior of showing the protocol, visit:

about:config

 

on your Firefox and search for:

browser.urlbar.trimURLs

 

change the value to false:

browser.urlbar.trimURLs = false

 

And you're good right away!

 

Hosting: Enabling Redis class on MediaTemple’s gridserver (gs)

Here's how I enabled access to a Redis server from my (GS) gridserver:

1. Store your SITEID in a variable:

export SITEID=`pwd | awk -F\/ '{ print $3 }'`

 

2. Create a folder to store the redis.so module

mkdir /home/$SITEID/data/lib
mkdir /home/$SITEID/data/lib/php/

 

3. Get the Redis PECL package (2.2.4 is the latest as of now)

wget http://pecl.php.net/get/redis-2.2.4.tgz

 

4. Uncompress it

tar -xvzf redis-2.2.4.tgz
cd redis-2.2.4

 

5. Compile it. I've set my (gs) to use PHP 5.5.5; change your accordingly

./configure --with-php-config=/usr/local/php-5.5.5/bin/php-config
make

 

6. "install" the module

cp modules/*.so /home/$SITEID/data/lib/php

 

7. Add the following to your /home/SITEID/etc/php.ini

;PECL
extension_dir=/home/97042/data/lib/php/
;redisphp
extension=redis.so

 

Check it:

Visit http://SITEID.gridserver.com/gs-bin/phpinfo.php-latest

 

redis-2-2-4-module

References

  • https://kb.mediatemple.net/questions/1682/Installing+PECL+extensions#gs
  • https://github.com/nicolasff/phpredis/issues/42
  • http://pecl.php.net/package/redis