Improving ssh/scp Performance by Choosing Suitable Ciphers

Posted on

Update on Oct. 9, 2014: You should be aware of the possible security problems of blowfish and it is suggested not to be used. Instead, you may consider ChaCha20 as suggested by Tony Arcieri. To use this with OpenSSH, you need to specify the Ciphers in your .ssh/config files as chacha20-poly1305@openssh.com possibly with another default
Read more

Accelerating WordPress with WP Super Cache, Opcache and Autoptimize

Posted on

WordPress can be very fast after some effort on performance optimization with the help from its plenty of plugins. Possible ways include using cache to cut down the number of database queries, improves HTML/JavaScript/CSS code, and optimizing PHP’s performance with opcode cache. In this post, we introduce how to speed up WordPress with OPcache, page
Read more

Making Emacs Start Up Faster

Posted on

I use Emacs in terminals and start/close Emacs frequently as needed like in a file checking-editing-closing loop. However, Emacs seems take some time to start up especially some heavy modes are used. How to make Emacs start up faster? (If you just want the solution/script first, find the command in the summary section.) My solution
Read more

Customizing Fonts in Gnome 3

Posted on

Gnome 3 is great and I can understand that it emphasizes on simplicity. However, the configuration settings for Gnome 3 does not provide tools for certain functions that I need. One of them is customizing the fonts. This post will summarize the tools/tips that I adopted to customize the fonts in Gnome 3. Usually, the
Read more

Vim Howtos and Tips

Posted on

Vim is a fast and handy editor on *nix systems. Like Emacs, Vim has a steep learning curve as you get constantly get new things. However, the effort deserves it as you efficiency is highly improved. Here, I summarize the tips and howtos I learned using Vim. Some previous posts on vim are tagged with
Read more

How to Set Up Git Commit Email Notifications

Posted on

A method to send email notification to a list of email addresses by the remote git server after every push from the client will be introduced in this post. An example notification email after a commit is shown in the figure below. The subject contains a prefix, the repository name, the branch name and the
Read more

How to Set Up A Gitolite Git Server – A Ten-Minute Tutorial

Posted on

I ever introduced seting up git server using SSH or gitosis. However, gitolite is the way to go for managing git servers if you want an lightweight authentication layer. gitolite provides many very usefull features which can control each user’s right on each branch. I set up one gitolite git server and am very happy
Read more

How to Connect to Remote Servers by VNC on Windows

Posted on

Software you will need 1, Putty 2, Real VNC viewer 3, twm (lightweight desktop). On fedora (centos, redhat): sudo yum install twm (on other distros, you may need other commands, or download source code and install it). Specific steps 1, Enter your Host name and port in putty. 2, Set port forwarding in putty Tunnels.
Read more

Statically Linking C and C++ Programs on Linux with gcc

Posted on

Before statically linking you C and C++ programs, you should be aware of the drawbacks of the static linking especially with glibc. There are some good discussions already: with glibc you’re linking static programs which are not really static and some others here and here. That said, you can choose to statically link C and
Read more

How to Set Up RAID0 in MegaRAID BIOS with New Disks

Posted on

The LSI MegaRAID is widely used like in IBM x3620M3 servers. This post introduces the process with screenshots of how to configure the new disks and set up RAID0 in the MegaRAID BIOS for reference by other and myself. It is illustrated with one example by adding a new 2TB hard disk and creating a
Read more

How to Find Out Failed Disks’ SATA Ports in Linux

Posted on

The Linux disk names (e.g. sda1, hdb3, etc.) are not reliable—they may be changed if there are hardware changes, such an adding or removing a disk. Additionally, the order for the Linux device names is not always the same as the order of SATA poets. For example, the disk connected to SATA port 0 (first
Read more

How to Send Email Using mailx/s-nail in Linux Through Internal SMTP

Posted on

How to Send Email from mailx Command in Linux Using Gmail’s SMTP introduces how to send email using heirloom mailx (or s-nail if you are using Ubuntu 18 or later or similar releases) command in Linux through Gmail’s SMTP which requires some configuration. On the other hand, there are many environments that do not require
Read more

SSH Port Forwarding on Linux

Posted on

Port forwarding (or tunnelling) is a method to forward one network traffic to another. We will introduce how to forward ports using SSH tunnel in this post. A simple example Let’s start with a simple and useful example: we want to forward local port 8080 to server:port. We can easily do this by using ssh
Read more

How to Install ATI fglrx Driver on Fedora Linux

Posted on

Update on Nov. 18, 2012: ATI fglrx driver works well on Fedora 17 with GNOME 3 Shell. Should work well with later releases. Great driver, ATI! Update on Nov. 29, 2011: ATI fglrx driver works on Fedora 16 with GNOME 3 Shell with Catalyst driver 11.11 (xorg-x11-drv-catalyst-11.11). Update on Oct. 9, 2011: GNOME 3 shell
Read more

Managing Xen Dom0′s CPU and Memory

Posted on

The performance of Xen’s Dom0 is important for the overall system. The disk and network drivers are running on Dom0. I/O intensive guests’ workloads may consume lots Dom0′s CPU cycles. The Linux kernel calculates various network related parameters based on the amount of memory at boot time. The kernel also allocate memory for storing memory
Read more

Unified Linux Login and Home Using OpenLDAP and NFS

Posted on

In this post, how to unified Linux login and home directory using OpenLDAP and NFS/automount will be introduced. 0. System environment This solution is tested on Fedora 12 systems and CentOS 5. LDAP and NFS server: IP: 10.0.0.2 OS: Fedora 12 x86_64 ldap base dn: “dc=lgcpu1″ Clients: IP: 10.0.0.1/24 OS: Fedora 12 x86_64 1. LDAP
Read more

Linux UDP Programming Tutorial

Posted on

UDP has its advantages over TCP, such as being relatively lightweight and receiving one packet per read call (recvmsg), although the programmers need to handle related issues, such as packet lost and out-of-order packets delivery. This post gives information and references on how to write UDP programs in a C/Linux environment. What is UDP Check
Read more

How to Measure Time Accurately in Programs

Posted on

It is quite common to measure the time in programs using APIs like clock() and gettimeofday(). We may also want to measure the time “accurately” for certain purposes, such as measuring a small piece of code’s execution time for performance analysis, or measuring the time in time-sensitive game software. It is hard to measure the
Read more

How to Bypass Bad fstab Failure When Booting Linux

Posted on

If /etc/fstab file is created with errors or the hardware configuration changes such as adding hard disks, Linux will boot into failure state. We can bypass the fstab failure by adding booting parameters to Linux. We can do this in two methods: Method 1: Boot to single user mode When booting into single user mode,
Read more

Changing Linux User Password in One Command Line

Posted on

In Linux, we use passwd to change password, but passwd requires input from stdin to get the new password. It is common case that we may want to change the password non-interactively, such as creating new user accounts and change or set password for these accounts on a number of Linux boxes when the new
Read more