Set Date and Time for Each Command You Execute in Bash History

Set Date and Time for Each Command You Execute in Bash History

I think one of the not so well known secrets of Linux sysadmin is the .bash_history file. Very useful if you want to see what a colleague did to break something or even if you forgot how you did something yourself a few months ago. This little trick makes it even more neat and that is the ability to add a timestamp to the file! Read on thanks to techmint ….

By default, all commands executed by Bash on the command line are stored in history buffer or recorded in a file called ~/.bash_history . This means that a system administrator can view a list of commands executed by users on the system or a user can view his/her command […]

PhotoRec – Recover Deleted or Lost Files in Linux

PhotoRec – Recover Deleted or Lost Files in Linux

Everyone had an issue now and again where they wish there was a quick easy way to get a file back either due to a typo, deleting it by mistake or some script gone mad. Restoring backups tend to take a bit long for those who a busy or less patient, so this handy tool may be just the answer, Usual for sysadmins to add it to their linux toolkit.

When you delete a file accidentally or intentionally on your system using ‘ shift + delete ‘ or delete option or empty Trash, the file content is not destroyed from the hard disk (or any storage media). It is simply removed from the the directory structure and you cannot […]

Install Security Patches or Updates Automatically on CentOS and RHEL

Install Security Patches or Updates Automatically on CentOS and RHEL

Saw this over on Techmint today and I have to share it! Clients with cPanel effectively have auto updates switched on, but for those without cPanel they sometimes miss updates and security issues can affect them. This article is a good summary on how to fix that and enable auto updates on Centos and RHEL.

One of the serious needs of a Linux system is to be kept up to date regularly with the latest security patches or updates available for the corresponding distribution. In a previous article, we’ve explained how to configure automatic security update in Debian/Ubuntu , in this article we will […]

How to Perform Internal Redirection with mod_rewrite in Apache

How to Perform Internal Redirection with mod_rewrite in Apache

Somehow everyone always seems to have an issue with mod_rewrite rules. I guess regular expressions were invented by applied maths majors leaving the rest of us at a disadvantage. Still I do think mod_rewrite is one of the most powerful features of Apache and when moving someone from a Windows IIS websever to a Linux VPS Apache install it is even more useful, so when I saw this article I thought I had to share it.

In this article and in the next we will explain how to use mod_rewrite, to map certain HTTP requests to other pages in a website, or to an external URL. In other words, this well-known Apache module will allow you to redirect an URL to another, which we will […]

When to use NGINX instead of Apache

Interesting article on Zdnet today apart from answering the question about NGIX/Apache also has some interesting stats about web server adoption in general.

 

They’re both popular open-source web servers but, according to NGINX CEO Gus Robertson, they have different use cases. And Microsoft? Its web server has dropped below 10 percent of all active websites for the first time in 20 years.

 

NGINX has risen to become the number two web server. It surpassed Microsoft Internet Information Services (IIS) long ago and has been creeping up on long-time top web server Apache. But, NGINX CEO Gus Roberston said in an interview, Apache and NGINX are not after the same audiences.

“I think Apache is a great web server. NGINX is different use case,” said Robertson. “We don’t see Apache as a rival. Our customers use NGINX to replace hardware load balancers and build micro-services neither of which is Apache.”

Read original article at Zdnet

Dstat – A Resourceful Tool to Monitor Linux Server Performance in Real-Time

Dstat – A Resourceful Tool to Monitor Linux Server Performance in Real-Time

We are always looking for interesting tools to make managing linux and linux performance better. This is one of those cool tools that will make life easier and a good article from Techmint on it.

Some of the popular and frequently used system resource generating tools available on the Linux platform include vmstat , netstat , iostat , ifstat and mpstat . They are used for reporting statistics from different system components such as virtual memory, network connections and interfaces, CPU, input/output devices and […]

How to setup a SVN server on CentOS

How to setup a SVN server on CentOS

SVN is one the most popular repositories for code and having your own SVN repository on a Linux VPS makes a lot of sense. It could be your main repository or it could be a backup. Offsite backups are must these days and act like an insurance policy against fire, theft and damage.

This tutorial explains how to setup and use an SVN repository server on CentOS. Before I start, let me explain what actually SVN represents and what it is used for. SVN is actually an abbreviation of SubVersion which had been created by the Apache software developer. It enables you […]

Why is your site so fast? 11 things you can do to have a fast loading website

We often get asked “How do you do it, your website seems so fast”. Well obviosuly being in the business, we have learnt a lot of tricks over the years and we also have quite a lot at our disposal to make sure vpsnine.com loads quickly! This is something that our customers can also do and indeed should be doing. Site speed is so important from a usability point of even and it is even a factor in Google SEO rankings. Some of it requires some knowledge of PHP , Linux or other System Administration skills, but I am going to list some of the points here

  1. Host your server or VPS in the best location for your audience.
    If your audience is in Singapore then clearly a Singapore server makes sense. However many companies these days aim at a global audience, just like we do. So we locate our main servers in Europe as the EU has great ping times to most parts of the world.
  2. Get a server or VPS with 1Gbps speeds , SSD and a reliable network. These all make a difference collectively. While shared hosting is ok for a small site, it is not going to give you the performance and speed you need as your site grows.
  3. Use Cpanel. It may seem counter productive as cPanel does add quite a bit if overhead, but it really is the best way to ensure you have a stable and secure hosting environment. cPanel auto applies all the latest security patches and configuration changes for you and you can be sure it works!
  4. Use mod_pagespeed – this is really great at speeding up lots of little things in your html that overall can make your site load faster. It does require a bit of fine tuning of filters and other options.
  5. Use a php accelerator like xCache with you can easily enable in cPanel
  6. Use memcached for php session information and to cache certain content that you get from your database. This is usually very site specific and make require some php knowledge to get it going.
  7. Tune mysqld – there are often small tweaks that can be made to improve performance.
  8. Check different Apache/php loading methods. Fast Cgi is often the fastest, but for security and other reasons you may need to use suphp.
  9. Do not do dns lookups anywhere, either in Apache configuration or your scripts. It does slow down your website and you generally do not need to process that in real-time.
  10. Use Cloudflare – with their network of well over 30 edge locations world wide, if you have a global audience, there is not better way to get enhanced security and speed all in one go. Essentially someone will connect to a location very close to them and Cloudflare’s magic will accelerate the data served to that client.
  11. Monitor it. Use a service like Pingdom or Host-Tracker to alert you if your site goes down or response time is too high. The best way to do this is to configure the service to look for a keyword that comes from your database. There are cases when your site looks like its up, but the content is in fact not loading due to a coding error or database issue, so this ensures you know about issues.

There are naturally other factors to the magic sauce and some trade secrets that we will keep under our white hats for now.

Of course we at VPSNine are here to help you if you need to benefit from any of the above. Depending on the plan you have with us we will be able to assist, contact our sales team to find out more.

 

Rclone - Sync File and Directories to Cloud Storage in Linux

Rclone – Sync File and Directories to Cloud Storage in Linux

This is quite a cool tool for syncing your files from your Linux VPS to the cloud.

Rclone is a command line program to sync files and directories to and from Google Drive, Amazon S3, Openstack Swift / Rackspace cloud files / Memset Memstore, Dropbox, Google Cloud Storage, The local filesystem. It is a Go program and comes as a single binary file. Rclone is a Free […]