Sysadmins of the North (Page 11)

Technical SysOps blog, where topics include Sysadmin, DevOps, computers, servers, web, MySQL, database, virtualization, optimization and security

Tunnel RDP through SSH & PuTTY

How to tunnel Remote Desktop over SSH with PuTTY? Have you ever been in a situation where you needed to perform remote administration on a Windows Server, and the RDP port 3389 is blocked on a firewall? You can tunnel RDP over SSH with PuTTY. This particularly comes in handy when there is no VPN available to the remote network...

Read more...

Monitor Windows services with PowerShell

Schedule a PowerShell script to monitor local services in your Windows Server environment

PowerShell Get-FsrmQuota and Set-FsrmQuota

To get and set File Server Resource Manager NTFS quota you now have to use PowerShell FileServerResourceManager cmdlets. It's pretty easy to get directory information with Get-FsrmQuota and change dirquota.exe using Set-FsrmQuota.

Set IIS Application Pool recycle defaults to Specific Times, not Regular Time Interval

By default, an IIS application pool (or "AppPool") recycles on a regular time interval of 1740 minutes, or 29 hours. One reason for this time interval is that application pools don't recycle at the same moment every day (every day at 07.00 for example).

PHP 5.6 default_charset change may break HTML output

An important note for everyone who's upgrading from PHP 5.4 and PHP 5.5, to PHP 5.6. The PHP `default_charset` in php.ini changed from "empty" to UTF-8, making UTF-8 the default charset in PHP. This may break HTML output if you try to set a different charset in your HTML head. It may also break functions like htmlentities() and htmlspecialchars.

Turn off swap

Swapping is costly for disk I/O and not every Linux server needs to have a swap partition and to start swapping. For instance, MySQL servers have more than enough RAM available to do their work. Yet, when a swap partition is enabled Linux starts swapping, and that degrades MySQL database performance.

Read more...

Redirect HTTP to HTTPS

In this post I provide you various HTTP to HTTPS redirection methods, for Windows Server IIS and Linux Apache. Use these examples to your advantage to secure the traffic between your visitors and your website.

Software deployment through WDS

In my environment, I had to set up a new Windows Deployment Services (WDS) configuration for Windows 8.1 Enterprise. To roll out in our office (some 20+ workstations). I wanted to install some additional software at the same time, without using Microsoft Deployment Workbench, because I find the interface too slow. The solution? Read on...

Read more...

Monit monitoring on Ubuntu 14.04 VM on Hyper-V

In this post you'll learn about setting up a Monit monitoring service for your websites and services. Monit is a free and open source service monitoring application which can perform various event-based actions. Monit can send email notifications, restart a service or application, or take other responsive actions. We set Monit up on a Ubuntu 14.04 VM, built on Hyper-V. And we use Monit to monitor several websites, and send out notifications on downtime.

Read more...

Convert PHP ext/mysql to MySQLi

Migrating away from ext/mysql to MySQLi (or PHP Data Object ([PDO](http://php.net/pdo "PHP Data Objects"))) is important, because the ext/mysql functions are deprecated as of PHP 5.5.0. If you do not update your PHP code, your website will fail soon!

How to restore a deleted Open-Xchange context?

How to restore, or recover, an accidentally deleted OX context. If you've accidentally deleted an Open-Xchange context (contextid), then that is bad... Here is how to recover a deleted OX context and filestore... Assuming you make backups of course.

Read more...

PowerShell: find all files owned by a particular user

In Windows, you sometimes need to find all files owned by a specific user. Recursively on your Windows Server NTFS file system. PowerShell has some nice cmdlets and features to automate this task for you. Here you'll find example PowerShell scripts to find and list files owned by a specific user...

Read more...

How to play old games on Windows with DOSBox

PC retrogaming how-to for 64-bit Windows - and Linux! We all love old games. It's a nostalgia thing from when we played those really old games on our 286 (or older, like an MSX) computer, either using floppy disks or cassettes/cartridges. There is nothing much sysadmin about this, it’s all about FUN! You all remember Airborne Ranger, Operation Wolf, Blues Brothers, Gunboat and The Lost Vikings, right? …

Read more...

Disable WordPress comments (how-to)

With thousands spam reactions, disabling (-)and removing) WordPress comments is the only way to go. Here is how to disable WordPress comments in both the WordPress Dashboard interface and in your MySQL database.

Disk Cleanup in Windows Server

Over time, as your Windows Server runs longer, more and more disk space is eaten. Simply gone! Investigating the disk usage leaves you clueless; there are no large log files, crash dumps, or there is no software to be removed. Where did that space go?