curtlftpfs is a nice tool to mount ftp to local. How to install curlftpfs on CentOS 7? The software package for curlftpfs is proved in EPEL. To install curlftpfs, first, enable EPEL following instructions here. Then, install curlftpfs by # yum install curlftpfs
Tag: Linux
How to use vnc to connect remote server with GUI desktop
Posted onFor my case, I need to bypass one intermediate server so that I can connect to the remote server with vnc. For example, there are two servers (s1, s2) except my local PC and I have to login to s1 so that I can login s2 from my local PC. However, now, I need to
Read more
How to install sshfs on CentOS 7?
Posted onsshfs is a nice tool. But it seems there is no support to it in a newly installed CentOS 7 Linux system: Not installed by default: # sshfs -bash: sshfs: command not found Seems not available from the repositories # yum install sshfs -y Loaded plugins: fastestmirror Repodata is over 2 weeks old. Install yum-cron?
Read more
How to change CONFIG_HZ parameter for Linux Kernel
Posted onIf we want to change the tick time for Linux Kernel, we need to change CONFIG_HZ parameter in Linux Kernel. Do we have other better ways to change it rather than compiling Linux Kernel. Please ignore the way to add ‘divider=10’ in grub config file because it is limited only for RH/CentOS distros. Zhiqiang, please
Read more
How to make Ubuntu Linux boot to text mode?
Posted onMy Ubuntu boots to GUI mode by default. How to make Ubuntu Linux boot to text mode? If you are using Ubuntu older than 16 such as Ubuntu 14.04: Edit /etc/default/grub Change GRUB_CMDLINE_LINUX=… to GRUB_CMDLINE_LINUX=”text”. Backup your old grub config`$ sudo cp -n /etc/default/grub /etc/default/grub.bak-date +%s ` Update grub$ sudo update-grub If you are using
Read more
How to install Flash Player plugin on CentOS 7?
Posted onFirefox on CentOS7 does not have Flash enabled by default. How to install Flash Player plugin on CentOS 7? You may follow this tutorials to build a freshwrapper based flash plugin for Firefox on CentOS 7. If you don’t want to build it by yourself, you may download the pre-built .so from from this repository.
rtl8192cu driver for CentOS 7
Posted onI find the rtl8192cu wireless adapter driver on CentOS 7 is quite unstable. After running a while, the connection will disappear. How to make it stable? There is a bug in some hardware where the device never wakes back up. You may try disabling the power management by putting a file 8192cu-disable-power-management.conf under /etc/modprobe.d/: #
Read more
How to install aclocal on Fedora Linux?
Posted onI tried to build a project while it reports: # ./autogen.sh Can’t exec “aclocal”: No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326. autoreconf: failed to run aclocal: No such file or directory How should I handle this? How to install aclocal? yum install aclocal shows: No package aclocal available. Error: Unable to find a
Read more
How to add two static IPs for a Xen VM?
Posted onHello, I have installed Xen4Centos on Centos7, having single NIC card with bridge network and have two VMs on that. In one VM, I want to add two static IP one for webserver and one for mail server. So I have created IP alias in guest VM, it was created but it was not pinging
Read more
Allowing root Access to NFS Directories
Posted onFor local filesystems, root usually has full access (read/write) to directories/files inside of it. But for NFS directory mounted from network, root usually has no permission to write to directories or files within the NFS directory. How to make root act similarly in an NFS directory to the behavior in local directories? The reason that
Read more
In Vim, are there shortcuts to set tab widths to 2 and 4?
Posted onTab widths may be different for different languages. Even with a common language, the tab width settings can be different for different projects. In Vim, are there shortcuts to set tab widths to 2 and 4? To quickly change the tab widths when changing projects. I am afraid no. But you create shortcuts for setting
Read more
Why I got message “invalid syntax, continuing…” when I execute “sysctl”?
Posted onWhen I tried to apply new configuration in /etc/sysctl.conf, I got following message. warning: /etc/sysctl.conf(44): invalid syntax, continuing… Sounds like your changed /etc/sysctl.conf has problem. You may post the content of your /etc/sysctl.conf here to let other have a check. net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1
Read more
How to install glibc, glibc-common and GD libraries independently?
Posted onI already have PHP and nginx installed and running on my on centOS 6.7. Please guide me, how can install glibc, glibc-common and GD libraries independently on my centOS 6.7 without crashing my system? I am not sure how you installed PHP and nginx. If they are installed from CentOS6.7’s Yum repository, you may install
Read more
In Golang, how to print string to STDERR?
Posted onIn Golang, the fmt.Println() is convenient to print to STDOUT. But how to print string to STDERR? In Go os package, “Stdin, Stdout, and Stderr are open Files pointing to the standard input, standard output, and standard error file descriptors.” So, you can use the WriteString function on File on os.Stderr to print string to
Read more
How to convert the dmesg timestamps to easier to read format on Linux?
Posted onThe dmesg results from newer Linux kernels show the timestamps. It seems the time in seconds since the kernel start time. How to convert the dmesg timestamps to the real time on Linux? The dmesg timestamp is the time in seconds since the kernel starting time. Later dmesg has an -T option: -T, –ctime Print
Read more
How to grep a tab on Linux?
Posted onHow to grep a tab on Linux? Including ‘t’ seems not working. grep can grep tabs. The problem is likely the tab is not passed to grep. If you are using Bash, you can use ANSI-C quoting to pass the “tab” to grep: $ grep $’t’ file.txt Or, use Perl-style regex (only for GNU grep)
Read more
How to get the full path and directory of a Makefile itself?
Posted onHow to get the full path and directory of a Makefile itself like finding Bash script’s own path? This 2 lines in Makefile get the full path and dir of the Makefile itself: mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) mkfile_dir := $(dir $(mkfile_path)) The piece of code gets you Makefile, finds its absolute path and the
Read more
How to choose the key used by SSH for a specific host?
Posted onHow to choose a key used rather than the default ~/.ssh/id_rsa when ssh to a remote server for a specific host? You have at least 2 choices for choosing the key used by ssh. Taking ~/.ssh/key1 and user@example.com as the example here. Method one, specify the key in command line with the -i option of
Read more
Which ssh client on iOS works the best for socks?
Posted onThere are good ssh clients on Windows and, needless to mention, Linux. But which ssh client on iOS for iPhone/iPad works the best for socks? You may try vSSH. It is the best SSH client app I found on iOS. vSSH supports tunneling/port forwarding: you can setup port tunneling in the “Port forwarding” section of
Read more
How to check whether a function has been defined in Bash?
Posted onI would like to know whether a function, say f1(), has already been defined in Bash. How should I do it? You can use the type -t to get a string of the type of the name: If the -t option is used, type prints a string which is one of alias, keyword, function, builtin,
Read more