IT Knowledge Base

Technical Repository

HowTo: Find Linux Version

Kernel Version $ uname -a Linux localhost 3.11.0-3-generic #8-Ubuntu SMP Fri Aug 23 16:49:15 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux Release Version $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu Saucy Salamander (development branch) Release: 13.10 Codename: saucy $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=13.10 DISTRIB_CODENAME=saucy DISTRIB_DESCRIPTION=”Ubuntu Saucy Salamander (development branch)” $ […]

Read More


HowTo: View boot messages behind the splash screen on Linux

Press AltĀ + D D stands for “Details”. Edit Grub to remove the splash screen. 1. Interrupt the GRUB by hitting the Esc key 2. Press e to edit 3. Remove the rhgb quiet at the kernel line 4. Press Enter and hit b to continue booting

Read More


HowTo: Configure SNMP on Linux

Just copy and paste the following commands in the terminal. They will update the configuration file and restart the service. Enable SNMP to listen on all interfaces sed -i ‘s/agentAddress udp:127.0.0.1:161/#agentAddress udp:127.0.0.1:161/g’ /etc/snmp/snmpd.conf Change SNMP Community String sed -i ‘s/ rocommunity public default -V systemonly/rocommunity MYSECURESNMPSTRING default -V systemonly/g’ /etc/snmp/snmpd.conf Allow SNMP connectinos from this […]

Read More


HowTo: CentOS – Minimal. Configure Network Adapter

Check IP address ip addr Note: ifconfig has been depreciated in Linux versions. Most systems will be using the IP command from now on. ip http://srobb.net/ip.html Additional Commands can be found here. nano /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=static ONBOOT=yes PEERDNS=yes IPADDR=15.15.15.15 NETMASK=255.255.255.0 GATEWAY=15.15.15.1 nano /etc/resolv.conf nameserver 8.8.8.8 nameserver 8.8.4.4 Restart the networking service for configurations to take […]

Read More


HowTo: CentOS 7 Minimal – Install Development Tools

Unlike Ubuntu where you can use apt-get install build-essentials, on CentOS you will need to run the following command to install those packages. yum install gcc gcc-c++ kernel-devel

Read More


HowTo: Enable Remote Connections to MySQL

Open the the MySQL configuration file: nano /etc/mysql/my.cnf and comment out the following line, save the file and then restart the MySQL service. #bind-address = 127.0.0.1 Restart the MySQL service. service mysql restart OR you can run the following command to comment out the same line and then restart the MySQL service. sed -i ‘s/^bind-address.*/#bind-address […]

Read More


HowTo: Update Nginx Configuration to support PHP files

These are the default settings for Nginx. OpenĀ /usr/local/nginx/conf/nginx.conf to edit. nano /usr/local/nginx/conf/nginx.conf location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; include fastcgi_params; } Update the nginx.conf file to these settings location ~ \.php$ { root /var/www; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } In order to use […]

Read More


HowTo: Ubuntu – Force file system check on next boot

Log into your server and issue the following command: sudo touch /forcefsck On the next reboot the server will check the file system for errors during the boot process.

Read More


HowTo: Find the public IP address that a Linux server is behind

Install curl. apt-get install curl Run the following command: root[email protected]:~# curl ifconfig.me 65.x.x.x

Read More


Postfix – Useful Commands

1. Give an approximation of the number of emails in the mailq. mailq | wc -l 2. Pause email delivery but still accept email. May be useful when needing to queue a large number of mail at once or when a mail needs to be deleted from the mail queue without stopping the mail server […]

Read More