Topic: Server Administration

Escapaing the system: Introduction to Proxies

If you ask me, most school and corporate policies on network monitoring and filtering are totalitarian and excessively pervasive. The Right is so concerned with silly traditional values and keeping objectionable content away from their vanilla-bland offspring that most corporations, by default, coerce their system administrators to violate one of the core guarantees of the Internet. A few weeks ago, three Chinese guys submitted a draft to the IETF. They proposed a laughable system in which each country controlled its own DNS namespace, so that each municipality had autonomy over the resolution of domain names for the sake of keeping up with the “fast development of the Internet” as if… go on →

Exploring HTTPS

Nobody will bother to hand you an introduction to HTTPS/SSL. Casual netizens recognize the green lock by the address bar well enough, but deeper technical knowledge can be inaccessible to programmers who are accustomed to a simple HTTP/1.1 transaction. Here’s what I’ve learned exploring HTTPS: Welcome. There, I said it. HTTP and it’s cousin HTTPS are just two of many communication protocols that are the application layer protocols. A protocol is nothing scary, just a set of rules. Other communication protocols include FTP, SMTP, OSCAR (for AIM), IRC, and Morse Code. They determine how two computer should exchange information with each other. A large part of this communication is actually… go on →

Fundamental Terminal Shortcuts

The linux command line interface is a powerful tool and a professional alternative to a graphical user interface. The keyboard shortcuts listed here are essential to using the terminal efficiently. In traditional computer documentation, the ^ symbol was used to indicate the Control Key. For example, ^C translated to Ctrl + C. ^C halts the current process. It can be used to interrupt a running process, stopping a server process, or getting a new terminal prompt to type on. ^D signals the End of File (EOF) character. It can be used to logout of a ssh or teletype (tty) session, to close a terminal window, to end a telnet session,… go on →

How Email is Sent

Email is an old-as-time standard. After dozens of published documents that altogether document the format, transmission, and access of email through email infrastructure, the email standard has been adopted across all age groups as the most professional and standard form of Internet communication today. They were officially known as ARPA Internet Text Messages, later called Electronic Mail Messages, and now colloquially known as email. Nearly all email today is sent and received either using a website interface such as Gmail or through one of several email clients. Email clients range from full-blown suites like Microsoft Office Outlook to mobile platforms on the iPhone. The program through which a human being… go on →

Understanding System Memory

Memory is one of the primary price-determining factors when buying server hardware or virtual server hosting. It is therefore important to monitor and understand memory usage. To get an overview of system memory usage, use the following: $ free -m The m switch tells free to display the numbers in terms of megabytes. Other possible options include b for bytes, k for kilobytes (default), and g for gigabytes. The first row lists total, used, and free physical memory. Physical memory refers to the memory that is provided by physical memory sticks on your machine, as opposed to virtual memory which is the space that your computer borrows from a long-term… go on →

Tools to Monitor Disk Usage

The linux command line provides several utilities to monitor disk usage. To see disk usage for each file system, use the following: $ df -Th The T flag tells df (disk free) to list the file system types. The h flag tells df to show the numbers with human-readable suffixes such as G for gigabyte and M for megabyte. To see the disk usage for a specific directory, use the following: $ du -hd1 The h flag again makes the numbers human-readable. The d flag tells du how detailed it should list per-directory folder sizes. A value of 1 tells du to list the size of the directory and its… go on →

Temperature and Fan Speed with lm-sensors

The following tutorial requires root terminal access. It also will not work on virtual servers, only on dedicated machines. This program lets you access temperature sensors and fan speed sensors on your system. Root access is required to detect the sensors, but not to read them. This will only work for systems running on bare metal, as opposed to a virtual server. Install the lm-sensors package with the following: $ sudo apt-get install lm-sensors Then, let sensors find which temperature sensors are available on your system with: $ sudo sensors-detect Accept the defaults to the prompts. If sensors-detect fails, check to make sure you are running as root and that… go on →

Using Telnet to Test TCP Services

The following introduction is based on telnet, a program that is found in virtually all computer systems. It does not require root privileges and can be run on a virtual machine over a terminal. Originally, telnet [host address] was used to remotely administrate servers over a network, but it was extremely insecure and has been replaced with ssh. Nonetheless, telnet is useful for quickly setting up TCP connections and testing out certain services. To connect to port 80 to test a web server, use the following: $ telnet syntaxionist.rogerhub.com 80 Output similar to the following will appear: Trying 50.116.11.45… Connected to syntaxionist.rogerhub.com. Escape character is ‘^]’. You have a couple… go on →

Introduction to Tar

The following introduction is based on tar, a program that is found in virtually all linux systems. It does not require root privileges and can be run on a virtual machine over a terminal. Copying a large number of files over ftp or sftp involves a lot of overhead because each file needs to be transferred and recreated separately. The linux command tar creates archives that condense a large number of files into one. By default, each file is appended to the end of the previous one, with an archive roughly the total size of the original files. To create an archive of a folder: $ tar cvf [archive name]… go on →

5 Useful Linux Administration Tools

sensors This program lets you access temperature sensors and fan speed sensors on your system. Root access is required to detect the sensors, but not to read them. This will only work for systems running on bare metal, as opposed to a virtual server. Install the lm-sensors package with the following: $ sudo apt-get install lm-sensors Then, let sensors find which temperature sensors are available on your system with: $ sudo sensors-detect Accept the defaults to the prompts. If sensors-detect fails, check to make sure you are running as root and that you are not running on a virtual machine. Then, get readings from the sensors with: $ sensors Reading… go on →

Rotate Rails Logs with logrotate

This technique requires root shell access. The logrotate program on linux servers handles rotation and compression of system logs. When logs get too big after being written to for a long time, logrotate will take the old log data and archive it somewhere else. By default, logrotate only watches system logs which are usually located in /var/log/. To rotate Rails logs, a bit of configuration is needed. Verify that the logrotate cron job (scheduled task) is enabled with the following: $ ls /etc/cron.daily Make sure logrotate is scheduled. The configuration file for logrotate is located at /etc/logrotate.conf. To enabled log rotation of Rails logs, open it up with your preferred… go on →