How to Install Wine 32-bit on CentOS 7

Since version 7, RHEL has only x86-64 versions. The same thing happens to CentOS 7. In CentOS 7/EPEL, there is only package for Wine x86-64. However, many Windows .exe files are 32-bit. Even there are 64-bit versions for some software, their installation file is 32-bit. And for some certain software such as Office 2007, 32-bit wine is preferred. In this post, we will check how to install 32-bit Wine on CentOS 7. » Read more

How to Change Systemd Boot Target on Linux

Many Linux distros, such as RHEL/CentOS 7, Fedora, Ubuntu 16, are now using systemd instead of init as the init system. It is common for Linux users to set Linux to boot to “GUI” or “Text” mode. The old way of changing ‘/etc/inittab’ for choosing Linux runlevels is not working for sytemd. This post will introduce the way for systemd systems to select the “runlevels”. » Read more

How to Change Linux Account Password Through SSH: A Beginners’ Tutorial

People are sometimes given access to Linux/Unix and asked to change their initial passwords. But for beginners, changing a Linux/Unix password is not an easy task, especially when there is only SSH log on allowed to the Linux/Unix server. This post introduces how to change password of user USER on host HOST remotely using SSH. linux-passwd.png Steps are as follows. Note: you will need to replace HOST and USER with the actual username and hostname you are using. » Read more

How to Set the Static IP Address Using CLI in Fedora/CentOS Linux

How to set the static IP address for CentOS 7/Fedora 22+ is introduced in this post. Here, we assume the Linux is using NetworkManager to manage the network. All steps are done as root. Find the interface you want to set the address ∞ Command ifconfig -a lists all interfaces. Find the interface name to set, such as enp2s0. datacenter-servers.jpg Edit the interface’s configuration file ∞ For interface NAME, the configuration file is stored in /etc/sysconfig/network-scripts/ifcfg-NAME. » Read more

How to Configure Scanner in an HP All-In-One Printer on Linux?

The hplip packages contains all the tools you need to set up the HP scanner. For scanning, you may use the sane and xsane tools. The tricky part to enable the scanner is carefully choose which driver to use from the hplip package. If you choose a non-suitable driver, only the printer will work and the scanner will not be found by Linux. » Read more

How to Clean RAID Signatures on Linux

RAID systems such as MegaRAID add signatures to disks to maintain the infomration on these didks. When we simply remove these disks and install them to another server, Linux on the new server may detect these RAID signature infomration and refuses to continue write to the disk. Here is one example that mkfs reports “apparently in use by the system” and refuses making a filesystem. » Read more

Improving ssh/scp Performance by Choosing Suitable Ciphers

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 one since only newer vesion of OpenSSH supports it. » Read more

Speeding Up WordPress with APC Object Cache and WP Super Cache

WordPress can be very fast after some (small) effort on performance optimization with the help from its plenty of plugins. Two of the directions are using cache to cut down the number of database queries and optimizing PHP’s performance with opcode cache. In this post, we introduce how to speed up WordPress with APC object cache and page cache with the two plugins “APC Object Cache Backed” and “WP Super Cache”. » Read more

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

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 with it. In this post, let’s look at how to set up one gitolite git server. » Read more

How to Find Out Failed Disks’ SATA Ports in Linux

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 port) is not always sda. It is possibly that you are in a situation like this: I find one disk failed on my server which have several ones installed. » Read more

Yum Using DVD as Package Repository

We introduce the method to use DVD as the package repository for yum. In this post, we use CentOS 5 as the example. 1) Modify /etc/yum.repos.d/CentOS-Base.repo Delete baseurls in [Base] baseurl by add ‘#’ at the beginning of the lines Then add a line at the end: baseurl=file:///media/CentOS_5.0_Final ‘file://’ means this is a local directory. Here, ‘/media/CentOS_5.0_Final’ is the mount point of the DVD. » Read more

Emacs Tips and Howtos

With Emacs, I feel happy. I love the rich functions of Emacs, such as compiling, quickly jumping to the lines with compilation error and debugging with gdb, and more. I ever wrote small tips posts about Emacs before. But it is a good idea to put them together and keep adding new ones. Here comes this post on Emacs tip and howtos, more or less like a cheat sheet and FAQ. » Read more

Installing Fedora 17 PV Domain-U on Xen with PXE Booting

An introduction to the general method of installing Domain-U on Xen is introduced here: Setting Up Stable Xen DomU with Fedora: Unmodified Fedora 12 on top of Xenified Fedora 12 Dom0 with Xen (this is a general introduction, some details are changed, such as ‘xl’ replacing ‘xm’, LVM backing the disk for higher performance. But the general process is the same). » Read more

Flushing iptables on Fedora

iptables is a mechanism in Linux kernel for port forwarding, NAT, firewalls etc. In Linux distros, such as Fedora, the iptables is configured to be as a “strict” firewall that opens a limited know ports, such as 22 for SSH. However, in some network environment, such as a private cluster, the nodes are trusted and firewalls are usually not needed. We may flush the default iptables to make it accept all connections and add rules as needed. » Read more

Installing Xen on Fedora as Domain-0 (Fedora 17)

The new development of Xen and Linux kernel make it easy to install Xen on Fedora as the Domain-0 now. This post uses Fedora 17 as an example platform to introduce how to set up Domain-0 on Fedora Linux. Compared to our old method (Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12) which requires manually compiled Xen and patched kernel, the current packages and support to Xen in Fedora and Linux kernel make the system administrators life much easier. » Read more

Setting Default Entry in Grub2 and Grub

Linux booting is usually controlled by Grub or the new Grub2. Setting the default booting entry is a frequent operations. Here, we introduce how to set the default entry in Grub2 and Grub. Setting the default booting entry in grub2 Note1: With some version of grub2, the grub2-set-default method and the script below may not work. You can check the “Setting default boot entry for grub2 in /etc/default/grub” method below. » Read more

Disabling IPv6 on Fedora 17 Linux

IPv6 is enabled by default on most Linux distros. However, IPv6 is not used most of time (at least in my case). This post introduces how to disable IPv6 support on Linux (newer Kernel versions, such as in Fedora 17). IPv6 on Linux can be easily configured via sysctrl. Add these lines to /etc/sysctl.conf: net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 Note that you will need to restart Linux to make it take effect. » Read more

Linux Flushing File System Caches

We may drop the file system caches on Linux to free up memory for applications. Kernels 2.6.16 and newer provide a mechanism via the /proc/ to make the kernel drop the page cache and/or inode and dentry caches on command. We can use this mechanism to free up the memory. However, this is a non-destructive operation that only free things that are completely unused and dirty objects will not be freed until written out to disk. » Read more