LINUX

Here is a clumsy script to check on an FTP Service on a remote server if running or down. The script is written in Python and is a very draft one, but does the job. The main goal is to check whether we get any response from the FTP server while we try to connect […]

IMPORTANT NOTE: Never assume the directory structures exist in your system as written in the document. Never blindly follow security instructions — read, review, compare, apply as it fits your system., Update your server as necessary As its nature, Linux is a multi-developer operating system and you might see an update on any package everyday, an updater like […]

The other day I was working on a server and needed the LARGEST files on some directory – including its subdirectories. As it turns out, it’s a very simple task limiting the file size you want with the output of the find tool. The -size argument will define the borders of your output. Let’s say […]

DirectAdmin determines the admin password during installation and saves these passwords into the file called setup.txt. If you havent changed this password, you can find it in this file, to see the file contents: less /usr/local/directadmin/scripts/setup.txt adminpass= you can find admin password here, and if you didn’t change it after installing you should be able […]

Before changing MySQL root password you may try to recover default installation password. DirectAdmin MySQL root password is set within the installation process and written down to setup.txt. If you didn’t change this password you can find the default one in the setup.txt, use the command below to see the contents of /usr/local/directadmin/scripts/setup.txt: your password […]

There are some important processes after successfully installation of DirectAdmin and if you miss these steps, the system may not work efficiently. After logged in with the admin user: (default admin password is located at: /usr/local/directadmin/scripts/setup.txt) Add an additional IP for the second DNS Server, to do so, click to the “IP Management” link in […]

If you prepared your server with the directives we mentioned on the previous article, it will be so much easy to install DireactAdmin software. You must download the setup file from DirectAdmin site: Download DirectAdmin setup file & run: mkdir /root/DA cd /root/DA wget http://www.directadmin.com/setup.sh sh setup.sh Steps to follow: DirectAdmin setup will ask you […]

DirectAdmin is one of the mostly used Hosting Control Panels around, for single server installations it is easy to setup and start selling hosting busines, some advantages of DirectAdmin are; Easy to install, can be installed on a VPS or VDS also Less overhead, minimal code Easy to maintain & upgrade Easy to modify wtihout […]

Adding a task into crontab is relatively easy. You just enter the crontab with “$ crontab -e” and add the necessary job, save and exit. But adding a job in your bash script is not that simple, because what you have to do is, to get the entire list of the jobs, append your new […]

The other day we were working on a mail server of a customer’s that spammed insanely. Since the mail transfer agent it uses is exim, it’s necessary to check the mainlog files. Whilst doing that, we realized the server was getting a lot of incoming mails as forgery. So, it is possible to get the […]

I just added my whm/cpanel server to backup pool. I got the following error when trying to back up: Fatal error (bad version): stdin: is not a tty fileListReceive() failed Done: 0 files, 0 bytes Got fatal error during xfer (fileListReceive failed) Backup aborted by user signal Solution: I found that I had “mesg y” on […]

Here’s a simple bash script snippet I use for detecting the OS information on the current system. #!/bin/bash ### Getting OS Information if [ -f /etc/lsb-release ]; then . /etc/lsb-release DIST=$DISTRIB_ID DIST_VER=$DISTRIB_RELEASE else DIST=”Unknown” DIST_VER=”Unknown” fi if [ -f /etc/debian_version ]; then OS=”Debian” VER=$(cat /etc/debian_version) elif [ -f /etc/redhat-release ]; then OS=”Red Hat” VER=$(cat /etc/redhat-release) […]

Here’s something very basic yet poorly documented. That’s why it looks like almost everybody’s trying to hack their way into this module, the yum module for Python. First of all don’t forget that this module is only available if you’re using a Red Hat branch of distribution (fedora, centos etc.) For other distributions, such as […]

You are reading this article, most probably you faced trouble booting your Linux. Follow the steps below to fully chroot into your system as you booted regularly. Please note that we offer you to take a disk clone before doing anything in your boot configuration. To do so, you can use dd or dd_rescue to […]

If you want to show console output from a Serial device such as RS-232 interface, you need to make minor modifications in pfsense 2.0 distro. Switch to shell by pressing 8 from the pfsense console menu and edit the file /boot/loader.conf by typing: vi /boot/loader.conf Add the below lines to the file after pressin “i” […]

I have been looking a way to push e-mail since i got my iphone. Just found something for my test server and it works for me… I have a webserver running cPanel, Dovecot and suPHP. ( centOS 5.4, WHM 11.25 ) Steps: 1- You can download z-push from here. 2- Upload z-push to /usr/local/apache/htdocs 3- […]

Using LINUX as a server?, if so please read below Most of the Linux distros released as CD or DVD media for installing and if you install Linux with defualy options you get a nice user interface and a bunch of applications that you will never use in a server environment. Also default installation will […]

Running /tmp partition makes great performance enhancements as soon as you store temprorary information, please be aware that you mustn’t store valuable data as a reboot will flush all the data inside. /tmp & /var/tmp runs faster from RAM, to do so: vi /etc/fstab Switch to Insert mode by pressing I or INSERT button on […]

Vi is the one of the mostly used editor in Linux via terminal. In most cases where Linux is used as a server operating system, admins use the terminal, where GUI uses more system resources & network bandwidth. Since Vi is used from the terminal, the lack of GUI force the user to learn function […]

Updating RedHat & CentOS with Yum If you are using RedHat & its clones like CentOS or CloudLinux etc. you can use Yum or up2date to upgrade your current system. Please note that is you have a RedHat Enterprise Linux Subscription we offer you to use the command up2date, to upgrade your server with yum […]

You can use du command to see the folder size in LINUX including subfolders.: With du du -h # including subfolders (-h means human readable format in MB, GB or TB) If you want to exclude subfolders, type: du -h –max-depth=1   If you want to know a specific folders size (easy to remember) type: […]

In default LINUX installation IPv6 is enabled. IPv6 might use system resources or for what ever reason you have Run this command as root: echo “alias net-pf-10 off” >> /etc/modprobe.conf echo “alias ipv6 off” >> /etc/modprobe.conf You need to restart your server after this command.

LINUX Version Info To learn the architecture and kernel version info use the shell command below: less /etc/redhat-release The output will be like CentOS release 5.6 (Final) To learn the architecture & kernel version: uname -a you can use the command above, the last numbers marked as red below is your architecture: Linux xxx.veriportal.com 2.6.18-164.9.1.el5 […]

NTP (Network Time Protocol) could be used to set time synced with ntp clocks, to do this use the shell command below: Setting time with NTP: yum install ntp -y \cp -f /usr/share/zoneinfo/Europe/Istanbul /etc/localtime ntpdate -v -b in.pool.ntp.org And set the hardware clock with: hwclock -w