[{"content":"Symptom A scheduled Proxmox Backup Server job had been running against one of my LXC containers every night since 2026-09-27. Every run reported TASK OK. The run on 2026-10-01 was incremental and reused 98.9% of the previous backup, which read as healthy.\nLine 7 of that same task log said something else:\nINFO: excluding bind mount point mp0 (\u0026#39;/mnt/immich-data\u0026#39;) from backup (not a volume)I didn\u0026rsquo;t catch that line myself. Claude, who I was working through this with, is the one who flagged it. I wasn\u0026rsquo;t reading the log line by line looking for it. I\u0026rsquo;m OK with that: Claude catching the backup gap doesn\u0026rsquo;t bother me.\n/mnt/immich-data is the Immich photo library, confirmed from the container\u0026rsquo;s own Resources tab in the Proxmox UI. Immich itself is still in a testing phase here, with only a handful of photos uploaded so far, not the full library yet. So nothing was actually at risk when this was found, but the backup mechanism had been silently incomplete since the day it was set up, and that\u0026rsquo;s worth knowing before it does matter.\nGetting to that line took two earlier incidents on the same NAS, in the same week, so the order matters here:\nA regular clicking noise from the NAS with no disk I/O to explain it Rebuilding Proxmox Backup Server (PBS) onto a dedicated SSD, a separate architectural fix unrelated to what actually stopped the clicking (more on that below) Re-triggering the backup job after the rebuild, which produced the log above Environment NAS: ASRock B660M Steel Legend, Intel i3-12100, Jonsbo N4 case, TrueNAS Community Edition 25.10.7 (\u0026ldquo;Goldeye\u0026rdquo;) Pool hdd1: 2x Seagate IronWolf Pro 4TB (ST4000NT001-3M2101), ZFS mirror, 7200rpm, SATA 3.3 / 6.0 Gb/s PBS 4.2.6, running as a privileged Incus system container (Debian Trixie, the official proxmox-backup-server apt package; there\u0026rsquo;s no Docker image for PBS) PBS\u0026rsquo;s own chunk store lives on a separate dataset, hdd1/apps/pbs, bind-mounted into the container at /data, kept apart from the container\u0026rsquo;s own root filesystem on purpose The Proxmox VE host runs the container being backed up: CT 201, Immich (still in testing), tagged community-script and photos in the PVE UI. The bind-mount shape of the data path is believed to be a default of the Proxmox Community Scripts Immich installer (\u0026ldquo;I think,\u0026rdquo; not fully confirmed), but the specific host path (/mnt/pve/ssd-storage/immich-data) was changed by hand afterward, not left at whatever the installer originally set. CT 201\u0026rsquo;s actual config, from its Resources tab: Root Disk: local-lvm:vm-201-disk-0,size=24G, a real Proxmox-managed volume (storage name + volume id + size) Mount Point (mp0): /mnt/pve/ssd-storage/immich-data,mp=/mnt/immich-data, a bare host path, no storage:volume id, no size. That\u0026rsquo;s the tell, visible right in the PVE UI, for a bind mount versus a managed volume. iGPU passthrough for hardware transcode: /dev/dri/renderD128, /dev/dri/card0, /dev/kfd What I checked, in order The clicking noise Heard a regular click from the NAS. Ran iostat -x on both drives:\nDevice r/s rkB/s w/s wkB/s w_await wareq-sz %util sda 0.01 0.48 8.38 214.85 2.52 25.62 1.85 sdb 0.02 0.56 8.28 214.82 2.58 25.95 1.87 And zpool iostat -v hdd1 5, sampling every 5 seconds. Every single sample showed write activity, split almost exactly in half between the two mirror drives:\npool alloc free read write read write ---------------------------------------- ----- ----- ----- ----- ----- ----- hdd1 4.50G 3.62T 0 15 186 431K mirror-0 4.50G 3.62T 0 15 186 431K \u0026lt;vdev-a-guid\u0026gt; - - 0 7 118 215K \u0026lt;vdev-b-guid\u0026gt; - - 0 7 67 215K ---------------------------------------- ----- ----- ----- ----- ----- ----- hdd1 4.50G 3.62T 0 21 0 198K hdd1 4.50G 3.62T 0 17 0 205K hdd1 4.50G 3.62T 0 19 0 184K hdd1 4.50G 3.62T 0 22 0 267K hdd1 4.50G 3.62T 0 19 0 198K hdd1 4.50G 3.62T 0 19 0 195K hdd1 4.50G 3.62T 0 19 0 198K hdd1 4.50G 3.62T 0 18 0 210K hdd1 4.50G 3.62T 0 15 0 184KNo sample came back idle. The difference between the two commands: zpool iostat targets the pool, iostat targets the actual disk device. Two different layers, not two different sampling methods.\nRuled out drive failure directly:\n$ sudo zpool status -v hdd1 pool: hdd1 state: ONLINE config: NAME STATE READ WRITE CKSUM hdd1 ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 errors: No known data errorssmartctl -a on both drives: overall-health self-assessment PASSED, Reallocated_Sector_Ct, Current_Pending_Sector, Offline_Uncorrectable, and UDMA_CRC_Error_Count all at 0, Power_On_Hours at 27. dmesg -T | grep -iE 'ata|reset|error' turned up nothing but normal boot-time AHCI link-up lines and one unrelated false match: Error: Driver 'pcspkr' is already registered, aborting... (the PC speaker driver, not storage).\nClaude\u0026rsquo;s read of the pattern at the time pointed at two possible writers to hdd1: the TrueNAS System Dataset (telemetry/RRD data), and the Incus \u0026ldquo;Instances\u0026rdquo; storage pool backing the PBS container\u0026rsquo;s own root filesystem. I don\u0026rsquo;t agree with crediting the second one. The PVE backup job runs once a day on a cron schedule. That doesn\u0026rsquo;t explain a click recurring every few minutes. The System Dataset, which writes continuously in the background regardless of any backup schedule, fits the pattern much better.\nMoving storage off the pool that was clicking Moved the System Dataset to boot-pool (System Settings → Advanced → Storage). The clicking stopped. The Instances storage pool was still sitting on hdd1 at this point and stayed there for several more days; the SSD it eventually moved to wasn\u0026rsquo;t even purchased yet. So this was the System Dataset alone, not a simultaneous fix. Separately (and unrelated to the clicking, which was already gone), TrueNAS\u0026rsquo;s own documentation advises against putting Instances/Apps storage on boot-pool, and Instances storage can\u0026rsquo;t be live-migrated between pools anyway. That\u0026rsquo;s a reason to get it off hdd1 on its own architectural merits, not something done to silence the noise. Decided to add a dedicated SSD instead of using boot-pool: to improve performance, and to prevent HDD noise from app/instance activity in the future. It made sense because the apps themselves can be recreated quickly, while the actual data stays on the separate hdd1 pool. Checked the B660M Steel Legend\u0026rsquo;s SATA layout against its manual: 6 ports total (4 right-angle, 2 vertical), no lane-sharing conflicts for this build. [Correction along the way] Assumed the Jonsbo N4\u0026rsquo;s 2.5\u0026quot; bays had a backplane like the 3.5\u0026quot; bays. They don\u0026rsquo;t. Only 4 of the case\u0026rsquo;s 6 3.5\u0026quot; bays run through the backplane; the 2.5\u0026quot; slots are bare cavities needing a manually run SATA data cable and a power cable from the PSU. The 2.5\u0026quot; mounting kit needed for the SSD came included with the case itself: no separate bracket purchase needed. The rebuild, a repeat bug, and the log that gave it away The backup job was only ever disabled for the duration of this maintenance window, not left off indefinitely. Leaving backups off mid-fix is fine as long as the fix is quick, so there isn\u0026rsquo;t much delta between the last known-good backup and the actual state of things if something went wrong in between. Exact sequence:\nAdded the new SSD as its own pool, ssd1. Imported and started the PBS container on ssd1. Hit the PBS proxy issue: port 8007 came back empty/reset. Root cause: /run/proxmox-backup (tmpfs, rebuilt on every container start) was owned by root instead of backup inside the container. Fixed with chown -R backup:backup /run/proxmox-backup/ and a service restart. Both times this permission bug showed up (the first time during the original PBS deployment, this time during the rebuild), it coincided with a container identity change: first switching the container from unprivileged to privileged, this time reimporting PBS fresh onto ssd1. Not something that showed up during ordinary operation in between. I don\u0026rsquo;t know if a regular/standard PBS install would trigger the same bug: open question. The PBS datastore reattached cleanly once the container was back up. Its chunk data on hdd1/apps/pbs was never touched by any of this, since it lives on its own dataset separate from the container\u0026rsquo;s root filesystem. That split pays off doubly: backup data sits on hdd1, the cheaper, larger pool, while the application itself runs on ssd1, the faster one, each workload on the storage tier that actually fits it. Re-enabled the truenas PBS storage target and the backup job in PVE. Triggered a manual run. The run reported TASK OK. Reviewing the log with Claude afterward, line 7 showed the bind mount excluded, \u0026ldquo;not a volume.\u0026rdquo; Root cause Two separate root causes, chained:\nThe clicking noise wasn\u0026rsquo;t drive failure. It was the TrueNAS System Dataset writing continuously to hdd1 in the background. Claude\u0026rsquo;s original diagnosis also pinned some of the blame on the Incus Instances storage pool backing the PBS container. I don\u0026rsquo;t think that holds up: the PVE backup job fires once a day on a cron schedule, which can\u0026rsquo;t explain a noise recurring every few minutes. Moving the System Dataset to boot-pool alone stopped the clicking, days before the Instances-storage pool was ever moved off hdd1. The backup gap: Proxmox\u0026rsquo;s vzdump/PBS backup mechanism structurally cannot back up an LXC bind mount point, no matter what the backup=1 flag on it says. Only the container\u0026rsquo;s rootfs and real volume-backed mount points are ever included. Not a one-off bug, and not new as of this rebuild: every run of this job, since 2026-09-27, excluded the same bind mount. Confirmed two ways: the official vzdump documentation states plainly, \u0026ldquo;Device and bind mounts are never backed up as their content is managed outside the Proxmox VE storage library,\u0026rdquo; and a Proxmox staff member on the forum gave the same answer to someone hitting this exact issue: \u0026ldquo;you mounted the zfs volume with a bind mount, those can not be included in the backups,\u0026rdquo; recommending the ZFS storage backend (a real volume through the container\u0026rsquo;s resource settings) instead. The tell was sitting right in the PVE UI the whole time: the rootfs is local-lvm:vm-201-disk-0,size=24G (storage:volume,size: a managed volume), while mp0 is /mnt/pve/ssd-storage/immich-data,mp=/mnt/immich-data (a bare host path: a bind mount). The bind mount itself is believed to be a default of that installer; the specific path was customized afterward. Either way, the backup exclusion applies the same regardless of how the mount point got there. It is purely a function of it being a bind mount, not a volume.\nFix Clicking noise: System Dataset moved to boot-pool. This alone fixed it. Instances storage was separately moved to a dedicated SSD (ssd1) days later, for architectural reasons unrelated to the noise. Repeat permission bug: chown -R backup:backup /run/proxmox-backup/ plus a service restart: identical fix to the first time this bug class showed up. Backup gap: not fixed yet. The planned next step, already on the list before this was even found, is moving Immich\u0026rsquo;s data off the bind mount onto a proper NFS-mounted ZFS dataset instead, which would close this gap as a side effect of a move made for other reasons. No time to do it yet. Tracked as a to-do. How I know it is fixed Clicking noise: confirmed gone, from moving the System Dataset off hdd1 to boot-pool. The PVE backup cron\u0026rsquo;s once-a-day schedule rules out the Instances-storage pool as an explanation for noise recurring every few minutes, and the clicking stopped days before that pool was even moved. Permission bug: port 8007 reachable again, backup job completing. Backup gap: not fixed yet. TASK OK turned out not to mean what it looked like it meant, and the fix (moving Immich\u0026rsquo;s data to the NFS-mounted dataset) hasn\u0026rsquo;t happened. The real \u0026ldquo;it\u0026rsquo;s fixed\u0026rdquo; will be when Immich, running on the PVE host, uses a storage dataset provided by TrueNAS with mirror redundancy applied, instead of relying on local storage on the PVE host for personal data like photos. Not just backed up, but not sitting on a single unprotected disk in the first place. I also don\u0026rsquo;t know yet whether there\u0026rsquo;s other configuration in the bind-mounted path worth backing up beyond the photos themselves. That\u0026rsquo;s still open too. Why it took me a while This is my first time building a NAS server and installing TrueNAS SCALE. It\u0026rsquo;s also been a long time since I last worked with physical servers day to day. I\u0026rsquo;m still learning and familiarizing myself with this stack, which is why the clicking noise took several steps instead of being obvious right away.\nWhat I\u0026rsquo;d do differently The best practice I\u0026rsquo;d follow from the start now: two separate pools, HDD and SSD, one for data and one for app/instance storage. TrueNAS also runs containers and VMs directly, so this split matters beyond just PBS. The actual recommendation for the System Dataset is to put it on a separate pool with real redundancy, not on boot-pool. An SSD or NVMe pool can wear faster under that write-heavy load, but it\u0026rsquo;s much quieter than HDD, which is the trade I\u0026rsquo;d make again.\nReferences Proxmox vzdump manual page: \u0026ldquo;Device and bind mounts are never backed up as their content is managed outside the Proxmox VE storage library.\u0026rdquo; Mount Point excluded from backup although backup=1-Flag is set, Proxmox forum thread, answered by Proxmox staff (Oguz) ","date":"Oct 1, 2026","excerpt":"Symptom A scheduled Proxmox Backup Server job had been running against one of my LXC containers every night since 2026-09-27. Every run reported TASK OK. The run on 2026-10-01 was incremental and reused 98.9% of the previous backup, which read as healthy.\nLine 7 of that same task log said something else:\nINFO: excluding bind mount point mp0 ('/mnt/immich-data') from backup (not a volume)I didn’t catch that line myself. Claude, who I was working through this with, is the one who flagged it. I wasn’t reading the log line by line looking for it. I’m OK with that: Claude catching the backup gap doesn’t bother me.\n...","permalink":"http://blog.pras.my.id/blogs/2026-10-01-nas-click-noise-pbs-backup-gap/","readtime":"11 min read","summary":"\u003ch2 id=\"symptom\"\u003eSymptom\u003c/h2\u003e\n\u003cp\u003eA scheduled Proxmox Backup Server job had been running against one of my LXC containers every night since 2026-09-27. Every run reported \u003ccode\u003eTASK OK\u003c/code\u003e. The run on 2026-10-01 was incremental and reused 98.9% of the previous backup, which read as healthy.\u003c/p\u003e\n\u003cp\u003eLine 7 of that same task log said something else:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" role=\"region\" aria-label=\"text code 1\" class=\"chroma\"\u003e\u003ccode class=\"language-text\" data-lang=\"text\"\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003eINFO: excluding bind mount point mp0 (\u0026#39;/mnt/immich-data\u0026#39;) from backup (not a volume)\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eI didn\u0026rsquo;t catch that line myself. Claude, who I was working through this with, is the one who flagged it. I wasn\u0026rsquo;t reading the log line by line looking for it. I\u0026rsquo;m OK with that: Claude catching the backup gap doesn\u0026rsquo;t bother me.\u003c/p\u003e","tags":["homelab","truenas","proxmox","zfs","backup","incus"],"title":"Day 2 with my custom build NAS server for the homelab"},{"content":"This is the Hugo code I use to generate the HTML files of my blog. A DevOps/SysAdmin blog about web and network technology stacks, also provides tutorials and original writing of the author. This blog also covers exciting news in science and technology.\nPowered by Hugo is a general-purpose website framework. Technically speaking, Hugo is a static site generator. Unlike systems that dynamically build a page with each visitor request, Hugo builds pages when you create or update your content. Since websites are viewed far more often than they are edited, Hugo is designed to provide an optimal viewing experience for your website’s end users and an ideal writing experience for website authors.\nHugo-Profile is a theme for Hugo, a static site generator. It is a high-performance, mobile-first Hugo theme for personal portfolios and blogs.\n","date":"Mar 2, 2026","excerpt":"This is the Hugo code I use to generate the HTML files of my blog. A DevOps/SysAdmin blog about web and network technology stacks, also provides tutorials and original writing of the author. This blog also covers exciting news in science and technology.\nPowered by Hugo is a general-purpose website framework. Technically speaking, Hugo is a static site generator. Unlike systems that dynamically build a page with each visitor request, Hugo builds pages when you create or update your content. Since websites are viewed far more often than they are edited, Hugo is designed to provide an optimal viewing experience for your website’s end users and an ideal writing experience for website authors.\n...","permalink":"http://blog.pras.my.id/blogs/2026-03-01-hugo-new-theme/","readtime":"1 min read","summary":"\u003cp\u003eThis is the Hugo code I use to generate the HTML files of my blog. A\nDevOps/SysAdmin blog about web and network technology stacks, also provides\ntutorials and original writing of the author. This blog also covers exciting\nnews in science and technology.\u003c/p\u003e\n\u003ch2 id=\"powered-by\"\u003ePowered by\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"https://gohugo.io/\"\u003eHugo\u003c/a\u003e is a general-purpose website framework. Technically\nspeaking, Hugo is a static site generator. Unlike systems that dynamically\nbuild a page with each visitor request, Hugo builds pages when you create or\nupdate your content. Since websites are viewed far more often than they are\nedited, Hugo is designed to provide an optimal viewing experience for your\nwebsite’s end users and an ideal writing experience for website authors.\u003c/p\u003e","tags":["hugo"],"title":"Hugo New Theme"},{"content":"Steps Get the current version of Stalwart Mail. current version: v0.8.0 Check the documentation for the latest version. upgrading documentation: https://github.com/stalwartlabs/stalwart/blob/main/UPGRADING.md Upgrade to the next major version incrementally next major version: v0.9.x next major version: v0.10.x next major version: v0.11.x next major version: v0.12.x Fix issues that arise during the upgrade process. issue: failed to start when using v0.11.0 root causes: https://github.com/stalwartlabs/stalwart/issues/1057 https://github.com/stalwartlabs/stalwart/issues/1104 resolution: use v0.11.3 when upgrading from v0.10 to v0.11 issue: cannot login to web admin after upgrading it to latest version when using the old version of stalwart mail root causes: https://www.reddit.com/r/stalwartlabs/comments/1ikfz8u/error_trying_to_log_in_admin/ resolution: finish the upgrade to the latest version v0.12.4 Export and backup the data before upgrading. export and backup data using stalwart mail CLI command backup the database data using the database management tool Get the current version of Stalwart Mail Check the docker-compose file to get the current version of Stalwart Mail.\nCheck the documentation for the latest version Read the upgrading documentation to understand the changes and steps required for each version upgrade.\nUpgrade to the next major version incrementally Change the stalwart mail docker image tag in the docker-compose file to:\nv0.9.0 v0.10.0 v0.11.3 (see the issue above) v0.12.4 (see the issue above) Fix issues that arise during the upgrade process Failed to start when using v0.11.0 This issue is caused by missing code in the v0.11.0 release. The solution is to use v0.11.3 instead of v0.11.0. Cannot login to web admin after upgrading it to the latest version when still using the old version of stalwart mail. Upgraded the web admin using the web admin UI or API. curl -k -u admin:your-password https://localhost/api/update/webadmin This issue is caused by a change in the web admin version. The solution is to finish the upgrade to the latest version v0.12.4. Export and backup the data before upgrading Export and backup data using stalwart mail CLI command Use the stalwart mail export command to export the data. Save the exported data to a safe location. Backup the database data using the database management tool Use the database management tool to create a backup of the database. Save the backup to a safe location. ","date":"Jun 20, 2025","excerpt":"Steps Get the current version of Stalwart Mail. current version: v0.8.0 Check the documentation for the latest version. upgrading documentation: https://github.com/stalwartlabs/stalwart/blob/main/UPGRADING.md Upgrade to the next major version incrementally next major version: v0.9.x next major version: v0.10.x next major version: v0.11.x next major version: v0.12.x Fix issues that arise during the upgrade process. issue: failed to start when using v0.11.0 root causes: https://github.com/stalwartlabs/stalwart/issues/1057 https://github.com/stalwartlabs/stalwart/issues/1104 resolution: use v0.11.3 when upgrading from v0.10 to v0.11 issue: cannot login to web admin after upgrading it to latest version when using the old version of stalwart mail root causes: https://www.reddit.com/r/stalwartlabs/comments/1ikfz8u/error_trying_to_log_in_admin/ resolution: finish the upgrade to the latest version v0.12.4 Export and backup the data before upgrading. export and backup data using stalwart mail CLI command backup the database data using the database management tool Get the current version of Stalwart Mail Check the docker-compose file to get the current version of Stalwart Mail.\n...","permalink":"http://blog.pras.my.id/blogs/2025-06-20-upgrading-self-hosted-stalwart-mail-experience/","readtime":"2 min read","summary":"\u003ch2 id=\"steps\"\u003eSteps\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eGet the current version of Stalwart Mail.\n\u003cul\u003e\n\u003cli\u003ecurrent version: v0.8.0\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003eCheck the documentation for the latest version.\n\u003cul\u003e\n\u003cli\u003eupgrading documentation: \u003ca href=\"https://github.com/stalwartlabs/stalwart/blob/main/UPGRADING.md\"\u003ehttps://github.com/stalwartlabs/stalwart/blob/main/UPGRADING.md\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003eUpgrade to the next major version incrementally\n\u003cul\u003e\n\u003cli\u003enext major version: v0.9.x\u003c/li\u003e\n\u003cli\u003enext major version: v0.10.x\u003c/li\u003e\n\u003cli\u003enext major version: v0.11.x\u003c/li\u003e\n\u003cli\u003enext major version: v0.12.x\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003eFix issues that arise during the upgrade process.\n\u003cul\u003e\n\u003cli\u003eissue: failed to start when using v0.11.0\nroot causes:\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/stalwartlabs/stalwart/issues/1057\"\u003ehttps://github.com/stalwartlabs/stalwart/issues/1057\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"https://github.com/stalwartlabs/stalwart/issues/1104\"\u003ehttps://github.com/stalwartlabs/stalwart/issues/1104\u003c/a\u003e\nresolution: use v0.11.3 when upgrading from v0.10 to v0.11\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003eissue: cannot login to web admin after upgrading it to latest version when\nusing the old version of stalwart mail\nroot causes:\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https://www.reddit.com/r/stalwartlabs/comments/1ikfz8u/error_trying_to_log_in_admin/\"\u003ehttps://www.reddit.com/r/stalwartlabs/comments/1ikfz8u/error_trying_to_log_in_admin/\u003c/a\u003e\nresolution: finish the upgrade to the latest version v0.12.4\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003eExport and backup the data before upgrading.\n\u003cul\u003e\n\u003cli\u003eexport and backup data using stalwart mail CLI command\u003c/li\u003e\n\u003cli\u003ebackup the database data using the database management tool\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch3 id=\"get-the-current-version-of-stalwart-mail\"\u003eGet the current version of Stalwart Mail\u003c/h3\u003e\n\u003cp\u003eCheck the docker-compose file to get the current version of Stalwart Mail.\u003c/p\u003e","tags":["stalwart-mail","self-hosted","upgrade"],"title":"Upgrading Self Hosted Stalwart Mail Experience"},{"content":"Introduction Talos is a container optimized Linux distro; a reimagining of Linux for distributed systems such as Kubernetes. Designed to be as minimal as possible while still maintaining practicality.\nInstallation Regardless of where you run Talos, the steps to create a Kubernetes cluster are:\nboot machines off the Talos Linux image define the endpoint for the Kubernetes API and generate your machine configurations configure Talos Linux by applying machine configurations to the machines configure talosctl bootstrap Kubernetes Pre-requisites talosctl is a CLI tool which interfaces with the Talos API. Talos Linux has no SSH access: talosctl is the tool you use to interact with the operating system on the machines.\nNetwork access We configure our DHCP server to assign static IP addresses for the VMs that we use in our cluster.\nhostname IP talos-controller-1 10.10.10.11 talos-worker-1 10.10.10.21 Talos Image Factory The Talos Linux Image Factory, developed by Sidero Labs, Inc., offers a method to download various boot assets for Talos Linux.\nFor more information about the Image Factory API and the available image formats, please visit the GitHub repository.\nFor our experiment, we will use the following image schematic ID generated by the Image Factory to suit our Proxmox environment: df227a758d9635f2dc034e8d4580518d889592c763d7b1d8179f8810da999e36\ncustomization: extraKernelArgs: - -console - console=tty0 - console=ttyS0 - net.ifnames=0 systemExtensions: officialExtensions: - siderolabs/qemu-guest-agent - siderolabs/util-linux-toolsReferences System Requirements Production Notes Support Matrix Troubleshooting Proxmox Installation ","date":"Apr 28, 2025","excerpt":"Introduction Talos is a container optimized Linux distro; a reimagining of Linux for distributed systems such as Kubernetes. Designed to be as minimal as possible while still maintaining practicality.\nInstallation Regardless of where you run Talos, the steps to create a Kubernetes cluster are:\nboot machines off the Talos Linux image define the endpoint for the Kubernetes API and generate your machine configurations configure Talos Linux by applying machine configurations to the machines configure talosctl bootstrap Kubernetes Pre-requisites talosctl is a CLI tool which interfaces with the Talos API. Talos Linux has no SSH access: talosctl is the tool you use to interact with the operating system on the machines.\n...","permalink":"http://blog.pras.my.id/blogs/2025-04-28-create-kubernetes-cluster-in-proxmox-using-talos/","readtime":"2 min read","summary":"\u003ch2 id=\"introduction\"\u003eIntroduction\u003c/h2\u003e\n\u003cp\u003eTalos is a container optimized Linux distro; a reimagining of Linux for\ndistributed systems such as Kubernetes. Designed to be as minimal as possible\nwhile still maintaining practicality.\u003c/p\u003e\n\u003ch2 id=\"installation\"\u003eInstallation\u003c/h2\u003e\n\u003cp\u003eRegardless of where you run Talos, the steps to create a Kubernetes cluster are:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eboot machines off the Talos Linux image\u003c/li\u003e\n\u003cli\u003edefine the endpoint for the Kubernetes API and generate your machine configurations\u003c/li\u003e\n\u003cli\u003econfigure Talos Linux by applying machine configurations to the machines\u003c/li\u003e\n\u003cli\u003econfigure talosctl\u003c/li\u003e\n\u003cli\u003ebootstrap Kubernetes\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3 id=\"pre-requisites\"\u003ePre-requisites\u003c/h3\u003e\n\u003cp\u003etalosctl is a CLI tool which interfaces with the Talos API. Talos Linux has no\nSSH access: talosctl is the tool you use to interact with the operating system\non the machines.\u003c/p\u003e","tags":["kubernetes","talos","proxmox","homelab"],"title":"Create Kubernetes Cluster in Proxmox Using Talos"},{"content":"My OpenStack development environment is build using RDO\u0026rsquo;s packstack utility and consists of three nodes: one controller, network, and compute node, and two compute nodes. RDO website offers two scenario for upgrading OpenStack Mitaka to OpenStack Newton. The first scenario involves taking down all of the OpenStack services at once and will not bring them back up until the upgrade process is completed. The second scenario upgrades each OpenStack service one by one to avoid downtime by performing rolling upgrades of the compute hosts, taking advantage of the fact that nova-compute from Mitaka can communicate with a Newton control plane.\nMy development environment is simple, so I choose the first scenario to upgrade my OpenStack installation. Each node which runs the OpenStack services actually a virtual machine (VM) running above multiple type of hypervisors and operating systems. The controller node is a CentOS 7 VM running above KVM in CentOS 7 host, the first compute node is a CentOS 7 VM running above KVM in ArchLinux host, and the second compute node is a CentOS 7 VM running above BHYVE in FreeBSD 10 host. The second compute node doesn\u0026rsquo;t have capabilities to do virtualization so in this compute node I use Docker as compute driver using a OpenStack project called Nova-Docker.\nThe Upgrades The upgrade process is running smoothly at first\nDisabling all OpenStack Services Install openstack-utils on all standard nodes to manage OpenStack services with openstack-service command\nsudo yum install openstack-utils Then, disable all OpenStack services on all standard nodes\nsudo openstack-service stop Performing a Package Upgrade Install the Newton release repository\nsudo yum install -y centos-release-openstack-newton Disable previous release repositories, for example\nsudo yum-config-manager --disable centos-release-openstack-mitaka Then update the packages\nsudo yum update Wait until the package upgrade is completed. Review the resulting configuration files. The upgraded packages will have installed .rpmnew files appropriate to the Newton version of the service. New versions of OpenStack services may deprecate certain configuration options. You should also review your OpenStack logs for any deprecation warnings, because these may cause problems during future upgrades. For more information on the new, updated and deprecated configuration options for each service, see Configuration Reference available from http://docs.openstack.org/newton/config-reference. Perform the package upgrade on each node in your environment.\nPerforming Synchronization of all Databases After we upgrade the packages, then we have to upgrade the database of each service. Flush expired tokens in the Identity service to decrease the time required to synchronize the database\nsudo keystone-manage token_flush Upgrade the database schema for each service that uses the database. Run the following commands on the node hosting the service’s database.\nTable 1. Commands to Synchronize OpenStack Service Databases\nService Project name Command Identity keystone # su -s /bin/sh -c \u0026quot;keystone-manage db_sync\u0026quot; keystone Image Service glance # su -s /bin/sh -c \u0026quot;glance-manage db_sync\u0026quot; glance Block Storage cinder # su -s /bin/sh -c \u0026quot;cinder-manage db sync\u0026quot; cinder Orchestration heat # su -s /bin/sh -c \u0026quot;heat-manage db_sync\u0026quot; heat Compute nova # su -s /bin/sh -c \u0026quot;nova-manage api_db sync\u0026quot; nova # su -s /bin/sh -c \u0026quot;nova-manage db sync\u0026quot; nova Telemetry ceilometer # ceilometer-dbsync Networking neutron # su -s /bin/sh -c \u0026quot;neutron-db-manage upgrade heads\u0026quot; neutron Enabling all OpenStack Services The final step enables the OpenStack services on the node. Restart all OpenStack services:\nsudo openstack-service start The Problems Like usual, we ran into problems everytime we upgrade an environment.\nResolving the configuration files differences is too much of works and I am too lazy to do it I end up using packstack utility once again to re-configure my development environment. First, we generate a template for the new packstack answer file\nsudo packstack --gen-answer-file=ANSWER-FILE-NEWTON Take your old answer file and change the passwords fields and others configuration option to suit your needs. I also upgrade the authentication schema to use the v3 version. There are also another problem which is I cannot use my domain name for declaring the nodes, so I have to use IP addresses. Then, run the packstack utility.\nsudo packstack --answer-file=ANSWER-FILE-NEWTON After the packstack utility finish successfully, reboot the OpenStack nodes.\nsudo reboot After all the nodes have started again, try to access your OpenStack installation using your old credentials.\nThe Console utilty in Instances module is not working Using IP addresses to declare the nodes is having bad effect to the Nova configuration, I have to change novncproxybase_url options/etc/nova/nova.conf_ in all KVM based compute nodes from using the controller IP address to use the controller domain name\n/etc/nova/nova.conf: ... #novncproxy_base_url=http://10.0.1.11:6080/vnc_auto.html novncproxy_base_url=http://controller:6080/vnc_auto.html Restart the OpenStack services on all nodes\nThe Nova-Docker project has been abandoned for OpenStack Newton Sadly, the nova-docker project has been abandoned and there is no way I can use my second compute node to run docker instances on OpenStack. But all hope is not lost! I managed to hack the nova-docker installation to at least run my existing docker instance on OpenStack.\nGet the latest version of nova-docker project in Github\ngit clone https://github.com/openstack/nova-docker.git Install the nova-docker\ncd nova-docker sudo python setup.py install Install the python-docker-py package\nsudo yum install python-docker-py Change the Nova configuration in /etc/nova/nova.conf\n/etc/nova/nova.conf: ... #compute_driver=libvirt.LibvirtDriver compute_driver=novadocker.virt.docker.DockerDriver Add filter file /etc/nova/rootwrap.d/docker.filters writable only by root\n/etc/nova/rootwrap.d/docker.filters: ... # nova-rootwrap command filters for setting up network in the docker driver # This file should be owned by (and only-writeable by) the root user [Filters] # nova/virt/docker/driver.py: 'ln', '-sf', '/var/run/netns/.*' ln: CommandFilter, /bin/ln, root The Hack. Create a symbolic link for the Nova compute service to pick the nova-docker module\nsudo ln -s /usr/lib/python2.7/site-packages/novadocker /usr/lib/python2.7/site-packages/nova/virt/novadocker Edit file /usr/lib/python2.7/site-packages/novadocker/virt/docker/vifs.py to accomodate deprecated configuration in OpenStack Newton\n/usr/lib/python2.7/site-packages/novadocker/virt/docker/vifs.py ... #CONF.import_opt('network_device_mtu', 'nova.objects.network') ... #mtu = CONF.network_device_mtu mtu = 1450 Restart the openstack-nova-compute service on the second node.\nReferences Upgrading from Mitaka to Newton: Overview ","date":"Jan 6, 2017","excerpt":"My OpenStack development environment is build using RDO’s packstack utility and consists of three nodes: one controller, network, and compute node, and two compute nodes. RDO website offers two scenario for upgrading OpenStack Mitaka to OpenStack Newton. The first scenario involves taking down all of the OpenStack services at once and will not bring them back up until the upgrade process is completed. The second scenario upgrades each OpenStack service one by one to avoid downtime by performing rolling upgrades of the compute hosts, taking advantage of the fact that nova-compute from Mitaka can communicate with a Newton control plane.\n...","permalink":"http://blog.pras.my.id/blogs/2017-01-06-upgrade-openstack-mitaka-to-openstack-newton-using-rdo/","readtime":"5 min read","summary":"\u003cp\u003eMy OpenStack development environment is build using RDO\u0026rsquo;s \u003cstrong\u003epackstack\u003c/strong\u003e utility\nand consists of three nodes: one controller, network, and compute node, and two\ncompute nodes. RDO website offers two scenario for\n\u003ca href=\"https://www.rdoproject.org/install/upgrading-rdo/\"\u003eupgrading\u003c/a\u003e OpenStack Mitaka\nto OpenStack Newton. The first scenario involves taking down all of the\nOpenStack services at once and will not bring them back up until the upgrade\nprocess is completed. The second scenario upgrades each OpenStack service one\nby one to avoid downtime by performing rolling upgrades of the compute hosts,\ntaking advantage of the fact that nova-compute from Mitaka can communicate with\na Newton control plane.\u003c/p\u003e","tags":["sysadmin","openstack","rdo","packstack"],"title":"Upgrade OpenStack Mitaka to OpenStack Newton using RDO"},{"content":"We will use ProxySQL as a gateway to access our Percona XtraDB Cluster. ProxySQL is a high-performance SQL proxy. ProxySQL runs as a daemon watched by a monitoring process. The process monitors the daemon and restarts it in case of a crash to minimize downtime. The daemon accepts incoming traffic from MySQL clients and forwards it to backend MySQL servers.\nInstalling ProxySQL Node configuration Node Host IP Node 1 db1 192.168.50.31 Node 2 db2 192.168.50.32 Node 3 db3 192.168.50.33 Node 4 proxysql 192.168.50.34 Prerequisites Install CentOS 7\nUpdate CentOS 7\nOpen firewall for TCP ports 6033:\nansible -i hosts -bkKv proxysql -m firewalld -a 'port=6033/tcp permanent=true state=enabled immediate=yes' Disable or set SELinux to Permissive, set option below in /etc/selinux/config and /etc/sysconfig/selinux:\nSELINUX=disabled and then reboot. 5. Remove another MySQL installation:\nansible -bkKv -i hosts proxysql -m yum -a 'name=mysql-community-* state=removed' Installation from Percona Repository Install Percona Repository:\nansible -bkKv -i hosts proxysql -m command -a '/usr/bin/yum -y install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm creates=/etc/yum.repos.d/percona-release.repo' Install ProxySQL:\nansible -bkKv -i hosts proxysql -m yum -a 'name=proxysql state=present' Change default credential configuration to /etc/proxysql.cnf:\nadmin_credentials=\u0026quot;admin:tempP455wd@\u0026quot; Also change the default credential and host configuration in /etc/proxysql-admin.cnf:\nexport PROXYSQL_USERNAME=\u0026quot;admin\u0026quot; export PROXYSQL_PASSWORD=\u0026quot;tempP455wd@\u0026quot; export PROXYSQL_HOSTNAME=\u0026quot;127.0.0.1\u0026quot; export PROXYSQL_PORT=\u0026quot;6032\u0026quot; Disable requiretty option in /etc/sudoers:\nDefaults !requiretty Start ProxySQL service:\nansible -bkKv -i hosts proxysql -m systemd -a 'name=proxysql state=started' Manual Configuration Install MySQL client (if doesn\u0026rsquo;t exist):\nansible -bkKv -i hosts proxysql -m yum -a 'name=Percona-XtraDB-Cluster-client-57 state=present' Login to ProxySQL Admin Module:\n[user@proxysql ~]$ mysql -u admin -ptempP455wd@ -h 127.0.0.1 -P 6032 Welcome to the MySQL monitor. Commands end with ; or \\g. Your MySQL connection id is 2 Server version: 5.5.30 (ProxySQL Admin Module) Copyright (c) 2009-2016 Percona LLC and/or its affiliates Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement. mysql@proxysql\u0026gt; Check ProxySQL databases and tables:\nmysql@proxysql\u0026gt; SHOW DATABASES; +-----+---------+-------------------------------+ | seq | name | file | +-----+---------+-------------------------------+ | 0 | main | | | 2 | disk | /var/lib/proxysql/proxysql.db | | 3 | stats | | | 4 | monitor | | +-----+---------+-------------------------------+ 4 rows in set (0.00 sec) mysql@proxysql\u0026gt; SHOW TABLES; +--------------------------------------+ | tables | +--------------------------------------+ | global_variables | | mysql_collations | | mysql_query_rules | | mysql_replication_hostgroups | | mysql_servers | | mysql_users | | runtime_global_variables | | runtime_mysql_query_rules | | runtime_mysql_replication_hostgroups | | runtime_mysql_servers | | runtime_scheduler | | scheduler | +--------------------------------------+ 12 rows in set (0.00 sec) Note: ProxySQL configuration can run from three different areas:\nMEMORY (your current working place) RUNTIME (the production settings) DISK (durable configuration, saved inside an SQLITE database) When you change a parameter, you change it in MEMORY area. That is done by design to allow you to test the changes before pushing to production (RUNTIME), or save them to disk.\nAdding cluster nodes to ProxySQL To configure the backend Percona XtraDB Cluster nodes in ProxySQL, insert corresponding records into the mysql_servers table.\nNote: ProxySQL uses the concept of hostgroups to group cluster nodes. This enables you to balance the load in a cluster by routing different types of traffic to different groups. There are many ways you can configure hostgroups (for example master and slaves, read and write load, etc.) and a every node can be a member of multiple hostgroups.\nThis example adds three Percona XtraDB Cluster nodes to the default hostgroup (0), which receives both write and read traffic:\nmysql@proxysql\u0026gt; INSERT INTO mysql_servers(hostgroup_id, hostname, port) VALUES (0,'192.168.50.31',3306); mysql@proxysql\u0026gt; INSERT INTO mysql_servers(hostgroup_id, hostname, port) VALUES (0,'192.168.50.32',3306); mysql@proxysql\u0026gt; INSERT INTO mysql_servers(hostgroup_id, hostname, port) VALUES (0,'192.168.50.33',3306); Use the following command to see the nodes:\nmysql@proxysql\u0026gt; SELECT * FROM mysql_servers; +--------------+---------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+ | hostgroup_id | hostname | port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | +--------------+---------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+ | 0 | 192.168.50.31 | 3306 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | | 0 | 192.168.50.32 | 3306 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | | 0 | 192.168.50.33 | 3306 | ONLINE | 1 | 0 | 1000 | 0 | 0 | 0 | +--------------+---------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+ 3 rows in set (0.00 sec) Creating ProxySQL Monitoring User To enable monitoring of Percona XtraDB Cluster nodes in ProxySQL, create a user with USAGE privilege on any node in the cluster and configure the user in ProxySQL.\nmysql@db1\u0026gt; CREATE USER 'proxysql'@'%' IDENTIFIED BY 'tempP455wd@'; mysql@db1\u0026gt; GRANT USAGE ON *.* TO 'proxysql'@'%'; Configure the monitoring user in ProxySQL:\nmysql@proxysql\u0026gt; UPDATE global_variables SET variable_value='proxysql' WHERE variable_name='mysql-monitor_username'; mysql@proxysql\u0026gt; UPDATE global_variables SET variable_value='tempP455wd@' WHERE variable_name='mysql-monitor_password'; Use LOAD command to load this configuration at runtime:\nmysql@proxysql\u0026gt; LOAD MYSQL VARIABLES TO RUNTIME; To save these changes to disk so they can persist after ProxySQL is shutdown, use SAVE command:\nmysql@proxysql\u0026gt; SAVE MYSQL VARIABLES TO DISK; Check monitoring logs to ensure that monitoring is enabled:\nmysql@proxysql\u0026gt; SELECT * FROM monitor.mysql_server_connect_log ORDER BY time_start_us DESC LIMIT 6; +---------------+------+------------------+----------------------+---------------+ | hostname | port | time_start_us | connect_success_time | connect_error | +---------------+------+------------------+----------------------+---------------+ | 192.168.50.31 | 3306 | 1469635762434625 | 1695 | NULL | | 192.168.50.32 | 3306 | 1469635762434625 | 1779 | NULL | | 192.168.50.33 | 3306 | 1469635762434625 | 1627 | NULL | | 192.168.50.31 | 3306 | 1469635642434517 | 1557 | NULL | | 192.168.50.32 | 3306 | 1469635642434517 | 2737 | NULL | | 192.168.50.33 | 3306 | 1469635642434517 | 1447 | NULL | +---------------+------+------------------+----------------------+---------------+ 6 rows in set (0.00 sec) Check that ProxySQL is able to connect and ping the nodes:\nmysql\u0026gt; SELECT * FROM monitor.mysql_server_ping_log ORDER BY time_start_us DESC LIMIT 6; +---------------+------+------------------+-------------------+------------+ | hostname | port | time_start_us | ping_success_time | ping_error | +---------------+------+------------------+-------------------+------------+ | 192.168.50.31 | 3306 | 1469635762416190 | 948 | NULL | | 192.168.50.32 | 3306 | 1469635762416190 | 803 | NULL | | 192.168.50.33 | 3306 | 1469635762416190 | 711 | NULL | | 192.168.50.31 | 3306 | 1469635702416062 | 783 | NULL | | 192.168.50.32 | 3306 | 1469635702416062 | 631 | NULL | | 192.168.50.33 | 3306 | 1469635702416062 | 542 | NULL | +---------------+------+------------------+-------------------+------------+ 6 rows in set (0.00 sec) Enable monitoring of these nodes by loading them at runtime:\nmysql@proxysql\u0026gt; LOAD MYSQL SERVERS TO RUNTIME; Creating ProxySQL Client User ProxySQL must have users that can access backend nodes to manage connections.\nTo add a user, insert credentials into mysql_users table:\nmysql@proxysql\u0026gt; INSERT INTO mysql_users (username,password) VALUES ('sbuser','sbP455wd@'); Query OK, 1 row affected (0.00 sec) Load the user into runtime space:\nmysql@proxysql\u0026gt; LOAD MYSQL USERS TO RUNTIME; While in the runtime, the user password is not hashed. To facilitate the support of hashed passwords, ProxySQL v1.2.3 introduced a new global boolean variable, admin-hash_password, enabled by default. When admin-hash_password=true, password are automatically hashed at RUNTIME only when running LOAD MYSQL USERS TO RUNTIME. Passwords in mysql_users tables are yet not automatically hashed.[2]\nmysql@proxysql\u0026gt; SELECT username,password FROM mysql_users; +----------+-----------+ | username | password | +----------+-----------+ | sbuser | sbP455wd@ | +----------+-----------+ 1 row in set (0.00 sec) Nonetheless, it is easily possible to hash the passwords in mysqlusers table, both in-memory and on-disk. It is enough to copy users from _RUNTIME, for example running SAVE MYSQL USERS FROM RUNTIME after LOAD MYSQL USERS TO RUNTIME, and then SAVE MYSQL USERS TO DISK (recommended).[2]\nmysql@proxysql\u0026gt; SAVE MYSQL USERS FROM RUNTIME; Query OK, 0 rows affected (0.00 sec) mysql@proxysql\u0026gt; SELECT username,password FROM mysql_users; +----------+-------------------------------------------+ | username | password | +----------+-------------------------------------------+ | sbuser | *00CEF9910CD14484D09244483B96CF51F6294D40 | +----------+-------------------------------------------+ 1 row in set (0.00 sec) mysql@proxysql\u0026gt; SAVE MYSQL USERS TO DISK; Query OK, 0 rows affected (0.29 sec) Try to login with the new user to check if the user has been set up correctly:\n[user@proxysql ~]$ mysql -u sbuser -psbP455wd@ -h 127.0.0.1 -P 6033 Welcome to the MySQL monitor. Commands end with ; or \\g. Your MySQL connection id is 1491 Server version: 5.5.30 (ProxySQL) Copyright (c) 2009-2016 Percona LLC and/or its affiliates Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement. mysql@proxysql\u0026gt; To provide read/write access to the cluster for ProxySQL, add this user on one of the Percona XtraDB Cluster nodes:\nmysql@db2\u0026gt; CREATE USER 'sbuser'@'192.168.50.34' IDENTIFIED BY 'sbP455wd@'; Query OK, 0 rows affected (0.01 sec) mysql@db2\u0026gt; GRANT ALL ON sbtest.* TO 'sbuser'@'192.168.50.34'; Query OK, 0 rows affected (0.00 sec) Adding Galera Support Default ProxySQL cannot detect a node which is not in Synced state. To monitor status of Percona XtraDB Cluster nodes, use the proxysql_galera_checker script. The script is located here: /usr/bin/proxysql_galera_checker. To use this script, load it into ProxySQL Scheduler.\nThe following example shows how you can load the script for default ProxySQL configuration:\nmysql@proxysql\u0026gt; INSERT INTO scheduler(id,active,interval_ms,filename,arg1,arg2,arg3,arg4,arg5) VALUES (1,1,10000,'/usr/bin/proxysql_galera_checker',0,0,3,1,'/var/lib/proxysql/proxysql_galera_checker.log'); To load the scheduler changes into the runtime space:\nmysql@proxysql\u0026gt; LOAD SCHEDULER TO RUNTIME; To make sure that the script has been loaded, check the runtime_scheduler table:\nmysql@proxysql\u0026gt; SELECT * FROM runtime_scheduler\\G *************************** 1. row *************************** id: 1 active: 1 interval_ms: 10000 filename: /usr/bin/proxysql_galera_checker arg1: 0 arg2: 0 arg3: 3 arg4: 1 arg5: /var/lib/proxysql/proxysql_galera_checker.log comment: 1 row in set (0.00 sec) To check the status of available nodes, run the following command:\nmysql@proxysql\u0026gt; SELECT hostgroup_id,hostname,port,status FROM mysql_servers; +--------------+---------------+------+--------+ | hostgroup_id | hostname | port | status | +--------------+---------------+------+--------+ | 0 | 192.168.50.31 | 3306 | ONLINE | | 0 | 192.168.50.32 | 3306 | ONLINE | | 0 | 192.168.50.33 | 3306 | ONLINE | +--------------+---------------+------+--------+ 3 rows in set (0.00 sec) Note: Each node can have the following status:\nONLINE: backend node is fully operational. SHUNNED: backend node is temporarily taken out of use, because either too many connection errors hapenned in a short time, or replication lag exceeded the allowed threshold. OFFLINE_SOFT: new incoming connections aren’t accepted, while existing connections are kept until they become inactive. In other words, connections are kept in use until the current transaction is completed. This allows to gracefully detach a backend node. OFFLINE_HARD: existing connections are dropped, and new incoming connections aren’t accepted. This is equivalent to deleting the node from a hostgroup, or temporarily taking it out of the hostgroup for maintenance. Testing Cluster with sysbench Install sysbench from Percona software repositories:\nansible -bkKv -i hosts proxysql -m yum -a 'name=sysbench state=present' Note: sysbench requires ProxySQL client user credentials that you created in Creating ProxySQL Client User.\nCreate the database that will be used for testing on one of the Percona XtraDB Cluster nodes:\nmysql@db3\u0026gt; CREATE DATABASE sbtest; Populate the table with data for the benchmark on the ProxySQL node:\n[user@proxysql ~]$ sysbench --report-interval=5 --num-threads=4 \\ --num-requests=0 --max-time=20 \\ --test=/usr/share/doc/sysbench/tests/db/oltp.lua \\ --mysql-user='sbuser' --mysql-password='sbP455wd@' \\ --oltp-table-size=10000 --mysql-host=127.0.0.1 --mysql-port=6033 \\ prepare Run the benchmark on the ProxySQL node:\nroot@proxysql:~# sysbench --report-interval=5 --num-threads=4 \\ --num-requests=0 --max-time=20 \\ --test=/usr/share/doc/sysbench/tests/db/oltp.lua \\ --mysql-user='sbuser' --mysql-password='sbP455wd@' \\ --oltp-table-size=10000 --mysql-host=127.0.0.1 --mysql-port=6033 \\ run ProxySQL stores collected data in the stats schema:\nmysql@proxysql\u0026gt; SHOW TABLES FROM stats; +--------------------------------+ | tables | +--------------------------------+ | stats_mysql_query_rules | | stats_mysql_commands_counters | | stats_mysql_processlist | | stats_mysql_connection_pool | | stats_mysql_query_digest | | stats_mysql_query_digest_reset | | stats_mysql_global | +--------------------------------+ For example, to see the number of commands that run on the cluster:\nmysql@proxysql\u0026gt; SELECT * FROM stats_mysql_commands_counters; +-------------------+---------------+-----------+-----------+-----------+---------+---------+----------+----------+-----------+-----------+--------+--------+---------+----------+ | Command | Total_Time_us | Total_cnt | cnt_100us | cnt_500us | cnt_1ms | cnt_5ms | cnt_10ms | cnt_50ms | cnt_100ms | cnt_500ms | cnt_1s | cnt_5s | cnt_10s | cnt_INFs | +-------------------+---------------+-----------+-----------+-----------+---------+---------+----------+----------+-----------+-----------+--------+--------+---------+----------+ | ALTER_TABLE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | ANALYZE_TABLE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | BEGIN | 2212625 | 3686 | 55 | 2162 | 899 | 569 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | CHANGE_MASTER | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | COMMIT | 21522591 | 3628 | 0 | 0 | 0 | 1765 | 1590 | 272 | 1 | 0 | 0 | 0 | 0 | 0 | | CREATE_DATABASE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | CREATE_INDEX | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | DELETE | 2904130 | 3670 | 35 | 1546 | 1346 | 723 | 19 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | | DESCRIBE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | INSERT | 19531649 | 3660 | 39 | 1588 | 1292 | 723 | 12 | 2 | 0 | 1 | 0 | 1 | 2 | 0 | ... | SELECT | 35049794 | 51605 | 501 | 26180 | 16606 | 8241 | 70 | 3 | 4 | 0 | 0 | 0 | 0 | 0 | | SELECT_FOR_UPDATE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | UPDATE | 6402302 | 7367 | 75 | 2503 | 3020 | 1743 | 23 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | | USE | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | SHOW | 19691 | 2 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | | UNKNOWN | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +-------------------+---------------+-----------+-----------+-----------+---------+---------+----------+----------+-----------+-----------+--------+--------+---------+----------+ 52 rows in set (0.00 sec) Automatic Fail-over ProxySQL will automatically detect if a node is not available or not synced with the cluster.\nYou can check the status of all available nodes by running:\nmysql@proxysql\u0026gt; SELECT hostgroup_id,hostname,port,status FROM mysql_servers; +--------------+---------------+------+--------+ | hostgroup_id | hostname | port | status | +--------------+---------------+------+--------+ | 0 | 192.168.50.31 | 3306 | ONLINE | | 0 | 192.168.50.32 | 3306 | ONLINE | | 0 | 192.168.50.33 | 3306 | ONLINE | +--------------+---------------+------+--------+ 3 rows in set (0.00 sec) To test problem detection and fail-over mechanism, shut down Node 3:\nansible -bkKv -i hosts db3 -m systemd -a 'name=mysql state=stopped' ProxySQL will detect that the node is down and update its status to OFFLINE_SOFT:\nmysql@proxysql\u0026gt; SELECT hostgroup_id,hostname,port,status FROM mysql_servers; +--------------+---------------+------+--------------+ | hostgroup_id | hostname | port | status | +--------------+---------------+------+--------------+ | 0 | 192.168.50.31 | 3306 | ONLINE | | 0 | 192.168.50.32 | 3306 | ONLINE | | 0 | 192.168.50.33 | 3306 | OFFLINE_SOFT | +--------------+---------------+------+--------------+ 3 rows in set (0.00 sec) Now start Node 3 again:\nansible -bkKv -i hosts db3 -m systemd -a 'name=mysql state=stopped' The script will detect the change and mark the node as ONLINE:\nmysql@proxysql\u0026gt; SELECT hostgroup_id,hostname,port,status FROM mysql_servers; +--------------+---------------+------+--------+ | hostgroup_id | hostname | port | status | +--------------+---------------+------+--------+ | 0 | 192.168.50.31 | 3306 | ONLINE | | 0 | 192.168.50.32 | 3306 | ONLINE | | 0 | 192.168.50.33 | 3306 | ONLINE | +--------------+---------------+------+--------+ 3 rows in set (0.00 sec) References Percona XtraDB Cluster 5.7 Documentation Passwords management How to set up read-write split in Galera Cluster using ProxySQL MySQL Documentation Ansible Documentation ","date":"Dec 9, 2016","excerpt":"We will use ProxySQL as a gateway to access our Percona XtraDB Cluster. ProxySQL is a high-performance SQL proxy. ProxySQL runs as a daemon watched by a monitoring process. The process monitors the daemon and restarts it in case of a crash to minimize downtime. The daemon accepts incoming traffic from MySQL clients and forwards it to backend MySQL servers.\nInstalling ProxySQL Node configuration Node Host IP Node 1 db1 192.168.50.31 Node 2 db2 192.168.50.32 Node 3 db3 192.168.50.33 Node 4 proxysql 192.168.50.34 Prerequisites Install CentOS 7\n...","permalink":"http://blog.pras.my.id/blogs/2016-12-09-using-proxysql-to-access-and-manage-percona-xtradb-cluster/","readtime":"13 min read","summary":"\u003cp\u003eWe will use ProxySQL as a gateway to access our Percona XtraDB Cluster. ProxySQL is a high-performance SQL proxy. ProxySQL runs as a daemon watched by a monitoring process. The process monitors the daemon and restarts it in case of a crash to minimize downtime. The daemon accepts incoming traffic from MySQL clients and forwards it to backend MySQL servers.\u003c/p\u003e\n\u003ch2 id=\"installing-proxysql\"\u003eInstalling ProxySQL\u003c/h2\u003e\n\u003ch3 id=\"node-configuration\"\u003eNode configuration\u003c/h3\u003e\n\u003cdiv class=\"pl-table-scroll\" role=\"region\" tabindex=\"0\" aria-label=\"Table 1\"\u003e\n  \u003ctable\u003e\n    \u003cthead\u003e\n      \u003ctr\u003e\n        \u003cth style=\"text-align: left\"\u003eNode\u003c/th\u003e\n        \u003cth style=\"text-align: left\"\u003eHost\u003c/th\u003e\n        \u003cth style=\"text-align: left\"\u003eIP\u003c/th\u003e\n      \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n      \u003ctr\u003e\n        \u003ctd style=\"text-align: left\"\u003eNode 1\u003c/td\u003e\n        \u003ctd style=\"text-align: left\"\u003edb1\u003c/td\u003e\n        \u003ctd style=\"text-align: left\"\u003e192.168.50.31\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n        \u003ctd style=\"text-align: left\"\u003eNode 2\u003c/td\u003e\n        \u003ctd style=\"text-align: left\"\u003edb2\u003c/td\u003e\n        \u003ctd style=\"text-align: left\"\u003e192.168.50.32\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n        \u003ctd style=\"text-align: left\"\u003eNode 3\u003c/td\u003e\n        \u003ctd style=\"text-align: left\"\u003edb3\u003c/td\u003e\n        \u003ctd style=\"text-align: left\"\u003e192.168.50.33\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n        \u003ctd style=\"text-align: left\"\u003eNode 4\u003c/td\u003e\n        \u003ctd style=\"text-align: left\"\u003eproxysql\u003c/td\u003e\n        \u003ctd style=\"text-align: left\"\u003e192.168.50.34\u003c/td\u003e\n      \u003c/tr\u003e\n    \u003c/tbody\u003e\n  \u003c/table\u003e\n\u003c/div\u003e\n\u003ch3 id=\"prerequisites\"\u003ePrerequisites\u003c/h3\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp\u003eInstall CentOS 7\u003c/p\u003e","tags":["sysadmin","database","mysql","percona","proxysql"],"title":"Using ProxySQL to Access and Manage Percona XtraDB Cluster"},{"content":"Percona XtraDB Cluster is a database clustering solution for MySQL. It ensures high availability, prevents downtime and data loss, and provides linear scalability for a growing environment. Here we will try to install Percona XtraDB Cluster on a three nodes cluster configuration with the help from Ansible configuration management.\nInstalling Percona XtraDB Cluster on Red Hat Enterprise Linux and CentOS 7 Node configuration Node Host IP Node 1 db1 192.168.50.31 Node 2 db2 192.168.50.32 Node 3 db3 192.168.50.33 Prerequisites Install CentOS 7 Update CentOS 7 Open firewall for TCP ports 3306, 4444, 4567, 4568: ansible -i hosts -bkKv db-cluster -m firewalld -a \u0026#39;port=3306/tcp permanent=true state=enabled immediate=yes\u0026#39; ansible -i hosts -bkKv db-cluster -m firewalld -a \u0026#39;port=4444/tcp permanent=true state=enabled immediate=yes\u0026#39; ansible -i hosts -bkKv db-cluster -m firewalld -a \u0026#39;port=4567/tcp permanent=true state=enabled immediate=yes\u0026#39; ansible -i hosts -bkKv db-cluster -m firewalld -a \u0026#39;port=4568/tcp permanent=true state=enabled immediate=yes\u0026#39; Disable or set SELinux to Permissive, set option below in /etc/selinux/config and /etc/sysconfig/selinux:\nSELINUX=disabled and then reboot.\nRemove another MySQL installation:\nansible -bkKv -i hosts db-cluster -m yum -a 'name=mysql-community-* state=removed' Installation from Percona Repository Install Percona Repository:\nansible -bkKv -i hosts db-cluster -m command -a '/usr/bin/yum -y install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm creates=/etc/yum.repos.d/percona-release.repo' Install Percona-XtraDB-Cluster:\nansible -bkKv -i hosts db-cluster -m yum -a 'name=Percona-XtraDB-Cluster-57 state=present' Start Percona XtraDB Cluster server service:\nansible -bkKv -i hosts db-cluster -m systemd -a 'name=mysql state=started' For each nodes, find the Percona XtraDB Cluster server temporary root password:\nsudo grep 'temporary password' /var/log/mysqld.log For each nodes, use the temporary password to log in as root:\nmysql -u root -p For each nodes, change the password for the root account:\nmysql\u0026gt; ALTER USER 'root'@'localhost' IDENTIFIED BY 'tempP455wd@'; Query OK, 0 rows affected (0.00 sec) mysql\u0026gt; exit Bye Stop Percona XtraDB Cluster server service:\nansible -bkKv -i hosts db-cluster -m systemd -a 'name=mysql state=stopped' Configuring Nodes for Write-Set Replication Make sure to stop Percona XtraDB Cluster server service:\nansible -bkKv -i hosts db-cluster -m systemd -a 'name=mysql state=stopped' Add the following configuration to /etc/my.cnf on the first node:\nwsrep_provider=/usr/lib64/galera3/libgalera_smm.so wsrep_cluster_name=db-cluster wsrep_cluster_address=gcomm://192.168.50.31,192.168.50.32,192.168.50.33 wsrep_node_name=db1 wsrep_node_address=192.168.50.31 wsrep_sst_method=xtrabackup-v2 wsrep_sst_auth=sstuser:tempP455wd@ pxc_strict_mode=ENFORCING binlog_format=ROW default_storage_engine=InnoDB innodb_autoinc_lock_mode=2 Use the same configuration for /etc/my.cnf on the other nodes with some modification for second node:\nwsrep_node_name=db2 wsrep_node_address=192.168.50.32 And modification for third node:\nwsrep_node_name=db3 wsrep_node_address=192.168.50.33 Configuration Reference wsrep_provider\nSpecify the path to the Galera library. Red Hat or CentOS: /usr/lib64/galera3/libgalera_smm.so\nwsrep_cluster_name\nSpecify the logical name for your cluster. It must be the same for all nodes in your cluster.\nwsrep_cluster_address\nSpecify the IP addresses of nodes in your cluster. At least one is required for a node to join the cluster, but it is recommended to list addresses of all nodes. This way if the first node in the list is not available, the joining node can use other addresses. No addresses are required for the initial node in the cluster. However, it is recommended to specify them and properly bootstrap the first node. This will ensure that the node is able to rejoin the cluster if it goes down in the future.\nwsrep_node_name\nSpecify the logical name for each individual node. If this variable is not specified, the host name will be used.\nwsrep_node_address\nSpecify the IP address of this particular node.\nwsrep_sst_method\nBy default, Percona XtraDB Cluster uses Percona XtraBackup for State Snapshot Transfer (SST). Setting wsrep_sst_method=xtrabackup-v2 is highly recommended. This method requires a user for SST to be set up on the initial node. Provide SST user credentials with the wsrep_sst_auth variable.\nwsrep_sst_auth\nSpecify authentication credentials for SST as \u0026lt;sst_user\u0026gt;:\u0026lt;sst_pass\u0026gt;. You must create this user when Bootstrapping the First Node and provide necessary privileges for it:\nmysql\u0026gt; CREATE USER 'sstuser'@'localhost' IDENTIFIED BY 'tempP455wd@'; mysql\u0026gt; GRANT RELOAD, LOCK TABLES, PROCESS, REPLICATION CLIENT ON *.* TO 'sstuser'@'localhost'; mysql\u0026gt; FLUSH PRIVILEGES; pxc_strict_mode\nPXC Strict Mode is enabled by default and set to ENFORCING, which blocks the use of experimental and unsupported features in Percona XtraDB Cluster.\nbinlog_format\nGalera supports only row-level replication, so set binlog_format=ROW.\ndefault_storage_engine\nGalera fully supports only the InnoDB storage engine. It will not work correctly with MyISAM or any other non-transactional storage engines. Set this variable to default_storage_engine=InnoDB.\ninnodb_autoinc_lock_mode\nGalera supports only interleaved (2) lock mode for InnoDB. Setting the traditional (0) or consecutive (1) lock mode can cause replication to fail due to unresolved deadlocks. Set this variable to innodb_autoinc_lock_mode=2.\nBootstrapping the First Node After you configure all PXC nodes, initialize the cluster by bootstrapping the first node. The initial node should be the one that contains all your data, which you want to be replicated to other nodes. Bootstrapping implies starting the node without any known cluster addresses. If the wsrep_cluster_address variable is empty, Percona XtraDB Cluster assumes that this is the first node and initializes the cluster.\nStart the first node using the following command instead of changing configuration:\n[user@db1 ~]$ sudo systemctl start mysql@bootstrap.service This command runs in bootstrap mode with wsrep_cluster_address=gcomm://. This tells the node to initialize the cluster with wsrep_cluster_conf_id set to 1, after we add another nodes to the cluster, we can then restart this node as normal, and it will use standard configuration again.\nCheck that the first node has been properly initialized:\nmysql@db1\u0026gt; show status like 'wsrep%'; +----------------------------+--------------------------------------+ | Variable_name | Value | +----------------------------+--------------------------------------+ | wsrep_local_state_uuid | c2883338-834d-11e2-0800-03c9c68e41ec | | ... | ... | | wsrep_local_state | 4 | | wsrep_local_state_comment | Synced | | ... | ... | | wsrep_cluster_size | 1 | | wsrep_cluster_status | Primary | | wsrep_connected | ON | | ... | ... | | wsrep_ready | ON | +----------------------------+--------------------------------------+ 40 rows in set (0.01 sec) The previous output shows that the cluster size is 1 node, it is the primary component, the node is in Synced state, it is fully connected and ready for write-set replication.\nBefore adding other nodes to the new cluster, we need to create user for SST and provide necessary privileges for it. The credentials must match those specified when Configuring Nodes for Write-Set Replication.\nmysql@db1\u0026gt; CREATE USER 'sstuser'@'localhost' IDENTIFIED BY 'tempP455wd@'; mysql@db1\u0026gt; GRANT RELOAD, LOCK TABLES, PROCESS, REPLICATION CLIENT ON *.* TO 'sstuser'@'localhost'; mysql@db1\u0026gt; FLUSH PRIVILEGES; After initializing the cluster, you can add other nodes.\nAdding Nodes to Cluster New nodes that are properly configured are provisioned automatically. When you start a node with the address of at least one other running node in the wsrep_cluster_address variable, it automatically joins the cluster and synchronizes with it.\nNote: Any existing data and configuration will be overwritten to match the data and configuration of the DONOR node. Do not join several nodes at the same time to avoid overhead due to large amounts of traffic when a new node joins.\nBy default, Percona XtraDB Cluster uses Percona XtraBackup for State Snapshot Transfer (SST). This requires the following: Set the wsrep_sst_method variable to xtrabackup-v2 and provide SST user credentials with the wsrep_sst_auth variable. Create a user for SST on the initial node. Start the second node using the following command:\n[user@db2 ~]$ sudo systemctl start mysql.service After the server starts, it should receive SST automatically.\nCheck the status of second node:\nmysql@db2\u0026gt; show status like 'wsrep%'; +----------------------------+--------------------------------------+ | Variable_name | Value | +----------------------------+--------------------------------------+ | wsrep_local_state_uuid | c2883338-834d-11e2-0800-03c9c68e41ec | | ... | ... | | wsrep_local_state | 4 | | wsrep_local_state_comment | Synced | | ... | ... | | wsrep_cluster_size | 1 | | wsrep_cluster_status | Primary | | wsrep_connected | ON | | ... | ... | | wsrep_ready | ON | +----------------------------+--------------------------------------+ 40 rows in set (0.01 sec) Previous output shows that the new node has been successfully added to the cluster. Cluster size is now 2 nodes, it is the primary component, and it is fully connected and ready to receive write-set replication. If the state of the second node is Synced as in the previous example, then the node received full SST, is synchronized with the cluster, and you can proceed to add the next node.\nNote: If the state of the node is Joiner, it means that SST hasn’t finished. Do not add new nodes until all others are in Synced state.\nAdd the third node as usual:\n[user@db3 ~]$ sudo systemctl start mysql.service Check the status of third node:\nmysql@db3\u0026gt; show status like 'wsrep%'; +----------------------------+--------------------------------------+ | Variable_name | Value | +----------------------------+--------------------------------------+ | wsrep_local_state_uuid | c2883338-834d-11e2-0800-03c9c68e41ec | | ... | ... | | wsrep_local_state | 4 | | wsrep_local_state_comment | Synced | | ... | ... | | wsrep_cluster_size | 1 | | wsrep_cluster_status | Primary | | wsrep_connected | ON | | ... | ... | | wsrep_ready | ON | +----------------------------+--------------------------------------+ 40 rows in set (0.01 sec) Previous output shows that the new node has been successfully added to the cluster. Cluster size is now 3 nodes, it is the primary component, and it is fully connected and ready to receive write-set replication. When you add all nodes to the cluster, you can verify replication by running queries and manipulating data on nodes to see if these changes are synchronized accross the cluster.\nVerifying Replication The following procedure can be used to verify replication by doing some operation each in different node.\nCreate a new database on the second node:\nmysql@db2\u0026gt; CREATE DATABASE percona; Query OK, 1 row affected (0.01 sec) Create a new table on the third node:\nmysql@db3\u0026gt; USE percona; Database changed mysql@db3\u0026gt; CREATE TABLE example (node_id INT PRIMARY KEY, node_name VARCHAR(30)); Query OK, 0 rows affected (0.05 sec) Insert a record on the first node:\nmysql@db1\u0026gt; INSERT INTO percona.example VALUES (1, 'percona1'); Query OK, 1 row affected (0.02 sec) Retrieve rows from that table on the second node:\nmysql@db2\u0026gt; SELECT * FROM percona.example; +---------+-----------+ | node_id | node_name | +---------+-----------+ | 1 | percona1 | +---------+-----------+ 1 row in set (0.00 sec) References Percona XtraDB Cluster 5.7 Documentation Ansible Documentation MySQL Documentation ","date":"Dec 6, 2016","excerpt":"Percona XtraDB Cluster is a database clustering solution for MySQL. It ensures high availability, prevents downtime and data loss, and provides linear scalability for a growing environment. Here we will try to install Percona XtraDB Cluster on a three nodes cluster configuration with the help from Ansible configuration management.\nInstalling Percona XtraDB Cluster on Red Hat Enterprise Linux and CentOS 7 Node configuration Node Host IP Node 1 db1 192.168.50.31 Node 2 db2 192.168.50.32 Node 3 db3 192.168.50.33 Prerequisites Install CentOS 7 Update CentOS 7 Open firewall for TCP ports 3306, 4444, 4567, 4568: ansible -i hosts -bkKv db-cluster -m firewalld -a 'port=3306/tcp permanent=true state=enabled immediate=yes' ansible -i hosts -bkKv db-cluster -m firewalld -a 'port=4444/tcp permanent=true state=enabled immediate=yes' ansible -i hosts -bkKv db-cluster -m firewalld -a 'port=4567/tcp permanent=true state=enabled immediate=yes' ansible -i hosts -bkKv db-cluster -m firewalld -a 'port=4568/tcp permanent=true state=enabled immediate=yes' Disable or set SELinux to Permissive, set option below in /etc/selinux/config and /etc/sysconfig/selinux:\n...","permalink":"http://blog.pras.my.id/blogs/2016-12-06-build-percona-xtradb-cluster-using-ansible/","readtime":"8 min read","summary":"\u003cp\u003ePercona XtraDB Cluster is a database clustering solution for MySQL. It ensures\nhigh availability, prevents downtime and data loss, and provides linear\nscalability for a growing environment. Here we will try to install Percona\nXtraDB Cluster on a three nodes cluster configuration with the help from\nAnsible configuration management.\u003c/p\u003e\n\u003ch2 id=\"installing-percona-xtradb-cluster-on-red-hat-enterprise-linux-and-centos-7\"\u003eInstalling Percona XtraDB Cluster on Red Hat Enterprise Linux and CentOS 7\u003c/h2\u003e\n\u003ch3 id=\"node-configuration\"\u003eNode configuration\u003c/h3\u003e\n\u003cdiv class=\"pl-table-scroll\" role=\"region\" tabindex=\"0\" aria-label=\"Table 1\"\u003e\n  \u003ctable\u003e\n    \u003cthead\u003e\n      \u003ctr\u003e\n        \u003cth style=\"text-align: left\"\u003eNode\u003c/th\u003e\n        \u003cth style=\"text-align: left\"\u003eHost\u003c/th\u003e\n        \u003cth style=\"text-align: left\"\u003eIP\u003c/th\u003e\n      \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n      \u003ctr\u003e\n        \u003ctd style=\"text-align: left\"\u003eNode 1\u003c/td\u003e\n        \u003ctd style=\"text-align: left\"\u003edb1\u003c/td\u003e\n        \u003ctd style=\"text-align: left\"\u003e192.168.50.31\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n        \u003ctd style=\"text-align: left\"\u003eNode 2\u003c/td\u003e\n        \u003ctd style=\"text-align: left\"\u003edb2\u003c/td\u003e\n        \u003ctd style=\"text-align: left\"\u003e192.168.50.32\u003c/td\u003e\n      \u003c/tr\u003e\n      \u003ctr\u003e\n        \u003ctd style=\"text-align: left\"\u003eNode 3\u003c/td\u003e\n        \u003ctd style=\"text-align: left\"\u003edb3\u003c/td\u003e\n        \u003ctd style=\"text-align: left\"\u003e192.168.50.33\u003c/td\u003e\n      \u003c/tr\u003e\n    \u003c/tbody\u003e\n  \u003c/table\u003e\n\u003c/div\u003e\n\u003ch3 id=\"prerequisites\"\u003ePrerequisites\u003c/h3\u003e\n\u003col\u003e\n\u003cli\u003eInstall CentOS 7\u003c/li\u003e\n\u003cli\u003eUpdate CentOS 7\u003c/li\u003e\n\u003cli\u003eOpen firewall for TCP ports 3306, 4444, 4567, 4568:\u003c/li\u003e\n\u003c/ol\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" role=\"region\" aria-label=\"bash code 1\" class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003eansible -i hosts -bkKv db-cluster -m firewalld -a \u003cspan class=\"s1\"\u003e\u0026#39;port=3306/tcp permanent=true\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"s1\"\u003estate=enabled immediate=yes\u0026#39;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003eansible -i hosts -bkKv db-cluster -m firewalld -a \u003cspan class=\"s1\"\u003e\u0026#39;port=4444/tcp permanent=true\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"s1\"\u003estate=enabled immediate=yes\u0026#39;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003eansible -i hosts -bkKv db-cluster -m firewalld -a \u003cspan class=\"s1\"\u003e\u0026#39;port=4567/tcp permanent=true\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"s1\"\u003estate=enabled immediate=yes\u0026#39;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003eansible -i hosts -bkKv db-cluster -m firewalld -a \u003cspan class=\"s1\"\u003e\u0026#39;port=4568/tcp permanent=true\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"s1\"\u003estate=enabled immediate=yes\u0026#39;\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003col\u003e\n\u003cli\u003e\n\u003cp\u003eDisable or set SELinux to Permissive, set option below in \u003cstrong\u003e/etc/selinux/config\u003c/strong\u003e and \u003cstrong\u003e/etc/sysconfig/selinux\u003c/strong\u003e:\u003c/p\u003e","tags":["sysadmin","mysql","percona","ansible"],"title":"Build Percona XtraDB Cluster using Ansible"},{"content":"What is a Linux Cluster? Linux cluster is a group of computers running Linux which is interconnected in a local network so they can communicate with each other. Linux cluster is often used in high performance computing to do complex calculation of scientific problems because they can share the calculation load across all computers in the cluster. One example of the technology used to share the calculation load to all computers in the cluster is MPI or Message Passing Interface. There are many implementations of MPI, for example OpenMPI, MPICH, and Intel MPI.\nHigh Performance Computing High performance computing is a method using parallel processing to run advanced computer applications more efficiently, reliably, and quickly and usually refers to the practice of aggregating computing power of several computers to get higher performance than one could get from a single computer to solve complicated problems in science, engineering or business.\nWaste of Computing Power A typical datacenter which runs internet service like web and email hosting usually doesn\u0026rsquo;t consume much of its raw computing power and the unused processor\u0026rsquo;s cores become a waste of electricity. One idea to utilize the unused computing power is to create a simple cluster underneath application which serve the usual internet service to run some parallel application which can be used to solve complicated but parallelizable problems. Of course the use of the cluster must be strictly moderated so it won\u0026rsquo;t disturb the operational of main internet service.\nHigh Performance Computer Cluster A high performance computer is a computer with special specification which provides it with a high computational power in form of processor\u0026rsquo;s technology, processor\u0026rsquo;s number of cores, size and bandwidth of memory, large capacity harddisks, very fast storage and networking devices, etc. A computer which used as a server in data center usually has a specification close to the specification of a high performance computer. A group of high performance computer can be combined as a cluster to calculate complex problems using special computer applications or programs. In Chemical Computation, example of such programs is QuantumESPRESSO, which is suitable to investigate a crystalline structure, and GAMESS, which is suitable to investigate a molecular structure.\nAnsible Ansible is a configuration management tool which commonly used to manage multiple servers simultaneously in DevOps practice. But, its functionality can be used not only to build a cloud infrastructure but also to build a high performance computer cluster. Configuration of compute nodes can be done automatically and simultaneously from a single master node thus removing needs to log in one-by-one to each compute node. Another configuration management tool which already popular in HPC practice is C3.\nSLURM (Simple Linux Utility for Resource Management) SLURM is a cluster management tool and job scheduling system for linux clusters. In other words, user can submit calculation job or manage cluster resources allocation using SLURM. SLURM has several main functions: resources allocation, running job management, and queue management, and more functionalities can be added using plugin. SLURM is an open-source tool which highly scalable and fault-tolerant and requires no kernel modification for its operation.\n","date":"Nov 7, 2016","excerpt":"What is a Linux Cluster? Linux cluster is a group of computers running Linux which is interconnected in a local network so they can communicate with each other. Linux cluster is often used in high performance computing to do complex calculation of scientific problems because they can share the calculation load across all computers in the cluster. One example of the technology used to share the calculation load to all computers in the cluster is MPI or Message Passing Interface. There are many implementations of MPI, for example OpenMPI, MPICH, and Intel MPI.\n...","permalink":"http://blog.pras.my.id/blogs/2016-11-07-building-linux-cluster-for-hpc-using-ansible-and-slurm/","readtime":"3 min read","summary":"\u003ch2 id=\"what-is-a-linux-cluster\"\u003eWhat is a Linux Cluster?\u003c/h2\u003e\n\u003cp\u003eLinux cluster is a group of computers running Linux which is interconnected in a local network so they can communicate with each other. Linux cluster is often used in high performance computing to do complex calculation of scientific problems because they can share the calculation load across all computers in the cluster. One example of the technology used to share the calculation load to all computers in the cluster is MPI or Message Passing Interface. There are many implementations of MPI, for example OpenMPI, MPICH, and Intel MPI.\u003c/p\u003e","tags":["linux","cluster","hpc","ansible","slurm"],"title":"Building Linux Cluster for HPC using Ansible and SLURM"},{"content":"Salah satu fitur OpenStack adalah elastisitasnya yang memungkinkan kita untuk membuat dan menjalankan instance dengan cepat dan mudah menggunakan image dari sistem operasi yang sudah kita buat sebelumnya. Tutorial kali ini akan memberikan salah satu cara membuat sendiri image sistem operasi CentOS 7 untuk digunakan di OpenStack Liberty.\nPersiapan Host Environment Host yang kita gunakan untuk membuat image adalah host dengan sistem operasi CentOS 7. Pastikan sudah terinstall virtualisasi KVM/libvirtd dan tools yang diperlukan\nsudo yum install qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer sudo yum install libguestfs-tools-c Konfigurasi networking dari KVM menggunakan profil default dengan DHCP dan koneksi NAT atau Bridge. Pada pembuatan image CentOS 7 kali ini kita akan menggunakan instalasi otomatis menggunakan file kickstart. Di bawah ini adalah contoh alamat FTP berisi file kickstart dan file-file instalasi CentOS 7 yang dapat dibuat dengan cara menyalin isi dari file ISO instalasi CentOS 7 ke dalam direktori FTP tersebut\n# direktori FTP berisi file instalasi CentOS 7 ftp://\u0026lt;your FTP server\u0026gt;/repos/centos/7/ # file kickstart di di dalam direktori FTP ftp://\u0026lt;your FTP server\u0026gt;/repos/kickstarts/centos-7.cfg Berikut ini adalah contoh isi dari file kickstart yang akan kita gunakan.\n#version=RHEL7 # System authorization information auth --enableshadow --passalgo=sha512 # Specify installation install # Run the Setup Agent on first boot firstboot --enable # Text mode (no graphical mode) text # Skip graphics skipx # Agree to EULA eula --agreed # Logging logging --level=info # Installation files FTP directory url --url=\u0026quot;ftp://\u0026lt;your FTP server\u0026gt;/repos/centos/7/\u0026quot; # Language support lang en_US.UTF-8 # Keyboard keyboard --vckeymap=us --xlayouts='us' # Network network --device eth0 --bootproto dhcp --noipv6 --hostname \u0026lt;hostname\u0026gt; # Timezone timezone Asia/Jakarta --isUtc --ntpservers=\u0026lt;your NTP server\u0026gt; # Ignore other disk ignoredisk --only-use=vda # Zero MBR zerombr # Bootloader bootloader --append=\u0026quot; crashkernel=auto\u0026quot; --location=mbr --boot-drive=vda # Remove all partitions clearpart --all --initlabel --drives=vda # Create partitions on the system part / --asprimary --fstype=\u0026quot;ext4\u0026quot; --grow --size=1 #part swap --recommended # No root password rootpw --lock # User user --groups=wheel --name=centos --password=\u0026lt;your password hash\u0026gt; --iscrypted --gecos=\u0026quot;Centos Cloud User\u0026quot; # Enabled servies services --enabled=NetworkManager,sshd,chrony # SElinux permissive selinux --permissive # Firewall firewall --service=ssh # Reboot after install reboot # Packages installation %packages @core chrony bash-completion kexec-tools net-tools telnet wget git vim %end %addon com_redhat_kdump --enable --reserve-mb='auto' %end %post %end Instalasi Sistem Operasi CentOS 7 ke dalam File Image Setelah file instalasi dan file kickstart siap, maka kita bisa memulai pembuatan image sistem operasi CentOS 7. Langkah pertama, kita buat file sebagai virtual disk untuk image sistem operasi CentOS 7.\nqemu-img create -f qcow2 centos-7.qcow2 2G Setelah itu jalankan instalasi sistem operasi CentOS 7 ke dalam file image tersebut. Pastikan sudah mengunduh file CentOS-7-x86_64-Minimal-1511.iso dari situs resmi CentOS.\nsudo virt-install --virt-type kvm --name centos-7 --ram 1024 --disk ./centos-7.qcow2,format=qcow2 --network network=default --graphics none --os-type=linux --os-variant=rhel7 --console pty,target_type=serial --extra-args=\u0026quot;console=ttyS0,115200n8 serial ksdevice=eth0 ip=dhcp ks=ftp://\u0026lt;your FTP server\u0026gt;/repos/kickstarts/centos-7.cfg\u0026quot; --location=./CentOS-7-x86_64-Minimal-1511.iso Perintah tersebut akan menjalankan sebuah terminal serial yang akan menunjukkan tahapan instalasi otomatis sistem operasi CentOS 7 ke dalam file image CentOS 7. Pada saat instalasi selesai akan muncul permintaan login dari virtual machine yang telah kita instal sistem operasi CentOS 7 tersebut.\nBug pada Package Cloud-Init dari CentOS 7 Package cloud-init 0.7.5 dari CentOS tidak dapat mengambil metadata dari OpenStack sehingga pada saat pembuatan instance informasi seperti SSH key tidak terinstal ke dalam instance. Hal ini menyebabkan kita tidak bisa melakukan login SSH ke dalam instance CentOS OpenStack. Permasalahan ini disebabkan oleh bug yang ada di dalam package cloud-init 0.7.5 dari CentOS. Pada tutorial ini terdapat salah satu cara untuk menghindari bug tersebut dengan menggunakan package cloud-init 0.7.6 dari Red-Hat.\nwget http://ftp.redhat.com/pub/redhat/linux/enterprise/7Server/en/RH-COMMON/SRPMS/cloud-init-0.7.6-2.el7.src.rpm Package yang baru saja kita unduh harus dibangun ulang sehingga dapat diinstal di sistem operasi CentOS 7. Kita instal tools yang diperlukan untuk melakukan proses build.\nsudo yum install rpm-build redhat-rpm-config gcc make mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} rpmbuild --rebuild cloud-init-0.7.6-2.el7.src.rpm Setelah proses build selesai maka kita unggah package tersebut ke virtual machine yang akan kita jadikan file image dan instal package tersebut.\ncd rpmbuild/RPMS/x86_64 scp cloud-init-0.7.6-2.el7.centos.x86_64.rpm user@centos-image:~/ ssh user@centos-image sudo yum -y install epel-release sudo yum -y install cloud-utils PyYAML policycoreutils-python python-jsonpatch python-prettytable sudo rpm -ivh cloud-init-0.7.6-2.el7.centos.x86_64.rpm Konfigurasi Image CentOS 7 Setelah itu lakukan konfigurasi pada networking dari image CentOS tersebut sehingga dapat digunakan dengan baik untuk membuat instance.\nsudo su -c 'cat \u0026lt;\u0026lt; EOF \u0026gt; /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=\u0026quot;eth0\u0026quot; BOOTPROTO=\u0026quot;dhcp\u0026quot; ONBOOT=\u0026quot;yes\u0026quot; TYPE=\u0026quot;Ethernet\u0026quot; PERSISTENT_DHCLIENT=1 NM_CONTROLLED=\u0026quot;no\u0026quot; EOF' sudo su -c 'cat \u0026lt;\u0026lt; EOF \u0026gt; /etc/sysconfig/network NETWORKING=yes NOZEROCONF=yes EOF' Non-aktifkan repositori EPEL sehingga kita dapat menggunakannya hanya ketika diperlukan.\nsudo sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/epel.repo Ubah file konfigurasi cloud-init untuk melakukan penyesuaian agar bisa digunakan pada OpenStack Liberty.\nsudo vi /etc/cloud/cloud.cfg ... # gunakan opsi ini jika ingin mengaktifkan ssh menggunakan user root disable_root: 0 ... cloud_init_modules: ... - resolv-conf ... system_info: default_user: name: centos ... Setelah itu matikan virtual machine yang menjalankan image CentOS. Kita akan kembali ke terminal host.\nsudo poweroff Reset dan bersihkan image sehingga dapat digunakan kembali tanpa masalah.\nsudo virt-sysprep -d centos-7 Kurangi ukuran file image dengan cara mengubah nilai dari blok yang tidak terpakai menjadi nol di dalam virtual disk.\nsudo virt-sparsify --compress centos-7.qcow2 centos-7-new.qcow2 Unggah file image tersebut ke server OpenStack kita.\nscp centos-7-new.qcow2 user@openstack:~/ Buat image OpenStack baru dengan file image CentOS 7 baru.\nglance image-create --name centos-7-new --disk-format qcow2 --container-format bare --min-ram 512 --min-disk 10 --visibility public --file ./centos-7-new.qcow2 --progress Buat dan jalankan sebuah instance menggunakan image OpenStack baru.\nnova boot --flavor m1.medium --image centos-7-new --nic net-id=\u0026lt;your openstack network id\u0026gt; --security-group default --key-name \u0026lt;your ssh key\u0026gt; \u0026lt;your instance name\u0026gt; nova console-log \u0026lt;your instance name\u0026gt; Jika menggunakan network privat, konfigurasi floating ip untuk instance CentOS tersebut.\nnova floating-ip-associate \u0026lt;your instance name\u0026gt; \u0026lt;your floating ip address\u0026gt; Akses instance CentOS baru kita.\nssh -o \u0026quot;StrictHostKeyChecking no\u0026quot; \u0026lt;your floating ip address\u0026gt; -lcentos Referensi Creating CentOS and Fedora images ready for Openstack Creating Centos-7 Image for Openstack CentOS 6 cloud image with cloud-init-0.7.5 can not retrieve OpenStack metadata Linux : How to install source rpm on RHEL/CentOS ","date":"Mar 30, 2016","excerpt":"Salah satu fitur OpenStack adalah elastisitasnya yang memungkinkan kita untuk membuat dan menjalankan instance dengan cepat dan mudah menggunakan image dari sistem operasi yang sudah kita buat sebelumnya. Tutorial kali ini akan memberikan salah satu cara membuat sendiri image sistem operasi CentOS 7 untuk digunakan di OpenStack Liberty.\nPersiapan Host Environment Host yang kita gunakan untuk membuat image adalah host dengan sistem operasi CentOS 7. Pastikan sudah terinstall virtualisasi KVM/libvirtd dan tools yang diperlukan\n...","permalink":"http://blog.pras.my.id/blogs/2016-03-30-pembuatan-file-image-centos-7-untuk-instance-openstack-liberty/","readtime":"5 min read","summary":"\u003cp\u003eSalah satu fitur OpenStack adalah elastisitasnya yang memungkinkan kita untuk\nmembuat dan menjalankan \u003cem\u003einstance\u003c/em\u003e dengan cepat dan mudah menggunakan \u003cem\u003eimage\u003c/em\u003e\ndari sistem operasi yang sudah kita buat sebelumnya. Tutorial kali ini akan\nmemberikan salah satu cara membuat sendiri \u003cem\u003eimage\u003c/em\u003e sistem operasi CentOS 7\nuntuk digunakan di OpenStack Liberty.\u003c/p\u003e\n\u003ch2 id=\"persiapan-host-environment\"\u003ePersiapan Host Environment\u003c/h2\u003e\n\u003cp\u003eHost yang kita gunakan untuk membuat \u003cem\u003eimage\u003c/em\u003e adalah host dengan sistem operasi\nCentOS 7. Pastikan sudah terinstall virtualisasi KVM/\u003cstrong\u003elibvirtd\u003c/strong\u003e dan \u003cem\u003etools\u003c/em\u003e\nyang diperlukan\u003c/p\u003e","tags":["sysadmin","openstack"],"title":"Pembuatan File Image CentOS 7 Untuk Instance OpenStack Liberty"},{"content":"Virtualenv Virtualenv adalah aplikasi untuk membuat membuat environment virtual Python terisolasi. Aplikasi ini membuat sebuah environment virtual yang mempunyai direktori instalasi sendiri, yang tidak berbagi library dengan environment Virtualenv lainnya dan dapat dikonfigurasi untuk tidak mengakses library yang diinstal secara global.\nInstal pip di sistem operasi masing-masing, contohnya CentOS\nsudo yum update -y sudo yum install -y python-pip Instal virtualenv menggunakan pip\nsudo pip install virtualenv Buat environment virtual Python menggunakan virtualenv\nvirtualenv -p PYTHON_VER ENV # Python 2.x virtualenv -p python2 venv # Python 3.x virtualenv -p python3 venv Jalankan environment virtual Python\nsource ./ENV/bin/activate # contoh source ./venv/bin/activate Cek versi Python yang terinstal\npython -V Keluar dari environment virtual Python\ndeactivate Nodeenv Nodeenv (environment virtual Node.js) adalah sebuat aplikasi untuk membuat environment virtual Node.js terisolasi. Aplikasi ini membuat sebuah environment virtual yang mempunyai direktori instalasi sendiri, yang tidak berbagi library dengan environment Nodeenv lain. Environment virtual baru juga dapat diintegrasikan dengan environment virtual yang dibuat menggunakan Virtualenv (Python).\nInstal nodeenv menggunakan pip\nsudo pip install nodeenv Tampilkan semua versi Node.js yang tersedia\nnodeenv -l Instal environment virtual Node.js\nnodeenv -n NODE_VER -v NENV Instal environment virtual Node.js dengan paket yang sudah terkompilasi\nnodeenv -n NODE_VER --prebuilt -v NENV Jalankan environment virtual Node.js\nsource ./NENV/bin/activate Integrasi environment node.js dengan environment Virtualenv yang sudah ada, ketika menjalankan environment Virtualenv maka akan secara otomatis menjalankan environment Nodeenv\nnodeenv -n NODE_VER --prebuilt -v -p Keluar dari environment virtual Node.js\ndeactivate_node RVM (Ruby Version Manager) RVM adalah aplikasi command-line yang membuat kita dapat dengan mudah melakukan instalasi, manajemen, dan bekerja dengan banyak environment Ruby mulai dari interpreter sampai set dari gem. Selain mempermudah instalasi banyak Ruby interpreter/runtime secara konsisten, aplikasi ini juga memberikan fitur seperti gemset yang tidak biasanya langsung didukung oleh banyak instalasi Ruby. RVM juga mengizinkan kita menggunakan berbagai macam Ruby tanpa merusak instalasi Ruby yang sudah ada.\nImpor GPG key\ncurl -sSL https://rvm.io/mpapis.asc | gpg2 --import - Instlasi RVM di environment kita, mode instalasi yang dianjurkan adalah Single-User\n\\curl -sSL https://get.rvm.io | bash -s stable # instalasi tanpa integrasi dengan file environment (.bash_profile) \\curl -sSL https://get.rvm.io | bash -s stable --ignore-dotfiles echo \u0026quot;source $HOME/.rvm/scripts/rvm\u0026quot; \u0026gt;\u0026gt; ~/.bashrc Jalankan ulang shell atau ekspor profile RVM\nsource ~/.rvm/scripts/rvm Tes instalasi RVM\ntype rvm | head -n 1 # output rvm is a function Tampilkan versi Ruby yang tersedia\nrvm list known Instal sebuah versi Ruby\nrvm install 2.3 Jalankan versi Ruby yang telah diinstal\nrvm use 2.3 Cek versi Ruby\nruby -v ","date":"Mar 27, 2016","excerpt":"Virtualenv Virtualenv adalah aplikasi untuk membuat membuat environment virtual Python terisolasi. Aplikasi ini membuat sebuah environment virtual yang mempunyai direktori instalasi sendiri, yang tidak berbagi library dengan environment Virtualenv lainnya dan dapat dikonfigurasi untuk tidak mengakses library yang diinstal secara global.\nInstal pip di sistem operasi masing-masing, contohnya CentOS\nsudo yum update -y sudo yum install -y python-pip Instal virtualenv menggunakan pip\nsudo pip install virtualenv Buat environment virtual Python menggunakan virtualenv\n...","permalink":"http://blog.pras.my.id/blogs/2016-03-27-instalasi-virtualenv-nodeenv-dan-rvm-sebagai-development-environment/","readtime":"2 min read","summary":"\u003ch2 id=\"virtualenv\"\u003eVirtualenv\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"https://virtualenv.readthedocs.org/en/latest/\"\u003eVirtualenv\u003c/a\u003e adalah aplikasi untuk membuat membuat environment virtual Python terisolasi. Aplikasi ini membuat sebuah environment virtual yang mempunyai direktori instalasi sendiri, yang tidak berbagi library dengan environment Virtualenv lainnya dan dapat dikonfigurasi untuk tidak mengakses library yang diinstal secara global.\u003c/p\u003e\n\u003cp\u003eInstal pip di sistem operasi masing-masing, contohnya CentOS\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo yum update -y\nsudo yum install -y python-pip\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eInstal \u003cstrong\u003evirtualenv\u003c/strong\u003e menggunakan \u003cstrong\u003epip\u003c/strong\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo pip install virtualenv\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eBuat environment virtual Python menggunakan \u003cstrong\u003evirtualenv\u003c/strong\u003e\u003c/p\u003e","tags":["sysadmin","virtualenv","nodeenv","rvm"],"title":"Instalasi Virtualenv, Nodeenv Dan RVM Sebagai Development Environment"},{"content":"Let\u0026rsquo;s Encrypt adalah Certificate Authority (CA) yang gratis dan terotomatisasi yang berjalan untuk kepentingan umum. Let\u0026rsquo;s Encrypt adalah sebuah layanan yang disediakan oleh Internet Security Research Group (ISRG). Prinsip-prinsip dasar dari Let\u0026rsquo;s Encrypt adalah gratis, otomatis, aman, transparan, terbuka, dan koperatif.\nInstalasi Let\u0026rsquo;s Encrypt Instalasi Let\u0026rsquo;s Encrypt\nsudo yum -y install git bc sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt Buat sertifikat baru untuk domain example.com, sebelumnya hentikan dulu aplikasi Nginx\nsudo systemctl stop nginx cd /opt/letsencrypt ./letsencrypt-auto certonly --standalone -d example.com -d www.example.com -d mail.example.com ./letsencrypt-auto --help Cek sertifikat yang dihasilkan\nsudo ls -l /etc/letsencrypt/live/example.com Membuat Diffie-Hellman key\nsudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 4096 Nginx Konfigurasi TLS/SSL di aplikasi Nginx\nsudo vi /etc/nginx/conf.d/ssl.conf # contoh konfigurasi server { listen 443 ssl; server_name example.com www.example.com; ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # strong + backward compatibility ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; ssl_dhparam /etc/ssl/certs/dhparam.pem; ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'; ssl_session_timeout 10m; ssl_session_cache shared:SSL:10m; ssl_ecdh_curve secp384r1; # Requires nginx \u0026gt;= 1.1.0 ssl_session_tickets off; # Requires nginx \u0026gt;= 1.5.9 ssl_stapling on; ssl_stapling_verify on; resolver $DNS1 $DNS2 valid=300s; resolver_timeout 5s; add_header Strict-Transport-Security \u0026quot;max-age=63072000; includeSubdomains; preload\u0026quot;; add_header X-Frame-Options DENY; add_header X-Content-Type-Options nosniff; # The rest of your server block root /usr/share/nginx/html; index index.html index.htm; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; # Uncomment to enable naxsi on this location # include /etc/nginx/naxsi.rules } } Jalankan ulang Nginx\nsudo systemctl start nginx Cek instalasi di website SSL Labs\nUpdate sertifikat otomatis Sertifikat Let\u0026rsquo;s Encrypt hanya berlaku untuk 90 hari, akan tetapi direkomendasikan untuk melakukan update sertifikat setiap 60 hari untuk memberikan ruang untuk kesalahan. Berikut ini adalah perintah untuk melakukan update sertifikat.\n/opt/letsencrypt/letsencrypt-auto renew Edit crontab untuk membuat job baru yang akan menjalankan perintah update setiap minggu.\nsudo crontab -e # contoh job 30 2 * * 1 /opt/letsencrypt/letsencrypt-auto renew \u0026gt;\u0026gt; /var/log/le-renew.log 35 2 * * 1 /usr/bin/systemctl reload nginx Update Let\u0026rsquo;s Encrypt Pull versi baru dari Github\ncd /opt/letsencrypt sudo git pull ","date":"Mar 27, 2016","excerpt":"Let’s Encrypt adalah Certificate Authority (CA) yang gratis dan terotomatisasi yang berjalan untuk kepentingan umum. Let’s Encrypt adalah sebuah layanan yang disediakan oleh Internet Security Research Group (ISRG). Prinsip-prinsip dasar dari Let’s Encrypt adalah gratis, otomatis, aman, transparan, terbuka, dan koperatif.\nInstalasi Let’s Encrypt Instalasi Let’s Encrypt\nsudo yum -y install git bc sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt Buat sertifikat baru untuk domain example.com, sebelumnya hentikan dulu aplikasi Nginx\n...","permalink":"http://blog.pras.my.id/blogs/2016-03-27-instalasi-lets-encrypt-dan-konfigurasi-https-di-aplikasi-nginx-pada-centos-7/","readtime":"2 min read","summary":"\u003cp\u003e\u003ca href=\"https://letsencrypt.org\"\u003eLet\u0026rsquo;s Encrypt\u003c/a\u003e adalah Certificate Authority (CA) yang gratis dan terotomatisasi yang berjalan untuk kepentingan umum. Let\u0026rsquo;s Encrypt adalah sebuah layanan yang disediakan oleh Internet Security Research Group (ISRG). Prinsip-prinsip dasar dari Let\u0026rsquo;s Encrypt adalah gratis, otomatis, aman, transparan, terbuka, dan koperatif.\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"SSL-Labs\" loading=\"lazy\" src=\"/images/ssl-labs.png\"\u003e\u003c/p\u003e\n\u003ch2 id=\"instalasi-lets-encrypt\"\u003eInstalasi Let\u0026rsquo;s Encrypt\u003c/h2\u003e\n\u003cp\u003eInstalasi Let\u0026rsquo;s Encrypt\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo yum -y install git bc\nsudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eBuat sertifikat baru untuk domain example.com, sebelumnya hentikan dulu aplikasi Nginx\u003c/p\u003e","tags":["sysadmin"],"title":"Instalasi Let's Encrypt Dan Konfigurasi HTTPS Di Aplikasi Nginx Pada CentOS 7"},{"content":"Setelah kita melakukan instalasi email server, cek skor email server di website Mail Tester. Salah satu contoh hasil pengecekan website tersebut sebagai berikut.\nContent: [Text] [HTML] [Source] SpamAssassin: [Score] The famous spam filter SpamAssassin. A score below -5 is considered spam. Authentication: We check if the server you are sending from is authenticated [SPF] Sender Policy Framework (SPF) is an email validation system designed to prevent email spam by detecting email spoofing, a common vulnerability, by verifying sender IP addresses. [Sender ID] Sender ID is like SPF, but it checks the FROM address, not the bounce address. [DKIM] DomainKeys Identified Mail (DKIM) is a method for associating a domain name to an email message, thereby allowing a person, role, or organization to claim some responsibility for the message. [DMARC record] A DMARC policy allows a sender to indicate that their emails are protected by SPF and/or DKIM, and give instruction if neither of those authentication methods passes. Please be sure you have a DKIM and SPF set before using DMARC. [PTR record] Reverse DNS lookup or reverse DNS resolution (rDNS) is the determination of a domain name that is associated with a given IP address. Some companies such as AOL will reject any message sent from a server without rDNS, so you must ensure that you have one. You cannot associate more than one domain name with a single IP address. [A record] We check if there is a mail server (A Record) behind your hostname. Errors: Checks whether your message is well formatted or not. [Image alternate tag] alt attributes provide a textual alternative to your images. It is a useful fallback for people suffering from sight problems and for cases where your images cannot be displayed. [HTML elements] Checks whether your message contains dangerous html elements such as javascript, iframes, embed content or applet. [URL shortener] Checks whether your message uses URL shortener systems. [List-Unsubscribe header] The List-Unsubscribe header is required if you send mass emails, it enables the user to easily unsubscribe from your mailing list. [Blacklist] Matches your server IP address against 22 of the most common ipv4 blacklists. Untuk meningkatkan skor, kita bisa memperbaiki konfigurasi email server dengan SPF dan DKIM\nSPF Sender Policy Framework (SPF) adalah sebuah sistem validasi email yang didesain untuk mencegah email spam dengan cara mendeteksi email spoofing, sebuah celah umum, dengan melakukan verifikasi alamat IP pengirim. SPF berupa TXT record yang ditambahkan ke domain email server kita.\n# contoh example.com IN TXT \u0026quot;v=spf1 mx a ip4:192.168.1.0/24 include:myexample.com ~all\u0026quot; Contoh di atas memberikan informasi bahwa email dengan domain example.com valid jika dikirim dari alamat-alamat IP di jaringan 192.168.1.0/24 dan server yang memiliki hostname myexample.com. Email dengan domain example.com yang dikirim dari selain alamat-alamat tersebut akan ditandai tetapi tetap diterima.\nDKIM DomainKeys Identified Mail (DKIM) adalah metode untuk mengasosiasikan sebuah nama domain ke sebuah pesan email, sehingga mengizinkan seseorang atau sebuah organisasi untuk mengklaim tanggung jawab untuk pesan tersebut. Berikut ini adalah langkah instalasi OpenDKIM.\nsudo yum -y install epel-release sudo yum -y install opendkim sudo opendkim-default-keygen sudo su cd /etc/opendkim/keys ll File default.private adalah private key untuk domain kita dan default.txt adalah public key yang akan kita masukkan ke dalam DNS record (TXT).\nUbah file konfigurasi untuk OpenDKIM\nvi /etc/opendkim.conf # contoh konfigurasi Mode sv Socket inet:8891@localhost Canonicalization relaxed/simple Domain example.com #KeyFile /etc/opendkim/keys/default.private KeyTable refile:/etc/opendkim/KeyTable SigningTable refile:/etc/opendkim/SigningTable ExternalIgnoreList refile:/etc/opendkim/TrustedHosts InternalHosts refile:/etc/opendkim/TrustedHosts Ubah file KeyTable yang mendefinisikan alamat private key untuk domain kita\nvi /etc/opendkim/KeyTable # contoh konfigurasi default._domainkey.example.com example.com:default:/etc/opendkim/keys/default.private Ubah file SigningTable yang memberikan informasi bagaimana OpenDKIM menggunakan key files.\nvi /etc/opendkim/SigningTable # contoh konfigurasi *@example.com default._domainkey.example.com Ubah file TrustedHosts yang mendefinisikan host mana yang berhak menggunakan key files tersebut.\nvi /etc/opendkim/TrustedHosts # contoh konfigurasi 127.0.0.1 mail.example.com Ubah file konfigurasi untuk Postfix\nvi /etc/postfix/main.cf # contoh konfigurasi smtpd_milters = inet:127.0.0.1:8891 non_smtpd_milters = $smtpd_milters milter_default_action = accept Jalankan ulang OpenDKIM dan Postfix\nsudo hash -r sudo systemctl start opendkim ; systemctl enable opendkim ; systemctl restart postfix Tambahkan key ke DNS record\ndefault._domainkey IN TXT \u0026quot;v=DKIM1; g=*; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDNHHZ5Wq8bmpNTwzg+5wwwgKiYphgdRnngxS6Wd1lq9kQRh2OxzOH4kW1gsPe8UA396e9zaXjGlSzbIkeHEt86JzuS+fg+utLrVtIH6gLXJgxppBjCMhLy95oBLrG9M3rqGtrzHgVclANnYdfGs3Tg6r+RnS7GHW3YqW+7tr45YQIDAQAB\u0026quot; ; ----- DKIM default for example.com Berikut ini adalah daftar layanan yang menyediakan informasi alamat-alamat IP yang termasuk dalam daftar hitam karena sering mengirimkan spam.\nASPEWS BACKSCATTERER BARRACUDA BBFHL1 BBFHL2 BLOCKLIST.DE BSB CASA CBL CASA CBLESS CASA CBLPLUS CASA CDL CBL CYMRU BOGONS DAN TOR DAN TOREXIT DNS REALTIME BLACKHOLE LIST DNS SERVICIOS DRONE BL DULRU EFNET RBL EMAILBASURA FABELSOURCES HIL HIL2 IBM DNS BLACKLIST ICMFORBIDDEN IMP SPAM IMP WORM INPS_DE INTERSERVER IPRANGE RBL PROJECT IVMSIP IVMSIP24 JIPPG KEMPTBL KONSTANT LASHBACK LNSGBLOCK LNSGBULK LNSGMULTI LNSGOR LNSGSRC MADAVI MAILBLACKLIST MAILSPIKE BL MAILSPIKE Z MEGARBL MSRBL PHISHING MSRBL SPAM NETHERRELAYS NETHERUNSURE NIXSPAM NOSOLICITADO ORVEDB OSPAM PROTECTED SKY PSBL RATS ALL RATS DYNA RATS NOPTR RATS SPAM RBL JP REDHAWK RSBL SCHULTE SECTOOR EXITNODES SEM BACKSCATTER SEM BLACK SENDER SCORE REPUTATION NETWORK SERVICESNET SORBS BLOCK SORBS DUHL SORBS HTTP SORBS MISC SORBS NEW SORBS SMTP SORBS SOCKS SORBS SPAM SORBS WEB SORBS ZOMBIE SPAMCANNIBAL SPAMCOP SPAMHAUS ZEN SPEWS1 SPEWS2 SWINOG TRIUMF TRUNCATE UCEPROTECTL1 UCEPROTECTL2 UCEPROTECTL3 URIBL MULTI IP VIRBL WOODYS SMTP BLACKLIST WPBL ZAPBL ","date":"Mar 27, 2016","excerpt":"Setelah kita melakukan instalasi email server, cek skor email server di website Mail Tester. Salah satu contoh hasil pengecekan website tersebut sebagai berikut.\nContent: [Text] [HTML] [Source] SpamAssassin: [Score] The famous spam filter SpamAssassin. A score below -5 is considered spam. Authentication: We check if the server you are sending from is authenticated [SPF] Sender Policy Framework (SPF) is an email validation system designed to prevent email spam by detecting email spoofing, a common vulnerability, by verifying sender IP addresses. [Sender ID] Sender ID is like SPF, but it checks the FROM address, not the bounce address. [DKIM] DomainKeys Identified Mail (DKIM) is a method for associating a domain name to an email message, thereby allowing a person, role, or organization to claim some responsibility for the message. [DMARC record] A DMARC policy allows a sender to indicate that their emails are protected by SPF and/or DKIM, and give instruction if neither of those authentication methods passes. Please be sure you have a DKIM and SPF set before using DMARC. [PTR record] Reverse DNS lookup or reverse DNS resolution (rDNS) is the determination of a domain name that is associated with a given IP address. Some companies such as AOL will reject any message sent from a server without rDNS, so you must ensure that you have one. You cannot associate more than one domain name with a single IP address. [A record] We check if there is a mail server (A Record) behind your hostname. Errors: Checks whether your message is well formatted or not. [Image alternate tag] alt attributes provide a textual alternative to your images. It is a useful fallback for people suffering from sight problems and for cases where your images cannot be displayed. [HTML elements] Checks whether your message contains dangerous html elements such as javascript, iframes, embed content or applet. [URL shortener] Checks whether your message uses URL shortener systems. [List-Unsubscribe header] The List-Unsubscribe header is required if you send mass emails, it enables the user to easily unsubscribe from your mailing list. [Blacklist] Matches your server IP address against 22 of the most common ipv4 blacklists. Untuk meningkatkan skor, kita bisa memperbaiki konfigurasi email server dengan SPF dan DKIM\n...","permalink":"http://blog.pras.my.id/blogs/2016-03-27-konfigurasi-email-server-dengan-spf-dan-dkim-di-aplikasi-postfix-pada-centos-7/","readtime":"4 min read","summary":"\u003cp\u003eSetelah kita melakukan instalasi email server, cek skor email server di website \u003ca href=\"https://www.mail-tester.com/\"\u003eMail Tester\u003c/a\u003e. Salah satu contoh hasil pengecekan website tersebut sebagai berikut.\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"Mail-Tester\" loading=\"lazy\" src=\"/images/mail-tester.png\"\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eContent:\n[Text]\n[HTML]\n[Source]\n\nSpamAssassin:\n[Score]\n The famous spam filter SpamAssassin. A score below -5 is considered spam.\n\nAuthentication:\n We check if the server you are sending from is authenticated\n[SPF]\n Sender Policy Framework (SPF) is an email validation system designed to prevent email spam by detecting email spoofing, a common vulnerability, by verifying sender IP addresses.\n[Sender ID]\n Sender ID is like SPF, but it checks the FROM address, not the bounce address.\n[DKIM]\n DomainKeys Identified Mail (DKIM) is a method for associating a domain name to an email message, thereby allowing a person, role, or organization to claim some responsibility for the message.\n[DMARC record]\n A DMARC policy allows a sender to indicate that their emails are protected by SPF and/or DKIM, and give instruction if neither of those authentication methods passes. Please be sure you have a DKIM and SPF set before using DMARC.\n[PTR record]\n Reverse DNS lookup or reverse DNS resolution (rDNS) is the determination of a domain name that is associated with a given IP address. Some companies such as AOL will reject any message sent from a server without rDNS, so you must ensure that you have one. You cannot associate more than one domain name with a single IP address.\n[A record]\n We check if there is a mail server (A Record) behind your hostname.\n\nErrors:\n Checks whether your message is well formatted or not.\n[Image alternate tag]\n alt attributes provide a textual alternative to your images. It is a useful fallback for people suffering from sight problems and for cases where your images cannot be displayed.\n[HTML elements]\n Checks whether your message contains dangerous html elements such as javascript, iframes, embed content or applet.\n[URL shortener]\n Checks whether your message uses URL shortener systems.\n[List-Unsubscribe header]\n The List-Unsubscribe header is required if you send mass emails, it enables the user to easily unsubscribe from your mailing list.\n[Blacklist]\n Matches your server IP address against 22 of the most common ipv4 blacklists.\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eUntuk meningkatkan skor, kita bisa memperbaiki konfigurasi email server dengan SPF dan DKIM\u003c/p\u003e","tags":["sysadmin","email-server","postfix","spf","dkim"],"title":"Konfigurasi Email Server Dengan SPF Dan DKIM Di Aplikasi Postfix Pada CentOS 7"},{"content":"Sejak FreeBSD 10.0-RELEASE, hypervisor bhyve (lisensi BSD) sudah menjadi bagian dari base system. Hypervisor adalah aplikasi yang bisa membuat dan menjalankan virtual machine atau yang biasa disebut guest di dalam sebuah sistem operasi. Guest yang didukung oleh bhyve cukup banyak, termasuk FreeBSD, OpenBSD, dan banyak distribusi Linux. Saat ini bhyve hanya mendukung konsol serial dan tidak bisa menampilkan konsol grafik. Bhyve membutuhkan prosesor baru yang mendukung Intel Extended Page Tables (EPT) atau AMD Rapid Virtualization Indexing (RVI), yang dikenal juga sebagai Nested Page Tables (NPT). Untuk Linux atau FreeBSD guest dengan vCPU (virtualCPU) membutuhkan dukungan VMX unrestricted mode (UG). Cara termudah untuk mengecek dukungan prosesor untuk bhyve adalah dengan menjalankan #dmesg# atau melihat isi /var/run/dmesg.boot untuk fitur POPCNT di baris Features dan EPT dan UG di baris VT-x. Panduan yang cukup lengkap untuk menggunakan bhyve dapat diakses di halaman ini\nVM-BHYVE Vm-bhyve adalah aplikasi yang dibuat oleh Matt Churchyard dan diletakkan di repositori Githubnya. Aplikasi ini dapat digunakan untuk manajemen guest yang lebih mudah menggunakan hypervisor bhyve. Beberapa fitur yang ada di aplikasi ini adalah\nDukungan untuk guest FreeBSD/NetBSD/OpenBSD/Linux\nPerintah sederhana untuk membuat, menjalankan dan menghentikan guest (create, start, stop),\nKonfigurasi file sederhana,\nSwitch virtual yang mendukung NAT dan VLAN\nDukungan untuk filesystem ZFS\nKonfigurasi otomatis serial device untuk mengakses konsol guest\nIntegrasi dengan rc.d startup/shutdown\nInstalasi VM-BHYVE Clone repositori dari halaman GitHub\ngit clone https://github.com/churchers/vm-bhyve.git Untuk menjalankan guest selain FreeBSD, instal grub2-bhyve\npkg install grub2-bhyve Untuk memberikan layanan DHCP ketika menggunakan switch dengan mode NAT, instal dnsmasq\npkg install dnsmasq Konfigurasi VM-BHYVE Vm-bhyve membutuhkan sebuah direktori untuk menyimpan semua virtual machines dan konfigurasi vm-bhyve. Direktori tersebut dapat berupa ZFS mountpoint atau direktori biasa.\nJika menggunakan ZFS, buat sebuah mountpoint untuk vm-bhyve\nzfs create pool/vm Setelah itu ubah file /etc/rc.conf\nvm_enable=\u0026quot;YES\u0026quot; vm_dir=\u0026quot;zfs:pool/vm\u0026quot; Jika menggunakan direktori biasa, buat direktori tersebut\nmkdir /somepath/vm Setelah itu ubah file /etc/rc.conf\nvm_enable=\u0026quot;YES\u0026quot; vm_dir=\u0026quot;/somepath/vm\u0026quot; Inisialisasi konfigurasi vm-bhyve dan kernel modules yang dibutuhkan\nvm init Perintah ini cukup dijalankan sekali saja dan untuk seterusnya akan dijalankan oleh rc.d script.\nTemplate Virtual Machine Vm-bhyve menggunakan template ketika membuat sebuah guest atau virtual machine. Semua template disimpan di direktori vm_dir/.templates/. Contoh template dapat diperoleh dari direktori /usr/local/share/examples/vm-bhyve/.\ncp /usr/local/share/examples/vm-bhyve/* /somepath/vm/.templates/ Kita dapat mendefinisikan sendiri template yang kita inginkan. Untuk mengetahui format template yang dibutuhkan dapat membaca sample-templates/config.sample untuk mengetahui opsi-opsi yang ada di dalam template deskripsi dari fungsi-fungsinya.\nSwitch Virtual Ketika sebuah guest dijalankan maka secara otomatis guest tersebut akan terkoneksi dengan switch virtual yang dicantumkan di dalam file konfigurasi. Secara default semua template sampel akan terkoneksi dengan switch bernama \u0026lsquo;public\u0026rsquo;.\nSwitch bisa dibuat dengan perintah berikut ini\nvm switch create \u0026lt;switchname\u0026gt; Mode bridge bisa langsung dijalankan dengan menambahkan physical interface ke switch virtual\nvm switch add \u0026lt;switchname\u0026gt; \u0026lt;physicalinterface\u0026gt; Jika hanya menginginkan mode NAT, jangan menambahkan physical interface ke switch virtual, cukup aktifkan mode NAT\nvm switch nat \u0026lt;switchname\u0026gt; on Secara otomatis mode NAT akan membuat sebuah jaringan privat pada switch dan mengarahkan semua trafik melalui default gateway. Untuk mengaktifkan NAT diperlukan PF yang diaktifkan di file /etc/rc.conf.\nUntuk mengaktifkan vlan, cukup dengan memberikan nomor vlan yang diinginkan\nvm switch vlan \u0026lt;switchname\u0026gt; \u0026lt;vlannumber\u0026gt; Untuk menon-aktifkan vlan, cukup dengan memberikan angka 0 sebagai nomor vlan\nvm switch vlan \u0026lt;switchname\u0026gt; 0 Konfigurasi switch yang sudah ada dapat dilihat menggunakan perintah\nvm switch list Membuat Guest/Virtual Machine Untuk membuat guest/virtual machine cukup jalankan perintah\nvm create \u0026lt;guestname\u0026gt; vm create -t \u0026lt;templatename\u0026gt; -s \u0026lt;disksize\u0026gt; \u0026lt;guestname\u0026gt; Contoh pertama menggunakan template default.conf dan akan membuat disk image sebesar 20GB. Sedangkan contoh kedua menggunakan template \u0026lt;templatename\u0026gt;.conf dan akan membuat disk image sebesar \u0026lt;disksize\u0026gt; dalam GB.\nInstalasi guest/virtual machine membutuhkan file ISO instalasi sistem operasi yang akan diinstal, download file ISO contoh perintah sebagai berikut untuk sistem operasi FreeBSD.\nvm iso ftp://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/10.1/FreeBSD-10.1-RELEASE-amd64-disc1.iso Untuk memulai instalasi, jalankan perintah berikut\nvm install \u0026lt;guestname\u0026gt; FreeBSD-10.1-RELEASE-amd64-disc1.iso vm console \u0026lt;guestname\u0026gt; Setelah instalasi selesai, reboot guest dari konsol dan guest akan melakukan booting ke sistem operasi yang telah diinstal (dengan asumsi instalasi berhasil). Konsol menggunakan perintah cu dan untuk kembali ke host gunakan kombinasi ~+Ctrl-D.\nPerintah-perintah berikut menjalankan dan menghentikan guest/virtual machine\nvm start \u0026lt;guestname\u0026gt; vm stop \u0026lt;guestname\u0026gt; Konfigurasi dasar dan keadaan setiap guest/virtual machine dapat dilihat dengan perintah berikut\nvm list Untuk menghentikan seluruh guest/virtual machine secara bersamaan gunakan perintah\nvm stopall Agar guest/virtual machine berjalan secara otomatis ketika host melakukan booting, tambahkan baris berikut ke dalam file /etc/rc.conf\nvm_list=\u0026quot;vm1 vm2\u0026quot; vm_delay=\u0026quot;5\u0026quot; vm_delay adalah variabel yang mengatur selang waktu dijalankannya setiap guest/virtual machine. Terdapat juga perintah untuk mengubah konfigurasi guest/virtual machine menggunakan default text editor dengan perintah berikut\nvm configure \u0026lt;guestname\u0026gt; Instalasi CentOS Guest dengan Instalasi melalui VNC CentOS adalah sistem operasi GNU/Linux sehingga membutuhkan instalasi grub2-bhyve agar dapat dijalankan sebagai guest di hypervisor bhyve. Ketika melakukan instalasi guest/virtual machine dengan sistem operasi CentOS, proses instalasi yang didukung ketika menggunakan konsol hanya proses instalasi berbasis teks yang tidak memberikan pilihan konfigurasi yang lengkap. Sebagai alternatif, dapat dilakukan instalasi berbasis grafis menggunakan VNC yang diakses melalui jaringan. Metode ini membutuhkan instalasi dilakukan dengan guest/virtual machine terkoneksi switch dengan mode bridge dan kita dapat mengakses jaringan host.\nInstalasi seperti biasa\nvm create -t centos -s \u0026lt;disksize\u0026gt; \u0026lt;guestname\u0026gt; vm iso http://buaya.klas.or.id/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso vm install \u0026lt;guestname\u0026gt; CentOS-7-x86_64-Minimal-1511.iso vm console \u0026lt;guestname\u0026gt; Proses instalasi akan masuk ke sesi instalasi CentOS berbasis teks. Pada tahap ini lakukan konfigurasi jaringan atau network (Opsi nomor 7) sehingga guest/virtual machine terkoneksi dengan jaringan host pada saat proses instalasi.\nSebelum terkoneksi\nHost name: localhost.localdomain 1) Set host name 2) Configure device eth0 Please make your choice from above ['q' to quit | 'c' to continue | 'r' to refresh]: c ================================================================================ ================================================================================ Installation 1) [x] Language settings 2) [!] Timezone settings (English (United States)) (Timezone is not set.) 3) [x] Installation source 4) [!] Software selection (Local media) (Minimal Install) 5) [!] Installation Destination 6) [x] Kdump (No disks selected) (Kdump is enabled) 7) [ ] Network configuration 8) [!] Root password (Not connected) (Password is not set.) 9) [!] User creation (No user will be created) Please make your choice from above ['q' to quit | 'b' to begin installation | 'r' to refresh]: 7 [anaconda] 1:main* 2:shell 3:log 4:storage-lo\u0026gt; Switch tab: Alt+Tab | Help: F1 Setelah terkoneksi\nHost name: localhost.localdomain 1) Set host name 2) Configure device eth0 Please make your choice from above ['q' to quit | 'c' to continue | 'r' to refresh]: c ================================================================================ ================================================================================ Installation 1) [x] Language settings 2) [!] Timezone settings (English (United States)) (Timezone is not set.) 3) [x] Installation source 4) [x] Software selection (Local media) (Minimal Install) 5) [!] Installation Destination 6) [x] Kdump (No disks selected) (Kdump is enabled) 7) [x] Network configuration 8) [!] Root password (Wired (eth0) connected) (Password is not set.) 9) [!] User creation (No user will be created) Please make your choice from above ['q' to quit | 'b' to begin installation | 'r' to refresh]: [anaconda] 1:main* 2:shell 3:log 4:storage-lo\u0026gt; Switch tab: Alt+Tab | Help: F1 Kemudian pindah ke tab nomor 2:shell dengan kombinasi Ctrl-B+2 dan jalankan perintah\n[anaconda root@localhost ~]# anaconda --vnc Starting installer, one moment... anaconda 21.48.22.56-1 for CentOS 7 started. * installation log files are stored in /tmp during the installation * shell is available on TTY2 * when reporting a bug add logs from /tmp as separate text/plain attachments 15:35:19 Starting VNC... 15:35:21 The VNC server is now running. 15:35:21 WARNING!!! VNC server running with NO PASSWORD! You can use the vncpassword=\u0026lt;password\u0026gt; boot option if you would like to secure the server. 15:35:21 Please manually connect your vnc client to \u0026lt;your-guest-ip\u0026gt;:1 to begin the install. 15:35:21 Attempting to start vncconfig [anaconda] 1:main- 2:shell* 3:log 4:storage-lo\u0026gt; Switch tab: Alt+Tab | Help: F1 Akses instalasi grafis menggunakan VNC client dengan alamat \u0026lt;your-guest-ip\u0026gt; port 1 tanpa menggunakan password. Jika ingin menggunakan password maka jalankan perintah berikut ini\n[anaconda root@localhost ~]# anaconda --vnc --vncpassword password Untuk menjalankan VNC server dengan password akses \u0026lsquo;password\u0026rsquo;. Berikut ini adalah instalasi guest/virtual machine dengan sistem operasi CentOS 7 melalui VNC. ","date":"Mar 22, 2016","excerpt":"Sejak FreeBSD 10.0-RELEASE, hypervisor bhyve (lisensi BSD) sudah menjadi bagian dari base system. Hypervisor adalah aplikasi yang bisa membuat dan menjalankan virtual machine atau yang biasa disebut guest di dalam sebuah sistem operasi. Guest yang didukung oleh bhyve cukup banyak, termasuk FreeBSD, OpenBSD, dan banyak distribusi Linux. Saat ini bhyve hanya mendukung konsol serial dan tidak bisa menampilkan konsol grafik. Bhyve membutuhkan prosesor baru yang mendukung Intel Extended Page Tables (EPT) atau AMD Rapid Virtualization Indexing (RVI), yang dikenal juga sebagai Nested Page Tables (NPT). Untuk Linux atau FreeBSD guest dengan vCPU (virtualCPU) membutuhkan dukungan VMX unrestricted mode (UG). Cara termudah untuk mengecek dukungan prosesor untuk bhyve adalah dengan menjalankan #dmesg# atau melihat isi /var/run/dmesg.boot untuk fitur POPCNT di baris Features dan EPT dan UG di baris VT-x. Panduan yang cukup lengkap untuk menggunakan bhyve dapat diakses di halaman ini\n...","permalink":"http://blog.pras.my.id/blogs/2016-03-22-membuat-virtual-machine-di-freebsd-dengan-bhyve-dan-vm-bhyve/","readtime":"7 min read","summary":"\u003cp\u003eSejak FreeBSD 10.0-RELEASE, hypervisor bhyve (lisensi BSD) sudah menjadi bagian\ndari \u003cem\u003ebase system\u003c/em\u003e. Hypervisor adalah aplikasi yang bisa membuat dan\nmenjalankan \u003cem\u003evirtual machine\u003c/em\u003e atau yang biasa disebut \u003cem\u003eguest\u003c/em\u003e di dalam sebuah\nsistem operasi. \u003cem\u003eGuest\u003c/em\u003e yang didukung oleh bhyve cukup banyak, termasuk\nFreeBSD, OpenBSD, dan banyak distribusi Linux. Saat ini bhyve hanya mendukung\nkonsol serial dan tidak bisa menampilkan konsol grafik. Bhyve membutuhkan\nprosesor baru yang mendukung Intel Extended Page Tables (EPT) atau AMD Rapid\nVirtualization Indexing (RVI), yang dikenal juga sebagai Nested Page Tables\n(NPT). Untuk Linux atau FreeBSD \u003cem\u003eguest\u003c/em\u003e dengan vCPU (virtualCPU) membutuhkan\ndukungan VMX \u003cem\u003eunrestricted mode\u003c/em\u003e (UG). Cara termudah untuk mengecek dukungan\nprosesor untuk bhyve adalah dengan menjalankan #dmesg# atau melihat isi\n\u003cem\u003e/var/run/dmesg.boot\u003c/em\u003e untuk fitur \u003cstrong\u003ePOPCNT\u003c/strong\u003e di baris \u003cstrong\u003eFeatures\u003c/strong\u003e dan \u003cstrong\u003eEPT\u003c/strong\u003e\ndan \u003cstrong\u003eUG\u003c/strong\u003e di baris \u003cstrong\u003eVT-x\u003c/strong\u003e. Panduan yang cukup lengkap untuk menggunakan\nbhyve dapat diakses di \u003ca href=\"https://www.freebsd.org/doc/handbook/virtualization-host-bhyve.html\"\u003ehalaman\nini\u003c/a\u003e\u003c/p\u003e","tags":["sysadmin"],"title":"Membuat Virtual Machine di FreeBSD dengan bhyve dan vm-bhyve"},{"content":"Python is one of the programming languages which can claim to be both simple and powerful.\nPython is an easy to learn, powerful programming language with efficient high-level data structures and a simple but effective approach to object oriented programming. Python\u0026rsquo;s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas in many platforms.\nGuido van Rossum, the creator of the Python language, named the language after the BBC show \u0026ldquo;Monty Python\u0026rsquo;s Flying Circus\u0026rdquo;.\nPython\u0026rsquo;s Features Simple Easy to Learn Free and Open Source High-level Language Portable Interpreted Object Oriented Extensible Embeddable Extensive Libraries Python does not need compilation to binary. You just run the program directly from the source code. Internally, Python converts the source code into an intermediate form called bytecodes and then translates this into the native language of your computer and then runs it.\nWe can use help() function to get quick information about any function or statement in Python.\nPython\u0026rsquo;s Basics Literal constants 5, 3.14, 9.25e-3, 'This is a string' or \u0026quot;It's a string!\u0026quot; Numbers Integers 2, 4, 10 Long integers Floating point numbers or floats 3.14, 12.5E-4 Complex numbers (-5 + 4j), (2.3 - 4.6j) Strings 'single quotes strings', \u0026quot;double quotes strings\u0026quot;, '''triple quotes or multiline strings''', \u0026quot;\u0026quot;\u0026quot;another triple quotes or multiline strings\u0026quot;\u0026quot;\u0026quot; Escape sequences \\', \\\u0026quot;, \\n, \\t Raw strings r'You can add tab using \\t', R\u0026quot;Newlines are indicated by \\n\u0026quot; Unicode strings u\u0026quot;This is a Unicode string.\u0026quot; Strings are immutable. Once you have created a string, you cannot change it. String literal concatenation. 'What\\'s' 'your name?' is automatically converted in to \u0026quot;What's your name?\u0026quot;. Variables can store information and enable us to manipulate them and we can access them by name. Identifiers are names given to identify something i.e. variables. The first character must be a letter of the alphabet or an underscore. The rest can consist of letters, underscores, or digits. Identifier names are case-sensitive. Variables can hold values of different types called data types. Python refers to anything used in a program as an object. Python is strongly object-oriented in the sense that everything is an object including numbers, strings and even functions. A physical line is what you see when you write the program. A logical line is what Python sees as a single statement. Explicit line joining is writing a logical line spanning many physical lines follows. Indentation is used to determine the indentation level of the logical line, which in turn is used to determine the grouping of statements which called block. Operators and Expressions Arithmetics + (plus), - (minus), * (multiply), ** (power), / (division), // (floor division), % (modulo) Shifts \u0026lt;\u0026lt; (left shift), \u0026gt;\u0026gt; (right shift) Bitwise \u0026amp; (bitwise AND), | (bitwise OR), ^ (bitwise XOR), ~ (bitwise invert) Comparison \u0026lt; (less than), \u0026gt; (greater than), \u0026lt;= (less than or equal to), \u0026gt;= (greater than or equal to), == (equal to), != (not equal to) Boolean not (boolean NOT), and (boolean AND), or (boolean OR) Operator precedence from the lowest to highest lambda; or; and; not x; in, not in; is, is not; \u0026lt;, \u0026lt;=, \u0026gt;, \u0026gt;=, !=, ==; |; ^; \u0026amp;; \u0026lt;\u0026lt;, \u0026gt;\u0026gt;; +, -; *, /, %; +x, -x; ~x; **; x.attribute; x[index]; x[index:index]; f(arguments ...); (expressions, ...); [expressions, ...]; {key:datum, ...}; String conversion Control Flow if statement to check a condition and if the condition is true, we run a block of statements (called the if-block).\nnumber = 25 guess = int(raw_input('Guess a number : ')) if guess == number: print \u0026quot;You've guessed the number.\u0026quot; # optional elif guess \u0026gt; number: print \u0026quot;The number is lower than that.\u0026quot; # optional else: print \u0026quot;The number is higher than that.\u0026quot; print \u0026quot;Done.\u0026quot; while statement allows you to repeatedly execute a block of statements as long as a condition is true.\nnumber = 25 running = True while running: guess = int(raw_input('Guess a number : ')) if guess == number: print \u0026quot;You've guessed the number.\u0026quot; running = False # optional elif guess \u0026gt; number: print \u0026quot;The number is lower than that.\u0026quot; # optional else: print \u0026quot;The number is higher than that.\u0026quot; else: print \u0026quot;The game is over.\u0026quot; print \u0026quot;Done.\u0026quot; for..in statement is another looping statement which iterates over a sequence of objects.\nfor i in range(1, 6): # for i in [1, 2, 3, 4, 5]: print i else: print 'The loop is over' break statement is used to break out of a loop statement i.e. stop the execution of a looping statement.\nwhile True: s = raw_input('Write something : ') if s == 'quit': break print 'Length of the string is', len(s) print 'Done' G2\u0026rsquo;s Poetic Python\nProgramming is fun When the work is done if you wanna make your work also fun: use Python!\ncontinue statement is used to tell Python to skip the rest of the statements in the current loop block and to continue to the next iteration of the loop.\nwhile True: s = raw_input('Write something : ') if s == 'quit': break if len(s) \u0026lt; 5: continue print 'Input is of sufficient length' print 'Length of the string is', len(s) Functions Functions are reusable pieces of programs. They allow you to give a name to a block of statements and you can run that block using that name anywhere in your program and any number of times. This is known as calling the function.\nDefining a function\ndef helloWorld(): print 'Hello World!' # block belonging to the function # End of function helloWorld() # call the function A function can take parameters which are just values you supply to the function so that the function can do something utilising those values.\ndef printMin(a, b): if a \u0026lt; b: print a, 'is minimum' else: print b, 'is minimum' printMin(4, 6) # directly give literal values x = 9 y = 5 printMin(x, y) # give variables as arguments Variable names inside a function definition are not related in any way to other variables with the same names used outside the function i.e. variable names are local to the function. This is called the scope of the variable.\ndef func(n): print 'n is ', n n = 2 print 'Local n now is', n n = 20 func(n) print 'n is still ', n global statement tells Python that the variable name is not local, but it is global.\ndef func(): global n print 'n is ', n n = 2 print 'Global n now is', n n = 20 func() print 'n is ', n Default argument values can be used to make some of function\u0026rsquo;s parameters as optional and use default values if the user does not want to provide values for such parameters.\ndef write(message, times = 1): print message * times write('Morning') write('Hello', 3) You cannot have a parameter with a default argument value before a parameter without a default argument value in the order of parameters declared in the function parameter list.\nKeyword arguments can be used to specify only some parameters or arguments in the function provided that the other parameters have default argument values.\ndef func(x, y=3, z=7): print 'x is', x, 'and y is', y, 'and z is', z func(6, 11) func(12, z=18) func(z=25, x=80) return statement is used to return from a function i.e. break out of the function. We can optionally return a value from the function as well. A return statement without a value is equivalent to return None. Every function implicitly contains a return None statement at the end.\ndef minimum(a, b): if a \u0026lt; b: return a else: return b print minimum(23, 17) pass statement is used in Python to indicate an empty block of statements.\ndef someFunc(): pass Documentation strings or docstrings are an important tool that you should make use of since it helps to document the program better and makes it more easy to understand.\ndef printMin(a, b): '''Prints the maximum of two numbers. The two values must be integers.''' a = int(a) # convert to integers, if possible b = int(b) if a \u0026lt; b: print a, 'is minimum' else: print b, 'is minimum' printMin(19, 13) print printMin.__doc__ Modules A module is basically a file containing all your functions and variables that you have defined. To reuse the module in other programs, the filename of the module must have a .py extension. A module can be imported by another program to make use of its functionality. This is how we can use the Python standard library as well.\nimport statement is used to import modules i.e. sys module.\nimport sys print 'The command line arguments are:' for x in sys.argv: print x print '\\n\\nThe PYTHONPATH is', sys.path, '\\n' One way Python make importing a module faster is to create byte-compiled files with the extension .pyc which is related to the intermediate form that Python transforms the program into.\n__name__ statement can be used to find out the name of a its module.\nif __name__ == '__main__': print 'This program is being run by itself' else: print 'I am being imported from another module' You can create your own module just by creating a Python source code, just make sure it has .py extension.\n# !/usr/bin/python # Filename: mymodule.py def sayhello(): print 'Hello, this is mymodule speaking.' version = '0.1' # End of mymodule.py Then you can import the module.\nimport mymodule mymodule.sayhello() print 'Version', mymodule.version from..import statement can be used to import specific functions or variables from a module or all of it using from..import * statement.\nfrom mymodule import sayhello, version # Alternative: # from mymodule import * sayhello() print 'Version', version dir() function can be used to list the identifiers that a module defines. The identifiers are the functions, classes and variables defined in that module.\ndel statement is used to delete a variable/name and after the statement has run you can no longer access the variable.\nData Structures A list is a data structure that holds an ordered collection of items i.e. you can store a sequence of items in a list. List is a mutable data type i.e. this type can be altered.\nreadlist = [ 'memo', 'magazine', 'newspaper', 'book'] print 'I have', len(readlist), 'items to read.' print 'These items are:', for item in readlist: print item, print '\\nI also have to read the notes.' readlist.append('notes') print 'My reading list is now', readlist print 'I will short my list now' readlist.sort() print 'Sorted reading list is', readlist print 'The first item I will read is', readlistp[0] olditem = readlist[0] del readlist[0] print 'I read the', olditem print 'My reading list is now', readlist Tuples are just like lists except that they are immutable like strings i.e. you cannot modify tuples.\ngarden = ('roses', 'poppies', 'irises') print = 'Number of flowers in the garden is', len(garden) new_garden = ('daisies', 'lavender', garden) print 'Number of flowers in the new garden is', len(new_garden) print 'All flowers in the new garden are', new_garden print 'Flowers brought from old garden are', new_garden[2] print 'Last flower brought from old garden are', new_garden[2][2] Empty tuple can be specified i.e. myempty = (). Single item tuple should be specified i.e. singleton = (2, ) so that Python can differentiate between a tuple and a pair of parentheses surrounding the object in an expression.\nOne of the most common usage of tuples is with the print statement.\nage = 23 name = 'Pras' print '%s is %d years old' % (name, age) print 'Why is %s learning Python?' % name Dictionary is data structure which consists of keys with values pairs. Key must be unique and can only be immutable objects. Pairs of keys and valus are specified by using the notation d = {key1 : value1, key2 : value2 }. Key/value pairs in a dictionary are not ordered in any manner. The dictionaries are instances/objects of the dict class.\n# 'sl' is short for 's'tudents 'l'ist sl = { 'Agung': 'agung@students.com', 'Bayu': 'bayu@university.com', 'Deni': 'deni@study.com', 'Hafidz': 'hafidz@learn.com' } print \u0026quot;Agung's email is %s\u0026quot; % sl['Agung'] # Adding a key/value pair sl['Ibnu'] = 'ibnu@courses.com' # Deleting a key/value pair del sl['Deni'] print '\\nThere are %d students in the student list\\n', % len(sl) for name, email in sl.items(): print 'Student %s at %s' % (name, email) if 'Ibnu' in sl: # OR sl.has_key('Ibnu') print \u0026quot;\\nIbnu's email is %s\u0026quot; % sl['Ibnu'] Lists, tuples and strings are examples of sequences which has indexing operation which allows us to fetch a particular item in the sequence directly and the slicing operation which allows us to retrieve a slice of the sequence i.e. a part of the sequence.\nreadlist = ['book', 'magazine', 'memo', 'newspaper'] # Indexing or 'Subscription' operation print 'Item 0 is', readlist[0] print 'Item 1 is', readlist[1] print 'Item 2 is', readlist[2] print 'Item 3 is', readlist[3] print 'Item -1 is', readlist[-1] print 'Item -2 is', readlist[-2] # Slicing on a list print 'Item 1 to 3 is', readlist[1:3] print 'Item 2 to end is', readlist[2:] print 'Item 1 to -1 is', readlist[1:-1] print 'Item start to end is', readlist[:] # Slicing on a string name = 'purwoko' print 'characters 1 to 3 is', name[1:3] print 'characters 2 to end is', name[2:] print 'characters 1 to -1 is', name[1:-1] print 'characters start to end is', name[:] Variable only refers to the object and does not represent the object itself. The variable name points to that part of computer\u0026rsquo;s memory where the object is stored. This is called as binding of the name to the object.\nprint 'Simple Assignment' readlist = ['book', 'magazine', 'memo', 'newspaper'] mylist = readlist # mylist is just another name pointing to the same object! del readlist[0] # I read the first item, so I remove it from the list print 'readlist is', readlist print 'mylist is', mylist # notice that both readlist and mylist both print the same list without # the 'book' confirming that they point to the same object print 'Copy by making a full slice' mylist = readlist[:] # make a copy by doing a full slice del mylist[0] # remove first item print 'readlist is', readlist print 'mylist is', mylist # notice that now the two lists are different The strings are all objects of the class str. For a complete list of such str methods, see help(str).\nname = 'Wijayakusuma' # This is a string object if name.startswith('Wij'): print 'Yes, the string starts with \u0026quot;Wij\u0026quot;' if 'a' in name: print 'Yes, it contains the string \u0026quot;a\u0026quot;' if name.find('jaya'): print 'Yes, it contans the string \u0026quot;jaya\u0026quot;' delimiter = '_*_' mylist = ['Bandung', 'Surabaya', 'Jakarta', 'Yogyakarta'] print delimiter.join(mylist) Reference: C. H. Swaroop. A Byte of Python. 2005.\n","date":"Jun 14, 2015","excerpt":"Python is one of the programming languages which can claim to be both simple and powerful.\nPython is an easy to learn, powerful programming language with efficient high-level data structures and a simple but effective approach to object oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas in many platforms.\nGuido van Rossum, the creator of the Python language, named the language after the BBC show “Monty Python’s Flying Circus”.\n...","permalink":"http://blog.pras.my.id/blogs/2015-06-14-re-introduction-to-python/","readtime":"12 min read","summary":"\u003cp\u003ePython is one of the programming languages which can claim to be both \u003cstrong\u003esimple\u003c/strong\u003e and \u003cstrong\u003epowerful\u003c/strong\u003e.\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003ePython is an easy to learn, powerful programming language with efficient high-level data structures and a simple but effective approach to object oriented programming. Python\u0026rsquo;s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas in many platforms.\u003c/p\u003e\u003c/blockquote\u003e\n\u003cp\u003e\u003cstrong\u003eGuido van Rossum\u003c/strong\u003e, the creator of the Python language, named the language after the BBC show \u0026ldquo;Monty Python\u0026rsquo;s Flying Circus\u0026rdquo;.\u003c/p\u003e","tags":["python"],"title":"Re-Introduction to Python"},{"content":"By default, FreeBSD doesn\u0026rsquo;t install a python package in its standard distribution. So, we need to install python, either manually or using ansible module.\nansible freebsd-host -m raw -a 'env ASSUME_ALWAYS_YES=YES pkg install python' -u root Of course before we can use ansible we have to install public key authentication and enable SSH to root user in FreeBSD host from controller machine. FreeBSD install python in different path than Linux machine, so we must set variable for the python interpreter, either in host file or variable files.\nansible_python_interpreter: \u0026quot;/usr/local/bin/python\u0026quot; Then test installed python interpreter.\n$ ansible freebsd-host -m ping -u root \u0026lt;ip address\u0026gt; | success \u0026gt;\u0026gt; { \u0026quot;changed\u0026quot;: false, \u0026quot;ping\u0026quot;: \u0026quot;pong\u0026quot; } For new installation of FreeBSD, we should update port distribution using portsnap. The ad-hoc command\nansible freebsd-host -m command -a \u0026quot;/usr/sbin/portsnap fetch extract\u0026quot; The playbook\n--- - hosts: freebsd-host remote_user: root vars: ansible_python_interpreter: /usr/local/bin/python tasks: - name: update portsnap command: /usr/sbin/portsnap fetch extract After that we are ready to begin using ansible to automate our servers.\n","date":"Jun 8, 2015","excerpt":"By default, FreeBSD doesn’t install a python package in its standard distribution. So, we need to install python, either manually or using ansible module.\nansible freebsd-host -m raw -a 'env ASSUME_ALWAYS_YES=YES pkg install python' -u root Of course before we can use ansible we have to install public key authentication and enable SSH to root user in FreeBSD host from controller machine. FreeBSD install python in different path than Linux machine, so we must set variable for the python interpreter, either in host file or variable files.\n...","permalink":"http://blog.pras.my.id/blogs/2015-06-08-playing-with-ansible-and-freebsd/","readtime":"1 min read","summary":"\u003cp\u003eBy default, FreeBSD doesn\u0026rsquo;t install a python package in its standard distribution. So, we need to install python, either manually or using \u003cstrong\u003eansible\u003c/strong\u003e module.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eansible freebsd-host -m raw -a 'env ASSUME_ALWAYS_YES=YES pkg install python' -u root\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eOf course before we can use \u003cstrong\u003eansible\u003c/strong\u003e we have to install public key authentication and enable SSH to root user in FreeBSD host from controller machine. FreeBSD install python in different path than Linux machine, so we must set variable for the python interpreter, either in host file or variable files.\u003c/p\u003e","tags":["sysadmin"],"title":"Playing with Ansible and FreeBSD"},{"content":"The Prologue My college was the only college I know that gave the chance to its students to run the college network infrastructures. It encourages the students to study more outside their respective fields and share the knowledge in a community. Only a handful of people know that in the early days, the network infrastructure of my college, was built through the hands of its own students and the tradition to maintain it has been passed through the new generation of students.\nThe community of students which involved in maintaining the campus network gets benefits like faster network access, special routes and proxies, and access to computers across campus networks, as the compensations of the time and energy they used for maintaining campus network infrastructures. The benefits of maintaining the campus network infrastructures, despite only obtained by a few students, has been the driving force of the community to keep tinkering with the campus networks and develop theirs and others community, also to study new technology or trends like Internet of Things, which will be too expensive for common students.\nThe Present The network infrastructures has been evolved faster and faster by the time. Now we face terms like Software Defined Network, OpenStack, DevOps, and many more terms. The amount of knowledge and requirements needed to run the network infrastructures has grown beyond the capability of the campus students, some said. So, in the wake of new form of our college department which runs the campus network infrastructures, they decide to cut ties of any students involvement in operations of campus network infrastructures.\nThe new directorate of campus network operations wants to control the network operations from the backbone until the user access, simply everything. The new directorate demands that people who runs the campus network infrastructures to work full time, so no students allowed, despite there are a few part time students which runs the most important parts of campus networks, they kick them out one by one.\nNow, the community of students which involved in running the campus network in the past facing an uncertain future. When they are not involved in running the campus networks, their existence is no more relevant than any other students communities which just a bunch of students with same hobby, or culture, or whatever ties them as a community. The new directorate offers them to do projects with strict contracts for the directorate for the substitution of running campus networks.\nThe Opinion Before I walked out from the campus (not dropped out apparently, of course I graduated), the campus security unit has been implementing a new protocol, the so called night hours for the students, to keep them out of campus from 11 p.m. until the next morning. Of course the students communities became upset, their activity hours had been cut significantly. One of the community which greatly affected with this new protocol is our community which involved in running campus network. We usually start tinkering from the evening after courses until the next morning. But, when the new security protocol implemented, its only give the students approximately four hours effective for the activity.\nOf course we cannot cope with the demand of the technology which grows faster and faster when our time to study it has been cut more than sixty percent a day. I know only a very few students has the dedication to do the jobs, but they are the tinkerers, they are the ones who inspire the others to study the technology and develop it. They are the ones who tell the other students that our campus is different than other campuses, that there are another ways than to give up to education industry scheme, that the access to technology not only limited to those who have the money. We do not have any money, but we never afraid to tinker anything because we have access, and now they want to cut it.\nI know it is no place for me, who had been out of the campus, to say those words. But, I don\u0026rsquo;t want something that makes me very proud with my college gets taken away just like that, and frankly I don\u0026rsquo;t need MIT if my college still supports those few students which are willing to give their time and energy so they can tinker the technology beyond their reach and I am very disappointed to see my college downgrades to the level of college with access only for the rich people.\n","date":"Apr 11, 2015","excerpt":"The Prologue My college was the only college I know that gave the chance to its students to run the college network infrastructures. It encourages the students to study more outside their respective fields and share the knowledge in a community. Only a handful of people know that in the early days, the network infrastructure of my college, was built through the hands of its own students and the tradition to maintain it has been passed through the new generation of students.\n...","permalink":"http://blog.pras.my.id/blogs/2015-04-11-the-end-of-generation-of-tinkerers/","readtime":"4 min read","summary":"\u003ch2 id=\"the-prologue\"\u003eThe Prologue\u003c/h2\u003e\n\u003cp\u003eMy college was the only college I know that gave the chance to its students to run the college network infrastructures. It encourages the students to study more outside their respective fields and share the knowledge in a community. Only a handful of people know that in the early days, the network infrastructure of my college, was built through the hands of its own students and the tradition to maintain it has been passed through the new generation of students.\u003c/p\u003e","tags":["idea"],"title":"The End of Generation of Tinkerers"},{"content":"Ini adalah tulisan pertama di blog ini yang membahas tentang hardware dan yang pertama menggunakan bahasa Indonesia. Sensor temperatur LM35 (datasheet) adalah sensor IC (Integrated Circuit) yang memberikan respon terhadap perubahan temperatur di sekitarnya dalam bentuk keluaran tegangan analog. Sensor temperatur LM35 bekerja pada tegangan 4 sampai 30V dan mempunyai respon linear 10mV/derajat Celcius pada rentang -55 sampai 150 derajat Celcius berdasarkan datasheet yang tersedia. Akuisisi data menggunakan sensor temperatur ini adalah percobaan sederhana yang bisa dikembangkan untuk perangkat Internet of Thing. Garis besar percobaan ini adalah keluaran dari sensor LM35 dibaca oleh Arduino melalui pin input analog (A0). Pin input analog Arduino mengeluarkan nilai dengan resolusi 10 bit untuk rentang 0 sampai 5V. Untuk mengetahui tegangan keluaran dari sensor LM35, diperlukan perhitungan berikut ini,\ntegangan_keluaran_lm35 = input_analog_A0 * 5V / 1024 kemudian untuk mengetahui temperatur yang terukur dari sensor LM35, diperlukan perhitungan berikut,\ntemperatur_terukur = tegangan_keluaran_lm35 / (10mV/derajatC) Berikut ini adalah skematik untuk rangkaian LM35 dan Arduino UNO (dibuat dengan software open-source Fritzing) Berikut ini adalah program Arduino yang di-upload ke dalam mikrokontroler Arduino\n#define refVoltage 5.0 #define gradVoltage 0.01 #define tempPin 0 float temp; void setup() { // put your setup code here, to run once: Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: temp = analogRead(tempPin); // print lm35 output reading to Serial Serial.print(temp); Serial.print(\u0026quot;\\t\u0026quot;); // equation to calculate measured temperature from lm35 output temp = (refVoltage*temp)/(1024*gradVoltage); // print calculated temperature to Serial Serial.println(temp); // acquire data every one second (1000 miliseconds) delay(1000); } Berdasarkan program Arduino di atas, keluaran Serial Arduino dapat dibaca oleh komputer dengan menghubungkan Arduino dengan komputer menggunakan kabel Serial USB TTL RS232. Komputer yang digunakan pada percobaan ini adalah Raspberry Pi 2 dengan sistem operasi Raspbian. Pada Raspbian, setelah melakukan instalasi Arduino IDE dan menghubungkan kabel USB Serial dari Arduino ke Raspberry Pi, Serial Arduino akan terdeteksi sebagai /dev/ttyACM0. Setelah Serial USB terhubung, maka keluaran Serial dari Arduino dapat dibaca menggunakan berbagai macam bahasa pemrograman, salah satunya menggunakan bahasa pemrograman Python. Berikut ini adalah aplikasi Python yang digunakan untuk membaca Serial Arduino dan mengirimkan keluaran temperatur terukur LM35 ke database MySQL dan InfluxDB.\n#!/usr/bin/python import serial import MySQLdb import json import requests import time # define arduino device serial port and timeout device = '/dev/ttyACM0' timeout = 2 # connect to serial port try: print \u0026quot;Trying...\u0026quot;, device ser = serial.Serial(device, 9600, timeout=timeout) except: print \u0026quot;Failed to connect on\u0026quot;, device # create connection to MySQL database db = MySQLdb.connect('mysql_server_host', 'mysql_user', 'mysql_password', 'mysql_database') or die('ERROR: Could not connect to database!') # open a cursor to the database cur = db.cursor() # Influxdb server url url = 'http://influxdb_server_host:8086/db/influxdb_database/series?u=influxdb_user\u0026amp;p=influxdb_password' headers = {'Content-type': 'application/json'} # flush serial input ser.flushInput() while True: try: # read data from arduino data = ser.readline() # split data by tab character datum = data.split(\u0026quot;\\t\u0026quot;) # insert data to MySQL database try: cur.execute('insert into lm35 (output, tempc) values (%s, %s)', (datum[0], datum[1])) db.commit() except MySQLdb.IntegrityError: print \u0026quot;ERROR: Failed to insert data!\u0026quot; # send data as JSON to InfluxDB try: payload = [{\u0026quot;points\u0026quot;:[[float(datum[1].replace('\\r\\n', ''))]], \u0026quot;name\u0026quot;: \u0026quot;influxdb_series\u0026quot;, \u0026quot;columns\u0026quot;: [\u0026quot;tempc\u0026quot;]}] r = requests.post(url, data=json.dumps(payload), headers=headers) except: pass except: cur.close() db.close() ser.close() print \u0026quot;ERROR: Failed to get data from Arduino!\u0026quot; break Setelah disimpan di dalam database MySQL, data temperatur terukur dari sensor LM35 dapat digunakan untuk analisis lebih lanjut. Terdapat aplikasi yang dapat membaca data dari database InfluxDB dan mengeluarkannya dalam bentuk grafik dengan mudah yaitu Grafana yang pada percobaan ini dijalankan dengan web server Nginx.\nSetelah mengunduh Grafana, copy file config.sample.js menjadi file config.js dan ubah blok konfigurasi di dalamnya menjadi seperti berikut ini, \u0026hellip;\n// InfluxDB example setup (the InfluxDB databases specified need to exist) datasources: { influxdb: { type: 'influxdb', url: \u0026quot;http://influxdb_server_host:8086/db/influxdb_database\u0026quot;, username: 'influxdb_user', password: 'influxdb_password', }, grafana: { type: 'influxdb', url: \u0026quot;http://influxdb_server_host:8086/db/grafana\u0026quot;, username: 'grafana', password: 'grafana_password', grafanaDB: true }, }, ... Setelah itu lakukan instalasi Nginx dan buat file konfigurasi Nginx untuk Grafana seperti berikut ini,\nserver { listen 5100; auth_basic 'Restricted'; auth_basic_user_file /location/grafana-1.9.1/htpasswd; location / { root /location/grafana-1.9.1; } } Modul auth_basic digunakan untuk membatasi akses ke Grafana dan untuk membuat file htpasswd dan menambahkan user baru dapat menggunakan aplikasi apache2-utils untuk sistem operasi Debian. Setelah menambahkan file konfigurasi, restart Nginx.\nBerikut ini adalah tampilan Grafana setelah dikonfigurasi untuk mengambil data temperatur terukur dari sensor LM35 yang disimpan di dalam InfluxDB. Pada percobaan ini, Database MySQL dan InfluxDB, serta aplikasi Grafana dan Nginx tidak berjalan di Raspberry Pi, tetapi berjalan di komputer yang mempunyai resource lebih besar untuk mencegah beban yang terlalu besar pada Raspberry Pi. Raspberry Pi dan server database dan web terhubung melalui LAN.\n","date":"Mar 20, 2015","excerpt":"Ini adalah tulisan pertama di blog ini yang membahas tentang hardware dan yang pertama menggunakan bahasa Indonesia. Sensor temperatur LM35 (datasheet) adalah sensor IC (Integrated Circuit) yang memberikan respon terhadap perubahan temperatur di sekitarnya dalam bentuk keluaran tegangan analog. Sensor temperatur LM35 bekerja pada tegangan 4 sampai 30V dan mempunyai respon linear 10mV/derajat Celcius pada rentang -55 sampai 150 derajat Celcius berdasarkan datasheet yang tersedia. Akuisisi data menggunakan sensor temperatur ini adalah percobaan sederhana yang bisa dikembangkan untuk perangkat Internet of Thing. Garis besar percobaan ini adalah keluaran dari sensor LM35 dibaca oleh Arduino melalui pin input analog (A0). Pin input analog Arduino mengeluarkan nilai dengan resolusi 10 bit untuk rentang 0 sampai 5V. Untuk mengetahui tegangan keluaran dari sensor LM35, diperlukan perhitungan berikut ini,\n...","permalink":"http://blog.pras.my.id/blogs/2015-03-20-akuisisi-data-sensor-lm35-dengan-arduino/","readtime":"4 min read","summary":"\u003cp\u003eIni adalah tulisan pertama di blog ini yang membahas tentang hardware dan yang pertama menggunakan bahasa Indonesia. Sensor temperatur LM35 (\u003ca href=\"http://www.ti.com/lit/ds/symlink/lm35.pdf\"\u003edatasheet\u003c/a\u003e) adalah sensor IC (Integrated Circuit) yang memberikan respon terhadap perubahan temperatur di sekitarnya dalam bentuk keluaran tegangan analog. Sensor temperatur LM35 bekerja pada tegangan 4 sampai 30V dan mempunyai respon linear 10mV/derajat Celcius pada rentang -55 sampai 150 derajat Celcius berdasarkan datasheet yang tersedia. Akuisisi data menggunakan sensor temperatur ini adalah percobaan sederhana yang bisa dikembangkan untuk perangkat \u003ca href=\"http://whatis.techtarget.com/definition/Internet-of-Things\"\u003eInternet of Thing\u003c/a\u003e. Garis besar percobaan ini adalah keluaran dari sensor LM35 dibaca oleh Arduino melalui pin input analog (\u003cstrong\u003eA0\u003c/strong\u003e). Pin input analog Arduino mengeluarkan nilai dengan resolusi 10 bit untuk rentang 0 sampai 5V. Untuk mengetahui tegangan keluaran dari sensor LM35, diperlukan perhitungan berikut ini,\u003c/p\u003e","tags":["engineering"],"title":"Akuisisi Data Sensor LM35 dengan Arduino"},{"content":"Percona Server 5.6 is the latest release of drop-in replacement for MySQL®. The new version offers all the improvements found in MySQL 5.6 Community Edition plus scalability, availability, backup, and security features found only in MySQL 5.6 Enterprise Edition, which requires a support contract from Oracle to access. Percona Server 5.6 is free, open source software which includes superior diagnostics and improved integration with other Percona software. In this documentation, I will show how to install Percona Server 5.6 on CentOS 6.\nInstall Percona repository\nsudo yum install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm Install Percona Server 5.6\nsudo yum install Percona-Server-client-56 Percona-Server-server-56 Enable and start Percona Server 5.6\nsudo chkconfig mysql on sudo service mysql start Run mysql_secure_installation to secure Percona Server 5.6 installation\nsudo /usr/bin/mysql_secure_installation Create user defined function (UDF) from Percona Toolkit\nmysql -u root -e \u0026quot;CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'\u0026quot; mysql -u root -e \u0026quot;CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'\u0026quot; mysql -u root -e \u0026quot;CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'\u0026quot; Reference: https://www.percona.com/doc/percona-server/5.6/installation.html\n","date":"Feb 24, 2015","excerpt":"Percona Server 5.6 is the latest release of drop-in replacement for MySQL®. The new version offers all the improvements found in MySQL 5.6 Community Edition plus scalability, availability, backup, and security features found only in MySQL 5.6 Enterprise Edition, which requires a support contract from Oracle to access. Percona Server 5.6 is free, open source software which includes superior diagnostics and improved integration with other Percona software. In this documentation, I will show how to install Percona Server 5.6 on CentOS 6.\n...","permalink":"http://blog.pras.my.id/blogs/2015-02-24-percona-server-5-6-installation-on-centos-6/","readtime":"1 min read","summary":"\u003cp\u003e\u003ca href=\"https://www.percona.com/software/percona-server/ps-5.6\"\u003ePercona Server 5.6\u003c/a\u003e is the latest release of drop-in replacement for MySQL®. The new version offers all the improvements found in MySQL 5.6 Community Edition plus scalability, availability, backup, and security features found only in MySQL 5.6 Enterprise Edition, which requires a support contract from Oracle to access. Percona Server 5.6 is free, open source software which includes superior diagnostics and improved integration with other Percona software. In this documentation, I will show how to install \u003cstrong\u003ePercona Server 5.6\u003c/strong\u003e on CentOS 6.\u003c/p\u003e","tags":["sysadmin"],"title":"Percona Server 5.6 Installation on CentOS 6"},{"content":"Beanstalkd is a simple, fast work queue. Its interface is generic, but was originally designed for reducing the latency of page views in high-volume web applications by running time-consuming tasks asynchronously. In this documentation, I will show how to install Beanstalkd on CentOS 6.\nInstall Beanstalkd from EPEL repository using yum\nsudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm sudo yum install beanstalkd Enable and start Beanstalkd service\nsudo chkconfig beanstalkd on sudo service beanstalkd start Reference: https://kr.github.io/beanstalkd/download.html\n","date":"Feb 24, 2015","excerpt":"Beanstalkd is a simple, fast work queue. Its interface is generic, but was originally designed for reducing the latency of page views in high-volume web applications by running time-consuming tasks asynchronously. In this documentation, I will show how to install Beanstalkd on CentOS 6.\nInstall Beanstalkd from EPEL repository using yum\nsudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm sudo yum install beanstalkd Enable and start Beanstalkd service\nsudo chkconfig beanstalkd on sudo service beanstalkd start Reference: https://kr.github.io/beanstalkd/download.html\n...","permalink":"http://blog.pras.my.id/blogs/2015-02-24-beanstalkd-installation-on-centos-6/","readtime":"1 min read","summary":"\u003cp\u003e\u003ca href=\"https://kr.github.io/beanstalkd/\"\u003eBeanstalkd\u003c/a\u003e is a simple, fast work queue. Its interface is generic, but was originally designed for reducing the latency of page views in high-volume web applications by running time-consuming tasks asynchronously. In this documentation, I will show how to install \u003cstrong\u003eBeanstalkd\u003c/strong\u003e on CentOS 6.\u003c/p\u003e\n\u003chr\u003e\n\u003cp\u003eInstall \u003cstrong\u003eBeanstalkd\u003c/strong\u003e from \u003cstrong\u003eEPEL\u003c/strong\u003e repository using \u003cstrong\u003eyum\u003c/strong\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm\nsudo yum install beanstalkd\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eEnable and start \u003cstrong\u003eBeanstalkd\u003c/strong\u003e service\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo chkconfig beanstalkd on\nsudo service beanstalkd start\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eReference: \u003ca href=\"https://kr.github.io/beanstalkd/download.html\"\u003ehttps://kr.github.io/beanstalkd/download.html\u003c/a\u003e\u003c/p\u003e","tags":["sysadmin"],"title":"Beanstalkd Installation on CentOS 6"},{"content":"Sensu is often described as the “monitoring router”. Essentially, Sensu takes the results of “check” scripts run across many systems, and if certain conditions are met; passes their information to one or more “handlers”. Checks are used, for example, to determine if a service like Apache is up or down. Checks can also be used to collect data, such as MySQL query statistics or Rails application metrics. Handlers take actions, using result information, such as sending an email, messaging a chat room, or adding a data point to a graph. There are several types of handlers, but the most common and most powerful is “pipe”, a script that receives data via standard input. Check and handler scripts can be written in any language, and the community repository continues to grow! In this documentation, I will show how to install Sensu on CentOS 6.\nGenerate SSL certificates for communication of Sensu components (be sure that OpenSSL is installed)\nwhich openssl openssl version cd /tmp wget http://sensuapp.org/docs/0.16/tools/ssl_certs.tar tar -xvf ssl_certs.tar cd ssl_certs ./ssl_certs.sh generate Install RabbitMQ (requires Erlang from EPEL repository)\nsudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm sudo yum install erlang sudo rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc sudo rpm -Uvh http://www.rabbitmq.com/releases/rabbitmq-server/v3.4.4/rabbitmq-server-3.4.4-1.noarch.rpm sudo chkconfig rabbitmq-server on sudo service rabbitmq-server start Configure RabbitMQ SSL listenet\nsudo mkdir -p /etc/rabbitmq/ssl sudo cp /tmp/sensu_ca/cacert.pem /etc/rabbitmq/ssl/ sudo cp /tmp/server/cert.pem /etc/rabbitmq/ssl/ sudo cp /tmp/server/key.pem /etc/rabbitmq/ssl/ sudo vi /etc/rabbitmq/rabbitmq.config [ {rabbit, [ {ssl_listeners, [5671]}, {ssl_allow_poodle_attack, true}, {ssl_options, [{cacertfile,\u0026quot;/etc/rabbitmq/ssl/cacert.pem\u0026quot;}, {certfile,\u0026quot;/etc/rabbitmq/ssl/cert.pem\u0026quot;}, {keyfile,\u0026quot;/etc/rabbitmq/ssl/key.pem\u0026quot;}, {verify,verify_peer}, {fail_if_no_peer_cert,true}]} ]} ].\nsudo service rabbitmq-server restart Create a RabbitMQ vhost for Sensu\nsudo rabbitmqctl add_vhost /sensu Create a RabbitMQ user with permissions for the Sensu vhost\nsudo rabbitmqctl add_user \u0026lt;rabbitmq-user\u0026gt; \u0026lt;rabbitmq-password\u0026gt; Create a RabbitMQ user with permissions for the Sensu vhost\nsudo rabbitmqctl set_permissions -p /sensu sensu \u0026quot;.*\u0026quot; \u0026quot;.*\u0026quot; \u0026quot;.*\u0026quot; (Optional) Enable the RabbitMQ web management console\nsudo rabbitmq-plugins enable rabbitmq_management Install Redis (you can use tutorial in this page) Add Sensu repository\nsudo vi /etc/yum.repos.d/sensu.repo [sensu] name=sensu-main baseurl=http://repos.sensuapp.org/yum/el/$releasever/$basearch/ gpgcheck=0 enabled=1 Install Sensu using yum\nsudo yum install sensu Add Sensu SSL certificates\nsudo mkdir -p /etc/sensu/ssl sudo cp /tmp/ssl_certs/client/cert.pem /etc/sensu/ssl/ sudo cp /tmp/ssl_certs/client/key.pem /etc/sensu/ssl/ Configure Sensu to communicate with RabbitMQ\nsudo vi /etc/sensu/conf.d/rabbitmq.json { \u0026ldquo;rabbitmq\u0026rdquo;: { \u0026ldquo;ssl\u0026rdquo;: { \u0026ldquo;cert_chain_file\u0026rdquo;: \u0026ldquo;/etc/sensu/ssl/cert.pem\u0026rdquo;, \u0026ldquo;private_key_file\u0026rdquo;: \u0026ldquo;/etc/sensu/ssl/key.pem\u0026rdquo; }, \u0026ldquo;host\u0026rdquo;: \u0026ldquo;\u0026rdquo;, \u0026ldquo;port\u0026rdquo;: 5671, \u0026ldquo;vhost\u0026rdquo;: \u0026ldquo;/sensu\u0026rdquo;, \u0026ldquo;user\u0026rdquo;: \u0026ldquo;\u0026rdquo;, \u0026ldquo;password\u0026rdquo;: \u0026ldquo;\u0026rdquo; } } Configure Sensu to communicate with Redis\nsudo vi /etc/sensu/conf.d/redis.json { \u0026quot;redis\u0026quot;: { \u0026quot;host\u0026quot;: \u0026quot;localhost\u0026quot;, \u0026quot;port\u0026quot;: 6379 } } Configure Sensu API\nsudo vi /etc/sensu/conf.d/api.json { \u0026ldquo;api\u0026rdquo;: { \u0026ldquo;host\u0026rdquo;: \u0026ldquo;localhost\u0026rdquo;, \u0026ldquo;port\u0026rdquo;: 4567, \u0026ldquo;user\u0026rdquo;: \u0026ldquo;\u0026rdquo;, \u0026ldquo;password\u0026rdquo;: \u0026ldquo;\u0026rdquo; } } Configure Sensu client\nsudo vi /etc/sensu/conf.d/client.json { \u0026quot;client\u0026quot;: { \u0026quot;name\u0026quot;: \u0026quot;\u0026lt;client-name\u0026gt;\u0026quot;, \u0026quot;address\u0026quot;: \u0026quot;\u0026lt;clien-ip\u0026gt;\u0026quot;, \u0026quot;subscriptions\u0026quot;: [ \u0026quot;all\u0026quot; ] } } Enable Sensu services\nsudo chkconfig sensu-server on sudo chkconfig sensu-client on sudo chkconfig sensu-api on Start Sensu services\nsudo service sensu-server start sudo service sensu-client start sudo service sensu-api start Install Sensu dashboard: Uchiwa\nsudo yum install uchiwa Configure Sensu dashboard: Uchiwa\nsudo cp /etc/sensu/{uchiwa.json,uchiwa.json.old} sudo vi /etc/sensu/uchiwa.json { \u0026quot;sensu\u0026quot;: [ { \u0026quot;name\u0026quot;: \u0026quot;Sensu\u0026quot;, \u0026quot;host\u0026quot;: \u0026quot;127.0.0.1\u0026quot;, \u0026quot;ssl\u0026quot;: false, \u0026quot;port\u0026quot;: 4567, \u0026quot;user\u0026quot;: \u0026quot;\u0026lt;api-user\u0026gt;\u0026quot;, \u0026quot;pass\u0026quot;: \u0026quot;\u0026lt;api-password\u0026gt;\u0026quot;, \u0026quot;path\u0026quot;: \u0026quot;\u0026quot;, \u0026quot;timeout\u0026quot;: 5000 } ], \u0026quot;uchiwa\u0026quot;: { \u0026quot;user\u0026quot;: \u0026quot;\u0026lt;uchiwa-user\u0026gt;\u0026quot;, \u0026quot;pass\u0026quot;: \u0026quot;\u0026lt;uchiwa-password\u0026gt;\u0026quot;, \u0026quot;port\u0026quot;: 3000, \u0026quot;stats\u0026quot;: 10, \u0026quot;refresh\u0026quot;: 10000 } } Enable and start Uchiwa\nsudo chkconfig uchiwa on sudo service uchiwa start You can access Uchiwa in http://sensu-server-ip:3000\nReferences: http://sensuapp.org/docs/0.16/guide http://www.rabbitmq.com/install-rpm.html\n","date":"Feb 23, 2015","excerpt":"Sensu is often described as the “monitoring router”. Essentially, Sensu takes the results of “check” scripts run across many systems, and if certain conditions are met; passes their information to one or more “handlers”. Checks are used, for example, to determine if a service like Apache is up or down. Checks can also be used to collect data, such as MySQL query statistics or Rails application metrics. Handlers take actions, using result information, such as sending an email, messaging a chat room, or adding a data point to a graph. There are several types of handlers, but the most common and most powerful is “pipe”, a script that receives data via standard input. Check and handler scripts can be written in any language, and the community repository continues to grow! In this documentation, I will show how to install Sensu on CentOS 6.\n...","permalink":"http://blog.pras.my.id/blogs/2015-02-23-sensu-installation-on-centos-6/","readtime":"3 min read","summary":"\u003cp\u003e\u003ca href=\"http://sensuapp.org/\"\u003eSensu\u003c/a\u003e is often described as the “monitoring router”. Essentially, Sensu takes the results of “check” scripts run across many systems, and if certain conditions are met; passes their information to one or more “handlers”. Checks are used, for example, to determine if a service like Apache is up or down. Checks can also be used to collect data, such as MySQL query statistics or Rails application metrics. Handlers take actions, using result information, such as sending an email, messaging a chat room, or adding a data point to a graph. There are several types of handlers, but the most common and most powerful is “pipe”, a script that receives data via standard input. Check and handler scripts can be written in any language, and the community repository continues to grow! In this documentation, I will show how to install \u003cstrong\u003eSensu\u003c/strong\u003e on CentOS 6.\u003c/p\u003e","tags":["sysadmin"],"title":"Sensu Installation on CentOS 6"},{"content":"InfluxDB is an open-source, distributed, time series database with no external dependencies. In this documentation, I will show how to install InfluxDB on CentOS 6.\nDownload InfluxDB\nwget https://s3.amazonaws.com/influxdb/influxdb-latest-1.x86_64.rpm Install InfluxDB\nsudo rpm -ivh influxdb-latest-1.x86_64.rpm Enable and start InfluxDB service\nsudo chkconfig influxdb on sudo service influxdb start Reference: http://influxdb.com/download/\n","date":"Feb 23, 2015","excerpt":"InfluxDB is an open-source, distributed, time series database with no external dependencies. In this documentation, I will show how to install InfluxDB on CentOS 6.\nDownload InfluxDB\nwget https://s3.amazonaws.com/influxdb/influxdb-latest-1.x86_64.rpm Install InfluxDB\nsudo rpm -ivh influxdb-latest-1.x86_64.rpm Enable and start InfluxDB service\nsudo chkconfig influxdb on sudo service influxdb start Reference: http://influxdb.com/download/\n","permalink":"http://blog.pras.my.id/blogs/2015-02-23-influxdb-installation-on-centos-6/","readtime":"1 min read","summary":"\u003cp\u003e\u003ca href=\"http://influxdb.com/\"\u003eInfluxDB\u003c/a\u003e is an open-source, distributed, time series database with no external dependencies. In this documentation, I will show how to install \u003cstrong\u003eInfluxDB\u003c/strong\u003e on CentOS 6.\u003c/p\u003e\n\u003chr\u003e\n\u003cp\u003eDownload \u003cstrong\u003eInfluxDB\u003c/strong\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003ewget https://s3.amazonaws.com/influxdb/influxdb-latest-1.x86_64.rpm\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eInstall \u003cstrong\u003eInfluxDB\u003c/strong\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo rpm -ivh influxdb-latest-1.x86_64.rpm\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eEnable and start \u003cstrong\u003eInfluxDB\u003c/strong\u003e service\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo chkconfig influxdb on\nsudo service influxdb start\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eReference: \u003ca href=\"http://influxdb.com/download/\"\u003ehttp://influxdb.com/download/\u003c/a\u003e\u003c/p\u003e","tags":["sysadmin"],"title":"InfluxDB Installation on CentOS 6"},{"content":"Fluentd is an open source data collector, which lets you unify the data collection and consumption for a better use and understanding of data. In this documentation, I will show how to install fluentd (td-agent) on CentOS 6.\nPre-installation: increase number of maximum file descriptors\nulimit -n sudo vi /etc/security/limits.conf * soft nofile 65535 * hard nofile 65535 root soft nofile unlimited root hard nofile unlimited sudo reboot Pre-installation: network kernel optimization\nsudo vi /etc/sysctl.conf net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_tw_reuse = 1 net.ipv4.ip_local_port_range = 10240 65535 sudo sysctl -p Install fluentd (td-agent)\ncurl -L http://toolbelt.treasuredata.com/sh/install-redhat-td-agent2.sh | sudo sh sudo chkconfig td-agent on sudo chkconfig td-agent start Reference: http://docs.fluentd.org/articles/install-by-rpm\n","date":"Feb 23, 2015","excerpt":"Fluentd is an open source data collector, which lets you unify the data collection and consumption for a better use and understanding of data. In this documentation, I will show how to install fluentd (td-agent) on CentOS 6.\nPre-installation: increase number of maximum file descriptors\nulimit -n sudo vi /etc/security/limits.conf * soft nofile 65535 * hard nofile 65535 root soft nofile unlimited root hard nofile unlimited sudo reboot Pre-installation: network kernel optimization\n...","permalink":"http://blog.pras.my.id/blogs/2015-02-23-fluent-treasure-datatd-agent-installation-on-centos-6/","readtime":"1 min read","summary":"\u003cp\u003e\u003ca href=\"https://www.fluentd.org/\"\u003eFluentd\u003c/a\u003e is an open source data collector, which lets you unify the data collection and consumption for a better use and understanding of data. In this documentation, I will show how to install \u003cstrong\u003efluentd\u003c/strong\u003e (\u003cstrong\u003etd-agent\u003c/strong\u003e) on CentOS 6.\u003c/p\u003e\n\u003chr\u003e\n\u003cp\u003ePre-installation: increase number of maximum file descriptors\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003eulimit -n\nsudo vi /etc/security/limits.conf\n\n*               soft    nofile          65535\n*               hard    nofile          65535\nroot            soft    nofile          unlimited\nroot            hard    nofile          unlimited\n\nsudo reboot\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003ePre-installation: network kernel optimization\u003c/p\u003e","tags":["sysadmin"],"title":"Fluent Treasure Data (TD) Agent Installation on CentOS 6"},{"content":"Elasticsearch is a distributed restful search and analytics. In this documentation, I will show how to install Elasticsearch on CentOS 6.\nInstall Oracle Java\nwget --header \u0026quot;Cookie: oraclelicense=accept-securebackup-cookie\u0026quot; http://download.oracle.com/otn-pub/java/jdk/8u31-b13/server-jre-8u31-linux-x64.tar.gz sudo mkdir /opt/jre sudo tar zxf server-jre-8u31-linux-x64.tar.gz -C /opt/jre sudo update-alternatives --install /usr/bin/java java /opt/jre/jdk1.8.0_31/bin/java 2000 sudo update-alternatives --install /usr/bin/javac javac /opt/jre/jdk1.8.0_31/bin/javac 2000 sudo update-alternatives --display java sudo update-alternatives --display javac Import Elasticsearch GPG key\nsudo rpm --import https://packages.elasticsearch.org/GPG-KEY-elasticsearch Add Elasticsearch repository\nsudo vi /etc/yum.repos.d/elasticsearch.repo [elasticsearch-1.4] name=Elasticsearch repository for 1.4.x packages baseurl=http://packages.elasticsearch.org/elasticsearch/1.4/centos gpgcheck=1 gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch enabled=1 Install Elasticsearch using yum\nsudo yum install elasticsearch Start Elasticsearch service\nsudo service elasticsearch start sudo chkconfig elasticsearch on Reference: https://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup-repositories.html\n","date":"Feb 23, 2015","excerpt":"Elasticsearch is a distributed restful search and analytics. In this documentation, I will show how to install Elasticsearch on CentOS 6.\nInstall Oracle Java\nwget --header \"Cookie: oraclelicense=accept-securebackup-cookie\" http://download.oracle.com/otn-pub/java/jdk/8u31-b13/server-jre-8u31-linux-x64.tar.gz sudo mkdir /opt/jre sudo tar zxf server-jre-8u31-linux-x64.tar.gz -C /opt/jre sudo update-alternatives --install /usr/bin/java java /opt/jre/jdk1.8.0_31/bin/java 2000 sudo update-alternatives --install /usr/bin/javac javac /opt/jre/jdk1.8.0_31/bin/javac 2000 sudo update-alternatives --display java sudo update-alternatives --display javac Import Elasticsearch GPG key\nsudo rpm --import https://packages.elasticsearch.org/GPG-KEY-elasticsearch Add Elasticsearch repository\n...","permalink":"http://blog.pras.my.id/blogs/2015-02-23-elasticsearch-on-centos-6/","readtime":"1 min read","summary":"\u003cp\u003e\u003ca href=\"https://www.elasticsearch.org/overview/elasticsearch\"\u003eElasticsearch\u003c/a\u003e is a distributed restful search and analytics. In this documentation, I will show how to install \u003cstrong\u003eElasticsearch\u003c/strong\u003e on CentOS 6.\u003c/p\u003e\n\u003chr\u003e\n\u003cp\u003eInstall Oracle Java\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003ewget --header \u0026quot;Cookie: oraclelicense=accept-securebackup-cookie\u0026quot; http://download.oracle.com/otn-pub/java/jdk/8u31-b13/server-jre-8u31-linux-x64.tar.gz\nsudo mkdir /opt/jre\nsudo tar zxf server-jre-8u31-linux-x64.tar.gz -C /opt/jre\nsudo update-alternatives --install /usr/bin/java java /opt/jre/jdk1.8.0_31/bin/java 2000\nsudo update-alternatives --install /usr/bin/javac javac /opt/jre/jdk1.8.0_31/bin/javac 2000\nsudo update-alternatives --display java\nsudo update-alternatives --display javac\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eImport \u003cstrong\u003eElasticsearch\u003c/strong\u003e GPG key\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo rpm --import https://packages.elasticsearch.org/GPG-KEY-elasticsearch\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eAdd \u003cstrong\u003eElasticsearch\u003c/strong\u003e repository\u003c/p\u003e","tags":["sysadmin"],"title":"Elasticsearch on CentOS 6"},{"content":"Varnish Cache is a web application accelerator also known as a caching HTTP reverse proxy. You install it in front of any server that speaks HTTP and configure it to cache the contents. Varnish Cache is really, really fast. It typically speeds up delivery with a factor of 300 - 1000x, depending on your architecture. In this documentation, I will show how to install Varnish 4 on CentOS 6.\nFor first installation install Varnish repository\nsudo rpm --nosignature -i https://repo.varnish-cache.org/redhat/varnish-4.0.el6.rpm Then install Varnish\nsudo yum install varnish Start Varnish service and configure it to start at boot\nsudo service varnish start sudo chkconfig varnish on Reference: https://www.varnish-cache.org/installation/redhat\n","date":"Feb 21, 2015","excerpt":"Varnish Cache is a web application accelerator also known as a caching HTTP reverse proxy. You install it in front of any server that speaks HTTP and configure it to cache the contents. Varnish Cache is really, really fast. It typically speeds up delivery with a factor of 300 - 1000x, depending on your architecture. In this documentation, I will show how to install Varnish 4 on CentOS 6.\nFor first installation install Varnish repository\n...","permalink":"http://blog.pras.my.id/blogs/2015-02-21-varnish-4-on-centos-6/","readtime":"1 min read","summary":"\u003cp\u003e\u003ca href=\"https://www.varnish-cache.org/\"\u003eVarnish Cache\u003c/a\u003e is a web application accelerator also known as a caching HTTP reverse proxy. You install it in front of any server that speaks HTTP and configure it to cache the contents. Varnish Cache is really, really fast. It typically speeds up delivery with a factor of 300 - 1000x, depending on your architecture. In this documentation, I will show how to install Varnish 4 on CentOS 6.\u003c/p\u003e\n\u003chr\u003e\n\u003cp\u003eFor first installation install \u003cstrong\u003eVarnish\u003c/strong\u003e repository\u003c/p\u003e","tags":["sysadmin"],"title":"Varnish 4 on CentOS 6"},{"content":"RVM is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems. In this documentation I will show how to install RVM on CentOS 6.6.\nInstall Development Tools\nsudo yum groupinstall \u0026quot;Development Tools\u0026quot; Install mpapis public key\nsudo gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 or if failed\ncurl -sSL https://rvm.io/mpapis.asc | sudo gpg2 --import - Install RVM for multiuser installation\n\\curl -sSL https://get.rvm.io | sudo bash -s stable Add your user to rvm group\nsudo usermod -aG rvm \u0026lt;user\u0026gt; Logout and login again then install Ruby\nrvm install 2.1 rvm use --default 2.1 You have installed Ruby version 2.1 and set it as your default version of Ruby.\nruby -v ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux] Reference: https://rvm.io/rvm/install\n","date":"Feb 21, 2015","excerpt":"RVM is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems. In this documentation I will show how to install RVM on CentOS 6.6.\nInstall Development Tools\nsudo yum groupinstall \"Development Tools\" Install mpapis public key\nsudo gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 or if failed\ncurl -sSL https://rvm.io/mpapis.asc | sudo gpg2 --import - Install RVM for multiuser installation\n...","permalink":"http://blog.pras.my.id/blogs/2015-02-21-rvm-for-managing-ruby-version-on-centos-6/","readtime":"1 min read","summary":"\u003cp\u003e\u003ca href=\"https://rvm.io/\"\u003eRVM\u003c/a\u003e is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems. In this documentation I will show how to install RVM on CentOS 6.6.\u003c/p\u003e\n\u003chr\u003e\n\u003cp\u003eInstall \u003cstrong\u003eDevelopment Tools\u003c/strong\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo yum groupinstall \u0026quot;Development Tools\u0026quot;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eInstall \u003cstrong\u003empapis public key\u003c/strong\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eor if failed\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003ecurl -sSL https://rvm.io/mpapis.asc | sudo gpg2 --import -\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eInstall RVM for multiuser installation\u003c/p\u003e","tags":["sysadmin"],"title":"RVM for Managing Ruby Version on CentOS 6"},{"content":"Redis is an open source, BSD licensed, advanced key-value cache and store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs. In this documentation, I will show how to install Redis on CentOS 6.\nInstall Development Tools\nsudo yum groupinstall \u0026quot;Development Tools\u0026quot; Download and extract latest Redis package from http://redis.io/ wget http://download.redis.io/releases/redis-2.8.19.tar.gz tar zxf redis-2.8.19.tar.gz Go to redis directory and run make\ncd redis-2.8.19 make it is a good idea to run make test\nsudo yum install tcl make test Then run make install\nsudo make install Add /usr/local/bin and /usr/local/sbin to your secure_path in /etc/sudoers\nInstall as service\nsudo ./utils/install-server.sh Welcome to the redis service installer This script will help you easily set up a running redis server Please select the redis port for this instance: [6379] Selecting default: 6379 Please select the redis config file name [/etc/redis/6379.conf] Selected default - /etc/redis/6379.conf Please select the redis log file name [/var/log/redis_6379.log] Selected default - /var/log/redis_6379.log Please select the data directory for this instance [/var/lib/redis/6379] Selected default - /var/lib/redis/6379 Please select the redis executable path [/usr/local/bin/redis-server] Selected config: Port : 6379 Config file : /etc/redis/6379.conf Log file : /var/log/redis_6379.log Data dir : /var/lib/redis/6379 Executable : /usr/local/bin/redis-server Cli Executable : /usr/local/bin/redis-cli Is this ok? Then press ENTER to go on or Ctrl-C to abort. Copied /tmp/6379.conf =\u0026gt; /etc/init.d/redis_6379 Installing service... Successfully added to chkconfig! Successfully added to runlevels 345! Starting Redis server... Installation successful! Test your redis installation\nredis-cli 127.0.0.1:6379\u0026gt;INFO Reference: http://redis.io/download\n","date":"Feb 21, 2015","excerpt":"Redis is an open source, BSD licensed, advanced key-value cache and store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs. In this documentation, I will show how to install Redis on CentOS 6.\nInstall Development Tools\nsudo yum groupinstall \"Development Tools\" Download and extract latest Redis package from http://redis.io/ wget http://download.redis.io/releases/redis-2.8.19.tar.gz tar zxf redis-2.8.19.tar.gz Go to redis directory and run make\n...","permalink":"http://blog.pras.my.id/blogs/2015-02-21-redis-on-centos-6/","readtime":"2 min read","summary":"\u003cp\u003e\u003ca href=\"http://redis.io/\"\u003eRedis\u003c/a\u003e is an open source, BSD licensed, advanced key-value cache and store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs. In this documentation, I will show how to install \u003cstrong\u003eRedis\u003c/strong\u003e on CentOS 6.\u003c/p\u003e\n\u003chr\u003e\n\u003cp\u003eInstall \u003cstrong\u003eDevelopment Tools\u003c/strong\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo yum groupinstall \u0026quot;Development Tools\u0026quot;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eDownload and extract latest Redis package from \u003ca href=\"http://redis.io/\"\u003ehttp://redis.io/\u003c/a\u003e\nwget \u003ca href=\"http://download.redis.io/releases/redis-2.8.19.tar.gz\"\u003ehttp://download.redis.io/releases/redis-2.8.19.tar.gz\u003c/a\u003e\ntar zxf redis-2.8.19.tar.gz\nGo to redis directory and run make\u003c/p\u003e","tags":["sysadmin"],"title":"Redis on CentOS 6"},{"content":"Phusion Passenger is a web server and application server for your web apps which built upon Ruby or NodeJS. In this documentation I will show how to install open source version of Phusion Passenger on CentOS 6.6 using Ruby gem installation.\nCheck your Ruby location\nwhich ruby /usr/local/rvm/rubies/ruby-2.1.5/bin/ruby In this tutorial I assume your Ruby is installed using RVM Install passenger using gem command\ngem install passenger -V Install passenger module for nginx\nrvmsudo passenger-install-nginx-module Follow the installation steps and you can customize your nginx installation if you want Download init script for nginx and install\nwget https://gist.githubusercontent.com/prasetiyohadi/90355ce4b02487261f58/raw/35319a9b63331a9503424c40489d7be27387584d/nginx mv nginx /etc/init.d/nginx sudo chmod +x /etc/init.d/nginx Start nginx service\nsudo chkconfig nginx on sudo service nginx start sudo service nginx status Reference: https://www.phusionpassenger.com/documentation/Users%20guide%20Nginx.html#rubygems\\_generic\\_install https://www.digitalocean.com/community/tutorials/how-to-deploy-rails-apps-using-passenger-with-nginx-on-centos-6-5\n","date":"Feb 21, 2015","excerpt":"Phusion Passenger is a web server and application server for your web apps which built upon Ruby or NodeJS. In this documentation I will show how to install open source version of Phusion Passenger on CentOS 6.6 using Ruby gem installation.\nCheck your Ruby location\nwhich ruby /usr/local/rvm/rubies/ruby-2.1.5/bin/ruby In this tutorial I assume your Ruby is installed using RVM Install passenger using gem command\ngem install passenger -V Install passenger module for nginx\n...","permalink":"http://blog.pras.my.id/blogs/2015-02-21-open-source-phusion-passenger-module-for-nginx-on-centos-6/","readtime":"1 min read","summary":"\u003cp\u003e\u003ca href=\"https://www.phusionpassenger.com/\"\u003ePhusion Passenger\u003c/a\u003e is a web server and application server for your web apps which built upon Ruby or NodeJS. In this documentation I will show how to install open source version of \u003cstrong\u003ePhusion Passenger\u003c/strong\u003e on CentOS 6.6 using Ruby gem installation.\u003c/p\u003e\n\u003chr\u003e\n\u003cp\u003eCheck your Ruby location\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003ewhich ruby\n/usr/local/rvm/rubies/ruby-2.1.5/bin/ruby\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eIn this tutorial I assume your Ruby is installed using RVM\nInstall passenger using \u003cstrong\u003egem\u003c/strong\u003e command\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003egem install passenger -V\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eInstall passenger module for nginx\u003c/p\u003e","tags":["sysadmin"],"title":"Open Source Phusion Passenger Module for Nginx on CentOS 6"},{"content":"MongoDB is the only database that harnesses the innovations of NoSQL (flexibility, scalability, performance) and builds on the foundation of relational databases (expressive query language, secondary indexes, strong consistency). In this documentation, I will show how to install MongoDB on CentOS 6.\nAdd MongoDB repository to yum\nsudo vi /etc/yum.repos.d/mongodb.repo [mongodb] name=MongoDB Repository baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/ gpgcheck=0 enabled=1 Install MongoDB\nsudo yum install mongo-10gen mongo-10gen-server --exclude mongodb-org,mongodb-org-server Add this to /etc/yum.conf to prevent MongoDB from being upgraded\nsudo vi /etc/yum.conf ... exclude=mongo-10gen,mongo-10gen-server Start MongoDB service and configure it to start at boot\nsudo service mongod start sudo chkconfig mongod on Reference: https://docs.mongodb.org/v2.4/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/\n","date":"Feb 21, 2015","excerpt":"MongoDB is the only database that harnesses the innovations of NoSQL (flexibility, scalability, performance) and builds on the foundation of relational databases (expressive query language, secondary indexes, strong consistency). In this documentation, I will show how to install MongoDB on CentOS 6.\nAdd MongoDB repository to yum\nsudo vi /etc/yum.repos.d/mongodb.repo [mongodb] name=MongoDB Repository baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/ gpgcheck=0 enabled=1 Install MongoDB\nsudo yum install mongo-10gen mongo-10gen-server --exclude mongodb-org,mongodb-org-server Add this to /etc/yum.conf to prevent MongoDB from being upgraded\n...","permalink":"http://blog.pras.my.id/blogs/2015-02-21-mongodb-on-centos-6/","readtime":"1 min read","summary":"\u003cp\u003e\u003ca href=\"https://www.mongodb.org/\"\u003eMongoDB\u003c/a\u003e is the only database that harnesses the innovations of NoSQL (flexibility, scalability, performance) and builds on the foundation of relational databases (expressive query language, secondary indexes, strong consistency). In this documentation, I will show how to install MongoDB on CentOS 6.\u003c/p\u003e\n\u003chr\u003e\n\u003cp\u003eAdd MongoDB repository to yum\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo vi /etc/yum.repos.d/mongodb.repo\n\n[mongodb]\nname=MongoDB Repository\nbaseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/\ngpgcheck=0\nenabled=1\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eInstall \u003cstrong\u003eMongoDB\u003c/strong\u003e\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003esudo yum install mongo-10gen mongo-10gen-server --exclude mongodb-org,mongodb-org-server\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eAdd this to \u003ccode\u003e/etc/yum.conf\u003c/code\u003e to prevent \u003cstrong\u003eMongoDB\u003c/strong\u003e from being upgraded\u003c/p\u003e","tags":["sysadmin"],"title":"MongoDB on CentOS 6"},{"content":"Memcached is free \u0026amp; open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering. In this documentation I will show how to install memcached using yum package manager with Atomicorp repository.\nInstall the latest Atomicorp repository from http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/\nsudo rpm -Uvh atomic-release*rpm Then install memcached sudo yum install memcached\nReference: http://pkgs.org/centos-6/atomic-x86_64/memcached-1.4.22-4.el6.art.x86_64.rpm.html\n","date":"Feb 21, 2015","excerpt":"Memcached is free \u0026 open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering. In this documentation I will show how to install memcached using yum package manager with Atomicorp repository.\nInstall the latest Atomicorp repository from http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/\n...","permalink":"http://blog.pras.my.id/blogs/2015-02-21-memcached-on-centos-6/","readtime":"1 min read","summary":"\u003cp\u003e\u003ca href=\"http://memcached.org/\"\u003eMemcached\u003c/a\u003e is free \u0026amp; open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering. In this documentation I will show how to install \u003cstrong\u003ememcached\u003c/strong\u003e using yum package manager with \u003ca href=\"https://www.atomicorp.com/\"\u003eAtomicorp\u003c/a\u003e repository.\u003c/p\u003e\n\u003chr\u003e\n\u003cp\u003eInstall the latest Atomicorp repository from \u003ca href=\"http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/\"\u003ehttp://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/\u003c/a\u003e\u003c/p\u003e","tags":["sysadmin"],"title":"Memcached on CentOS 6"},{"content":"I am trying to write again after some month was absent from touching any electronic notes (blogs). Actually I wanted to do it from a long time ago but I was afraid don\u0026rsquo;t have any material with qualities to be written. In reality, I realized that I have been encountering events that I must write about. After so long trying to make up my mind and gather my courage, I finally be able to put some ideas into my writing, starting with this re-introduction.\nThis blog actually planned to be a place where I keep my documentation about thing that I have been thinkering with. But I think I was too strict. Why don\u0026rsquo;t I write anything I want to write here? This is my personal blog after all. So, I think it is wiser to share any good things with folks from internet here. As a system administrator which also want to be a developer, I think having a blog to write about your project or anything you get in touch is essential. It keeps a record about your projects and also can be a source of help for someone working the same projects out there.\nOkay, I think this is all from me now. We will catch up again real soon, I hope.\n","date":"Jan 9, 2015","excerpt":"I am trying to write again after some month was absent from touching any electronic notes (blogs). Actually I wanted to do it from a long time ago but I was afraid don’t have any material with qualities to be written. In reality, I realized that I have been encountering events that I must write about. After so long trying to make up my mind and gather my courage, I finally be able to put some ideas into my writing, starting with this re-introduction.\n...","permalink":"http://blog.pras.my.id/blogs/2015-01-09-start-your-own-documentation-blog/","readtime":"2 min read","summary":"\u003cp\u003eI am trying to write again after some month was absent from touching any electronic notes (blogs). Actually I wanted to do it from a long time ago but I was afraid don\u0026rsquo;t have any material with qualities to be written. In reality, I realized that I have been encountering events that I must write about. After so long trying to make up my mind and gather my courage, I finally be able to put some ideas into my writing, starting with this re-introduction.\u003c/p\u003e","tags":["sysadmin"],"title":"Start Your Own Documentation Blog"},{"content":"I have run Ghost for quite some time now and I have been through two upgrade process so I think it will be a good idea to save a procedure for easy upgrading. I found the instruction here.\nManually upgrade Ghost I usually use manual upgrade method because I don\u0026rsquo;t inspect the automatic scripts yet if it is compatible with my installation.\n# cd /var/www/html/ghost # mkdir temp # cd temp/ # curl -L -O https://ghost.org/zip/ghost-latest.zip # unzip ghost-latest.zip # cd .. # cp temp/*.md temp/*.js temp/*.json . # rm -R core # cp -R temp/core . # cp -R temp/content/themes/casper content/themes # npm install --production # rm -R temp # su ghost -c /var/www/html/ghost/starter.sh -s /bin/sh Reference http://www.howtoinstallghost.com/how-to-update-ghost/\n","date":"Aug 25, 2014","excerpt":"I have run Ghost for quite some time now and I have been through two upgrade process so I think it will be a good idea to save a procedure for easy upgrading. I found the instruction here.\nManually upgrade Ghost I usually use manual upgrade method because I don’t inspect the automatic scripts yet if it is compatible with my installation.\n# cd /var/www/html/ghost # mkdir temp # cd temp/ # curl -L -O https://ghost.org/zip/ghost-latest.zip # unzip ghost-latest.zip # cd .. # cp temp/*.md temp/*.js temp/*.json . # rm -R core # cp -R temp/core . # cp -R temp/content/themes/casper content/themes # npm install --production # rm -R temp # su ghost -c /var/www/html/ghost/starter.sh -s /bin/sh Reference http://www.howtoinstallghost.com/how-to-update-ghost/\n...","permalink":"http://blog.pras.my.id/blogs/2014-08-25-upgrade-ghost/","readtime":"1 min read","summary":"\u003cp\u003eI have run \u003ca href=\"https://ghost.org\"\u003eGhost\u003c/a\u003e for quite some time now and I have been through two upgrade process so I think it will be a good idea to save a procedure for easy upgrading. I found the instruction \u003ca href=\"http://www.howtoinstallghost.com/how-to-update-ghost/\"\u003ehere\u003c/a\u003e.\u003c/p\u003e\n\u003chr\u003e\n\u003ch2 id=\"manually-upgrade-ghost\"\u003eManually upgrade Ghost\u003c/h2\u003e\n\u003cp\u003eI usually use manual upgrade method because I don\u0026rsquo;t inspect the automatic scripts yet if it is compatible with my installation.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# cd /var/www/html/ghost\n# mkdir temp\n# cd temp/\n# curl -L -O https://ghost.org/zip/ghost-latest.zip\n# unzip ghost-latest.zip\n# cd ..\n# cp temp/*.md temp/*.js temp/*.json .\n# rm -R core\n# cp -R temp/core .\n# cp -R temp/content/themes/casper content/themes\n# npm install --production\n# rm -R temp\n# su ghost -c /var/www/html/ghost/starter.sh -s /bin/sh\n\u003c/code\u003e\u003c/pre\u003e\n\u003chr\u003e\n\u003ch2 id=\"reference\"\u003eReference\u003c/h2\u003e\n\u003cp\u003e\u003ca href=\"http://www.howtoinstallghost.com/how-to-update-ghost/\"\u003ehttp://www.howtoinstallghost.com/how-to-update-ghost/\u003c/a\u003e\u003c/p\u003e","tags":["sysadmin"],"title":"Upgrade Ghost"},{"content":"Puppet is a software which can automate configuration and management of machines and software running on them. This tool has great benefits for system administrator because it helps sysadmin to be the dream of every sysadmin, a lazy sysadmin. Puppet has great support for many operating system. Unfortunately its installation on my favourite OS, FreeBSD, is not so smooth. An introduction of Puppet installation which I found in BSD Magazine January 2012 edition is a starting point but I have to make some modification due to some of deprecated configurations. So, here I want to show you how to install and configure the basic of Puppet in FreeBSD in its master-agent scenario.\nLet\u0026rsquo;s start\u0026hellip; Puppet benefits: automated server installation mass deployment of changes to servers maintain server state consistency Puppet scenario: 0. FreeBSD (master) FreeBSD (agent) FreeBSD initial: update ports\n# portsnap fetch extract # portsnap fetch update install portmaster via ports\n# cd /usr/ports/ports-mgmt/portmaster # make install clean # rehash switch to pkgng\n# portmaster -dB ports-mgmt/pkg convert package database to new pkgng format\n# pkg2ng use pkgng by default\n# echo 'WITH_PKGNG=yes' \u0026gt;\u0026gt; /etc/make.conf define new repository for pkgng\n# mkdir -p /usr/local/etc/pkg/repos # cat \u0026lt;\u0026lt; 'EOF' \u0026gt; /usr/local/etc/pkg/repos/FreeBSD.conf FreeBSD: { url: \u0026quot;http://pkg.FreeBSD.orf/${ABI}/latest\u0026quot;, mirror_type: \u0026quot;srv\u0026quot;, enabled: true } EOF # pkg update test pkgng\n# pkg install sl # sl Puppet master initial: IMPORTANT: Puppet requires FQDN hostname install from ports\n# cd /usr/ports/sysutils/puppet # make install clean generate puppet configuration file\n# puppet master --genconfig \u0026gt; /usr/local/etc/puppet/puppet.conf copy auth.conf-dist to auth.conf\n# cp /usr/local/etc/puppet/auth.conf-dist /usr/local/etc/puppet/auth.conf some \u0026ldquo;red\u0026rdquo; warnings when run puppet help\nWarning: Setting manifestdir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations (at /usr/local/lib/ruby/site_ruby/1.9/puppet/settings.rb:1095:in `block in issue_deprecations') Warning: Setting manifest is deprecated in puppet.conf. See http://links.puppetlabs.com/env-settings-deprecations (at /usr/local/lib/ruby/site_ruby/1.9/puppet/settings.rb:1095:in `block in issue_deprecations') Warning: Setting modulepath is deprecated in puppet.conf. See http://links.puppetlabs.com/env-settings-deprecations (at /usr/local/lib/ruby/site_ruby/1.9/puppet/settings.rb:1095:in `block in issue_deprecations') Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations (at /usr/local/lib/ruby/site_ruby/1.9/puppet/settings.rb:1095:in `block in issue_deprecations') skeleton files creation\n# mkdir -p /usr/local/etc/puppet/files # mkdir -p /usr/local/etc/puppet/manifests # touch /usr/local/etc/puppet/fileserver.conf # touch /usr/local/etc/puppet/files/sudoers # touch /usr/local/etc/puppet/manifests/site.pp # touch /usr/local/etc/puppet/environments/production/environment.conf # touch /usr/local/etc/puppet/environments/production/manifests/site.pp edit puppet.conf\n[main] environmentpath = /usr/local/etc/puppet/environments [master] #manifestdir = /usr/local/etc/puppet/manifests #manifest = /usr/local/etc/puppet/manifests/site.pp #modulepath = /usr/local/etc/puppet/modules:/usr/share/puppet/modules #templatedir = /var/puppet/templates pluginsource = puppet://puppetmaster.domain/plugins pluginfactsource = puppet://puppetmaster.domain/pluginfacts edit fileserver.conf\n[files] path /usr/local/etc/puppet/files allow *.domain edit environments/production/environment.conf\nmodulepath = /usr/local/etc/puppet/modules:/usr/share/puppet/modules manifest = /usr/local/etc/puppet/environments/production/manifests/site.pp ### EXPERIMENTAL ### #config_version = get_environment_commit.sh #environment_timeout = 5s edit environments/production/manifests/site.pp\nclass sudoers { file { \u0026quot;/usr/local/etc/sudoers\u0026quot;: ensure =\u0026gt; file, owner =\u0026gt; root, group =\u0026gt; wheel, mode =\u0026gt; 440, source =\u0026gt; \u0026quot;puppet://puppetmaster.domain/files/sudoers\u0026quot;, } } node 'puppetclient.domain' { include sudoers } start puppet master\n# echo 'puppetmaster_enable=\u0026quot;YES\u0026quot;' \u0026gt;\u0026gt; /etc/rc.conf # /usr/local/etc/rc.d/puppetmaster start sign the certificate when agent initiate a certificate signing session # puppet cert \u0026ndash;list \u0026ndash;all # puppet cert \u0026ndash;sign puppetagent.domain\nedit files/sudoers\nroot ALL=(ALL) ALL update puppet agents using kick\n# puppet kick puppetagent.domain Puppet agent initial: IMPORTANT: Puppet requires FQDN hostname install from ports # cd /usr/ports/sysutils/puppet # make install clean\nconfigure hostname\n# hostname puppetagent.domain create and edit new auth.conf\npath /run method save allow puppetmaster.domain initiate a certificate signing session from agent to master and wait to be signed and automatically closed\n# puppet agent -v --server puppetmaster.domain --waitforcert 60 --test enable puppet agent on rc.conf\n# echo 'puppet_enable=\u0026quot;YES\u0026quot;' \u0026gt;\u0026gt; /etc/rc.conf # echo 'puppet_flags=\u0026quot;-v --listen --server puppetmaster.domain\u0026quot;' \u0026gt;\u0026gt; /etc/rc.conf start puppet agent\n# /usr/local/etc/rc.d/puppet start inspect /usr/local/etc/sudoers after puppet master kicked some changes\n# less /usr/local/etc/sudoers Puppet problems: cannot connect to https://forge.puppetlabs.com\nsecurity/ca_root_nss port needed to be installed with ETCSYMLINK turned on puppet kick and \u0026ndash;listen flag is deprecated still can\u0026rsquo;t find good configuration for using sysutils/mcollective-puppet-agent as alternative\nReferences: http://www.iceflatline.com/2013/02/how-to-use-portmaster-to-update-ports/ http://www.fitzdsl.net/2013/11/utiliser-pkgng-sous-freebsd-avec-puppet/ https://mebsd.com/make-build-your-freebsd-word/pkgng-first-look-at-freebsds-new-package-manager.html https://forums.freebsd.org/viewtopic.php?\u0026amp;t=36732 http://www.6tech.org/2013/01/how-to-install-puppet-open-source-on-centos-6-3/ https://github.com/puppetlabs-operations/puppet-freebsd\n","date":"Aug 25, 2014","excerpt":"Puppet is a software which can automate configuration and management of machines and software running on them. This tool has great benefits for system administrator because it helps sysadmin to be the dream of every sysadmin, a lazy sysadmin. Puppet has great support for many operating system. Unfortunately its installation on my favourite OS, FreeBSD, is not so smooth. An introduction of Puppet installation which I found in BSD Magazine January 2012 edition is a starting point but I have to make some modification due to some of deprecated configurations. So, here I want to show you how to install and configure the basic of Puppet in FreeBSD in its master-agent scenario.\n...","permalink":"http://blog.pras.my.id/blogs/2014-08-25-puppet-master-agent-installation-on-freebsd/","readtime":"3 min read","summary":"\u003cp\u003e\u003ca href=\"http://puppetlabs.com/\"\u003ePuppet\u003c/a\u003e is a software which can automate configuration and management of machines and software running on them. This tool has great benefits for system administrator because it helps sysadmin to be the dream of every sysadmin, \u003cstrong\u003ea lazy sysadmin\u003c/strong\u003e. Puppet has great support for many operating system. Unfortunately its installation on my favourite OS, FreeBSD, is not so smooth. An introduction of Puppet installation which I found in BSD Magazine January 2012 edition is a starting point but I have to make some modification due to some of deprecated configurations. So, here I want to show you how to install and configure the basic of Puppet in FreeBSD in its master-agent scenario.\u003c/p\u003e","tags":["sysadmin"],"title":"Puppet Master-Agent Installation on FreeBSD"},{"content":"Installation using FreeBSD ports Login as root, then to make sure our server\u0026rsquo;s hostname can be identified locally we need to edit /etc/hosts.\n# ee /etc/hosts ::1 localhost localhost.example.com 127.0.0.1 localhost localhost.example.com 192.168.1.11 host.example.com Install MySQL Server with following command.\n# cd /usr/ports/databases/mysql56-server # make -D BUILD_OPTIMIZED install clean # rehash After installation finished, run script for installing main database and tables used by MySQL.\n# mysql_install_db --user=mysql –basedir=/usr/local/ Run following command to start MySQL daemon and create password for MySQL\u0026rsquo;s root. # mysqld_safe \u0026amp; # mysqladmin -u root password \u0026rsquo;localpassword\u0026rsquo; # mysqladmin -u root -h host.example.com password \u0026lsquo;remotepassword\u0026rsquo;\nMySQL has three types of configuration files i.e. my-small.cnf, my-medium.cnf, my-large.cnf, and my-huge.cnf. Copy suitable configuration file to /var/db/mysql.\n# cp /usr/local/share/mysql/my-medium.cnf /var/db/mysql/my.cnf To deactivate MySQL TCP Networking edit MySQL configuration file.\n# ee /var/db/mysql/my.cnf skip-networking Save and exit text editor.\nTest MySQL Server Installation In order MySQL to start at boot time, edit file /etc/rc.conf\n# ee /etc/rc.conf mysql_enable=\u0026quot;YES\u0026quot; Restart MySQL to apply change in configuration file.\n# /usr/local/etc/rc.d/mysql-server restart For checking if MySQL is running correctly, run following command.\n# mysqlshow –p If MySQL running then the following output will appear.\n+---------------------------+ | Databases | +---------------------------+ | information_schema | | mysql | | test | +---------------------------+ If there is error then the error log is saved in file /var/db/mysql/host.example.com.err. Check the permission of /tmp directory.\n# ls -ld /tmp drwxrwxrwt 7 root wheel 512 Feb 17 12:00 /tmp If the output is not the same with line above, repair it with following command.\n# chown root:wheel /tmp # chmod 777 /tmp # chmod =t /tmp Installation of MySQL Server is finished.\n","date":"Jul 2, 2014","excerpt":"Installation using FreeBSD ports Login as root, then to make sure our server’s hostname can be identified locally we need to edit /etc/hosts.\n# ee /etc/hosts ::1 localhost localhost.example.com 127.0.0.1 localhost localhost.example.com 192.168.1.11 host.example.com Install MySQL Server with following command.\n# cd /usr/ports/databases/mysql56-server # make -D BUILD_OPTIMIZED install clean # rehash After installation finished, run script for installing main database and tables used by MySQL.\n# mysql_install_db --user=mysql –basedir=/usr/local/ Run following command to start MySQL daemon and create password for MySQL’s root. # mysqld_safe \u0026 # mysqladmin -u root password ’localpassword’ # mysqladmin -u root -h host.example.com password ‘remotepassword’\n...","permalink":"http://blog.pras.my.id/blogs/2014-07-02-installing-mysql-server-on-freebsd/","readtime":"2 min read","summary":"\u003ch2 id=\"installation-using-freebsd-ports\"\u003eInstallation using FreeBSD ports\u003c/h2\u003e\n\u003cp\u003eLogin as root, then to make sure our server\u0026rsquo;s hostname can be identified locally we need to edit /etc/hosts.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# ee /etc/hosts\n::1               localhost localhost.example.com\n127.0.0.1         localhost localhost.example.com\n192.168.1.11      host.example.com\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eInstall MySQL Server with following command.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# cd /usr/ports/databases/mysql56-server\n# make -D BUILD_OPTIMIZED install clean\n# rehash\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eAfter installation finished, run script for installing main database and tables used by MySQL.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# mysql_install_db --user=mysql –basedir=/usr/local/\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eRun following command to start MySQL daemon and create password for MySQL\u0026rsquo;s root. # mysqld_safe \u0026amp; # mysqladmin -u root password \u0026rsquo;localpassword\u0026rsquo; # mysqladmin -u root -h host.example.com password \u0026lsquo;remotepassword\u0026rsquo;\u003c/p\u003e","tags":["sysadmin"],"title":"Installing MySQL Server on FreeBSD"},{"content":"Instalation using FreeBSD ports Login as root then enter ports directory of Cyrus SASL and run following command.\n# cd /usr/ports/security/cyrus-sasl2-saslauthd # make config ; make install clean # rehash Create file smtpd.conf in directory /usr/local/lib/sasl2/. # ee /usr/local/lib/sasl2/smtpd.conf\nThen add following lines.\npwcheck_method: saslauthd mech_list: plain login Edit file rc.conf so that SASL Authentification server can start at boot time.\n# ee /etc/rc.conf saslauthd_enable=\u0026quot;YES\u0026quot; saslauthd_flags=\u0026quot;-a pam\u0026quot; if you want to use other authentication mechanism such as LDAP, use following flags.\nsaslauthd_flags=\u0026quot;-a ldap\u0026quot; Save and run the startup script.\n# /usr/local/etc/rc.d/saslauthd start # /usr/local/etc/rc.d/saslauthd status If SASL Authentification server is running, the terminal will show output similar to this.\nsaslauthd is running as pid 1234. ","date":"Jul 2, 2014","excerpt":"Instalation using FreeBSD ports Login as root then enter ports directory of Cyrus SASL and run following command.\n# cd /usr/ports/security/cyrus-sasl2-saslauthd # make config ; make install clean # rehash Create file smtpd.conf in directory /usr/local/lib/sasl2/. # ee /usr/local/lib/sasl2/smtpd.conf\nThen add following lines.\npwcheck_method: saslauthd mech_list: plain login Edit file rc.conf so that SASL Authentification server can start at boot time.\n# ee /etc/rc.conf saslauthd_enable=\"YES\" saslauthd_flags=\"-a pam\" if you want to use other authentication mechanism such as LDAP, use following flags.\n...","permalink":"http://blog.pras.my.id/blogs/2014-07-02-installing-cyrus-sasl-server-on-freebsd/","readtime":"1 min read","summary":"\u003ch2 id=\"instalation-using-freebsd-ports\"\u003eInstalation using FreeBSD ports\u003c/h2\u003e\n\u003cp\u003eLogin as root then enter ports directory of Cyrus SASL and run following command.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# cd /usr/ports/security/cyrus-sasl2-saslauthd\n# make config ; make install clean\n# rehash\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eCreate file \u003cem\u003esmtpd.conf\u003c/em\u003e in directory \u003cem\u003e/usr/local/lib/sasl2/\u003c/em\u003e. # ee /usr/local/lib/sasl2/smtpd.conf\u003c/p\u003e\n\u003cp\u003eThen add following lines.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003epwcheck_method: saslauthd\nmech_list: plain login\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eEdit file \u003cem\u003erc.conf\u003c/em\u003e so that SASL Authentification server can start at boot time.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# ee /etc/rc.conf\nsaslauthd_enable=\u0026quot;YES\u0026quot;\nsaslauthd_flags=\u0026quot;-a pam\u0026quot;\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eif you want to use other authentication mechanism such as LDAP, use following flags.\u003c/p\u003e","tags":["sysadmin"],"title":"Installing Cyrus SASL Server on FreeBSD"},{"content":"Installation Installation using FreeBSD ports Login as root, then to make sure our server\u0026rsquo;s hostname can be identified locally we need to edit /etc/hosts.\n# ee /etc/hosts ::1 localhost localhost.example.com 127.0.0.1 localhost localhost.example.com 192.168.1.11 host.example.com Install Apache HTTP Server using following command, choose default for options, select OK.\n# cd /usr/ports/www/apache22 # make config; make install clean # rehash After installation proses finished, change Apache configuration file.\n# ee /usr/local/etc/apache22/httpd.conf ServerAdmin you@example.com ServerName host.example.com:80 To enable SSL support, uncomment following line.\nInclude etc/apache22/extra/httpd-ssl.conf Save, then exit ee and open Apache\u0026rsquo; SSL configuration file.\n# ee /usr/local/etc/apache22/extra/httpd-ssl.conf ServerName host.example.com:443 ServerAdmin you@example.com SSLCertificateFile /usr/local/openssl/certs/host.example.com-cert.pem SSLCertificateKeyFile /usr/local/openssl/certs/host.example.com-unencrypted-key.pem\nSave and exit.\nTesting Apache HTTP Server Installation Check possible error on configuration files.\n# apachectl configtest If it shows Syntax OK then there is no error in configuration files. Change /etc/rc.conf so that Apache can start at boot time. # ee /etc/rc.conf apache22_enable=\u0026ldquo;YES\u0026rdquo; apache22_http_accept_enable=\u0026ldquo;YES\u0026rdquo;\nSave and exit from text editor and start Apache with following command.\n# /usr/local/etc/rc.d/apache22 start Test Apache by opening our domain in internet browser.\nhttp://host.example.com/ Test SSL support by opening our domain in HTTPS protocol. https://host.example.com/\n","date":"Jul 2, 2014","excerpt":"Installation Installation using FreeBSD ports Login as root, then to make sure our server’s hostname can be identified locally we need to edit /etc/hosts.\n# ee /etc/hosts ::1 localhost localhost.example.com 127.0.0.1 localhost localhost.example.com 192.168.1.11 host.example.com Install Apache HTTP Server using following command, choose default for options, select OK.\n# cd /usr/ports/www/apache22 # make config; make install clean # rehash After installation proses finished, change Apache configuration file.\n# ee /usr/local/etc/apache22/httpd.conf ServerAdmin you@example.com ServerName host.example.com:80 To enable SSL support, uncomment following line.\n...","permalink":"http://blog.pras.my.id/blogs/2014-07-02-installing-apache-http-server-on-freebsd/","readtime":"1 min read","summary":"\u003ch2 id=\"installation\"\u003eInstallation\u003c/h2\u003e\n\u003ch3 id=\"installation-using-freebsd-ports\"\u003eInstallation using FreeBSD ports\u003c/h3\u003e\n\u003cp\u003eLogin as root, then to make sure our server\u0026rsquo;s hostname can be identified locally we need to edit \u003cem\u003e/etc/hosts\u003c/em\u003e.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# ee /etc/hosts\n::1               localhost localhost.example.com\n127.0.0.1         localhost localhost.example.com\n192.168.1.11      host.example.com\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eInstall Apache HTTP Server using following command, choose default for options, select OK.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# cd /usr/ports/www/apache22\n# make config; make install clean\n# rehash\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eAfter installation proses finished, change Apache configuration file.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# ee /usr/local/etc/apache22/httpd.conf\nServerAdmin you@example.com\nServerName host.example.com:80\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eTo enable SSL support, uncomment following line.\u003c/p\u003e","tags":["sysadmin"],"title":"Installing Apache HTTP Server on FreeBSD"},{"content":"Heartbeat is a daemon that provides cluster infrastructure (communication and membership) services to its clients. This allow clients to know appearance or disappearance of peer processes on other machines and to easily exchange message with them.(Heartbeat - Linux-HA)\nHeartbeat clusters work only one on same network so if we setup different cluster (different authkeys) on same network it will show up as an error in log file. We can still setup more than one cluster in same network by setting different communication port for heartbeat.\nThe following example show configuration file for two different clusters in same network.\nhost configuration 192.168.123.1 host1.cluster1 192.168.123.2 host2.cluster1 192.168.123.3 host1.cluster2 192.168.123.4 host2.cluster2 first cluster /etc/ha.d/ha.cf debugfile /var/log/ha-debug logfile /var/log/ha-log logfacility local0 keepalive 2 deadtime 20 udpport 694 udp eth0 bcast eth0 node host1.cluster1 host2.cluster1 auto_failback on debug 1 second cluster /etc/ha.d/ha.cf debugfile /var/log/ha-debug logfile /var/log/ha-log logfacility local0 keepalive 2 deadtime 20 udpport 695 udp eth0 bcast eth0 node host1.cluster2 host2.cluster2 auto_failback on debug 1 Reference: http://www.gossamer-threads.com/lists/linuxha/users/57074\n","date":"Jul 2, 2014","excerpt":"Heartbeat is a daemon that provides cluster infrastructure (communication and membership) services to its clients. This allow clients to know appearance or disappearance of peer processes on other machines and to easily exchange message with them.(Heartbeat - Linux-HA)\nHeartbeat clusters work only one on same network so if we setup different cluster (different authkeys) on same network it will show up as an error in log file. We can still setup more than one cluster in same network by setting different communication port for heartbeat.\n...","permalink":"http://blog.pras.my.id/blogs/2014-07-02-heartbeat-using-different-udp-ports-for-different-clusters-on-same-network/","readtime":"1 min read","summary":"\u003cp\u003e\u003cstrong\u003eHeartbeat\u003c/strong\u003e is a daemon that provides cluster infrastructure (communication and membership) services to its clients. This allow clients to know appearance or disappearance of peer processes on other machines and to easily exchange message with them.(\u003ca href=\"http://linux-ha.org/wiki/Heartbeat\"\u003eHeartbeat - Linux-HA\u003c/a\u003e)\u003c/p\u003e\n\u003cp\u003eHeartbeat clusters work only one on same network so if we setup different cluster (different authkeys) on same network it will show up as an error in log file. We can still setup more than one cluster in same network by setting different communication port for heartbeat.\u003c/p\u003e","tags":["sysadmin"],"title":"Heartbeat Using Different UDP Ports for Different Clusters on Same Network"},{"content":"Git is a distributed version control system version control system track history of a collection of files and includes the functionality to revert to another version.\nDistributed version control system does not necessarily have a central server which stores data.\nUser can copy existing repository (cloning).\nEvery clone contains full history of the collection of files and a clone repository has the same functionality as the original repository.\nUsers with sufficient authorization can push changes from their local repositories to remote repositories, they can also fetch or pull changes from other repositories to their local Git repository.\nGit support branching which means you can work on different versions of your collection files.\nWorking tree is the current collection of files.\nGit using SHA-1 checksum as file integrity protection.\nAdd changes to your Git repository by first add selected file to staging area and commit the changes in staging area to Git repository.\nMark changes in the working tree by staging or add changes to staging area.\n# git add . After adding files to staging area you can commit this file to permanently add them to Git repository.\n# git commit Push the modified version of files to remote repository using push command.\n# git push \u0026lt;repository\u0026gt; ","date":"Jul 2, 2014","excerpt":"Git is a distributed version control system version control system track history of a collection of files and includes the functionality to revert to another version.\nDistributed version control system does not necessarily have a central server which stores data.\nUser can copy existing repository (cloning).\nEvery clone contains full history of the collection of files and a clone repository has the same functionality as the original repository.\nUsers with sufficient authorization can push changes from their local repositories to remote repositories, they can also fetch or pull changes from other repositories to their local Git repository.\n...","permalink":"http://blog.pras.my.id/blogs/2014-07-02-git-tutorial/","readtime":"1 min read","summary":"\u003cp\u003e\u003cstrong\u003eGit\u003c/strong\u003e is a distributed version control system version control system track history of a collection of files and includes the functionality to revert to another version.\u003c/p\u003e\n\u003cp\u003eDistributed version control system does not necessarily have a central server which stores data.\u003c/p\u003e\n\u003cp\u003eUser can copy existing repository (\u003cstrong\u003ecloning\u003c/strong\u003e).\u003c/p\u003e\n\u003cp\u003eEvery clone contains full history of the collection of files and a clone repository has the same functionality as the original repository.\u003c/p\u003e\n\u003cp\u003eUsers with sufficient authorization can \u003cstrong\u003epush\u003c/strong\u003e changes from their local repositories to remote repositories, they can also \u003cstrong\u003efetch\u003c/strong\u003e or \u003cstrong\u003epull\u003c/strong\u003e changes from other repositories to their local Git repository.\u003c/p\u003e","tags":["sysadmin"],"title":"Git Tutorial"},{"content":"When using DRBD, we can grow DRBD disk online so we do not need to disturb the production process we have in the server. The requirement to this feature is the backing block device can be resized online so it is possible to resize the DRBD disk. There are two criterias that must be filled.\nThe backing device must be managed by a logical volume manager such as LVM The resource must currently be in the Connected connection state. First, we need to grow the backing device on both nodes and make sure only one node in Primary node.\n# lvextend -L 16GB /dev/VolGroup00/LogVol01 Then, resize the DRBD service to trigger a synchronization of the new section from primary node to secondary node.\n# drbdadm resize \u0026lt;resource\u0026gt; If the additional space is clean, we can skip syncing the additional space by using the \u0026ndash;assume-clean option.\n# drbdadm -- --assume-clean resize \u0026lt;resource\u0026gt; After that resize the file system of DRBD device.\n# resize2fs /dev/drbdX IMPORTANT: Always create backup, better safe than sorry.\nReferences: http://www.drbd.org/users-guide/s-resizing.html http://lists.linbit.com/pipermail/drbd-user/2008-August/009908.html\n","date":"Jul 2, 2014","excerpt":"When using DRBD, we can grow DRBD disk online so we do not need to disturb the production process we have in the server. The requirement to this feature is the backing block device can be resized online so it is possible to resize the DRBD disk. There are two criterias that must be filled.\nThe backing device must be managed by a logical volume manager such as LVM The resource must currently be in the Connected connection state. First, we need to grow the backing device on both nodes and make sure only one node in Primary node.\n...","permalink":"http://blog.pras.my.id/blogs/2014-07-02-drbd-extend-drbd-disk-online/","readtime":"1 min read","summary":"\u003cp\u003eWhen using DRBD, we can grow DRBD disk online so we do not need to disturb the production process we have in the server. The requirement to this feature is the backing block device can be resized online so it is possible to resize the DRBD disk. There are two criterias that must be filled.\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eThe backing device must be managed by a logical volume manager such as LVM\u003c/li\u003e\n\u003cli\u003eThe resource must currently be in the Connected connection state.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eFirst, we need to grow the backing device on both nodes and make sure only one node in Primary node.\u003c/p\u003e","tags":["sysadmin"],"title":"DRBD: Extend DRBD Disk Online"},{"content":"SMTP use TLS/SSL to secure connection to server and AUTH so only authenticated user can use the SMTP service. This tutorial will show steps to debug SMTP TLS/SSL and AUTH from Linux/Unix terminal.\nencode your login information in base64, the following perl command which requires MIME::Base64 will do encoding\nperl -MMIME::Base64 -e \u0026#39;print encode_base64(\u0026#34;\\000your_username\\000your_password\u0026#34;)\u0026#39; # example output # AHlvdXJfdXNlcm5hbWUAeW91cl9wYXNzd29yZA== connect to smtp server\n# normal non-secured SMTP $ telnet smtp.yourdomain.com 25 # TLS connection, check STARTTLS support with EHLO command $ telnet smtp.yourdomain.com 25 220 SMTP banner EHLO smtp.yourdomain.com 250 SMTP banner 250-smtp.yourdomain.com 250-PIPELINING 250-SIZE 36360000 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN quit $ openssl s_client -starttls smtp -crlf -connect smtp.yourdomain.com:25 # SSL connection $ openssl s_client -crlf -connect smtp.yourdomain.com:465 check AUTH support with EHLO command\n# Connect to secure SMTP using TLS or SSL $ openssl s_client -starttls smtp -crlf -connect smtp.yourdomain.com:25 # Or $ openssl s_client -crlf -connect smtp.yourdomain.com:465 EHLO smtp.yourdomain.com 250-smtp.yourdomain.com 250-PIPELINING 250-SIZE 36360000 250-VRFY 250-ETRN 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN quit use AUTH command to authenticate\n# connect to secure SMTP using TLS or SSL $ openssl s_client -starttls smtp -crlf -connect smtp.yourdomain.com:25 # OR $ openssl s_client -crlf -connect smtp.yourdomain.com:465 HELO smtp.yourdomain.com 250 smtp.yourdomain.com AUTH PLAIN AHlvdXJfdXNlcm5hbWUAeW91cl9wYXNzd29yZA== 235 2.7.0 Authentication successful if failed 535 5.7.8 Error: authentication failed: authentication failure test sending message\n$ openssl s_client -crlf -connect smtp.yourdomain.com:465 HELO smtp.yourdomain.com 250 smtp.yourdomain.com AUTH PLAIN AHlvdXJfdXNlcm5hbWUAeW91cl9wYXNzd29yZA== 235 2.7.0 Authentication successful MAIL FROM: \u0026lt;your_username@yourdomain.com\u0026gt; 250 2.1.0 OK RCPT TO: \u0026lt;your_destination@domain.com\u0026gt; 250 2.1.5 OK DATA 354 End data with \u0026lt;CR\u0026gt;\u0026lt;LF\u0026gt;.\u0026lt;CR\u0026gt;\u0026lt;LF\u0026gt; From: Your Name \u0026lt;your_username@yourdomain.com\u0026gt; To: Your Destination Name \u0026lt;your_destination@domain.com\u0026gt; Subject: Your Email Subject Your Email Content . 250 2.0.0 Ok: queued as 6A4C1D5153E quit Connection closed by foreign host. Reference: \u0026lt;https://qmail.jms1.net/test-auth.shtml\u0026gt; ","date":"Jul 1, 2014","excerpt":"SMTP use TLS/SSL to secure connection to server and AUTH so only authenticated user can use the SMTP service. This tutorial will show steps to debug SMTP TLS/SSL and AUTH from Linux/Unix terminal.\nencode your login information in base64, the following perl command which requires MIME::Base64 will do encoding\nperl -MMIME::Base64 -e 'print encode_base64(\"\\000your_username\\000your_password\")' # example output # AHlvdXJfdXNlcm5hbWUAeW91cl9wYXNzd29yZA== connect to smtp server\n# normal non-secured SMTP $ telnet smtp.yourdomain.com 25 # TLS connection, check STARTTLS support with EHLO command $ telnet smtp.yourdomain.com 25 220 SMTP banner EHLO smtp.yourdomain.com 250 SMTP banner 250-smtp.yourdomain.com 250-PIPELINING 250-SIZE 36360000 250-VRFY 250-ETRN 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN quit $ openssl s_client -starttls smtp -crlf -connect smtp.yourdomain.com:25 # SSL connection $ openssl s_client -crlf -connect smtp.yourdomain.com:465 check AUTH support with EHLO command\n...","permalink":"http://blog.pras.my.id/blogs/2014-07-01-smtp-debugging-smtp-with-tlsssl-and-auth/","readtime":"2 min read","summary":"\u003cp\u003eSMTP use TLS/SSL to secure connection to server and AUTH so only authenticated\nuser can use the SMTP service. This tutorial will show steps to debug SMTP\nTLS/SSL and AUTH from Linux/Unix terminal.\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp\u003eencode your login information in base64, the following perl command which\nrequires MIME::Base64 will do encoding\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" role=\"region\" aria-label=\"bash code 1\" class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003eperl -MMIME::Base64 -e \u003cspan class=\"s1\"\u003e\u0026#39;print encode_base64(\u0026#34;\\000your_username\\000your_password\u0026#34;)\u0026#39;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"c1\"\u003e# example output\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"c1\"\u003e# AHlvdXJfdXNlcm5hbWUAeW91cl9wYXNzd29yZA==\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003econnect to smtp server\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" role=\"region\" aria-label=\"bash code 2\" class=\"chroma\"\u003e\u003ccode class=\"language-bash\" data-lang=\"bash\"\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"c1\"\u003e# normal non-secured SMTP\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e$ telnet smtp.yourdomain.com \u003cspan class=\"m\"\u003e25\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"c1\"\u003e# TLS connection, check STARTTLS support with EHLO command\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e$ telnet smtp.yourdomain.com \u003cspan class=\"m\"\u003e25\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"m\"\u003e220\u003c/span\u003e SMTP banner\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003eEHLO smtp.yourdomain.com\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"m\"\u003e250\u003c/span\u003e SMTP banner\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e250-smtp.yourdomain.com\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e250-PIPELINING\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e250-SIZE \u003cspan class=\"m\"\u003e36360000\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e250-VRFY\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e250-ETRN\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e250-STARTTLS\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e250-ENHANCEDSTATUSCODES\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e250-8BITMIME\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"m\"\u003e250\u003c/span\u003e DSN\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003equit\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e$ openssl s_client -starttls smtp -crlf -connect smtp.yourdomain.com:25\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e\u003cspan class=\"c1\"\u003e# SSL connection\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003e$ openssl s_client -crlf -connect smtp.yourdomain.com:465\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003echeck AUTH support with EHLO command\u003c/p\u003e","tags":["sysadmin"],"title":"SMTP: Debugging SMTP with TLS/SSL and Auth"},{"content":"Linux LVM is a logical volume manager for Linux kernel. Logical volume manager provides method of allocation space in mass storage device that more flexible than traditional partitioning scheme. Logical volume manager can create, resize, and combine partitions, potentially without interrupting system. (Wikipedia)\nschema: new device /dev/sda create needed partitions, label them with 8e (Linux LVM)\n# fdisk /dev/sda format partitons\n# mkfs.ext4 /dev/sda1 create physical volume\n# pvcreate /dev/sda1 extend existing volume group\n# vgextend VolGroup00 /dev/sdb1 extend existing logical volume\nextend LogVol01 to 16GB # lvextend -L 16G /dev/VolGroup00/LogVol01 adding 1GB to LogVol01 # lvextend -l+1G /dev/VolGroup00/LogVol01 resize logical volume to new size\n# resize2fs /dev/VolGroup00/LogVol01 create new logical volume\ncreate new logical volume with size 16GB # lvcreate -L 16GB -n LogVol02 VolGroup00 create new logical volume with all free space # lvcreate -l+100%FREE -n LogVol02 VolGroup00 format new logical volume\n# mkfs.ext4 /dev/VolGroup00/LogVol02 Reference: http://sujithemmanuel.blogspot.com/2007/04/how-to-add-disk-to-lvm.html\n","date":"Jul 1, 2014","excerpt":"Linux LVM is a logical volume manager for Linux kernel. Logical volume manager provides method of allocation space in mass storage device that more flexible than traditional partitioning scheme. Logical volume manager can create, resize, and combine partitions, potentially without interrupting system. (Wikipedia)\nschema: new device /dev/sda create needed partitions, label them with 8e (Linux LVM)\n# fdisk /dev/sda format partitons\n# mkfs.ext4 /dev/sda1 create physical volume\n# pvcreate /dev/sda1 extend existing volume group\n...","permalink":"http://blog.pras.my.id/blogs/2014-07-01-lvm-adding-new-physical-volume-to-volume-group/","readtime":"1 min read","summary":"\u003cp\u003eLinux LVM is a logical volume manager for Linux kernel. Logical volume manager provides method of allocation space in mass storage device that more flexible than traditional partitioning scheme. Logical volume manager can create, resize, and combine partitions, potentially without interrupting system. (\u003ca href=\"http://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)\"\u003eWikipedia\u003c/a\u003e)\u003c/p\u003e\n\u003ch2 id=\"schema-new-device-devsda\"\u003eschema: new device /dev/sda\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp\u003ecreate needed partitions, label them with 8e (Linux LVM)\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# fdisk /dev/sda\n\u003c/code\u003e\u003c/pre\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eformat partitons\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# mkfs.ext4 /dev/sda1\n\u003c/code\u003e\u003c/pre\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003ecreate physical volume\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# pvcreate /dev/sda1\n\u003c/code\u003e\u003c/pre\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eextend existing volume group\u003c/p\u003e","tags":["sysadmin"],"title":"LVM: Adding New Physical Volume to Volume Group"},{"content":"When using iSCSI and LVM, sometimes we have to manually enable iSCSI disk that used as a physical volume in LVM. This is because LVM service is started earlier than iSCSI service so the iSCSI disk containing the physical volume is not present yet. Solution to this problem is to enable lvmetad in /etc/lvm/lvm.conf. The lvmetad is \u0026ldquo;LVM metadata daemon\u0026rdquo; that acts as in-memory cache of LVM metadata gathered from devices as they appear in the system. Whenever a block device appears and has PV label on it, it is automatically scanned via an udev rule. This update the lvmetad daemon with the LVM metadata found. Once the VG is complete (all the PVs making up the VG are present), the VG is activated. The lvmetad daemon is required for this LVM event-based autoactivation to work and the iSCSI disk must be present in the system after boot time.\nenable lvmetad in lvm.conf\nuse_lvmetad = 1 Reference: https://bugzilla.redhat.com/show_bug.cgi?id=474833\n","date":"Jul 1, 2014","excerpt":"When using iSCSI and LVM, sometimes we have to manually enable iSCSI disk that used as a physical volume in LVM. This is because LVM service is started earlier than iSCSI service so the iSCSI disk containing the physical volume is not present yet. Solution to this problem is to enable lvmetad in /etc/lvm/lvm.conf. The lvmetad is “LVM metadata daemon” that acts as in-memory cache of LVM metadata gathered from devices as they appear in the system. Whenever a block device appears and has PV label on it, it is automatically scanned via an udev rule. This update the lvmetad daemon with the LVM metadata found. Once the VG is complete (all the PVs making up the VG are present), the VG is activated. The lvmetad daemon is required for this LVM event-based autoactivation to work and the iSCSI disk must be present in the system after boot time.\n...","permalink":"http://blog.pras.my.id/blogs/2014-07-01-iscsilvm-automatically-enable-volume-group-contain-iscsi-disk-physical-volume/","readtime":"1 min read","summary":"\u003cp\u003eWhen using iSCSI and LVM, sometimes we have to manually enable iSCSI disk that used as a physical volume in LVM. This is because LVM service is started earlier than iSCSI service so the iSCSI disk containing the physical volume is not present yet. Solution to this problem is to enable lvmetad in \u003cstrong\u003e/etc/lvm/lvm.conf\u003c/strong\u003e. The lvmetad is \u0026ldquo;LVM metadata daemon\u0026rdquo; that acts as in-memory cache of LVM metadata gathered from devices as they appear in the system. Whenever a block device appears and has PV label on it, it is automatically scanned via an udev rule. This update the lvmetad daemon with the LVM metadata found. Once the VG is complete (all the PVs making up the VG are present), the VG is activated. The lvmetad daemon is required for this LVM event-based autoactivation to work and the iSCSI disk must be present in the system after boot time.\u003c/p\u003e","tags":["sysadmin"],"title":"iSCSI+LVM: Automatically Enable Volume Group Contain iSCSI Disk Physical Volume"},{"content":"Install packages using FreeBSD port.\nInstall postfix\n# Options for postfix-2.11.0,1 _OPTIONS_READ=postfix-2.11.0,1 _FILE_COMPLETE_OPTIONS_LIST=BDB CDB INST_BASE LDAP_SASL LMDB MYSQL NIS OPENLDAP PCRE PGSQL SASL2 SPF SQLITE TEST TLS VDA DOVECOT DOVECOT2 SASLKRB5 SASLKMIT OPTIONS_FILE_SET+=BDB OPTIONS_FILE_SET+=CDB OPTIONS_FILE_UNSET+=INST_BASE OPTIONS_FILE_SET+=LDAP_SASL OPTIONS_FILE_UNSET+=LMDB OPTIONS_FILE_UNSET+=MYSQL OPTIONS_FILE_UNSET+=NIS OPTIONS_FILE_SET+=OPENLDAP OPTIONS_FILE_SET+=PCRE OPTIONS_FILE_UNSET+=PGSQL OPTIONS_FILE_SET+=SASL2 OPTIONS_FILE_UNSET+=SPF OPTIONS_FILE_UNSET+=SQLITE OPTIONS_FILE_SET+=TEST OPTIONS_FILE_SET+=TLS OPTIONS_FILE_UNSET+=VDA OPTIONS_FILE_UNSET+=DOVECOT OPTIONS_FILE_UNSET+=DOVECOT2 OPTIONS_FILE_UNSET+=SASLKRB5 OPTIONS_FILE_UNSET+=SASLKMIT install openldap\n# Options for openldap-client-2.4.38 _OPTIONS_READ=openldap-client-2.4.38 _FILE_COMPLETE_OPTIONS_LIST=FETCH OPTIONS_FILE_UNSET+=FETCH install cyrus-sasl2\n# Options for cyrus-sasl-2.1.26_4 _OPTIONS_READ=cyrus-sasl-2.1.26_4 _FILE_COMPLETE_OPTIONS_LIST=ALWAYSTRUE AUTHDAEMOND KEEP_DB_OPEN OBSOLETE_CRAM_ATTR BDB MYSQL PGSQL SQLITE2 SQLITE3 CRAM DIGEST LOGIN NTLM OTP PLAIN SCRAM OPTIONS_FILE_UNSET+=ALWAYSTRUE OPTIONS_FILE_SET+=AUTHDAEMOND OPTIONS_FILE_UNSET+=KEEP_DB_OPEN OPTIONS_FILE_SET+=OBSOLETE_CRAM_ATTR OPTIONS_FILE_UNSET+=BDB OPTIONS_FILE_UNSET+=MYSQL OPTIONS_FILE_UNSET+=PGSQL OPTIONS_FILE_UNSET+=SQLITE2 OPTIONS_FILE_UNSET+=SQLITE3 OPTIONS_FILE_SET+=CRAM OPTIONS_FILE_SET+=DIGEST OPTIONS_FILE_SET+=LOGIN OPTIONS_FILE_SET+=NTLM OPTIONS_FILE_SET+=OTP OPTIONS_FILE_SET+=PLAIN OPTIONS_FILE_SET+=SCRAM install cyrus-sasl2-saslauthd\n# Options for cyrus-sasl-saslauthd-2.1.26 _OPTIONS_READ=cyrus-sasl-saslauthd-2.1.26 _FILE_COMPLETE_OPTIONS_LIST=BDB HTTPFORM OPENLDAP OPTIONS_FILE_SET+=BDB OPTIONS_FILE_SET+=HTTPFORM OPTIONS_FILE_SET+=OPENLDAP install postfwd\n# Options for postfix-postfwd-1.32_1 _OPTIONS_READ=postfix-postfwd-1.32_1 _FILE_COMPLETE_OPTIONS_LIST=DOCS EXAMPLES POSTFWD2 OPTIONS_FILE_SET+=DOCS OPTIONS_FILE_SET+=EXAMPLES OPTIONS_FILE_UNSET+=POSTFWD2 configure /usr/local/lib/sasl2/smtpd.conf\nlog_level: 3 pwcheck_method: saslauthd mech_list: PLAIN LOGIN configure /usr/local/etc/saslauthd.conf\nldap_servers: ldap_bind_dn: ldap_bind_pw: ldap_search_base: ldap_auth_method: ssha ldap_time_limit: 4 ldap_filter: configure /usr/local/etc/postfix/main.cf\nmtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = smtpd_sasl_authenticated_header = yes broken_sasl_auth_clients = yes smtpd_sasl_path = smtpd smtp_sasl_type = cyrus smtpd_sasl_security_options = noanonymous smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination configure /usr/local/etc/postfwd.conf\nid=RULE001 sasl_username=~/^(\\S+)$/ action=rcpt(sasl_username/200/3600/DEFER Too much emails for $$sasl_username) configure /etc/rc.conf\npostfix_enable=\u0026quot;YES\u0026quot; saslauthd_enable=\u0026quot;YES\u0026quot; saslauthd_flags=\u0026quot;-a ldap\u0026quot; postfwd_enable=\u0026quot;YES\u0026quot; Reference: http://ashterix.blogspot.com/2008/10/freebsd-postfix-sasl-openldap.html\n","date":"Jul 1, 2014","excerpt":"Install packages using FreeBSD port.\nInstall postfix\n# Options for postfix-2.11.0,1 _OPTIONS_READ=postfix-2.11.0,1 _FILE_COMPLETE_OPTIONS_LIST=BDB CDB INST_BASE LDAP_SASL LMDB MYSQL NIS OPENLDAP PCRE PGSQL SASL2 SPF SQLITE TEST TLS VDA DOVECOT DOVECOT2 SASLKRB5 SASLKMIT OPTIONS_FILE_SET+=BDB OPTIONS_FILE_SET+=CDB OPTIONS_FILE_UNSET+=INST_BASE OPTIONS_FILE_SET+=LDAP_SASL OPTIONS_FILE_UNSET+=LMDB OPTIONS_FILE_UNSET+=MYSQL OPTIONS_FILE_UNSET+=NIS OPTIONS_FILE_SET+=OPENLDAP OPTIONS_FILE_SET+=PCRE OPTIONS_FILE_UNSET+=PGSQL OPTIONS_FILE_SET+=SASL2 OPTIONS_FILE_UNSET+=SPF OPTIONS_FILE_UNSET+=SQLITE OPTIONS_FILE_SET+=TEST OPTIONS_FILE_SET+=TLS OPTIONS_FILE_UNSET+=VDA OPTIONS_FILE_UNSET+=DOVECOT OPTIONS_FILE_UNSET+=DOVECOT2 OPTIONS_FILE_UNSET+=SASLKRB5 OPTIONS_FILE_UNSET+=SASLKMIT install openldap\n# Options for openldap-client-2.4.38 _OPTIONS_READ=openldap-client-2.4.38 _FILE_COMPLETE_OPTIONS_LIST=FETCH OPTIONS_FILE_UNSET+=FETCH install cyrus-sasl2\n# Options for cyrus-sasl-2.1.26_4 _OPTIONS_READ=cyrus-sasl-2.1.26_4 _FILE_COMPLETE_OPTIONS_LIST=ALWAYSTRUE AUTHDAEMOND KEEP_DB_OPEN OBSOLETE_CRAM_ATTR BDB MYSQL PGSQL SQLITE2 SQLITE3 CRAM DIGEST LOGIN NTLM OTP PLAIN SCRAM OPTIONS_FILE_UNSET+=ALWAYSTRUE OPTIONS_FILE_SET+=AUTHDAEMOND OPTIONS_FILE_UNSET+=KEEP_DB_OPEN OPTIONS_FILE_SET+=OBSOLETE_CRAM_ATTR OPTIONS_FILE_UNSET+=BDB OPTIONS_FILE_UNSET+=MYSQL OPTIONS_FILE_UNSET+=PGSQL OPTIONS_FILE_UNSET+=SQLITE2 OPTIONS_FILE_UNSET+=SQLITE3 OPTIONS_FILE_SET+=CRAM OPTIONS_FILE_SET+=DIGEST OPTIONS_FILE_SET+=LOGIN OPTIONS_FILE_SET+=NTLM OPTIONS_FILE_SET+=OTP OPTIONS_FILE_SET+=PLAIN OPTIONS_FILE_SET+=SCRAM install cyrus-sasl2-saslauthd\n...","permalink":"http://blog.pras.my.id/blogs/2014-07-01-installing-postfix-with-auth-sasl-and-ldap-support-on-freebsd/","readtime":"1 min read","summary":"\u003cp\u003eInstall packages using FreeBSD port.\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp\u003eInstall postfix\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# Options for postfix-2.11.0,1\n_OPTIONS_READ=postfix-2.11.0,1\n_FILE_COMPLETE_OPTIONS_LIST=BDB CDB INST_BASE LDAP_SASL LMDB MYSQL NIS OPENLDAP PCRE PGSQL SASL2 SPF SQLITE TEST TLS VDA DOVECOT DOVECOT2 SASLKRB5 SASLKMIT\nOPTIONS_FILE_SET+=BDB\nOPTIONS_FILE_SET+=CDB\nOPTIONS_FILE_UNSET+=INST_BASE\nOPTIONS_FILE_SET+=LDAP_SASL\nOPTIONS_FILE_UNSET+=LMDB\nOPTIONS_FILE_UNSET+=MYSQL\nOPTIONS_FILE_UNSET+=NIS\nOPTIONS_FILE_SET+=OPENLDAP\nOPTIONS_FILE_SET+=PCRE\nOPTIONS_FILE_UNSET+=PGSQL\nOPTIONS_FILE_SET+=SASL2\nOPTIONS_FILE_UNSET+=SPF\nOPTIONS_FILE_UNSET+=SQLITE\nOPTIONS_FILE_SET+=TEST\nOPTIONS_FILE_SET+=TLS\nOPTIONS_FILE_UNSET+=VDA\nOPTIONS_FILE_UNSET+=DOVECOT\nOPTIONS_FILE_UNSET+=DOVECOT2\nOPTIONS_FILE_UNSET+=SASLKRB5\nOPTIONS_FILE_UNSET+=SASLKMIT\n\u003c/code\u003e\u003c/pre\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003einstall openldap\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# Options for openldap-client-2.4.38\n_OPTIONS_READ=openldap-client-2.4.38\n_FILE_COMPLETE_OPTIONS_LIST=FETCH\nOPTIONS_FILE_UNSET+=FETCH\n\u003c/code\u003e\u003c/pre\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003einstall cyrus-sasl2\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# Options for cyrus-sasl-2.1.26_4\n_OPTIONS_READ=cyrus-sasl-2.1.26_4\n_FILE_COMPLETE_OPTIONS_LIST=ALWAYSTRUE AUTHDAEMOND KEEP_DB_OPEN  OBSOLETE_CRAM_ATTR BDB MYSQL PGSQL SQLITE2 SQLITE3 CRAM DIGEST LOGIN NTLM OTP PLAIN SCRAM\nOPTIONS_FILE_UNSET+=ALWAYSTRUE\nOPTIONS_FILE_SET+=AUTHDAEMOND\nOPTIONS_FILE_UNSET+=KEEP_DB_OPEN\nOPTIONS_FILE_SET+=OBSOLETE_CRAM_ATTR\nOPTIONS_FILE_UNSET+=BDB\nOPTIONS_FILE_UNSET+=MYSQL\nOPTIONS_FILE_UNSET+=PGSQL\nOPTIONS_FILE_UNSET+=SQLITE2\nOPTIONS_FILE_UNSET+=SQLITE3\nOPTIONS_FILE_SET+=CRAM\nOPTIONS_FILE_SET+=DIGEST\nOPTIONS_FILE_SET+=LOGIN\nOPTIONS_FILE_SET+=NTLM\nOPTIONS_FILE_SET+=OTP\nOPTIONS_FILE_SET+=PLAIN\nOPTIONS_FILE_SET+=SCRAM\n\u003c/code\u003e\u003c/pre\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003einstall cyrus-sasl2-saslauthd\u003c/p\u003e","tags":["sysadmin"],"title":"Installing Postfix with Auth SASL and LDAP Support on FreeBSD"},{"content":"In this short tutorial I will show how to check TCP/UDP open port or services in FreeBSD box. For checking open port or services which uses port in FreeBSD simply issue the following commands.\ncheck TCP connection\nsockstat -Ptcp check UDP connection\nsockstat -PudpCombine with grep to search port used by specific service or service which using specific port.\nuse grep to get service or port\nsockstat -Ptcp | grep \u0026lt;port number\u0026gt; sockstat -Ptcp | grep -i \u0026lt;service name\u0026gt; sockstat -Pudp | grep \u0026lt;port number\u0026gt; sockstat -Pudp | grep -i \u0026lt;service name\u0026gt; ","date":"Jul 1, 2014","excerpt":"In this short tutorial I will show how to check TCP/UDP open port or services in FreeBSD box. For checking open port or services which uses port in FreeBSD simply issue the following commands.\ncheck TCP connection\nsockstat -Ptcp check UDP connection\nsockstat -PudpCombine with grep to search port used by specific service or service which using specific port.\nuse grep to get service or port\n...","permalink":"http://blog.pras.my.id/blogs/2014-07-01-freebsd-check-tcpudp-open-port-or-services/","readtime":"1 min read","summary":"\u003cp\u003eIn this short tutorial I will show how to check TCP/UDP open port or services in FreeBSD box. For checking open port or services which uses port in FreeBSD simply issue the following commands.\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp\u003echeck TCP connection\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" role=\"region\" aria-label=\"tcsh code 1\" class=\"chroma\"\u003e\u003ccode class=\"language-tcsh\" data-lang=\"tcsh\"\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003esockstat -Ptcp\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003echeck UDP connection\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" role=\"region\" aria-label=\"tcsh code 2\" class=\"chroma\"\u003e\u003ccode class=\"language-tcsh\" data-lang=\"tcsh\"\u003e\u003cspan class=\"line\"\u003e\u003cspan class=\"cl\"\u003esockstat -Pudp\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eCombine with \u003cstrong\u003egrep\u003c/strong\u003e to search port used by specific service or service which\nusing specific port.\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003euse grep to get service or port\u003c/p\u003e","tags":["sysadmin"],"title":"FreeBSD Check TCP/UDP Open Port or Services"},{"content":"DRBD refers to block devices designed as a building block to form high availability cluster. This is done by mirroring a whole block device via an assigned network. DRBD can be understood as network based RAID-1. (DRBD)\nSometimes we have a disk failure on hard drive which contains DRBD backing device. The following steps can be used to replace or recover the failed drive.\ndetach drbd resource from broken backing storage\n# drbdadm detach \u0026lt;resource\u0026gt; check state of drbd disk\n# drbdadm dstate \u0026lt;resource\u0026gt; Diskless/UpToDate if using internal meta data, bind DRBD device to new hard disk\n# drbdadm create-md \u0026lt;resource\u0026gt; # drbdadm attach \u0026lt;resource\u0026gt; if using external meta data DRBD unable to recognize hard drive was swapped, need additional step\n# drbdadm create-md \u0026lt;resource\u0026gt; # drbdadm attach \u0026lt;resource\u0026gt; # drbdadm invalidate \u0026lt;resource\u0026gt; Reference: http://www.drbd.org/users-guide-8.4/ch-troubleshooting.html\n","date":"Jul 1, 2014","excerpt":"DRBD refers to block devices designed as a building block to form high availability cluster. This is done by mirroring a whole block device via an assigned network. DRBD can be understood as network based RAID-1. (DRBD)\nSometimes we have a disk failure on hard drive which contains DRBD backing device. The following steps can be used to replace or recover the failed drive.\ndetach drbd resource from broken backing storage\n...","permalink":"http://blog.pras.my.id/blogs/2014-07-01-drbd-troubleshooting-and-error-recovery-of-hard-drive-failure-or-replacement/","readtime":"1 min read","summary":"\u003cp\u003e\u003cstrong\u003eDRBD\u003c/strong\u003e refers to block devices designed as a building block to form high availability cluster. This is done by mirroring a whole block device via an assigned network. DRBD can be understood as network based RAID-1. (\u003ca href=\"http://www.drbd.org/\"\u003eDRBD\u003c/a\u003e)\u003c/p\u003e\n\u003cp\u003eSometimes we have a disk failure on hard drive which contains DRBD backing device. The following steps can be used to replace or recover the failed drive.\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp\u003edetach drbd resource from broken backing storage\u003c/p\u003e","tags":["sysadmin"],"title":"DRBD: Troubleshooting and Error Recovery of Hard Drive Failure or Replacement"},{"content":"Split Brain in DRBD is a condition where each host think that resource in another host is outdated, thus synchronization won\u0026rsquo;t be occured. This condition often occurs because of network or power failure which is indicated by these variables:\nlog: Split-Brain detected, dropping connection connection-state: StandAlone/WFConnection To manually recover the cluster from split brain condition, the following steps is required.\non victim connection state must be StandAlone\n# drbdadm disconnect \u0026lt;resource\u0026gt; set victim as secondary\n# drbdadm secondary \u0026lt;resource\u0026gt; reconnect victim\n# drbdadm connect --discard-my-data \u0026lt;resource\u0026gt; on the survivor, if the connection state StandAlone enter following command\n# drbdadm connect \u0026lt;resource\u0026gt; Reference: http://www.drbd.org/users-guide-8.4/s-resolve-split-brain.html\n","date":"Jul 1, 2014","excerpt":"Split Brain in DRBD is a condition where each host think that resource in another host is outdated, thus synchronization won’t be occured. This condition often occurs because of network or power failure which is indicated by these variables:\nlog: Split-Brain detected, dropping connection connection-state: StandAlone/WFConnection To manually recover the cluster from split brain condition, the following steps is required.\non victim connection state must be StandAlone\n# drbdadm disconnect \u003cresource\u003e set victim as secondary\n...","permalink":"http://blog.pras.my.id/blogs/2014-07-01-drbd-manual-split-brain-recovery/","readtime":"1 min read","summary":"\u003cp\u003eSplit Brain in DRBD is a condition where each host think that resource in another host is outdated, thus synchronization won\u0026rsquo;t be occured. This condition often occurs because of network or power failure which is indicated by these variables:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003elog: Split-Brain detected, dropping connection\u003c/li\u003e\n\u003cli\u003econnection-state: StandAlone/WFConnection\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eTo manually recover the cluster from split brain condition, the following steps is required.\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp\u003eon victim connection state must be StandAlone\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# drbdadm disconnect \u0026lt;resource\u0026gt;\n\u003c/code\u003e\u003c/pre\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003eset victim as secondary\u003c/p\u003e","tags":["sysadmin"],"title":"DRBD: Manual Split Brain Recovery"},{"content":"It is usual task to find someone computer by its MAC address when there is an issue related to his computer in the local network. The common case is IP conflict or network abuse. But, if the MAC Address shows that machine is one of many scattered VMware virtual machine out there, how do we find it?\nvSphere Client If you have an VMware ESX or ESXi server, vSphere Client is tool to manage your virtual machines from remote computer. But, vSphere Client cannot tell the MAC Address of virtual machines from version 10 or higher and to find virtual machine based on MAC Address we must open the virtual machine Setting one by one. It is still possible when there are few virtual, but it is exhausting when we have many virtual machine.\nvSphere PowerCLI There is alternative method by using vSphere PowerCLI, a command-line tools to manage virtual machines in conjunction with vSphere Client. You can install vSphere PowerCLI by referring to this page. To find the virtual machine based on its MAC Address, open vSphere PowerCLI. Connect to your Virtual Machine Server (ESX or ESXI) by using command Connect-VIServer. After pressing [Enter] twice, you will be presented by a logon window. Login to your Virtual Machines Server. Then you can find the virtual machine by its MAC Address using this command Get-VM | Get-NetworkAdapter | Where {$_.MacAddress -eq \u0026quot;AA:BB:CC:DD:EE:FF\u0026quot;} | Format-List The highlighted one is the virtual machine name in your server. Good luck!\nReference Finding a virtual machine in VMware vSphere by the MAC address\n","date":"Mar 12, 2014","excerpt":"It is usual task to find someone computer by its MAC address when there is an issue related to his computer in the local network. The common case is IP conflict or network abuse. But, if the MAC Address shows that machine is one of many scattered VMware virtual machine out there, how do we find it?\nvSphere Client If you have an VMware ESX or ESXi server, vSphere Client is tool to manage your virtual machines from remote computer. But, vSphere Client cannot tell the MAC Address of virtual machines from version 10 or higher and to find virtual machine based on MAC Address we must open the virtual machine Setting one by one. It is still possible when there are few virtual, but it is exhausting when we have many virtual machine.\n...","permalink":"http://blog.pras.my.id/blogs/2014-03-12-find-a-virtual-machine-by-mac-address-with-vsphere-client-and-powercli/","readtime":"2 min read","summary":"\u003cp\u003eIt is usual task to find someone computer by its MAC address when there is an issue related to his computer in the local network. The common case is IP conflict or network abuse. But, if the MAC Address shows that machine is one of many scattered VMware virtual machine out there, how do we find it?\u003c/p\u003e\n\u003ch2 id=\"vsphere-client\"\u003evSphere Client\u003c/h2\u003e\n\u003cp\u003eIf you have an VMware ESX or ESXi server, \u003ca href=\"https://pubs.vmware.com/vsphere-4-esx-vcenter/index.jsp?topic=/com.vmware.vsphere.installclassic.doc_41/common/install/t_down_client.html\"\u003evSphere Client\u003c/a\u003e is tool to manage your virtual machines from remote computer. But, vSphere Client cannot tell the MAC Address of virtual machines from version 10 or higher and to find virtual machine based on MAC Address we must open the virtual machine Setting one by one. It is still possible when there are few virtual, but it is exhausting when we have many virtual machine.\u003c/p\u003e","tags":["sysadmin"],"title":"Find A Virtual Machine by MAC Address with VSphere Client and PowerCLI"},{"content":"Zimbra is a well known collaboration suite which includes email, calendaring, file sharing, activity streams, social communities and more. The most popular product from Zimbra is Zimbra Collaboration Server. Zimbra Collaboration Server comes with two version: Network Edition and Open Source Edition (FOSS). This documentation shows a simple way to install Zimbra Collaboration Server Open Source Edition in CentOS 6.5.\nGetting Started Prepare the system\n# yum update Disable SELinux\n# vi /etc/sysconfig/selinux SELINUXTYPE=disabled Disable firewall\n# service iptables stop # service ip6tables stop # chkconfig iptables off # chkconfig ip6tables off Disable postfix\n# service postfix stop # chkconfig postfix off Edit hosts file\n# vi /etc/hosts 192.168.1.91 your.zimbra-domain.com Install dependencies\n# yum install nc wget nano make nc sudo sysstat libtool-ltdl glibc perl ntp Edit ntp configuration file\n# vi /etc/ntp.conf #server 3.centos.pool.ntp.org iburst server your.ntp-server.com iburst Start ntpdate service\n# service ntpdate start # chkconfig ntpdate on Make sure you have setup your NS records for your ZCS\nyour.zimbra-domain.com IN A 192.168.1.91 IN MX 10 your.zimbra-domain.com Zimbra Installation Download zimbra collaboration server open source edition from here\n# cd /tmp # wget http://files2.zimbra.com/downloads/8.0.6_GA/zcs-8.0.6_GA_5922.RHEL6_64.20131203103705.tgz Extract ZCS\n# tar zxvf zcs-8.0.6_GA_5922.RHEL6_64.20131203103705.tgz Install ZCS and follow the instructions\n# cd zxvf zcs-8.0.6_GA_5922.RHEL6_64.20131203103705 # ./install.sh Set http for web access\n# su zimbra $ zmtlsctl http $ zmcontrol restart Now you can access your new ZCS installation in http://your.zimbra-domain.com/.\n","date":"Feb 27, 2014","excerpt":"Zimbra is a well known collaboration suite which includes email, calendaring, file sharing, activity streams, social communities and more. The most popular product from Zimbra is Zimbra Collaboration Server. Zimbra Collaboration Server comes with two version: Network Edition and Open Source Edition (FOSS). This documentation shows a simple way to install Zimbra Collaboration Server Open Source Edition in CentOS 6.5.\nGetting Started Prepare the system\n# yum update Disable SELinux\n...","permalink":"http://blog.pras.my.id/blogs/2014-02-27-installing-zimbra-collaboration-server-8-foss-on-centos-6-5/","readtime":"2 min read","summary":"\u003cp\u003e\u003ca href=\"http://www.zimbra.com/\"\u003eZimbra\u003c/a\u003e is a well known collaboration suite which includes email, calendaring, file sharing, activity streams, social communities and more. The most popular product from Zimbra is Zimbra Collaboration Server. Zimbra Collaboration Server comes with two version: Network Edition and Open Source Edition (FOSS). This documentation shows a simple way to install Zimbra Collaboration Server Open Source Edition in CentOS 6.5.\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"Zimbra Logo\" loading=\"lazy\" src=\"/images/zimbrs.svg\"\u003e\u003c/p\u003e\n\u003ch2 id=\"getting-started\"\u003eGetting Started\u003c/h2\u003e\n\u003cp\u003ePrepare the system\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# yum update\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eDisable SELinux\u003c/p\u003e","tags":["sysadmin"],"title":"Installing Zimbra Collaboration Server 8 FOSS on CentOS 6.5"},{"content":"Quantum Espresso is a software for electronic-structure calculations and materials modeling at the nanoscale. The installation of Quantum Espresso is quite easy because it includes external libraries which it needs. But we are encouraged to install Quantum Espresso using our own machine optimized external libraries such as Basic Linear Algebra Subprograms (BLAS), Linear Algebra Package (LAPACK), Scalable LAPACK (SCALAPACK), and Fastest Fourier Transform in the West (FFTW).\nExternal Libraries There are several repositories or development teams which provide external libraries. For example is Netlib which provides BLAS, LAPACK, and SCALAPACK. But, for machines with Intel processor, maybe the best external libraries out there is Intel® Math Kernel Library which has a non-commercial version as standalone or included in Intel® Parallel Studio XE 2013 for Linux that can be downloaded in Intel Non-Commercial Software Development. Intel® Math Kernel Library provides BLAS, LAPACK, SCALAPACK, and even FFTW interfaces.\nGetting Started My test machine is Supermicro X9DRD-7LN4F which has Intel(R) Xeon(R) CPU E5-2660 0 @ 2.20GHz with 8 cores and 16 threads and 64 GB RAM. For compilers I will be using Intel compilers which is included in Intel® Parallel Studio XE 2013 for Linux and OpenMPI for parallelization.\nInstalling Intel® Parallel Studio XE 2013 for Linux tar zxvf sources/parallel_studio_xe_2013_sp1_update1.tgz ./parallel_studio_xe_2013_sp1_update1/install.sh Please make your selection by entering an option. Root access is recommended for evaluation. 1. Run as a root for system wide access for all users [default] 2. Run using sudo privileges and password for system wide access for all users 3. Run as current user to limit access to user level h. Help q. Quit Please type a selection [1]: 3 Step 1 of 7 | Welcome -------------------------------------------------------------------------------- Welcome to the Intel(R) Parallel Studio XE 2013 SP1 Update 1 for Linux* installation program. -------------------------------------------------------------------------------- You will complete the steps below during this installation: Step 1 : Welcome Step 2 : License agreement Step 3 : Activation Step 4 : Intel(R) Software Improvement Program Step 5 : Options Step 6 : Installation Step 7 : Complete -------------------------------------------------------------------------------- Press \u0026quot;Enter\u0026quot; key to continue or \u0026quot;q\u0026quot; to quit: [Enter] Step 1 of 7 | Welcome \u0026gt; Missing Optional Prerequisite(s) -------------------------------------------------------------------------------- There are one or more optional unresolved issues. It is highly recommended to resolve them all before you continue the installation. You can fix them without exiting from the installation and re-check. Or you can quit from the installation, fix them and run the installation again. -------------------------------------------------------------------------------- Missing optional prerequisites -- Intel(R) Fortran Composer XE 2013 SP1 Update 1 for Linux*: Unsupported OS -- Intel(R) C++ Composer XE 2013 SP1 Update 1 for Linux*: Unsupported OS -- Power analysis is not enabled. -------------------------------------------------------------------------------- 1. Skip missing optional prerequisites [default] 2. Show the detailed info about issue(s) 3. Re-check the prerequisites h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press \u0026quot;Enter\u0026quot; to accept default choice [1]: 1 -------------------------------------------------------------------------------- Do you agree to be bound by the terms and conditions of this license agreement? Type 'accept' to continue or 'decline' to go back to the previous menu: accept Step 3 of 7 | Activation -------------------------------------------------------------------------------- If you have purchased this product and have the serial number and a connection to the internet you can choose to activate the product at this time. Activation is a secure and anonymous one-time process that verifies your software licensing rights to use the product. Alternatively, you can choose to evaluate the product or defer activation by choosing the evaluate option. Evaluation software will time out in about one month. Also you can use license file, license manager, or remote activation if the system you are installing on does not have internet access activation options. -------------------------------------------------------------------------------- 1. Use existing license [default] 2. I want to activate my product using a serial number 3. I want to evaluate my product or activate later 4. I want to activate either remotely, or by using a license file, or by using a license manager h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press \u0026quot;Enter\u0026quot; to accept default choice [1]: 1 Step 4 of 7 | Intel(R) Software Improvement Program -------------------------------------------------------------------------------- Help improve your experience with Intel(R) software Participate in the design of future Intel software. Select 'Yes' to give us permission to learn about how you use your Intel software and we will do the rest. - No personally identifiable information is collected - There are no additional follow-up emails by opting in - You can stop participating at any time Learn more about the Intel(R) Software Improvement Program http://software.intel.com/en-us/articles/software-improvement-program With your permission, Intel may automatically receive anonymous information about how you use your current and future Intel(R) Software Development Products. -------------------------------------------------------------------------------- 1. Yes, I am willing to participate and improve Intel software. (Recommended) 2. No, I don't want to participate in the Intel(R) Software Improvement Program at this time. b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection: 2 Step 5 of 7 | Options \u0026gt; Pre-install Summary -------------------------------------------------------------------------------- Install location: /home/pras/intel/parallel_studio_xe_2013 Component(s) selected: Intel(R) VTune(TM) Amplifier XE 2013 Update 13 544MB Command line interface Sampling Driver kit Power Driver kit Graphical user interface Intel(R) Inspector XE 2013 Update 8 296MB Command line interface Graphical user interface Intel(R) Advisor XE 2013 Update 5 470MB Command line interface Graphical user interface Intel(R) Fortran Compiler XE 14.0 Update 1 612MB Intel Fortran Compiler XE Intel(R) C++ Compiler XE 14.0 Update 1 580MB Intel C++ Compiler XE Intel(R) Debugger 13.0 533MB Intel Debugger Intel(R) Math Kernel Library 11.1 Update 1 2.0GB Intel MKL core libraries Intel(R) Xeon Phi(TM) coprocessor support Fortran 95 interfaces for BLAS and LAPACK GNU* Compiler Collection support Intel(R) Integrated Performance Primitives 8.0 Update 1 2.8GB Intel IPP single-threaded libraries Intel(R) Threading Building Blocks 4.2 Update 1 127MB Intel TBB GNU* GDB 7.5 170MB GNU* GDB 7.5 on Intel(R) 64 (Provided under GNU General Public License v3) GDB Eclipse* Integration on Intel(R) 64 (Provided under Eclipse Public License v.1.0) Install Space Required: 7.1GB Driver parameters: Sampling driver install type: Driver kit files will be installed only Power driver install type: Driver kit files will be installed only Drivers will be accessible to everyone on this system. To restrict access, select Customize Installation \u0026gt; Change advanced options \u0026gt; Driver is accessible to and set group access. 1. Start installation Now [default] 2. Customize installation h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press \u0026quot;Enter\u0026quot; to accept default choice [1]: 2 Step 5 of 7 | Options \u0026gt; Architecture selection -------------------------------------------------------------------------------- Select the architecture(s) where your applications will run. If unsure, accept the default options below or see http://software.intel.com/en-us/articles/about-target-architecture-selection-during-installation for more information. Target Architecture(s) of your applications: -------------------------------------------------------------------------------- 1. [x] IA-32 2. [x] Intel(R) 64 3. Finish architecture selection [default] Note: This system is an Intel(R) 64 architecture system. Your application may be built to run on either IA-32 or Intel(R) 64 architectures. b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press \u0026quot;Enter\u0026quot; to accept default choice [3]: 3 Step 5 of 7 | Options -------------------------------------------------------------------------------- You are now ready to begin installation. You can use all default installation settings by simply choosing the \u0026quot;Start installation Now\u0026quot; option or you can customize these settings by selecting any of the change options given below first. You can view a summary of the settings by selecting \u0026quot;Show pre-install summary\u0026quot;. -------------------------------------------------------------------------------- 1. Start installation Now [default] 2. Change install directory [ /home/pras/intel/parallel_studio_xe_2013 ] 3. Change components to install [ Custom ] 4. Show pre-install summary h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press \u0026quot;Enter\u0026quot; to accept default choice [1]: 3 Step 5 of 7 | Options \u0026gt; Component selection -------------------------------------------------------------------------------- Select the component you wish to install. When you have completed your changes, select option 1 to continue with the installation. -------------------------------------------------------------------------------- 1. Finish component selection [default] 2. Intel(R) VTune(TM) Amplifier XE 2013 Update 13 [All] 3. Intel(R) Inspector XE 2013 Update 8 [All] 4. Intel(R) Advisor XE 2013 Update 5 [All] 5. Intel(R) Fortran Compiler XE 14.0 Update 1 [All] 6. Intel(R) C++ Compiler XE 14.0 Update 1 [All] 7. Intel(R) Debugger 13.0 [All] 8. Intel(R) Math Kernel Library 11.1 Update 1 [Custom] 9. Intel(R) Integrated Performance Primitives 8.0 Update 1 [Custom] 10. Intel(R) Threading Building Blocks 4.2 Update 1 [All] 11. GNU* GDB 7.5 [Custom] Install Space Required: 7.1GB h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press \u0026quot;Enter\u0026quot; to accept default choice [1]: 8 Step 5 of 7 | Options \u0026gt; Component selection -------------------------------------------------------------------------------- You may choose not to install some components of this product. Optional components are shown with an option number of the left. Entering that number will select/unselect that component for installation. When you have completed your changes, select option 1 to return to previous menu. -------------------------------------------------------------------------------- 1. Finish component selection [default] 2. [x] Intel(R) Math Kernel Library 11.1 Update 1 3. [x] Intel MKL core libraries 4. [x] Intel(R) Xeon Phi(TM) coprocessor support 5. [x] Fortran 95 interfaces for BLAS and LAPACK 6. [x] GNU* Compiler Collection support 7. [ ] PGI* compiler support 8. [ ] SP2DP interface for Intel(R) 64 9. [ ] Cluster support Install Space Required: 2.0GB h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press \u0026quot;Enter\u0026quot; to accept default choice [1]: 2 Step 5 of 7 | Options \u0026gt; Component selection -------------------------------------------------------------------------------- You may choose not to install some components of this product. Optional components are shown with an option number of the left. Entering that number will select/unselect that component for installation. When you have completed your changes, select option 1 to return to previous menu. -------------------------------------------------------------------------------- 1. Finish component selection [default] 2. [ ] Intel(R) Math Kernel Library 11.1 Update 1 3. [ ] Intel MKL core libraries 4. [ ] Intel(R) Xeon Phi(TM) coprocessor support 5. [ ] Fortran 95 interfaces for BLAS and LAPACK 6. [ ] GNU* Compiler Collection support 7. [ ] PGI* compiler support 8. [ ] SP2DP interface for Intel(R) 64 9. [ ] Cluster support Install Space Required: 0MB For successful functioning of the selected components, selection of additional components will be changed. Intel(R) Xeon Phi(TM) coprocessor support Fortran 95 interfaces for BLAS and LAPACK GNU* Compiler Collection support h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press \u0026quot;Enter\u0026quot; to accept default choice [1]: 2 Step 5 of 7 | Options \u0026gt; Component selection -------------------------------------------------------------------------------- You may choose not to install some components of this product. Optional components are shown with an option number of the left. Entering that number will select/unselect that component for installation. When you have completed your changes, select option 1 to return to previous menu. -------------------------------------------------------------------------------- 1. Finish component selection [default] 2. [x] Intel(R) Math Kernel Library 11.1 Update 1 3. [x] Intel MKL core libraries 4. [x] Intel(R) Xeon Phi(TM) coprocessor support 5. [x] Fortran 95 interfaces for BLAS and LAPACK 6. [x] GNU* Compiler Collection support 7. [x] PGI* compiler support 8. [x] SP2DP interface for Intel(R) 64 9. [x] Cluster support Install Space Required: 2.1GB h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press \u0026quot;Enter\u0026quot; to accept default choice [1]: 1 Step 5 of 7 | Options \u0026gt; Component selection -------------------------------------------------------------------------------- Select the component you wish to install. When you have completed your changes, select option 1 to continue with the installation. -------------------------------------------------------------------------------- 1. Finish component selection [default] 2. Intel(R) VTune(TM) Amplifier XE 2013 Update 13 [All] 3. Intel(R) Inspector XE 2013 Update 8 [All] 4. Intel(R) Advisor XE 2013 Update 5 [All] 5. Intel(R) Fortran Compiler XE 14.0 Update 1 [All] 6. Intel(R) C++ Compiler XE 14.0 Update 1 [All] 7. Intel(R) Debugger 13.0 [All] 8. Intel(R) Math Kernel Library 11.1 Update 1 [All] 9. Intel(R) Integrated Performance Primitives 8.0 Update 1 [Custom] 10. Intel(R) Threading Building Blocks 4.2 Update 1 [All] 11. GNU* GDB 7.5 [Custom] Install Space Required: 7.2GB h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press \u0026quot;Enter\u0026quot; to accept default choice [1]: 1 Step 5 of 7 | Options -------------------------------------------------------------------------------- You are now ready to begin installation. You can use all default installation settings by simply choosing the \u0026quot;Start installation Now\u0026quot; option or you can customize these settings by selecting any of the change options given below first. You can view a summary of the settings by selecting \u0026quot;Show pre-install summary\u0026quot;. -------------------------------------------------------------------------------- 1. Start installation Now [default] 2. Change install directory [ /home/pras/intel/parallel_studio_xe_2013 ] 3. Change components to install [ Custom ] 4. Show pre-install summary h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press \u0026quot;Enter\u0026quot; to accept default choice [1]: 1 Installation of Open Source Components -------------------------------------------------------------------------------- Open source components provided under GNU General Public License v3 or Eclipse Public License v.1.0 will be installed. Includes: GNU* GDB 7.5 (Provided under GNU General Public License v3) GDB Eclipse* Integration (Provided under Eclipse Public License v.1.0) For further details, please refer to the product Release Notes. -------------------------------------------------------------------------------- 1. Continue the installation [default] b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press \u0026quot;Enter\u0026quot; to accept default choice [1]: 1 Step 5 of 7 | Options \u0026gt; Missing Optional Prerequisite(s) -------------------------------------------------------------------------------- There are one or more optional unresolved issues. It is highly recommended to resolve them all before you continue the installation. You can fix them without exiting from the installation and re-check. Or you can quit from the installation, fix them and run the installation again. -------------------------------------------------------------------------------- Missing optional prerequisites -- No compatible Java* Runtime Environment (JRE) found -- 32-bit libraries not found -------------------------------------------------------------------------------- 1. Skip missing optional prerequisites [default] 2. Show the detailed info about issue(s) 3. Re-check the prerequisites h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press \u0026quot;Enter\u0026quot; to accept default choice [1]: 1 Step 6 of 7 | Installation -------------------------------------------------------------------------------- Each component will be installed individually. If you cancel the installation, some components might remain on your system. This installation may take several minutes, depending on your system and the options you selected. -------------------------------------------------------------------------------- Installing Command line interface component... done -------------------------------------------------------------------------------- Installing Sampling Driver kit component... done -------------------------------------------------------------------------------- Installing Power Driver kit component... done -------------------------------------------------------------------------------- Installing Graphical user interface component... done -------------------------------------------------------------------------------- Installing Command line interface component... done -------------------------------------------------------------------------------- Installing Graphical user interface component... done -------------------------------------------------------------------------------- Installing Command line interface component... done -------------------------------------------------------------------------------- Installing Graphical user interface component... done -------------------------------------------------------------------------------- Installing Intel Fortran Compiler XE for IA-32 component... done -------------------------------------------------------------------------------- Installing Intel Fortran Compiler XE for Intel(R) 64 component... done -------------------------------------------------------------------------------- Installing Intel C++ Compiler XE for IA-32 component... done -------------------------------------------------------------------------------- Installing Intel C++ Compiler XE for Intel(R) 64 component... done -------------------------------------------------------------------------------- Installing Intel Debugger for IA-32 component... done -------------------------------------------------------------------------------- Installing Intel Debugger for Intel(R) 64 component... done -------------------------------------------------------------------------------- Installing Intel MKL core libraries for Intel(R) 64 component... done -------------------------------------------------------------------------------- Installing Intel(R) Xeon Phi(TM) coprocessor support component... done -------------------------------------------------------------------------------- Installing Fortran 95 interfaces for BLAS and LAPACK for Intel(R) 64 component... done -------------------------------------------------------------------------------- Installing GNU* Compiler Collection support for Intel(R) 64 component... done -------------------------------------------------------------------------------- Installing Intel MKL core libraries for IA-32 component... done -------------------------------------------------------------------------------- Installing Fortran 95 interfaces for BLAS and LAPACK for IA-32 component... done -------------------------------------------------------------------------------- Installing GNU* Compiler Collection support for IA-32 component... done -------------------------------------------------------------------------------- Installing Intel IPP single-threaded libraries for IA-32 component... done -------------------------------------------------------------------------------- Installing Intel IPP single-threaded libraries for Intel(R) 64 component... done -------------------------------------------------------------------------------- Installing Intel TBB component... done -------------------------------------------------------------------------------- Installing GNU* GDB 7.5 on Intel(R) 64 (Provided under GNU General Public License v3) component... done -------------------------------------------------------------------------------- Installing GDB Eclipse* Integration on Intel(R) 64 (Provided under Eclipse Public License v.1.0) component... done -------------------------------------------------------------------------------- Finalizing product configuration... -------------------------------------------------------------------------------- Preparing driver configuration scripts... done -------------------------------------------------------------------------------- Press \u0026quot;Enter\u0026quot; key to continue [Enter] Step 7 of 7 | Complete -------------------------------------------------------------------------------- Thank you for installing and for using the Intel(R) Parallel Studio XE 2013 SP1 Update 1 for Linux*. Support services start from the time you install or activate your product. If you have not already done so, please create your support account now to take full advantage of your product purchase. Your support account gives you access to free product updates and upgrades as well as interactive technical support at Intel(R) Premier Support. To create your support account, please visit the Intel(R) Software Development Products Registration Center web site https://registrationcenter.intel.com/RegCenter/registerexpress.aspx?media=GPZ -------------------------------------------------------------------------------- q. Quit -------------------------------------------------------------------------------- Please type a selection or press \u0026quot;Enter\u0026quot; to accept default choice [q]: q $ vi ~/.bashrc # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific aliases and functions export PATH=/home/\u0026lt;user\u0026gt;/intel/bin:$PATH export LD_LIBRARY_PATH=/home/\u0026lt;user\u0026gt;/intel/lib/intel64:/home/\u0026lt;user\u0026gt;/intel/mkl/lib/intel64:$LD_LIBRARY_PATH export PATH=/home/\u0026lt;user\u0026gt;/intel/bin:$PATH export LD_LIBRARY_PATH=/home/\u0026lt;user\u0026gt;/intel/lib/intel64:/home/\u0026lt;user\u0026gt;/intel/mkl/lib/intel64:$LD_LIBRARY_PATH Installing OpenMPI tar zxvf sources/openmpi-1.6.5.tar.tar.gz cd openmpi-1.6.5/ ./configure --prefix=/home/\u0026lt;user\u0026gt;/openmpi-install CC=icc FC=ifort F77=ifort CXX=icpc 2\u0026gt;\u0026amp;1 | tee c.txt make all install 2\u0026gt;\u0026amp;1 | tee m.txt $ vi ~/.bashrc # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific aliases and functions export PATH=/home/\u0026lt;user\u0026gt;/openmpi-install/bin:/home/\u0026lt;user\u0026gt;/intel/bin:$PATH export LD_LIBRARY_PATH=/home/\u0026lt;user\u0026gt;/openmpi-install/lib:/home/\u0026lt;user\u0026gt;/intel/lib/intel64:/home/\u0026lt;user\u0026gt;/intel/mkl/lib/intel64:$LD_LIBRARY_PATH export PATH=/home/\u0026lt;user\u0026gt;/openmpi-install/bin:$PATH export LD_LIBRARY_PATH=/home/\u0026lt;user\u0026gt;/openmpi-install/lib:$LD_LIBRARY_PATH Compiling Intel MKL FFTW Interface cd ~/intel/mkl/interfaces/fftw3x_cdft/ make libintel64 compiler=intel mpi=openmpi INSTALL_DIR=/home/\u0026lt;user\u0026gt;/fftw3x_cdft-install 2\u0026gt;\u0026amp;1 | tee m.txt Installing Quantum Espresso 5.0.3 cd ~/sources/ tar zxvf espresso-5.0.2.tar.gz mv -v espresso-5.0.2 ~/espresso-5.0.2-mkl cd ~ cp -v ~/espresso-5.0.2/archive/* ~/espresso-5.0.2-mkl/archive/ cp -v ~/espresso-5.0.2/pseudo/* ~/espresso-5.0.2-mkl/pseudo/ cp -v ~/sources/espresso-5.0.2-5.0.3.diff ~/espresso-5.0.2-mkl/ cd ~/espresso-5.0.2-mkl/ tar zxvf ~/sources/PHonon-5.0.2.tar.gz patch -p1 \u0026lt; espresso-5.0.2-5.0.3.diff ./configure --enable-parallel --with-scalapack CXX=icpc SCALAPACK_LIBS=\u0026quot;-lmkl_scalapack_lp64 -lmkl_blacs_openmpi_lp64\u0026quot; BLAS_LIBS=\u0026quot;-L/home/\u0026lt;user\u0026gt;/intel/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core\u0026quot; LAPACK_LIBS=\u0026quot;-L/home/\u0026lt;user\u0026gt;/intel/mkl/lib/intel64 -lmkl_lapack95_lp64\u0026quot; MPI_LIBS=\u0026quot;-L/home/\u0026lt;user\u0026gt;/intel/mkl/lib/intel64 -lmkl_blacs_openmpi_lp64\u0026quot; FFT_LIBS=\u0026quot;-L/home/\u0026lt;user\u0026gt;/fftw3x_cdft-install -lfftw3x_cdft_lp64\u0026quot; FCFLAGS=\u0026quot;-O2 -xavx\u0026quot; CFLAGS=\u0026quot;-O2 -xavx\u0026quot; FFLAGS=\u0026quot;-O2 -xavx\u0026quot; 2\u0026gt;\u0026amp;1 | tee c.txt make all 2\u0026gt;\u0026amp;1 | tee m.txt cd PW/tests ./check.pw.j If you do not have previous Quantum Espresso installation, don\u0026rsquo;t worry, the installer and test program will automatically download required files for you. When you compare between Quantum Espresso installation with internal libraries and Quantum Espresso with Intel MKL libraries, you can expect 25% speed up. Good luck!\n","date":"Feb 19, 2014","excerpt":"Quantum Espresso is a software for electronic-structure calculations and materials modeling at the nanoscale. The installation of Quantum Espresso is quite easy because it includes external libraries which it needs. But we are encouraged to install Quantum Espresso using our own machine optimized external libraries such as Basic Linear Algebra Subprograms (BLAS), Linear Algebra Package (LAPACK), Scalable LAPACK (SCALAPACK), and Fastest Fourier Transform in the West (FFTW).\nExternal Libraries There are several repositories or development teams which provide external libraries. For example is Netlib which provides BLAS, LAPACK, and SCALAPACK. But, for machines with Intel processor, maybe the best external libraries out there is Intel® Math Kernel Library which has a non-commercial version as standalone or included in Intel® Parallel Studio XE 2013 for Linux that can be downloaded in Intel Non-Commercial Software Development. Intel® Math Kernel Library provides BLAS, LAPACK, SCALAPACK, and even FFTW interfaces.\n...","permalink":"http://blog.pras.my.id/blogs/2014-02-19-quantum-espresso-5-0-3-using-intel-math-kernel-library-11-0-optimization/","readtime":"15 min read","summary":"\u003cp\u003e\u003ca href=\"http://www.quantum-espresso.org/\"\u003eQuantum Espresso\u003c/a\u003e is a software for electronic-structure calculations and materials modeling at the nanoscale. The installation of Quantum Espresso is quite easy because it includes external libraries which it needs. But we are encouraged to install Quantum Espresso using our own machine optimized external libraries such as \u003ca href=\"http://en.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms\"\u003eBasic Linear Algebra Subprograms (BLAS)\u003c/a\u003e, \u003ca href=\"http://en.wikipedia.org/wiki/LAPACK\"\u003eLinear Algebra Package (LAPACK)\u003c/a\u003e, \u003ca href=\"http://en.wikipedia.org/wiki/ScaLAPACK\"\u003eScalable LAPACK (SCALAPACK)\u003c/a\u003e, and \u003ca href=\"http://en.wikipedia.org/wiki/FFTW\"\u003eFastest Fourier Transform in the West (FFTW)\u003c/a\u003e.\u003c/p\u003e\n\u003ch2 id=\"external-libraries\"\u003eExternal Libraries\u003c/h2\u003e\n\u003cp\u003eThere are several repositories or development teams which provide external libraries. For example is \u003ca href=\"http://netlib.org/\"\u003eNetlib\u003c/a\u003e which provides \u003ca href=\"http://netlib.org/blas/\"\u003eBLAS\u003c/a\u003e, \u003ca href=\"http://netlib.org/lapack/\"\u003eLAPACK\u003c/a\u003e, and \u003ca href=\"http://netlib.org/scalapack/\"\u003eSCALAPACK\u003c/a\u003e. But, for machines with Intel processor, maybe the best external libraries out there is \u003ca href=\"http://software.intel.com/en-us/intel-mkl\"\u003eIntel® Math Kernel Library\u003c/a\u003e which has a non-commercial version as standalone or included in Intel® Parallel Studio XE 2013 for Linux that can be downloaded in \u003ca href=\"http://software.intel.com/en-us/non-commercial-software-development\"\u003eIntel Non-Commercial Software Development\u003c/a\u003e. Intel® Math Kernel Library provides BLAS, LAPACK, SCALAPACK, and even FFTW interfaces.\u003c/p\u003e","tags":["computational","material"],"title":"Quantum Espresso 5.0.3 Using Intel Math Kernel Library 11.0 Optimization"},{"content":"Icinga is a well-known server or network monitoring that runs in many Unix/Linux distribution. Server/Network monitoring is an essential part of Network Operations Center because by monitoring network engineers can always get the feedback and status from network and production servers. This is a simple documentation of Icinga installation in Scientific Linux 6.4 server.\nGetting started Before we install icinga, it best to keep our system updated.\n# yum update Search icinga package using yum search in RPMForge repository.\n# yum --enablerepo=rpmforge search icinga Loaded plugins: priorities, refresh-packagekit, security =============================== N/S Matched: icinga ============================== icinga-api.x86_64 : PHP api for icinga icinga-devel.x86_64 : Provides include files that Icinga-related applications may compile against icinga-doc.x86_64 : documentation icinga icinga-gui.x86_64 : Web content for icinga icinga-idoutils.x86_64 : database broker module for icinga icinga-idoutils-libdbi-mysql.x86_64 : database broker module for icinga icinga-idoutils-libdbi-pgsql.x86_64 : database broker module for icinga icinga-web-module-pnp.noarch : PNP Integration module for Icinga Web icinga.x86_64 : Open Source host, service and network monitoring program icinga-web.noarch : Open Source host, service and network monitoring Web UI nagios-plugins.x86_64 : Host/service/network monitoring program plugins for Nagios/Icinga nagios-plugins-setuid.x86_64 : Host/service/network monitoring program plugins for Nagios/Icinga requiring setuid Name and summary matches only, use \u0026quot;search all\u0026quot; for everything. Install icinga and the dependencies.\n# yum --enablerepo=rpmforge install icinga icinga-gui icinga-doc icinga-idoutils-libdbi-mysql # yum install mysql-server mysql-client libdbi libdbi-devel libdbi-drivers libdbi-dbd-mysql Create database for icinga.\n# mysql -uroot -p mysql\u0026gt; CREATE DATABASE icinga; mysql\u0026gt; GRANT USAGE ON icinga.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0; mysql\u0026gt; GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga.* TO 'icinga'@'localhost'; mysql\u0026gt; FLUSH PRIVILEGES; mysql\u0026gt; quit After we create database for icinga, import the database template to icinga database.\n# mysql -uicinga -p icinga \u0026lt; /usr/share/doc/icinga-idoutils-libdbi-mysql-1.8.4/db/mysql/mysql.sql Don\u0026rsquo;t forget to disable Selinux if you do not use it. Insert database credential into file ido2db.cfg.\n# vi /etc/icinga/ido2db.cfg db_name=icinga db_user=icinga db_pass=icinga Now we can start icinga and don\u0026rsquo;t forget to start ido2db too.\n# /etc/rc.d/init.d/ido2db start # /etc/rc.d/init.d/icinga start # /etc/rc.d/init.d/httpd restart # chkconfig ido2db on # chkconfig icinga on Add icinga user or update password of existing one using command below.\n# htpasswd /etc/icinga/passwd youradmin Testing Icinga We can now access icinga via this URL on browser.\nhttp://yourdomain/icinga Review the status and fix errors if any. Now you have your own icinga up and running. Congrats!\n","date":"Feb 12, 2014","excerpt":"Icinga is a well-known server or network monitoring that runs in many Unix/Linux distribution. Server/Network monitoring is an essential part of Network Operations Center because by monitoring network engineers can always get the feedback and status from network and production servers. This is a simple documentation of Icinga installation in Scientific Linux 6.4 server.\nGetting started Before we install icinga, it best to keep our system updated.\n# yum update Search icinga package using yum search in RPMForge repository.\n...","permalink":"http://blog.pras.my.id/blogs/2014-02-12-installing-icinga-on-scientific-linux-6-4/","readtime":"2 min read","summary":"\u003cp\u003e\u003ca href=\"https://www.icinga.org/\"\u003eIcinga\u003c/a\u003e is a well-known server or \u003ca href=\"http://en.wikipedia.org/wiki/Network_monitoring\"\u003enetwork monitoring\u003c/a\u003e that runs in many Unix/Linux distribution. Server/Network monitoring is an essential part of \u003ca href=\"http://en.wikipedia.org/wiki/Network_operations_center\"\u003eNetwork Operations Center\u003c/a\u003e because by monitoring network engineers can always get the feedback and status from network and production servers. This is a simple documentation of Icinga installation in Scientific Linux 6.4 server.\u003c/p\u003e\n\u003ch2 id=\"getting-started\"\u003eGetting started\u003c/h2\u003e\n\u003cp\u003eBefore we install icinga, it best to keep our system updated.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# yum update\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eSearch icinga package using \u003cstrong\u003eyum search\u003c/strong\u003e in \u003cem\u003eRPMForge\u003c/em\u003e repository.\u003c/p\u003e","tags":["sysadmin"],"title":"Installing Icinga on Scientific Linux 6.4"},{"content":"Cacti is a network graphic monitoring tools which used the potential of RRDTool. RRDTool is a data logging and graphing system for time series data. Cacti can show us a real time performance of network or servers which make this software become one of the most popular open source monitoring software. Getting Started Always update your box before we install new software.\n# yum update Install dependencies for cacti.\n# yum install mysql-server mysql php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-snmp php-pear-Net-SMTP php-mysql httpd Then create database for cacti.\n# mysql -uroot -p mysql\u0026gt; create database cacti; mysql\u0026gt; grant all privileges on cacti.* to cacti@localhost identified by 'password'; mysql\u0026gt; flush privileges; mysql\u0026gt; quit Install SNMPD Install net-snmpd.\n# yum install net-snmp-utils php-snmp net-snmp-libs Edit net-snmpd config file snmpd.conf.\n# vi /etc/snmp/snmpd.conf com2sec local localhost public group MyRWGroup v1 local group MyRWGroup v2c local group MyRWGroup usm local view all included .1 80 access MyRWGroup \u0026quot;\u0026quot; any noauth exact all all none syslocation Unknown (edit /etc/snmp/snmpd.conf) syscontact Root (configure /etc/snmp/snmp.local.conf) pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat Start snmpd.\n# /etc/init.d/snmpd start # chkconfig snmpd on Install Cacti Install cacti from EPEL Repository.\n# yum --enablrepo=epel install cacti Import cacti database.\n# mysql -ucacti -p cacti \u0026lt; /usr/share/doc/cacti-*version*/cacti.sql Then edit cacti configuration file db.php\n# vi /etc/cacti/db.php $database_type = \u0026quot;mysql\u0026quot;; $database_default = \u0026quot;cacti\u0026quot;; $database_hostname = \u0026quot;localhost\u0026quot;; $database_username = \u0026quot;cacti\u0026quot;; $database_password = \u0026quot;password\u0026quot;; $database_port = \u0026quot;3306\u0026quot;; Configure cacti httpd configuration to allow cacti in your network.\n# vi /etc/httpd/conf.d/cacti.conf Allow from 192.168.45.0/24 Restart httpd.\n# service httpd restart Uncomment cacti cronjob in cron directory.\n# vi /etc/cron.d/cacti */5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php \u0026gt; /dev/null 2\u0026gt;\u0026amp;1 Then, run cacti installer by opening your cacti URL in web browser.\nhttp://yourdomain/cacti Follow the instruction and wait several moment while cacti gather the data from log files. Log in to cacti and check your graph.\nReference http://www.cyberciti.biz/faq/fedora-rhel-install-cacti-monitoring-rrd-software/\n","date":"Feb 12, 2014","excerpt":"Cacti is a network graphic monitoring tools which used the potential of RRDTool. RRDTool is a data logging and graphing system for time series data. Cacti can show us a real time performance of network or servers which make this software become one of the most popular open source monitoring software. Getting Started Always update your box before we install new software.\n# yum update Install dependencies for cacti.\n...","permalink":"http://blog.pras.my.id/blogs/2014-02-12-installing-cacti-on-scientific-linux-6-4/","readtime":"2 min read","summary":"\u003cp\u003e\u003ca href=\"http://www.cacti.net/\"\u003eCacti\u003c/a\u003e is a network graphic monitoring tools which used the potential of \u003ca href=\"http://oss.oetiker.ch/rrdtool/\"\u003eRRDTool\u003c/a\u003e. RRDTool is a data logging and graphing system for time series data. Cacti can show us a real time performance of network or servers which make this software become one of the most popular open source monitoring software.\n\u003cimg alt=\"Cacti Logo\" loading=\"lazy\" src=\"https://www.cacti.net/images/cacti_banner.png\"\u003e\u003c/p\u003e\n\u003ch2 id=\"getting-started\"\u003eGetting Started\u003c/h2\u003e\n\u003cp\u003eAlways update your box before we install new software.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# yum update\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eInstall dependencies for cacti.\u003c/p\u003e","tags":["sysadmin"],"title":"Installing Cacti on Scientific Linux 6.4"},{"content":"Hello, I want to share a documentation how to setup a mail server using CentOS 6.5 using Postfix as SMTP server and Dovecot as IMAP/POP3 server. Postfix is a well known Message Transfer Agent that mostly used today and Dovecot is also one of the widely used Mail User Agent.\nPreparing The Machine In this documentation we use a CentOS 6.5 server and before we start, let\u0026rsquo;s update the system.\n# yum update A mail server needs to have a MX record in its DNS, so make sure we have that. It is also a good thing to set the PTR record pointing to our domain too.\n# dig server.net -t ANY ;; ANSWER SECTION: server.net. 86312 IN MX 10 mail.server.net. server.net. 86306 IN A 192.168.45.32 server.net. 80528 IN NS ns2.server.net. server.net. 80528 IN NS ns1.server.net. Installing Postfix Then install Postfix using yum if it\u0026rsquo;s not already installed.\n# yum install postfix Edit Postfix configuration file main.cf,\n# vi /etc/postfix/main.cf This is a standard configuration,\nqueue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix mail_owner = postfix myhostname = mail.server.net myorigin = $mydomain inet_interfaces = all inet_protocols = ipv4 mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain unknown_local_recipient_reject_code = 550 alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases home_mailbox = Maildir/ smtpd_banner = $myhostname ESMTP debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id \u0026amp; sleep 5 sendmail_path = /usr/sbin/sendmail.postfix newaliases_path = /usr/bin/newaliases.postfix mailq_path = /usr/bin/mailq.postfix setgid_group = postdrop html_directory = no manpage_directory = /usr/share/man sample_directory = /usr/share/doc/postfix-2.6.6/samples readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES # SASL configuration smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous smtpd_sasl_local_domain = $myhostname smtpd_client_restrictions = permit_mynetworks, reject_unknown_client, permit smtpd_recipient_restrictions = permit_mynetworks, permit_auth_destination, permit_sasl_authenticated, reject # TLS configuration smtpd_use_tls = yes smtpd_tls_key_file = /etc/pki/tls/private/ssl.key smtpd_tls_cert_file = /etc/pki/tls/cert/ssl.crt smtpd_tls_loglevel = 3 smtpd_tls_received_header = yes smtpd_tls_session_cache_timeout = 3600s tls_random_source = dev:/dev/urandom Restart Postfix,\n# service postfix restart Installing Dovecot Install Dovecot using yum,\n# yum install dovecot Edit Dovecot configuration file dovecot.conf,\n# vi /etc/dovecot/dovecot.conf protocols = imap pop3 listen = * dict { } !include conf.d/*.conf Edit 10-auth.conf,\n# vi /etc/dovecot/conf.d/10-auth.conf disable_plaintext_auth = no auth_mechanisms = plain login !include auth-system.conf.ext Edit 10-mail.conf,\n# vi /etc/dovecot/conf.d/10-mail.conf mail_location = maildir:~/Maildir mbox_write_locks = fcntl Edit 10-master.conf,\n# vi /etc/dovecot/conf.d/10-master.conf service imap-login { inet_listener imap { } inet_listener imaps { } } service pop3-login { inet_listener pop3 { } inet_listener pop3s { } } service lmtp { unix_listener lmtp { } } service imap { } service pop3 { } service auth { unix_listener auth-userdb { } unix_listener /var/spool/postfix/private/auth { mode = 0666 user = postfix group = postfix } } service auth-worker { } service dict { unix_listener dict { } } Edit 10-ssl.conf,\n# vi /etc/dovecot/conf.d/10-ssl.conf ssl = yes ssl_cert = \u0026lt;/etc/pki/tls/cert/ssl.crt ssl_key = \u0026lt;/etc/pki/tls/private/ssl.key Start Dovecot,\n# service dovecot start # chkconfig dovecot on Testing Installation Test your Postfix installation by sending a message using our newly installed server. Use telnet on your mail server on port 25.\n$ telnet mail.server.net 25 Trying 192.168.45.32... Connected to mail.server.net. Escape character is '^]'. 220 mail.server.net ESMTP EHLO mail.server.net 250-mail.server.net 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS 250-AUTH PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN MAIL FROM: \u0026lt;admin@server.net\u0026gt; 250 2.1.0 Ok RCPT TO: \u0026lt;user@gmail.com\u0026gt; 250 2.1.5 Ok DATA 354 End data with \u0026lt;CR\u0026gt;\u0026lt;LF\u0026gt;.\u0026lt;CR\u0026gt;\u0026lt;LF\u0026gt; From: Administrator \u0026lt;admin@server.net\u0026gt; To: User \u0026lt;user@gmail.com\u0026gt; Subject: Test Mail Server Test Mail Server . 250 2.0.0 Ok: queued as 54549110F Check your Gmail inbox to see if the message sent successfully. Then check Dovecot using telnet on your mail server on port 143.\n$ telnet mail.server.net 143 Trying 192.168.45.32... Connected to mail.server.net. Escape character is '^]'. * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready. aa login user password aa OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in ab select INBOX * FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft $Forwarded) * OK [PERMANENTFLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft $Forwarded \\*)] Flags permitted. * 0 EXISTS * 0 RECENT * OK [UIDVALIDITY 1390092598] UIDs valid * OK [UIDNEXT 7] Predicted next UID * OK [HIGHESTMODSEQ 1] Highest ab OK [READ-WRITE] Select completed. ac logout * BYE Logging out ac OK Logout completed. Connection closed by foreign host. Congratulation! Now you have a working SMTP and IMAP/POP3 server! :D\n","date":"Feb 9, 2014","excerpt":"Hello, I want to share a documentation how to setup a mail server using CentOS 6.5 using Postfix as SMTP server and Dovecot as IMAP/POP3 server. Postfix is a well known Message Transfer Agent that mostly used today and Dovecot is also one of the widely used Mail User Agent.\nPreparing The Machine In this documentation we use a CentOS 6.5 server and before we start, let’s update the system.\n# yum update A mail server needs to have a MX record in its DNS, so make sure we have that. It is also a good thing to set the PTR record pointing to our domain too.\n...","permalink":"http://blog.pras.my.id/blogs/2014-02-09-installing-postfix-and-dovecot-on-centos-6-5/","readtime":"4 min read","summary":"\u003cp\u003eHello, I want to share a documentation how to setup a mail server using CentOS 6.5 using \u003ca href=\"http://www.postfix.org/\"\u003ePostfix\u003c/a\u003e as \u003ca href=\"http://tools.ietf.org/html/rfc5321\"\u003eSMTP\u003c/a\u003e server and \u003ca href=\"http://www.dovecot.org/\"\u003eDovecot\u003c/a\u003e as \u003ca href=\"http://tools.ietf.org/html/rfc3501\"\u003eIMAP\u003c/a\u003e/\u003ca href=\"http://tools.ietf.org/html/rfc1939\"\u003ePOP3\u003c/a\u003e server. Postfix is a well known \u003ca href=\"http://en.wikipedia.org/wiki/Message_transfer_agent\"\u003eMessage Transfer Agent\u003c/a\u003e that mostly used today and Dovecot is also one of the widely used \u003ca href=\"http://en.wikipedia.org/wiki/Email_client\"\u003eMail User Agent\u003c/a\u003e.\u003c/p\u003e\n\u003ch2 id=\"preparing-the-machine\"\u003ePreparing The Machine\u003c/h2\u003e\n\u003cp\u003eIn this documentation we use a CentOS 6.5 server and before we start, let\u0026rsquo;s update the system.\u003c/p\u003e\n\u003cpre\u003e\u003ccode\u003e# yum update\n\u003c/code\u003e\u003c/pre\u003e\n\u003cp\u003eA mail server needs to have a MX record in its DNS, so make sure we have that. It is also a good thing to set the PTR record pointing to our domain too.\u003c/p\u003e","tags":["sysadmin"],"title":"Installing Postfix and Dovecot on CentOS 6.5"},{"content":"CentOS community now works together with Redhat alongside Fedora. It\u0026rsquo;s good news. So, we can hope to get a better software and support for next release of our beloved CentOS. As one of Linux (CentOS) fan, I want to share my experience installing nginx (engine-x) in CentOS 6.5. My VPS was installed as minimal server and then I added new packages, such as \u0026ldquo;Development tools\u0026rdquo; group and new repos (EPEL, CentALT).\nin CentOS 6.5\nFirst thing that I usually do before doing something is researching, usually. So, before I install nginx, I searched for tutorials and I found one in http://www.howtoforge.com/installing-nginx-with-php5-and-php-fpm-and-mysql-support-on-ubuntu-11.10. But, it is for Ubuntu and with MySQL which we not really need, yet. It is okay, because this is the fun part. We get to find the right configuration for our Linux distros.\nThe easiest way to install a package in CentOS (or every Linux distro) is using package manager, like yum. So, I searched http://pkgs.org to find any nginx package for CentOS and I found the latest stable nginx in CentALT repository.\n# yum --enablerepo=CentALT install nginx-stable # /etc/rc.d/init.d/nginx start Open a browser and open our web server. Voila!\nWe got a running nginx on CentOS. But, it is not everything yet. Now, we will make our nginx run PHP so we install php-fpm, a FastCGI Process Manager.\n# yum install php-fpm # /etc/rc.d/init.d/php-fpm start The **php-fpm** daemon will start at localhost on port 9000. The nginx configuration is easy to understand and available at http://wiki.codemongers.com/NginxFullExample and http://wiki.codemongers.com/NginxFullExample2. Then, to make nginx can execute PHP files, we need to make some changes in nginx configuration file /etc/nginx/nginx.conf\n# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \\.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } Reload nginx.\n# /etc/rc.d/init.d/nginx reload To test if the FastCGI server works, create the following PHP file in document root.\n\u0026lt;?php phpinfo(); ?\u0026gt; Save file as info.php and call that file in a browser.\nIf it\u0026rsquo;s showing the PHP information, our installation is running nicely.\n","date":"Feb 9, 2014","excerpt":"CentOS community now works together with Redhat alongside Fedora. It’s good news. So, we can hope to get a better software and support for next release of our beloved CentOS. As one of Linux (CentOS) fan, I want to share my experience installing nginx (engine-x) in CentOS 6.5. My VPS was installed as minimal server and then I added new packages, such as “Development tools” group and new repos (EPEL, CentALT).\n...","permalink":"http://blog.pras.my.id/blogs/2014-02-09-installing-nginx-on-centos-6-5/","readtime":"2 min read","summary":"\u003cp\u003eCentOS community now works together with Redhat alongside Fedora. It\u0026rsquo;s good\nnews. So, we can hope to get a better software and support for next release of\nour beloved CentOS. As one of Linux (CentOS) fan, I want to share my experience\ninstalling nginx (engine-x) in CentOS 6.5. My VPS was installed as minimal\nserver and then I added new packages, such as \u0026ldquo;Development tools\u0026rdquo; group and new\nrepos (EPEL, CentALT).\u003c/p\u003e","tags":["sysadmin"],"title":"Installing Nginx on CentOS 6.5"},{"content":"When we rent a VPS, we will get a public IP address so we can access our VPS from anywhere in this world. But, sometimes we want a better way to access our VPS using Domain Name. We will have to rent a domain name from a Domain Name Registrar and then set up our Name server so that our domain name refer to our IP address. There is usually an easier way by using our registrar control panel to set up NS records. But, if you still want to set up your own Name server, I hope this documentation will be useful for you.\nBIND Name Server BIND or Berkeley Internet Domain Name is open source software that implements the Domain Name System protocols. This is a documentation of installing BIND on CentOS 6.5 operating system.\nGetting Started Before we install BIND, or another software, always upgrade our system first.\n# yum updateInstall BIND using yum.\n# yum install bind bind-utilsUse this if you don\u0026rsquo;t use IPv6.\n# echo \u0026#39;OPTIONS = \u0026#34;4\u0026#34;\u0026#39; \u0026gt;\u0026gt; /etc/sysconfig/namedEdit file named.conf.\n# vi /etc/named.conf options { listen-on-v6 port 53 { none; }; directory \u0026#34;/var/named\u0026#34;; dump-file \u0026#34;/var/named/data/cache_dump.db\u0026#34;; statistics-file \u0026#34;/var/named/data/named_stats.txt\u0026#34;; memstatistics-file \u0026#34;/var/named/data/named_mem_stats.txt\u0026#34;; allow-query { any; }; allow-transfer { localhost; }; recursion no; dnssec-enable yes; dnssec-validation yes; dnssec-lookaside auto; /* Path to ISC DLV key */ bindkeys-file \u0026#34;/etc/named.iscdlv.key\u0026#34;; managed-keys-directory \u0026#34;/var/named/dynamic\u0026#34;; }; logging { channel default_debug { file \u0026#34;data/named.run\u0026#34;; severity dynamic; }; }; zone \u0026#34;.\u0026#34; IN { type hint; file \u0026#34;named.ca\u0026#34;; }; zone \u0026#34;server.net\u0026#34; { type master; file \u0026#34;/etc/server.net.hosts\u0026#34;; allow-update { none; }; }; zone \u0026#34;45.168.192.in-addr.arpa\u0026#34; IN { type master; file \u0026#34;/etc/45.168.192.db\u0026#34;; allow-update { none; }; }; include \u0026#34;/etc/named.rfc1912.zones\u0026#34;; include \u0026#34;/etc/named.root.key\u0026#34;;Configure zone server.net.hosts.\n# vi /etc/server.net.hosts $TTL 86400 @ IN SOA ns1.server.net. server.server.net. ( 2014011807 ;serial, todays date + todays serial 28800 ;refresh, seconds 7200 ;retry, seconds 604800 ;expire, seconds 86400 ;minimum, seconds; ) server.net. NS ns1.server.net. server.net. NS ns2.server.net. ns1 A 192.168.45.32 ns2 A 192.168.45.32 server A 192.168.45.32 mail A 192.168.45.32 server.net. A 192.168.45.32 MX 10 mail.server.net. www A 192.168.45.32Configure reverse 45.168.192.db.\n# vi /etc/45.168.192.db $TTL 86400 @ IN SOA ns1.server.net. server.server.net. ( 2014011807 ;serial, todays date + todays serial # 28800 ;refresh, seconds 7200 ;retry, seconds 604800 ;expire, seconds 86400 ;minimum, seconds; ) 45.168.192.in-addr.arpa. IN NS ns1.server.net. 45.168.192.in-addr.arpa. IN NS ns2.server.net. 32 IN PTR deuterion.net.Start BIND.\n# service named start # chkconfig named onFor PTR record, if you are having difficulties to set the PTR record in your NS server (the IP still does not point to your domain name), ask your registrar to configure it for you.\nTesting NS Server Change your DNS resolver to your NS server.\n# vi /etc/resolv.conf nameserver 192.168.45.32Try to resolve domain names and IP address.\n# dig server.net ; \u0026lt;\u0026lt;\u0026gt;\u0026gt; DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.el6_5.1 \u0026lt;\u0026lt;\u0026gt;\u0026gt; @192.168.45.32 server.net ; (1 server found) ;; global options: +cmd ;; Got answer: ;; -\u0026gt;\u0026gt;HEADER\u0026lt;\u0026lt;- opcode: QUERY, status: NOERROR, id: 35404 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; WARNING: recursion requested but not available ;; QUESTION SECTION: ;server.net. IN A ;; ANSWER SECTION: server.net. 86400 IN A 192.168.45.32 ;; AUTHORITY SECTION: server.net. 86400 IN NS ns2.server.net. server.net. 86400 IN NS ns1.server.net. ;; ADDITIONAL SECTION: ns1.server.net. 86400 IN A 192.168.45.32 ns2.server.net. 86400 IN A 192.168.45.32 ;; Query time: 0 msec ;; SERVER: 192.168.45.32#53(192.168.45.32) ;; WHEN: Sun Feb 9 21:10:38 2014 ;; MSG SIZE rcvd: 115 # dig -x 192.168.45.32 ; \u0026lt;\u0026lt;\u0026gt;\u0026gt; DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.el6_5.1 \u0026lt;\u0026lt;\u0026gt;\u0026gt; @192.168.45.32 -x 192.168.45.32 ; (1 server found) ;; global options: +cmd ;; Got answer: ;; -\u0026gt;\u0026gt;HEADER\u0026lt;\u0026lt;- opcode: QUERY, status: NOERROR, id: 50675 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; WARNING: recursion requested but not available ;; QUESTION SECTION: ;32.45.168.192.in-addr.arpa. IN PTR ;; ANSWER SECTION: 32.45.168.192.in-addr.arpa. 86400 IN PTR server.net. ;; AUTHORITY SECTION: 45.168.192.in-addr.arpa. 86400 IN NS ns1.server.net. 45.168.192.in-addr.arpa. 86400 IN NS ns2.server.net. ;; ADDITIONAL SECTION: ns1.server.net. 86400 IN A 192.168.45.32 ns2.server.net. 86400 IN A 192.168.45.32 ;; Query time: 0 msec ;; SERVER: 192.168.45.32#53(192.168.45.32) ;; WHEN: Sun Feb 9 21:13:23 2014 ;; MSG SIZE rcvd: 140That\u0026rsquo;s all, we have a working NS server.\n","date":"Feb 9, 2014","excerpt":"When we rent a VPS, we will get a public IP address so we can access our VPS from anywhere in this world. But, sometimes we want a better way to access our VPS using Domain Name. We will have to rent a domain name from a Domain Name Registrar and then set up our Name server so that our domain name refer to our IP address. There is usually an easier way by using our registrar control panel to set up NS records. But, if you still want to set up your own Name server, I hope this documentation will be useful for you.\n...","permalink":"http://blog.pras.my.id/blogs/2014-02-09-installing-bind-dns-server-on-centos-6-5/","readtime":"4 min read","summary":"\u003cp\u003eWhen we rent a \u003ca href=\"http://en.wikipedia.org/wiki/Virtual_private_server\"\u003eVPS\u003c/a\u003e, we\nwill get a public \u003ca href=\"http://en.wikipedia.org/wiki/IP_address\"\u003eIP address\u003c/a\u003e so we\ncan access our VPS from anywhere in this world. But, sometimes we want a better\nway to access our VPS using \u003ca href=\"http://en.wikipedia.org/wiki/Domain_name\"\u003eDomain\nName\u003c/a\u003e. We will have to rent a domain\nname from a \u003ca href=\"http://en.wikipedia.org/wiki/Domain_name_registrar\"\u003eDomain Name\nRegistrar\u003c/a\u003e and then set up\nour \u003ca href=\"http://en.wikipedia.org/wiki/Name_server\"\u003eName server\u003c/a\u003e so that our domain\nname refer to our IP address. There is usually an easier way by using our\nregistrar control panel to set up \u003ca href=\"http://en.wikipedia.org/wiki/List_of_DNS_record_types\"\u003eNS\nrecords\u003c/a\u003e. But, if you\nstill want to set up your own Name server, I hope this documentation will be\nuseful for you.\u003c/p\u003e","tags":["sysadmin"],"title":"Installing BIND DNS Server on CentOS 6.5"},{"content":"I have reached the eight semester in my undergraduate study and it means this semester I have to finish a final project (Tugas Akhir, ID) as a requirement to graduate. Actually I don\u0026rsquo;t really into my final project\u0026rsquo;s topic. There are many factors behind it. In the new curriculum, my department decide to give a final project to a team consist of two students. This is a good news because the possibility of student who will graduate is increased. But, this is somewhat a setback for me. I don\u0026rsquo;t usually work in a team and for my final project I want to do a final project which is a original, only for me, my own final project. The requirement that a final project must be done by a team makes me don\u0026rsquo;t feel that this is really my own final project.\nI often consider myself as a \u0026ldquo;lone wolf\u0026rdquo; and my skills and interests differ far from those in my department. For example, when most of students in my department have interest in control and instrumentation engineering or building engineering, my interest is in computation and materials engineering. Fortunately, I still like to get along well with my friends and I still can consider myself as an \u0026ldquo;activist\u0026rdquo; in my campus although my skills make me more suitable as nerd, and yes, I am starting to think that I am more nerd right now.\nMy department? My department is Engineering Physics, a cool name, isn\u0026rsquo;t it? But, I still don\u0026rsquo;t know for clear what is the goal and the purpose of my own department. Some say that the core of my department is control and instrumentation engineering or building engineering. Some say that the core of my department is to measure or in instrumentation. Actually those definitions is a total demotivation because I think I do not fall into group of people who think like that.\nBut, I got some enlightenment this morning from one of my teacher. His opinion in my department makes me understand what role my department holds and my skill is not a waste in my department. They talk about control, instrumentation, or anything but the real thing is beyond that. We exist because world needs some guys who can control the physics phenomenons so people from other departments can use the phenomenons in their field effectively and in the process of controlling those phenomenons there is an act of measuring, instrumentation. Moreover, my department also involved in designing the whole system, we exist in every part in the system which interact with physical world.\nSay some people from materials engineering want to process a material into something. For that purpose they need a spesific environment (temperature, pressure, etc.) or specific material. Who is responsible in creating such environment or preparing those specific (or special) material? Us. Say people from mining engineering want to explore new resources using ground signal sensor. Who is responsible in providing the sensor which suits the needs of people in mining engineering? Us. We are responsible, because if it\u0026rsquo;s not us, who else will?\nMy lab? My lab is Computational Materials Design, you hear the name. Maybe you think that this lab is suitable for me, isn\u0026rsquo;t. Not really, I still do not really into this. I don\u0026rsquo;t know why, this lab is my dream. But, maybe this is because the setbacks from my final project earlier. This lab is more research than engineering, actually. Here we calculate to define the properties of material we set in specific configuration and because of that this lab is somehow not really get along with the purpose of my department. Although my department needs this lab.\nThis lab\u0026rsquo;s work is to compute and for that it needs computer, a lot of computers, with high performance. But, for this small lab, only a few of HPC (High Performance Computer) available, and sadly, not configured optimally. I am just newbie here so I still don\u0026rsquo;t really know how this lab works and what will I really do. But I can say that the people in this lab is amazing. Their works are amazing too. They often go to abroad to attend international conference or something and get a chance to meet people from abroad. They often get offering to continue their study in Japan, Europe, or USA.\nBut still, it is really hard to start working. As the last person who enter this lab for this period, I often wonder how can I close the gap in knowledge and skill between mine and people who enters first. Moreover, I already have a job, and a hobby, in network engineering and administration. Although that boost my potential in computation field, it\u0026rsquo;s no use if I don\u0026rsquo;t know the theory and I do not like to be left behind. So, rather than struggling to study, I prefer to find a new field. So, my job now become my fall back, when I feel not motivated to study the theory. Honestly, this is what I feel now.\nNow, what? I don\u0026rsquo;t know. Tomorrow I have to give a presentation on my final project\u0026rsquo;s progress, when there is still no progress at all. This is only me anyway, I am the lazy one. Or maybe tonight I will try something new, trying to fing my dying motivation and revive it again. I think this is some kind of curse because I often compare myself with people around me and think low of myself.\nBut, someday I also want to say out loud that I am proud of what I really am. Not what people think of I am.\n","date":"Jan 19, 2014","excerpt":"I have reached the eight semester in my undergraduate study and it means this semester I have to finish a final project (Tugas Akhir, ID) as a requirement to graduate. Actually I don’t really into my final project’s topic. There are many factors behind it. In the new curriculum, my department decide to give a final project to a team consist of two students. This is a good news because the possibility of student who will graduate is increased. But, this is somewhat a setback for me. I don’t usually work in a team and for my final project I want to do a final project which is a original, only for me, my own final project. The requirement that a final project must be done by a team makes me don’t feel that this is really my own final project.\n...","permalink":"http://blog.pras.my.id/blogs/2014-01-19-final-project/","readtime":"5 min read","summary":"\u003cp\u003eI have reached the eight semester in my undergraduate study and it means this\nsemester I have to finish a final project (Tugas Akhir, ID) as a requirement to\ngraduate. Actually I don\u0026rsquo;t really into my final project\u0026rsquo;s topic. There are many\nfactors behind it. In the new curriculum, my department decide to give a final\nproject to a team consist of two students. This is a good news because the\npossibility of student who will graduate is increased. But, this is somewhat a\nsetback for me. I don\u0026rsquo;t usually work in a team and for my final project I want\nto do a final project which is a original, only for me, my own final project.\nThe requirement that a final project must be done by a team makes me don\u0026rsquo;t feel\nthat this is really my own final project.\u003c/p\u003e","tags":["university"],"title":"Final Project"},{"content":"Platform Engineer with over a decade of experience driving the evolution of high-scale platforms. I grew alongside a major Indonesian tech company from startup phase to public company, and I specialize in turning complex, manual legacy environments into automated, high-velocity GitOps platforms. My foundation is System Engineering plus a Master\u0026rsquo;s in Computational Science from Institut Teknologi Bandung. My focus is not only the tools, but the architectural standards and operational excellence needed to sustain long-term growth.\nTechnologies I\u0026rsquo;ve been working with recently: DevOps, GitOps, Kubernetes, Google Cloud Platform (GCP), Terraform, Linux.\nThis blog is where I write up what I build and break in my homelab.\nResume (PDF) GitHub, GitLab, LinkedIn Email: hello@pras.my.id ","date":"","excerpt":"Platform Engineer with over a decade of experience driving the evolution of high-scale platforms. I grew alongside a major Indonesian tech company from startup phase to public company, and I specialize in turning complex, manual legacy environments into automated, high-velocity GitOps platforms. My foundation is System Engineering plus a Master’s in Computational Science from Institut Teknologi Bandung. My focus is not only the tools, but the architectural standards and operational excellence needed to sustain long-term growth.\n...","permalink":"http://blog.pras.my.id/about/","readtime":"1 min read","summary":"\u003cp\u003ePlatform Engineer with over a decade of experience driving the\nevolution of high-scale platforms. I grew alongside a major Indonesian tech\ncompany from startup phase to public company, and I specialize in turning\ncomplex, manual legacy environments into automated, high-velocity GitOps\nplatforms. My foundation is System Engineering plus a Master\u0026rsquo;s in Computational\nScience from Institut Teknologi Bandung. My focus is not only the tools, but\nthe architectural standards and operational excellence needed to sustain\nlong-term growth.\u003c/p\u003e","tags":[],"title":"About"}]