<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
<channel>
<title><![CDATA[VPSBLOCKS PTY LTD]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/]]></link>
<description />
<generator><![CDATA[Kayako fusion v4.93.20]]></generator>
<item>
<title><![CDATA[CentOS 6 to CentOS 7 cPanel Upgrade Service]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[dc912a253d1e9ba40e2c597ed2376640]]></guid>
<pubDate><![CDATA[Thu, 04 Jun 2020 15:17:31 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[We are proud to present an in-place upgrade path for cPanel servers running CentOS 6 to CentOS 7.

CentOS 6 is EOL (end of life) on November 30 2020. This means that it will no longer be supported in any manner after this date. It is imperative that prior...]]></description>
<content:encoded><![CDATA[<p>We are proud to present an in-place upgrade path for cPanel servers running CentOS 6 to CentOS 7.</p>
<section class="post-content">
<p>CentOS 6 is EOL (end of life) on November 30 2020. This means that it will no longer be supported in any manner after this date. It is imperative that prior to this you have upgraded your cPanel server to CentOS 7.</p>
<h2>In-place upgrade</h2>
<p>An in-place upgrade updates your underlying system to CentOS 7 and associated cPanel services to the cPanel CentOS 7 repository version. This keeps your settings intact and requires no migration.</p>
<p><br />The main advantage here is you do not need to do anything, just provide us your server details and we'll do the in-place upgrade for you. As no migration has occurred settings still exist, and there is no risk of losing email, orders or website updates.<br /><br />The disadvantage is that there will be a period of approximately 1 hour when your server is likely to be unavailable while packages are installed and updated. This can of course be scheduled when you book in using our calendar based booking system to minimize impact to your clients.</p>
<p>To book in&nbsp;an upgrade please go to&nbsp;<a href="https://centosupgrades.com/">https://centosupgrades.com/</a>&nbsp;and use the book now button.</p>
<p>This is free for VPSBlocks clients.</p>
</section>]]></content:encoded>
</item>
<item>
<title><![CDATA[Extend An ext3/4 Partition Online]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[9b8619251a19057cff70779273e95aa6]]></guid>
<pubDate><![CDATA[Wed, 25 Sep 2013 12:16:05 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Here is the instructions that extend a regular ext3 or ext4 partition in your VPS without needing a boot CD. Follow the steps.&nbsp;
* Note: Our VPSs generally use LVM and as such as NOT regular ext3/4 partitions.
This article should not be used for res...]]></description>
<content:encoded><![CDATA[<p>Here is the instructions that extend a regular ext3 or ext4 partition in your VPS without needing a boot CD. Follow the steps.&nbsp;</p>
<p>* Note: Our VPSs generally use LVM and as such as NOT regular ext3/4 partitions.</p>
<p><strong>This article should not be used for resizing an LVM partition. DO NOT USE THIS FOR SYSTEM PARTITIONS ON VPSs with VPSBLOCKS</strong></p>
<p>To extend a regular ext3 or ext4 partition in your VPS without needing a boot CD you can follow the below instructions. Please note that this example is to extend /dev/sda3 (the root partition on this system). This will work with /dev/sda, /dev/mda and /dev/hda partitions.</p>
<p>Current mounted partition is as below:</p>
<p>df -h</p>
<p><img src="https://www.vpsblocks.com.au/images/support/resize1.jpg" alt="" width="447" height="74" /></p>
<p>fdisk -l</p>
<p><img src="https://www.vpsblocks.com.au/images/support/resize2.jpg" alt="" width="613" height="138" /></p>
<p>From the fdisk you can see that /dev/sda has 107.3GB available. The above df shows that currently about 50GB is being used. So we first need to recreate the partition in fdisk. We do this by deleting the existing partition and recreating it ensuring the same starting sector. Note this will only work to extend the LAST partition that exists (in this case sda3). If your swap partition is the last partition you must delete it first.</p>
<p>fdisk /dev/sda</p>
<p><img src="https://www.vpsblocks.com.au/images/support/resize4.jpg" alt="" width="628" height="447" /></p>
<p><img src="https://www.vpsblocks.com.au/images/support/resize6.jpg" alt="" width="627" height="287" /></p>
<p>Now that you've resized the partition you'll need to resync the partitions list.</p>
<p>You &nbsp;can do that by:</p>
<p>1. Rebooting the server</p>
<p>2. Running the command:</p>
<pre># partx -v -a /dev/sdX</pre>
<p>Where sdX is the actual drive (sda, sdb, sdc, etc). The flag -v meaens "verbose output", -a means "Add all partitions". The outpu will contain errors about already existing partitions, but new ones will be added.</p>
<p>Note if you deleted the swap partition first you will need to remove it from the /etc/fstab file or the system will not boot up properly. If you didn't delete any partitions and just followed the above instructions you can safely reboot your server.</p>
<p>Once the server is back online you need to resize the file system. This is done online and no further reboots are required. Simply type:</p>
<p>resize2fs /dev/sda3</p>
<p>After this has completed you will see the new space is now available:</p>
<p><img src="https://www.vpsblocks.com.au/images/support/resize7.jpg" alt="" width="442" height="71" /></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to Fix Open DNS Resolvers]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/how-to-fix-open-dns-resolvers]]></link>
<guid isPermaLink="false"><![CDATA[38af86134b65d0f10fe33d30dd76442e]]></guid>
<pubDate><![CDATA[Wed, 21 May 2014 11:11:01 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Your VPS may attack against other networks while running open DNS resolver. Follow  instructions on resolving problem.
Please note: If you are advised you are running an open DNS resolver you must take action as your VPS is most likely being used in atta...]]></description>
<content:encoded><![CDATA[<p>Your VPS may attack against other networks while running open DNS resolver. Follow  instructions on resolving problem.</p>
<p><strong>Please note: If you are advised you are running an open DNS resolver you must take action as your VPS is most likely being used in attacks against other networks. Please read below for an explanation and instructions on resolving the problem.</strong></p>
<p>An "open DNS resolver" is a DNS server that's willing to resolve recursive DNS lookups for anyone on the internet. It's much like an open SMTP relay, in that the simple lack of authentication allows malicious 3rd parties to propagate their payloads using your unsecured equipment. With open SMTP relays, the problem is that they forward spam. With open DNS resolvers, the problem is that they allow a denial of service attack known as a DNS Amplification Attack.</p>
<p>The way this attack works is pretty simple - because your server will resolve recursive DNS queries from anyone, an attacker can cause it to participate in a DDoS by sending your server a recursive DNS query that will return a large amount of data, much larger than the original DNS request packet. By spoofing (faking) their IP address, they'll direct this extra traffic to their victim's computers instead of their own, and of course, they'll make as many requests as fast as they can to your server, and any other open DNS resolvers they can find. In this manner, someone with a relatively small pipe can "amplify" a denial of service attack by using all the bandwidth on their pipe to direct a much larger volume of traffic at their victims.</p>
<p><a href="http://arstechnica.com/information-technology/2013/03/how-spamhaus-attackers-turned-dns-into-a-weapon-of-mass-destruction/" target="_blank" rel="noopener">ArsTechnica did a decent article on the recent DNS Amplification DDoS attack against Spamhaus</a>, and is worth a quick read to get the basics (and a good visual of the amplification).</p>
<p>The simplest way to protect your system from being abused like this is to limit the addresses your server will perform recursive lookups for to your local subnets. (The specifics of which depend on which DNS server you're using, of course).</p>
<hr />
<h2>BIND</h2>
<p>For example, if I were using BIND 9, and wanted to simply prevent DNS recursion from outside addresses, I would use the following code in my config:</p>
<pre><code>options {
    directory "/var/named/master";
    allow-recursion { 127.0.0.1; 10.0.0.0/8; 192.168.0.0/16; 172.16.0.0/12; };
</code></pre>
<p>That line of code tells my BIND server to only process recursive DNS requests for the local loopback address (which I guess I could/should set to the local loopback block, the whole /8) and the 3 Private IPv4 address spaces.</p>
<hr />
<h2>Windows Server 2012</h2>
<p><span style="font-size: 1.17em;">OPTION 1</span></p>
<h3>Block external DNS requests with a firewall, such as the built in Windows firewall (use this method if you are running a domain controller and are NOT using the DNS server as an actual name server for public domains)</h3>
<p>To my surprise, Windows DNS does not allow you to restrict the addresses to which recursive DNS requests are honored, so this actually the recommended method by Microsoft.</p>
<p><a href="http://i.stack.imgur.com/8EawA.png"><img src="http://i.stack.imgur.com/8EawA.png" alt="enter image description here" /></a></p>
<ul>
<li>Select the <strong>DNS (TCP Incoming)</strong> rule, go to the <strong>Remote IP address</strong> section and add:
<ul>
<li>127.0.0.1</li>
<li>Any public IP addresses assigned to your VPS e.g. 203.143.X.X</li>
<li>Any internal IP addresses assigned to your VPS (if you are using an internal network) e.g. 10.1.X.X</li>
</ul>
</li>
<li>Now go to the <strong>DNS (UDP Incoming)</strong> rule and do the same.</li>
</ul>
<h3></h3>
<p><span style="font-size: 1.17em;">OPTION 2</span></p>
<h3>Disable Recursion (use this method if your DNS server is used as a name server for a public domain)</h3>
<p>Disabling recursion is good when your DNS server is a public facing DNS server, only providing DNS information for zones it actually hosts (is authoritative for). If your system is a Domain Controller then you must make sure you have another DNS server specified in the network settings other than 127.0.0.1 or it will not be able to resolve any other domains, or use option 1 above. If your server is NOT a domain controller then this is the easiest option as it prevents your DNS server from providing any information other than about the zones it hosts.</p>
<ul>
<li><a href="http://i.stack.imgur.com/d5iRo.png"><img src="http://i.stack.imgur.com/d5iRo.png" alt="enter image description here" /></a>
<ol>
<li>Open DNS Manager.</li>
<li>In the console tree, right-click the applicable DNS server, then click Properties.</li>
<li>Click the Advanced tab.</li>
<li>In Server options, select the Disable recursion check box, and then click OK.
<ul>
<li>Since we have a multi-forest environment, and use conditional forwarders for that to work, I'm not going to check that box. Might be something for you to consider as well.</li>
</ul>
</li>
</ol>
</li>
</ul>]]></content:encoded>
</item>
<item>
<title><![CDATA[How Do I Use SSH?]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[3416a75f4cea9109507cacd8e2f2aefc]]></guid>
<pubDate><![CDATA[Thu, 05 Jul 2012 12:08:40 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Learn to enable SSH for account to perform the basic tasks through the terminal. Follow VPSBlocks to learn in detail.
Accessing SSH from Windows
To access your machine using SSH (all Linux variants) we recommend downloading the program 'Putty'.
This is...]]></description>
<content:encoded><![CDATA[<p>Learn to enable SSH for account to perform the basic tasks through the terminal. Follow VPSBlocks to learn in detail.</p>
<p><strong>Accessing SSH from Windows</strong></p>
<p>To access your machine using SSH (all Linux variants) we recommend downloading the program 'Putty'.</p>
<p>This is a very easy to use SSH client. Grab putty at: <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html</a></p>
<p>For Windows users just download 'putty.exe' on Intel x86.</p>
<p>The download is not a setup file, it is the actual program, so put it wherever you like (desktop is handy).</p>
<ul>
<li>Run 'Putty'</li>
<li>Enter the Host Name: the IP address provided in the setup email</li>
<li>Ensure the connection type is 'SSH'</li>
<li>Enter a name for your connection</li>
<li>Click 'Save'</li>
<li>Click 'Open'</li>
<li>You will now be prompted to login</li>
<li>Enter the username: root</li>
<li>Password: the password you supplied</li>
</ul>
<p>If you are unsure of your password or IP Address please refer to the setup email sent to you immediately after your new VPS was provisioned.</p>
<p><strong>Accessing SSH From Terminal on MAC (or desktop Linux variants)</strong></p>
<p>Open Terminal</p>
<p>Type:&nbsp;ssh root@203.143.x.x<br />(where 203.143.x.x is the IP address of your VPS)</p>
<p>You will be prompted for your root password. Enter it and you will be logged successfully into your VPS via SSH.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to Install Fast &amp; Free Vesta Control Panel]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[f7664060cc52bc6f3d620bcedc94a4b6]]></guid>
<pubDate><![CDATA[Mon, 03 Aug 2015 16:15:13 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Complete tutorials about installing &amp; using free control panel on a VPS. Do it yourself by following VPSBlocks.
cPanel is great as a complete hosting package. But if you don't need features like a web based file manager, VestaCP is a free control pan...]]></description>
<content:encoded><![CDATA[<p>Complete tutorials about installing &amp; using free control panel on a VPS. Do it yourself by following VPSBlocks.</p>
<p>cPanel is great as a complete hosting package. But if you don't need features like a web based file manager, VestaCP is a free control panel that offers speeds far surpassing that provided by cPanel. It's fantastic for hosting CMS based websites such as Magento, Joomla, Wordpress, Drupal etc.</p>
<p>Check out our sample Magento website running on a basic 1 CPU Core, 512MB Ram&nbsp;Linux Ubuntu 14 server at&nbsp;<a href="http://203.143.83.193/" target="_blank">http://203.143.83.193/</a></p>
<p>Note: If you are not confident in following these instructions&nbsp;we offer this installation as an optional service to our customers during the ordering process. We recommend you choose Ubuntu 14 as your operating system, and during the order process will be asked if you would like the Vesta Initial Setup, the cost is only $20.</p>
<p><strong>INSTALLING VESTA CONTROL PANEL</strong></p>
<p>Start with a VPS, for Vesta we recommend Ubuntu 16 or Ubuntu 14</p>
<p><a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh" target="_blank">SSH</a> into your new VPS</p>
<p>Type: curl -O http://vestacp.com/pub/vst-install.sh</p>
<p>Type: bash vst-install.sh</p>
<p>Important note: If asked for a hostname you must put the name you gave your server e.g. vps.yourdomain.com. If you&nbsp;do not put&nbsp;the same name services will not be able to resolve the hostname to your local VPS and it will cause issues with NGinx and some other services.</p>
<p><img src="http://www.vpsblocks.com.au/images/support/Vesta1.jpg" alt="" width="578" height="434" /></p>
<p>To start the installation press: y</p>
<p>Enter your email address</p>
<p>The installation will complete and at the end display your login credentials</p>
<p><img src="http://www.vpsblocks.com.au/images/support/Vesta2.jpg" alt="" width="578" height="434" /></p>
<p>Now run:&nbsp;update-rc.d mysql disable<br /><em>*Note: This is an Ubuntu 14 oddity, as otherwise two mysql processes will be started upon startup.&nbsp;</em></p>
<p><strong>Disable AppArmor for&nbsp;Bind9 (named) so DNS serving&nbsp;will function properly</strong></p>
<p>AppArmor by default&nbsp;prevents Bind9 from&nbsp;reading&nbsp;it's own database files under /home/&lt;user&gt;/ location. So you need to run these commands:</p>
<blockquote>
<p>ln -s /etc/apparmor.d/usr.sbin.named /etc/apparmor.d/disable/</p>
<p>apparmor_parser -R /etc/apparmor.d/usr.sbin.named</p>
<p>service bind9 restart</p>
</blockquote>
<p>&nbsp;</p>
<p>Visit https://YOURIP:8083 in your browser</p>
<p><img src="http://www.vpsblocks.com.au/images/support/Vesta3.jpg" alt="" width="716" height="593" /></p>
<p>Login using the credentials supplied to you</p>
<p>&nbsp;</p>
<p><strong>AUTO UPDATES</strong></p>
<p>We recommend turning on autoupdate</p>
<p>On the top bar, click on 'Updates' and click on [ enable autoupdate ]</p>
<p>&nbsp;</p>
<p><strong>USERS</strong></p>
<p>By default the 'Admin' user exists. You can create another user in the 'USER' section. Ensure any passwords you enter are very secure, particularly if you enable SSH access for any users you create. For each user you create, as well as the admin user you can also set default name servers. If you are using your own name servers enter them by editing the user, if you are using our provided name servers, enter them (ns1.controlmyvps.com.au / ns2.controlmyvps.com.au)</p>
<p>&nbsp;</p>
<p><strong>CREATING A WEBSITE</strong></p>
<p>Click on 'WEB'</p>
<p>Click on 'edit' next to the default domain</p>
<p>Here you should set the default settings for the webserver. For best performance we recommend you turn on Nginx Support and set the Nginx Template to default then click 'Save'</p>
<p>Note: Leave the Apache Template as default. If you want to set it to php-fcgi for extra performance you must have more than 1G of RAM, but you need to modify a file manually in SSH.</p>
<p>Edit /etc/apache2/mods-available/fcgid.conf (Ubuntu) (/etc/httpd/conf.d/fcgid.conf on CentOS):</p>
<dl class="codebox">
<dd><code><br />&lt;IfModule mod_fcgid.c&gt;<br />&nbsp; AddHandler&nbsp; &nbsp; fcgid-script .fcgi<br />&nbsp; FcgidConnectTimeout 20<br />&nbsp; FcgidMinProcessesPerClass 0<br />&nbsp; FcgidMaxProcessesPerClass 10<br />&nbsp; FcgidMaxProcesses 50<br />&nbsp; FcgidIdleTimeout 60<br />&nbsp; FcgidProcessLifeTime 120<br />&nbsp; FcgidIdleScanInterval 30<br /><br /><br />&nbsp; # Change the rate at which new FastCGI processes are spawned under load. Higher=faster<br />&nbsp; FcgidSpawnScoreUpLimit 10<br /><br />&nbsp; # Higher number = spawning more FastCGI processes decreases the spawn rate (controls runaway<br />&nbsp; FcgidSpawnScore 2<br /><br />&nbsp; # Higher number = terminating FastCGI processes decreases the spawn rate (controls runaway)<br />&nbsp; FcgidTerminationScore 2<br /><br />&nbsp; # Increase the FastCGI max request length for large file uploads (needed for some sites)<br />&nbsp; FcgidMaxRequestLen 1073741824<br /><br />&nbsp; FcgidMaxRequestsPerProcess 100000<br />&nbsp; FcgidIOTimeout 1800<br />&lt;/IfModule&gt;<br /><br /></code></dd>
</dl>
<p>&nbsp;</p>
<p><img src="http://www.vpsblocks.com.au/images/support/Vesta4.jpg" alt="" width="1014" height="914" /></p>
<p>You cannot edit the name for this website. This is the website that will always appear when you visit the IP address directly or any domains listed in the 'Aliases' section.</p>
<p>If you are hosting a single or main website you can use the default website, and enter the domain names in aliases. Note by doing this that you will have to add MAIL manually for the domain.</p>
<p>Alternatively, click on 'WEB' again and this time choose 'Add Web Domain' and add your new website.</p>
<p>&nbsp;</p>
<p><strong>ENABLING SELF-SIGNED SSL ON YOUR WEBSITE</strong></p>
<p>To enable self-signed SSL on your default website so things like webmail are accessed via SSL you need to do the following.</p>
<p>Click on 'WEB'</p>
<p>Click on 'edit' next to the default domain</p>
<p>Check the box next to 'SSL Support'</p>
<p>Click on 'Generate CSR' (this opens in a new browser window/tab)</p>
<p>Fill out the details, and change the Domain to a domain name that resolves to the server</p>
<p><img src="http://www.vpsblocks.com.au/images/support/Vesta6.jpg" alt="" width="1014" height="914" /></p>
<p>Then copy and and paste each of the details into the editing domain section. Note that they are not in the same order, so ensure you copy the certificate and key correctly. THe SSL Certificate Authority would be blank.</p>
<p><img src="http://www.vpsblocks.com.au/images/support/Vesta7.jpg" alt="" width="1014" height="914" /></p>
<p><img src="http://www.vpsblocks.com.au/images/support/Vesta8.jpg" alt="" width="1014" height="914" /></p>
<p>Click 'Save'</p>
<p>You will get warnings due to this being a self-signed certificate, but logging in via webmail will be secured.</p>
<p><img src="http://www.vpsblocks.com.au/images/support/Vesta9.jpg" alt="" width="1014" height="914" /></p>
<p>&nbsp;</p>
<p><strong>DNS RECORDS</strong></p>
<p>When you add a website the DNS records are automatically created for it. However, it's up to you whether you want to create your own DNS servers (ns1.yourdomain.com/ns2.yourdomain.com) and use Vesta to manage your DNS records, or use our provided DNS servers (ns1.controlmyvps.com.au/ns2.controlmyvps.com.au) and enter the DNS records yourself in our control panel.</p>
<p>If you setup your own DNS servers, you can edit/add any DNS records in the DNS section. Note that if you do not setup your own DNS servers then anything you do in this section will not be public or have any impact in the rest of the internet - e.g. you should make changes you need in our provided control panel.</p>
<p>&nbsp;</p>
<p><strong>MAIL</strong></p>
<p>To setup mail for your domain you will need to go the MAIL section. Here you can add/edit domains that you host mail for, and also add/remove mail accounts, open webmail and more.</p>
<p>If you've used the default website as your website, you will need to click on 'Add Mail Domain' and add your domain</p>
<p>Then click 'Add account' to add email accounts</p>
<p><img src="http://www.vpsblocks.com.au/images/support/Vesta5.jpg" alt="" width="1014" height="914" /></p>
<p>&nbsp;</p>
<p><strong>WEBMAIL</strong></p>
<p>Providing you have followed the instructions on enabling the self-signed SSL, Webmail can be accessed at any time at https://YOURIP/webmail/ or https://YOURDOMAIN/webmail/</p>
<p>If you have not then you can only access at http://YOURIP/webmail/ or http://YOURDOMAIN/webmail/</p>
<p>&nbsp;</p>
<p><strong>DATABASE</strong></p>
<p>If you are installing a CMS such as Magento, Joomla, Wordpress, Prestashop etc. you will need a database.</p>
<p>First click on 'DB'</p>
<p>Then click on 'Add Database'</p>
<p>Here fill out the name of your database, note that the user you are currently logged in with will be prefixed to your MySQL database and MySQL username.</p>
<p><img src="http://www.vpsblocks.com.au/images/support/Vesta10.jpg" alt="" width="1014" height="914" /></p>
<p>&nbsp;</p>
<p><strong>FTP</strong></p>
<p>You can FTP into the server using SFP or SCP as your admin user.</p>
<p>When you login you will see four folders. Browse into the web folder, there you will see a folder for each site under your username. Under that the public_html folder is your web root folder.</p>
<p>Click 'Save'</p>
<p><img src="http://www.vpsblocks.com.au/images/support/Vesta11.jpg" alt="" width="1014" height="1042" /></p>
<p>&nbsp;</p>
<p><strong>INSTALLING MAGENTO</strong></p>
<p>First download the full version of Magento, and extract it on your local machine.</p>
<p>Then FTP into the server and upload all the files into the public_html directory.</p>
<p>Then delete the file index.html</p>
<p>Then browse to http://YOURSITE/index.php</p>
<p>Follow the steps to install Magento</p>
<p>&nbsp;</p>
<p><strong>UPDATING YOUR SERVER (Debian and Ubuntu)</strong></p>
<p>You're nearly complete, but now you need to ensure your server is running the latest version of everything that's just been installed. To do that first&nbsp;<a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh" target="_blank">SSH</a>&nbsp;into your server, then type:</p>
<pre><code>apt-get update</code></pre>
<pre><code>apt-get upgrade</code></pre>
<p>Answer yes to any questions posed.&nbsp;</p>
<p>&nbsp;&nbsp;</p>
<p><strong>RUNNING A LOW MEMORY VPS</strong></p>
<p>If you are running on a VPS and only have 512MB of RAM, you may need to perform some tweaks, we recommend that you:</p>
<ul>
<li>SSH into your VPS</li>
<li>Type: nano /etc/mysql/my.cnf</li>
<li>Modify the file to look like this:</li>
</ul>
<p>[mysqld_safe]<br />socket=/var/run/mysqld/mysqld.sock</p>
<p>[mysqld]<br />user=mysql<br />pid-file=/var/run/mysqld/mysqld.pid<br />socket=/var/run/mysqld/mysqld.sock<br />port=3306<br />basedir=/usr<br />datadir=/var/lib/mysql<br />tmpdir=/tmp<br />lc-messages-dir=/usr/share/mysql<br />log_error=/var/log/mysql/error.log<br />max_connections=200<br />max_user_connections=30<br />wait_timeout=30<br />interactive_timeout=50<br />long_query_time=5<br />performance_schema&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = off</p>
<p># CACHES AND LIMITS #</p>
<p>tmp-table-size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 32M<br />max-heap-table-size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 32M<br />query-cache-type&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 0<br />query-cache-size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 0<br />max-connections&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 500<br />thread-cache-size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 50<br />open-files-limit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 65535<br />table-definition-cache&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 1024<br />table-open-cache&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 2048</p>
<p># INNODB #<br />innodb-flush-method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = O_DIRECT<br />innodb-log-files-in-group&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 2<br />innodb-flush-log-at-trx-commit = 1<br />innodb-file-per-table&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 1<br />innodb-buffer-pool-size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 128M</p>
<ul>
<li>Also, you should create a file based swap partition, see:&nbsp;<a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/131/0/creating-a-file-based-swap-partition">https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/131/0/creating-a-file-based-swap-partition</a></li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to Install zPanel for Ubuntu server ]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[a97da629b098b75c294dffdc3e463904]]></guid>
<pubDate><![CDATA[Wed, 27 Mar 2013 12:59:37 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[All related questions &amp; answer on installing zPanel for Ubuntu server. A self help guide to solve issues.
zPanel is a free alternative to cPanel. It's very easy to setup if you follow the below instructions:
1. Login to your server via SSH (see: htt...]]></description>
<content:encoded><![CDATA[<p>All related questions &amp; answer on installing zPanel for Ubuntu server. A self help guide to solve issues.</p>
<p>zPanel is a free alternative to cPanel. It's very easy to setup if you follow the below instructions:</p>
<p>1. Login to your server via SSH (see: <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh">https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh</a>&nbsp;)</p>
<p>2.&nbsp;Follow the instructions to install zPanel, see:&nbsp;http://www.zpanelcp.com/download/</p>
<p>Once this is complete you will see a Congratulations summary displayed in your SSH session. This will provide you the password you need to login to zPanel. The system will also automatically reboot. Ensure you save the password before you close the SSH session, otherwise you will not be able to login.</p>
<p>e.g.</p>
<p style="padding-left: 60px;"># Save the following information somewhere safe:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br /># MySQL Root Password :&nbsp;sdf89us4j&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br /># ZPanelX Username&nbsp;&nbsp;&nbsp; : zadmin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #<br /># ZPanelX Password&nbsp;&nbsp;&nbsp; :</p>
<p style="padding-left: 60px;">&gt; New server crypto key written to cnf/security.php<br />&gt; New API key has been generated!<br />&gt; Account password for 'zadmin' has been updated!</p>
<p style="padding-left: 60px;">p6pFIBviIsfdQH6hC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #</p>
<p>5. To login go to <a href="http://YOURSERVERIP">http://YOURSERVERIP</a></p>
<p>Login using: zadmin<br />Pass: p6pFIBviIsfdQH6hC (whatever&nbsp;password is displayed)</p>
<p>Once you are logged in you can begin creating websites.</p>
<ul>
<li>To get started go to 'Domain Management -&gt; Domains' and create your new hosting account domain.</li>
<li>It will enter a pending state, to force it to be created immediately go to 'Server Admin -&gt; zPanel Config' at the bottom is an option 'Run Daemon Now' click on that.</li>
<li>Once your domain is green (live), you should check DNS for it.</li>
<li>Click on 'Domain Management' -&gt; 'DNS Manager', choose your newly added domain</li>
<li>Create mailboxes: click on 'Mail' -&gt; 'Mailboxes'</li>
<li>Create a MySQL Database if required: Click on 'Database Management' -&gt; 'MySQL Database'</li>
<li>Create an FTP Account if required: Click on 'File Management' -&gt; 'FTP Accounts'</li>
<li>You can also create other users (users, resellers or administrators) if you wish: Click on 'Reseller -&gt; 'Manage Clients'</li>
</ul>
<p>For help see the zPanel website at: <a href="http://www.zpanelcp.com">http://www.zpanelcp.com</a></p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[ Solving Slowness Accessing Via VPS]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[d1fe173d08e959397adf34b1d77e88d7]]></guid>
<pubDate><![CDATA[Thu, 08 Nov 2012 13:17:39 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[SLOW access via an IPV6 from a VPS in Australia? Here is the solution to solve slowness accessing through your VPS.
Due to the way most&nbsp;operating systems&nbsp;work, IPv6 is preferred before IPv4 when available - however the world isn't fully IPv6 re...]]></description>
<content:encoded><![CDATA[<p>SLOW access via an IPV6 from a VPS in Australia? Here is the solution to solve slowness accessing through your VPS.</p>
<p>Due to the way most&nbsp;operating systems&nbsp;work, IPv6 is preferred before IPv4 when available - however the world isn't fully IPv6 ready even though many sites are supporting it - eg google has IPv6 - but It's not in Australia - so it's SLOW&nbsp;accessing it via an IPV6 from a VPS in Australia (and&nbsp;we wouldn't be surprised if the IPv6 international trunks are substantially smaller than IPv4).<br /><br />You can use <a href="http://support.microsoft.com/kb/2533454">this</a> Microsoft support article to prefer v4 over v6 (it lays the blame at mis-configured routers - not the case here - It's just that we're ahead of most of the rest of the world) or you can disable IPv6 on hosts which don't need/want it.</p>
<p>For linux variants there is an article here on how to disable IPv6: <a href="http://activemq.apache.org/multicast-watch-out-for-ipv6-vs-ipv4-support-on-your-operating-system-or-distribution-or-network.html">http://activemq.apache.org/multicast-watch-out-for-ipv6-vs-ipv4-support-on-your-operating-system-or-distribution-or-network.html</a></p>
<p>Interestingly, the latency between Melbourne to Sydney over ipv6 is also high - something which VPSBlocks or our DC have no control over (yet).</p>
<p><strong>Disabling in Windows 2008</strong></p>
<p>Download the fix onto your VPS and install it: <a href="http://go.microsoft.com/?linkid=9728870">http://go.microsoft.com/?linkid=9728870</a></p>
<p><strong>Disabling in Windows 2012</strong></p>
<p>Right click on the powershell icon and choose 'Run as Administrator', then paste in this command:</p>
<pre>New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\services\TCPIP6\Parameters -Name DisabledComponents -PropertyType DWord -Value 0xffffffff</pre>
<pre>You may need to restart afterwards.</pre>
<p><strong>Disabling in CentOS 5.3</strong></p>
<p>Disable IPV6 support on your Linux machine by adding a line at the end of /etc/modprobe.conf by doing the following:</p>
<ul>
<li>SSH into your VPS (we recommend using <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh" target="_blank">Putty</a>)</li>
<li>Type: pico /etc/modprobe.conf</li>
<li>Go to the end of the file and enter this line:</li>
<li>alias net-pf-10 off # disable IPV6</li>
<li>Save the file and exit pico.</li>
<li>Restart the VPS</li>
</ul>
<p><strong>Disabling in CentOS 5.4+</strong></p>
<ul>
<li>Edit /etc/sysconfig/network and set "NETWORKING_IPV6" to "no" <span id="line-96" class="anchor">&nbsp;</span></li>
<li>For 5.4 and later, replace in /etc/modprobe.conf</li>
</ul>
<p>&nbsp;&nbsp; alias ipv6 off</p>
<p class="line874">with:</p>
<p class="line874">&nbsp;&nbsp; options ipv6 disable=1<br /><strong>&nbsp;</strong></p>
<p class="line874"><strong>Disabling in CentOS 6 or 5.4+</strong></p>
<p class="line867">Add the following to /etc/sysctl.conf:</p>
<p class="line867">&nbsp;</p>
<p class="line867">net.ipv6.conf.all.disable_ipv6 = 1</p>
<p class="line867">&nbsp;</p>
<p class="line867"><strong>Alternative Method where modprobe.d is installed</strong></p>
<p class="line867">touch /etc/modprobe.d/disable-ipv6.conf</p>
<pre>echo "install ipv6 /bin/true" &gt;&gt; /etc/modprobe.d/disable-ipv6.conf </pre>
<p>Run <tt class="backtick">/sbin/chkconfig ip6tables off</tt> to disable the IPv6 firewall</p>
<p>Reboot the system</p>
<p class="line867">&nbsp;</p>
<p><strong>Disabling in Linux (Debian)</strong></p>
<p>Append the following to /etc/gai.conf</p>
<pre><code>precedence ::ffff:0:0/96  100
</code></pre>]]></content:encoded>
</item>
<item>
<title><![CDATA[Restart on Task Hang]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[757b505cfd34c64c85ca5b5690ee5293]]></guid>
<pubDate><![CDATA[Sun, 10 Aug 2014 10:06:33 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[If there isn't enough memory allocated on a server tasks may hang on the server. Find step by step tips to solve it.
Find excellent tutorial on restart on task hang. Know how to setup the server so it restarts if this occurs automatically.
Sometimes on ...]]></description>
<content:encoded><![CDATA[<p>If there isn't enough memory allocated on a server tasks may hang on the server. Find step by step tips to solve it.</p>
<p>Find excellent tutorial on restart on task hang. Know how to setup the server so it restarts if this occurs automatically.</p>
<p>Sometimes on a Linux server, particularly if there isn't enough memory allocated on a server or the tasks being queued cannot be done with the available resources over a period of time, tasks may hang on the server. This can be fatal and cause the server to become unresponsive.</p>
<p>To setup the server so it restarts if this occurs automatically you need:</p>
<p>Login to <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh">SSH</a></p>
<p>To make these settings live without rebooting type:<br />sysctl kernel.panic=5<br />sysctl kernel.hung_task_panic=1<br />sysctl vm.panic_on_oom=1</p>
<p>Edit the configuration file so the changes will also occur after a reboot type:<br />pico /etc/sysctl.conf</p>
<p>Add the following to the bottom of the file</p>
<pre><code># Reboot 5 seconds after panic
kernel.panic = 5

# Panic if a hung task was found
kernel.hung_task_panic = 1
<br /># Panic if OOM-Killer is initiated
vm.panic_on_oom = 1<br /></code></pre>
<p>To save Press: CTRL O<br />To exit Press: CTRL X&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Vesta Config File Location]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[9cfdf10e8fc047a44b08ed031e1f0ed1]]></guid>
<pubDate><![CDATA[Mon, 17 Nov 2014 20:12:37 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[Installed Vesta Control Panel and want to modify the config? Learn how to find vesta config file location.
If you have installed Vesta Control Panel and want to modify the config such as the php.ini to change the max file upload size, the file locations ...]]></description>
<content:encoded><![CDATA[<p>Installed Vesta Control Panel and want to modify the config? Learn how to find vesta config file location.</p>
<p>If you have installed Vesta Control Panel and want to modify the config such as the php.ini to change the max file upload size, the file locations are&nbsp;found below.</p>
<p>So for example the php.ini file to modify for phpmyadmin is at:&nbsp;/usr/local/vesta/php/lib/php.ini</p>
<h2>Config and log locations on a RHEL and CentOS</h2>
<table class="conftable">
<tbody>
<tr><th>Service</th><th>Config</th><th>Log</th></tr>
<tr>
<td>Apache</td>
<td>/etc/httpd/conf/httpd.conf<br />/etc/httpd/conf.d/*<br />/home/$user/conf/web/httpd.conf<br />/home/$user/conf/web/shttpd.conf (ssl)</td>
<td>/var/log/httpd/access_log<br />/var/log/httpd/error_log<br />/var/log/httpd/domains/$domain.log<br />/var/log/httpd/domains/$domain.error.log</td>
</tr>
<tr>
<td>PHP</td>
<td>/etc/php.ini<br />/etc/php.d/*</td>
<td>/var/log/httpd/domains/$domain.error.log</td>
</tr>
<tr>
<td>Nginx</td>
<td>/etc/nginx/nginx.conf<br />/etc/nginx/conf.d/*<br />/home/$user/conf/web/nginx.conf<br />/home/$user/conf/web/snginx.conf (ssl)</td>
<td>/var/log/nginx/access.log<br />/var/log/nginx/error.log<br />/var/log/httpd/domains/$domain.log<br />/var/log/httpd/domains/$domain.error.log</td>
</tr>
<tr>
<td>Named</td>
<td>/etc/named.conf<br />/home/$user/conf/dns/$domain.db</td>
<td>/var/log/messages</td>
</tr>
<tr>
<td>Exim</td>
<td>/etc/exim/exim.conf<br />/home/$user/conf/mail/$domain/*</td>
<td>/var/log/exim/main.log<br />/var/log/exim/reject.log<br />/var/log/exim/panic.log</td>
</tr>
<tr>
<td>Dovecot</td>
<td>/etc/dovecot/dovecot.conf<br />/etc/dovecot/conf.d/*<br />/etc/dovecot.conf (rhel5/centos5)<br />/home/$user/conf/mail/$domain/passwd</td>
<td>/var/log/dovecot.log</td>
</tr>
<tr>
<td>ClamAV</td>
<td>/etc/clamd.conf<br />/etc/freshclam.conf</td>
<td>/var/log/clamav/clamd.log<br />/var/log/clamav/freshclam.log<br />/var/log/messages<br />/var/log/exim/main.log</td>
</tr>
<tr>
<td>SpamAssassin</td>
<td>/etc/mail/spamassassin/local.cf</td>
<td>/var/log/exim/main.log</td>
</tr>
<tr>
<td>Roundcube</td>
<td>/etc/roundcubemail/main.inc.php<br />/etc/roundcubemail/db.inc.php<br />/etc/httpd/conf.d/roundcubemail.conf</td>
<td>/var/log/roundcubemail/*<br />/var/log/httpd/domains/$domain.log<br />/var/log/httpd/domains/$domain.error.log</td>
</tr>
<tr>
<td>MySQL</td>
<td>/etc/my.cnf<br />/root/.my.cnf<br />/usr/local/vesta/conf/mysql.conf</td>
<td>/var/log/mysqld.log</td>
</tr>
<tr>
<td>phpMyAdmin</td>
<td>/etc/phpMyAdmin/config.inc.php<br />/etc/httpd/conf.d/phpMyAdmin.conf</td>
<td>/var/log/httpd/domains/$domain.log<br />/var/log/httpd/domains/$domain.error.log</td>
</tr>
<tr>
<td>PostgreSQL</td>
<td>/var/lib/pgsql/data/postgresql.conf<br />/var/lib/pgsql/data/pg_hba.conf<br />/usr/local/vesta/conf/pgsql.conf</td>
<td>/var/lib/pgsql/pgstartup.log</td>
</tr>
<tr>
<td>phpPgAdmin</td>
<td>/etc/phpPgAdmin/config.inc.php<br />/etc/httpd/conf.d/phpPgAdmin.conf</td>
<td>/var/log/httpd/domains/$domain.log<br />/var/log/httpd/domains/$domain.error.log</td>
</tr>
<tr>
<td>Vsftpd</td>
<td>/etc/vsftpd/vsftpd.conf</td>
<td>/var/log/xferlog<br />/var/log/messages</td>
</tr>
<tr>
<td>Vesta</td>
<td>/usr/local/vesta/conf/vesta.conf<br />/usr/local/vesta/conf/mysql.conf<br />/usr/local/vesta/conf/pgsql.conf<br />/usr/local/vesta/conf/ftp.backup.conf<br />/usr/local/vesta/conf/dns-cluster.conf<br />/usr/local/vesta/nginx/conf/nginx.conf<br />/usr/local/vesta/php/lib/php.ini<br />/usr/local/vesta/php/etc/php-fpm.conf</td>
<td>/var/log/vesta/system.log<br />/var/log/vesta/backup.log<br />/var/log/vesta/auth.log<br />/var/log/vesta/nginx-error.log<br />/usr/local/vesta/php/var/log/php-fpm.log</td>
</tr>
</tbody>
</table>
<p><br /><br /></p>
<hr />
<p><a name="config-log-location-debian-ubuntu"></a></p>
<h2>Config and log locations on a Debian and Ubuntu</h2>
<table class="conftable">
<tbody>
<tr><th>Service</th><th>Config</th><th>Log</th></tr>
<tr>
<td>Apache</td>
<td>/etc/apache2/apache2.conf<br />/etc/httpd/conf.d/*<br />/home/$user/conf/web/apache2.conf<br />/home/$user/conf/web/sapache2.conf (ssl)</td>
<td>/var/log/apache2/access.log<br />/var/log/apache2/error.log<br />/var/log/apache2/domains/$domain.log<br />/var/log/apache2/domains/$domain.error.log</td>
</tr>
<tr>
<td>PHP</td>
<td>/etc/php5/apache2/php.ini<br />/etc/php5/conf.d/*</td>
<td>/var/log/apache2/domains/$domain.error.log</td>
</tr>
<tr>
<td>Nginx</td>
<td>/etc/nginx/nginx.conf<br />/etc/nginx/conf.d/*<br />/home/$user/conf/web/nginx.conf<br />/home/$user/conf/web/snginx.conf (ssl)</td>
<td>/var/log/nginx/access.log<br />/var/log/nginx/error.log<br />/var/log/apache2/domains/$domain.log<br />/var/log/apache2/domains/$domain.error.log</td>
</tr>
<tr>
<td>Named</td>
<td>/etc/bind/named.conf<br />/home/$user/conf/dns/$domain.db</td>
<td>/var/log/syslog</td>
</tr>
<tr>
<td>Exim</td>
<td>/etc/exim4/exim4.conf.template<br />/home/$user/conf/mail/$domain/*</td>
<td>/var/log/exim4/mainlog<br />/var/log/exim/rejectlog<br />/var/log/exim/paniclog</td>
</tr>
<tr>
<td>Dovecot</td>
<td>/etc/dovecot/dovecot.conf<br />/etc/dovecot/conf.d/*<br />/home/$user/conf/mail/$domain/passwd</td>
<td>/var/log/dovecot.log</td>
</tr>
<tr>
<td>ClamAV</td>
<td>/etc/clamav/clamd.conf<br />/etc/clamav/freshclam.conf</td>
<td>/var/log/clamav/clamav.log<br />/var/log/clamav/freshclam.log<br />/var/log/exim4/mainlog</td>
</tr>
<tr>
<td>SpamAssassin</td>
<td>/etc/spamassassin/local.cf</td>
<td>/var/log/exim4/mainlog</td>
</tr>
<tr>
<td>Roundcube</td>
<td>/etc/roundcube/main.inc.php<br />/etc/roundcube/db.inc.php<br />/etc/apache2/conf.d/roundcube</td>
<td>/var/log/roundcube/*<br />/var/log/apache2/domains/$domain.log<br />/var/log/apache2/domains/$domain.error.log</td>
</tr>
<tr>
<td>MySQL</td>
<td>/etc/mysql/my.cnf<br />/root/.my.cnf<br />/usr/local/vesta/conf/mysql.conf</td>
<td>/var/log/mysql.log<br />/var/log/mysql/error.log</td>
</tr>
<tr>
<td>phpMyAdmin</td>
<td>/etc/phpmyadmin/config.inc.php<br />/etc/apache2/conf.d/phpmyadmin.conf</td>
<td>/var/log/apache2/domains/$domain.log<br />/var/log/apache2/domains/$domain.error.log</td>
</tr>
<tr>
<td>PostgreSQL</td>
<td>/etc/postgresql/*/main/postgresql.conf<br />/etc/postgresql/*/main//pg_hba.conf<br />/usr/local/vesta/conf/pgsql.conf</td>
<td>/var/log/postgresql/postgresql-*-main.log</td>
</tr>
<tr>
<td>phpPgAdmin</td>
<td>/etc/phppgadmin/config.inc.php<br />/etc/apache2/conf.d/phppgadmin</td>
<td>/var/log/apache2/domains/$domain.log<br />/var/log/apache2/domains/$domain.error.log</td>
</tr>
<tr>
<td>Vsftpd</td>
<td>/etc/vsftpd.conf</td>
<td>/var/log/xferlog<br />/var/log/syslog</td>
</tr>
<tr>
<td>Vesta</td>
<td>/usr/local/vesta/conf/vesta.conf<br />/usr/local/vesta/conf/mysql.conf<br />/usr/local/vesta/conf/pgsql.conf<br />/usr/local/vesta/conf/ftp.backup.conf<br />/usr/local/vesta/conf/dns-cluster.conf<br />/usr/local/vesta/nginx/conf/nginx.conf<br />/usr/local/vesta/php/lib/php.ini<br />/usr/local/vesta/php/etc/php-fpm.conf</td>
<td>/var/log/vesta/system.log<br />/var/log/vesta/backup.log<br />/var/log/vesta/auth.log<br />/var/log/vesta/nginx-error.log<br />/usr/local/vesta/php/var/log/php-fpm.log</td>
</tr>
</tbody>
</table>]]></content:encoded>
</item>
<item>
<title><![CDATA[IPv6 duplicate address and dadfailed]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[cf004fdc76fa1a4f25f62e0eb5261ca3]]></guid>
<pubDate><![CDATA[Wed, 29 Jan 2020 15:53:53 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[Solving the issue with IPv6 when DAD is failed
Symptoms:

A lot of entries in the system log looking like this:kernel: [xxxx.yyyy] eth0: IPv6 duplicate address aaaa:bbbb:cccc:d:eee:fff:aaaa:aaaa detected!Where last several numbers in IPv6 address are matc...]]></description>
<content:encoded><![CDATA[<h2>Solving the issue with IPv6 when DAD is failed</h2>
<h3>Symptoms:</h3>
<ol>
<li>A lot of entries in the system log looking like this:<br /><span style="font-family: 'courier new', courier;"><br />kernel: [xxxx.yyyy] eth0: IPv6 duplicate address aaaa:bbbb:cccc:d:eee:fff:aaaa:aaaa detected!</span><br /><br />Where last several numbers in IPv6 address are matching the network interface MAC address.<br /><br /></li>
<li>Public ETH interface&nbsp;shows "dadfailed" when you run "ip a":<br /><br /><span style="font-family: 'courier new', courier;">inet6 fe80::aaaa:bbbb:cccc:dddd/64 scope link dadfailed</span></li>
</ol>
<p>&nbsp;</p>
<h3>Fix:</h3>
<p>Edit the file <span style="font-family: 'courier new', courier;">/etc/sysctl.conf</span> and insert following lines into it:</p>
<blockquote>
<p>net.ipv6.conf.eth0.accept_dad = 0<br />net.ipv6.conf.default.accept_dad = 0<br />net.ipv6.conf.eth0.dad_transmits = 0<br />net.ipv6.conf.default.dad_transmits = 0</p>
</blockquote>
<p>Where "<span style="font-family: 'courier new', courier;">eth0</span>" is your Ethernet interface name.</p>
<p>Then run:&nbsp;</p>
<p style="padding-left: 30px;"><span style="font-family: 'courier new', courier;">sysctl -p</span></p>
<p>And restart networking:</p>
<p style="padding-left: 30px;"><span style="font-family: 'courier new', courier;">service network restart</span></p>
<p>OR</p>
<p style="padding-left: 30px;"><span style="font-family: 'courier new', courier;">service networking restart</span></p>
<p>Or just reboot the VPS.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to Change Your Linux Hostname]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[f0935e4cd5920aa6c7c996a5ee53a70f]]></guid>
<pubDate><![CDATA[Fri, 22 Mar 2013 10:08:23 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[Change hostname or server name of a Linux system. Learn following step by step tips to do it yourself.
To change the hostname on your actual VPS, you need to login via SSH (see: https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-...]]></description>
<content:encoded><![CDATA[<p>Change hostname or server name of a Linux system. Learn following step by step tips to do it yourself.</p>
<p>To change the hostname on your actual VPS, you need to login via SSH (see: <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh">https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh</a>)</p>
<p><strong>Ubuntu</strong></p>
<p>Type: /bin/hostname mynewhostname</p>
<p>Type: nano /etc/hosts</p>
<p>Edit the file and then save it.</p>
<p>* Note: If you do not have nano installed, you can install it by running:<br />apt-get install nano</p>
<p><strong>CentOS</strong></p>
<p>Type: hostname mynewhostname</p>
<p>Type: pico /etc/sysconfig/network</p>
<p>Edit the file by changing the hostname entry if there is one, and then save it.</p>
<p>* Note: If you do not have pico installed, you can install it by running:<br />yum install pico</p>
<p><strong>CentOS 7</strong></p>
<p>Type: hostname mynewhostname</p>
<p>Type: pico /etc/hostname</p>
<p>Edit the file by changing the hostname entry and then save it.</p>
<p>Type: pico /etc/hosts</p>
<p>Edit the file by changing the hostname entry for 127.0.0.1 and then save it.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[PHP Invoked OOM-killer Error]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[274ad4786c3abca69fa097b85867d9a4]]></guid>
<pubDate><![CDATA[Wed, 27 Aug 2014 16:04:10 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Step by step tutorial on how to fix the PHP invoked OOM killer error. Read steps to fix yourself.
If your linux server does not have enough memory, it may&nbsp;crash due to trying to&nbsp;overcommit memory for application requests.
If your server become...]]></description>
<content:encoded><![CDATA[<p>Step by step tutorial on how to fix the PHP invoked OOM killer error. Read steps to fix yourself.</p>
<p>If your linux server does not have enough memory, it may&nbsp;crash due to trying to&nbsp;overcommit memory for application requests.</p>
<p>If your server becomes unresponsive and&nbsp;after restarting, look at the logs at /var/log/messages</p>
<p>If you find an&nbsp;errors similar to the following.</p>
<p>This one means that a process was killed as it was using too much memory, or memory was not available:</p>
<p>Aug 27 15:25:31 vps kernel: Out of memory: Kill process 19952 (php) score 28 or sacrifice child<br />Aug 27 15:25:31 vps kernel: Killed process 19952, UID 502, (php) total-vm:273544kB, anon-rss:11244kB, file-rss:936kB</p>
<p>This error is a fatal error meaning the kernel tried to&nbsp;overcommit memory for an&nbsp;application (in this case php) and failed. The&nbsp;kernel call trace is the output when a kernel panic occurs:</p>
<p>Aug 27 15:25:31 vps kernel: php invoked oom-killer: gfp_mask=0x200da, order=0, oom_adj=0, oom_score_adj=0<br />Aug 27 15:25:31 vps kernel: php cpuset=/ mems_allowed=0<br />Aug 27 15:25:31 vps kernel: Pid: 20001, comm: php Not tainted 2.6.32-358.2.1.el6.x86_64 #1<br />Aug 27 15:25:31 vps kernel: Call Trace:</p>
<p>This means&nbsp;your server essentially ran out of memory. You should consider adding an extra GB of RAM to your system, see:&nbsp;<a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/86/0/how-to-upgrade-your-memory--ram">https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/86/0/how-to-upgrade-your-memory--ram</a></p>
<p>You&nbsp;can also prevent your kernel from overcommitting memory in the future, by editing a file:</p>
<p>pico /etc/sysctl.conf</p>
<p>Enter the line:&nbsp;<br /><br />vm.overcommit_memory = 2</p>
<p>CTRL O to save the file<br />CTRL X to exit</p>
<p>Now type:</p>
<p>sysctl vm.overcommit_memory=2</p>
<p>This will make the value active in this session without requiring a restart. This may have adverse affects on your server however.</p>
<p>There is an explanation about this here: <a href="http://www.hskupin.info/2010/06/17/how-to-fix-the-oom-killer-crashe-under-linux/">http://www.hskupin.info/2010/06/17/how-to-fix-the-oom-killer-crashe-under-linux/</a></p>
<p>You can also configure your server to reboot when an OOM-Killer event occurs:</p>
<p>pico /etc/sysct.conf</p>
<p>Enter the lines:</p>
<pre class="file"># panic kernel on OOM
vm.panic_on_oom = 1
# reboot after 5 sec on panic
kernel.panic = 5</pre>
<p>CTRL O to save the file<br />CTRL X to exit</p>
<p>Now type:</p>
<p>sysctl vm.panic_on_oom=1<br />sysctl&nbsp;kernel.panic=5</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Kernel CentOS, cPanel &amp; Fedora Update]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[0777d5c17d4066b82ab86dff8a46af6f]]></guid>
<pubDate><![CDATA[Fri, 11 Apr 2014 15:00:05 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[This guide provides instruction to check your server kernel information &amp; upgrade your server to latest kernel. Read &amp; learn.
To update the kernel in CentOS, cPanel or Fedora is very simple. However, there are a few tricks to ensure you don't run...]]></description>
<content:encoded><![CDATA[<p>This guide provides instruction to check your server kernel information &amp; upgrade your server to latest kernel. Read &amp; learn.</p>
<p>To update the kernel in CentOS, cPanel or Fedora is very simple. However, there are a few tricks to ensure you don't run into trouble.</p>
<p>Note: This article applies to CentOS 6 and cPanel servers.&nbsp;Clients with CentOS 7 installed should read <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/257/0/updating-kernel-centos-7">this article</a>.</p>
<p><strong>1. Set a maximum number of installed kernels</strong></p>
<p>This ensure you will not run out of disk space in the /boot partition by continually adding new kernels.</p>
<ul>
<li>Logging into your server via <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh">SSH</a></li>
<li>Type:
<ul>
<li>yum install yum-utils</li>
<li>package-cleanup --oldkernels --count=2</li>
</ul>
</li>
<li>Edit /etc/yum.conf and set an install limit:
<ul>
<li>pico /etc/yum.conf</li>
<li>Enter or update the line if it exists: installonly_limit=2</li>
<li>Save: Ctrl-O</li>
<li>Quit: Ctrl-X</li>
</ul>
</li>
</ul>
<p><strong>2. Update the kernel</strong></p>
<p>On most VPSes there is a symbolic link created as:&nbsp;&nbsp;/etc/grub.conf -&gt; /boot/grub/grub.conf and there is no need to update grub config manually.</p>
<p>To check if there is symbolic link type the command:</p>
<blockquote>ls -la /etc/grub.conf</blockquote>
<p>If the output is as below:</p>
<blockquote>
<p>lrwxrwxrwx 1 root root 20 Jun 30 &nbsp;2014 /etc/grub.conf -&gt; /boot/grub/grub.conf</p>
</blockquote>
<p>Don't worry about the date, as long as it points to the /boot/grub/grub.conf then the symlink is in place correct&nbsp;you are ok. If the symlink does not exist you can either email support and have us check and update the kernel for you. Or type the following commands:</p>
<ul>
<li>cp /boot/grub/grub.conf /root/grub.conf</li>
<li>rm /etc/grub.conf</li>
<li>cd /etc</li>
<li>ln -s /boot/grub/grub.conf /etc/grub.conf</li>
</ul>
<p>Now all is prepared to update the kernel:</p>
<ul>
<li>Type: yum update</li>
<li>Answer yes to all the questions</li>
</ul>
<p>It will display something similar to this:</p>
<blockquote>
<p>Running Transaction<br /> Installing : kernel-2.6.32-504.23.4.el6.x86_64 1/2<br /> Cleanup : kernel-2.6.32-431.29.2.el6.x86_64 2/2<br /> Verifying : kernel-2.6.32-504.23.4.el6.x86_64 1/2<br /> Verifying : kernel-2.6.32-431.29.2.el6.x86_64 2/2</p>
<p>Removed:<br /> kernel.x86_64 0:2.6.32-431.29.2.el6</p>
<p>Installed:<br /> kernel.x86_64 0:2.6.32-504.23.4.el6</p>
<p>Complete!<br />root@vps [/etc]#</p>
</blockquote>
<p><strong>Single Commands to set number of kernels and install the latest kernel:</strong></p>
<p>[ ! -h /etc/grub.conf ] &amp;&amp; mv -f /etc/grub.conf /boot/grub/grub.conf &amp;&amp; ln -s /boot/grub/grub.conf /etc/grub.conf</p>
<p>yum install yum-utils -y &amp;&amp; package-cleanup --oldkernels --count=2 -y &amp;&amp; sed -i 's/installonly_limit=.*/installonly_limit=2/g' /etc/yum.conf &amp;&amp; yum clean all &amp;&amp; yum update -y</p>
<p><strong>Reboot your server:</strong></p>
<ul>
<li>Type: reboot</li>
</ul>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Reset Root Password from Console]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[d82c8d1619ad8176d665453cfb2e55f0]]></guid>
<pubDate><![CDATA[Thu, 19 Jul 2012 13:26:59 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Know the method to reset your root password from the console. This guide tells how to reset a forgotten root password.
Don't know how to reset your root password from the console? Here is the excellent full guidelines to do it yourself.
Firstly, you nee...]]></description>
<content:encoded><![CDATA[<p>Know the method to reset your root password from the console. This guide tells how to reset a forgotten root password.</p>
<p>Don't know how to reset your root password from the console? Here is the excellent full guidelines to do it yourself.</p>
<p>Firstly, you need to access your machine via the console. For instructions on doing this please see: <a href="http://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/28/0/how-can-i-get-console-access-to-my-vps">http://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/28/0/how-can-i-get-console-access-to-my-vps</a></p>
<p>Once you have console access, follow these instructions to boot into single user mode.</p>
<p>At GRUB screen on startup (this flashes quite quickly) do the following:</p>
<p>1. Press a key to stop it booting automatically</p>
<p>2. Select the top kernel and press 'a' to modify it (on some linux variants you press 'e' to edit)</p>
<p>3. Use the arrow keys to highlight the line that begins with the word 'kernel' and press &lsquo;e&rsquo; to edit the parameters</p>
<p>4. At the end of the line, add the word: single (then press Enter)</p>
<p>5. Press &lsquo;b&rsquo; to boot the system</p>
<p>You will be dropped directly into a bash shell as root and can change the password. You can also access your file system from there.</p>
<p>To change your password simply type: passwd root</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Importing a Large MySQL Database]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[f457c545a9ded88f18ecee47145a72c0]]></guid>
<pubDate><![CDATA[Fri, 13 Jul 2012 14:48:42 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Learn how to import a large MySQL database today online. An exceptional online selfhelp tutorial. Learn Step by Step.
If you have a large MySQL database you need to import, you cannot import it via PHPMyAdmin as there is a 2MB limit.
Upload your databas...]]></description>
<content:encoded><![CDATA[<p>Learn how to import a large MySQL database today online. An exceptional online selfhelp tutorial. Learn Step by Step.</p>
<p>If you have a large MySQL database you need to import, you cannot import it via PHPMyAdmin as there is a 2MB limit.</p>
<p>Upload your database file (WinSCP is a great program for transferring files to a Linux server, grab it at: <a href="http://winscp.net/eng/index.php" target="_blank">http://winscp.net/eng/index.php</a>)</p>
<p>Login to SSH (we recommend using <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">Putty</a>)</p>
<p>Find your uploaded database file and enter the following command (entering the correct database name and sql dump file name and location):</p>
<p>mysql -u&nbsp;root -p&nbsp;DATABASENAME &lt; SQLDUMPFILE.sql</p>
<p>If you have uploaded a ZIP of your MySQL dump, you can unzip it first with the command:</p>
<p>unzip FILENAME.zip</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Resizing/Expanding tmp Partition]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[3def184ad8f4755ff269862ea77393dd]]></guid>
<pubDate><![CDATA[Wed, 28 Aug 2013 13:21:20 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Excellent guidelines on how to resize or expand a tmp partition. Learn step by step to do it yourself.
The default tmp folder size for lunix operating systems is often 512mb (including cPanel installations).
To check the size of the tmp partition usedf ...]]></description>
<content:encoded><![CDATA[<p>Excellent guidelines on how to resize or expand a tmp partition. Learn step by step to do it yourself.</p>
<p><br />The default tmp folder size for lunix operating systems is often 512mb (including cPanel installations).</p>
<p>To check the size of the tmp partition use<br />df -h&nbsp;</p>
<p>For some VPS's this is inadequate and a full tmp directory can cause all sorts of problems.</p>
<p>Resizing the tmp partition is easy.</p>
<p>Log in via console or SSH and do the following -</p>
<p>Edit the file<br /><span style="white-space: normal; text-transform: none; word-spacing: 0px; float: none; color: #333333; text-align: left; font: 13px Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; display: inline !important; letter-spacing: normal; background-color: #fafafa; text-indent: 0px;">/scripts/securetmp</span></p>
<p><span style="white-space: normal; text-transform: none; word-spacing: 0px; float: none; color: #333333; text-align: left; font: 13px Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; display: inline !important; letter-spacing: normal; background-color: #fafafa; text-indent: 0px;">Find the line <br /></span><span style="white-space: normal; text-transform: none; word-spacing: 0px; float: none; color: #333333; text-align: left; font: 13px Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; display: inline !important; letter-spacing: normal; background-color: #fafafa; text-indent: 0px;">my $tmpdsksize&nbsp;&nbsp;&nbsp;&nbsp; = 512000;</span></p>
<p><span style="white-space: normal; text-transform: none; word-spacing: 0px; float: none; color: #333333; text-align: left; font: 13px Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; display: inline !important; letter-spacing: normal; background-color: #fafafa; text-indent: 0px;">To change this to 2GB, modify this to:<br /></span><span style="white-space: normal; text-transform: none; word-spacing: 0px; float: none; color: #333333; text-align: left; font: 13px Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; display: inline !important; letter-spacing: normal; background-color: #fafafa; text-indent: 0px;"><span style="white-space: normal; text-transform: none; word-spacing: 0px; float: none; color: #333333; text-align: left; font: 13px Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; display: inline !important; letter-spacing: normal; background-color: #fafafa; text-indent: 0px;">my $tmpdsksize&nbsp;&nbsp;&nbsp;&nbsp; =</span>&nbsp;2097152;</span></p>
<p>Save the file, then run the following commands:</p>
<p>umount -l /tmp<br />umount -l /var/tmp<br />rm -fv /usr/tmpDSK<br />/scripts/securetmp</p>
<p>Type "y" to the yes/no questions asked.</p>
<p>To check the new size of the tmp partition use<br />df -h</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Find Disk Space Usage on Linux]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[5ef059938ba799aaa845e1c2e8a762bd]]></guid>
<pubDate><![CDATA[Mon, 29 Jul 2013 10:08:51 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Learn how to check free disk space in Linux operating system. An easier way on 'how to' free guidelines for learners.
To find your current disk space usage
Login to SSH
Type: df -h
If you are running out of disk space
To find where your space is goin...]]></description>
<content:encoded><![CDATA[<p>Learn how to check free disk space in Linux operating system. An easier way on 'how to' free guidelines for learners.</p>
<p><strong>To find your current disk space usage</strong></p>
<p>Login to <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh">SSH</a></p>
<p>Type: df -h</p>
<p><strong>If you are running out of disk space</strong></p>
<p>To find where your space is going run the command: du -smh /*</p>
<p>This will tell you how much space each directory is taking. If you find for example /home is using a lot of space you can then do the same within the /home directory to drill down further e.g.: du -smbh /home/*</p>
<p>You can also use this command to find which directories are using the most space:</p>
<p>du -mxS / | sort -n | tail</p>
<p>Note that these commands will both take quite a while to return results, so you will need to be patient. If you are out of disk space and need to upgrade please see: <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/88/0/how-to-upgrade-your-disk-space">https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/88/0/how-to-upgrade-your-disk-space</a></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[How To Secure WordPress]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[3cec07e9ba5f5bb252d13f5f431e4bbb]]></guid>
<pubDate><![CDATA[Thu, 16 Apr 2015 12:50:02 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Stop hackers attempting to login on wordpress website. A quick guide for self learners on Wordpress security.
The WordPress Security tips can protect you against an attack and prevent hackers from continually attempting to login.
Wordpress installations...]]></description>
<content:encoded><![CDATA[<p>Stop hackers attempting to login on wordpress website. A quick guide for self learners on Wordpress security.</p>
<p>The WordPress Security tips can protect you against an attack and prevent hackers from continually attempting to login.</p>
<p>Wordpress installations do not come with a default manner in which to stop hackers continually hitting your wp-login page and attempting to login. We recommend you install the Login Security Solution plugin on all your WordPress installations, as well as keep your Wordpress installations up to date with the latest version.</p>
<p>To read about and downoad the plugin please go to:&nbsp;<a href="https://wordpress.org/plugins/login-security-solution/">https://wordpress.org/plugins/login-security-solution/</a></p>
<p>This security plugin will stop hackers from being able to continuously login to your wordpress installation by tracking IPs and&nbsp;blocking those which are attempting to hack.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Install Servers through Webmin]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[17e62166fc8586dfa4d1bc0e1742c08b]]></guid>
<pubDate><![CDATA[Thu, 05 Jul 2012 12:35:47 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Learn steps on how to install servers Apache or MySQL through Webmin. An easy tutorial for any new learners.
To use Webmin to install various servers and modules:

Go to http://YOURIPADDRESS:10000/
Accept the certificate warning
Login using the usern...]]></description>
<content:encoded><![CDATA[<p>Learn steps on how to install servers Apache or MySQL through Webmin. An easy tutorial for any new learners.</p>
<p>To use Webmin to install various servers and modules:</p>
<ul>
<li>Go to <a href="https://YOURIPADDRESS:10000/">http://YOURIPADDRESS:10000/</a></li>
<li>Accept the certificate warning</li>
<li>Login using the username: root</li>
<li>Password: your VPS password</li>
<li>Click on 'Un-used Modules' on the left hand panel</li>
<li>Click on the module you wish to install (for example MySQL Database Server)</li>
<li>Click on the 'click here' to have it download and installed using APT.</li>
</ul>
<p>This will download and install the package you selected.</p>
<p>Once this is complete you will be able to configure the server:</p>
<ul>
<li>Click on 'Servers' on the left hand panel</li>
<li>Click on 'MySQL Database Server'</li>
</ul>
<p>Configure the server in any way you like. For help configuring individual servers using Webmin see: <a href="http://doxfer.webmin.com/Webmin/Modules">http://doxfer.webmin.com/Webmin/Modules</a></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to Mount a Disk (linux)]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/how-to-mount-a-disk-linux]]></link>
<guid isPermaLink="false"><![CDATA[ec5decca5ed3d6b8079e2e7e7bacc9f2]]></guid>
<pubDate><![CDATA[Mon, 16 Sep 2013 10:50:08 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Find steps on How to mount a disk in Linux on VPSBlocks tutorial. An excellent tutorial guide for self learners.
If you have added SATA space to your VPS, the new drive will not be mounted automatically. To add your new SATA hard disk login to SSH.
Note...]]></description>
<content:encoded><![CDATA[<p>Find steps on How to mount a disk in Linux on VPSBlocks tutorial. An excellent tutorial guide for self learners.</p>
<p>If you have added SATA space to your VPS, the new drive will not be mounted automatically. To add your new SATA hard disk login to <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh" target="_blank" rel="noopener">SSH</a>.</p>
<p>Note for this example we are going to assume you are going to mount the drive at /backup</p>
<p><br />Type: fdisk -l<br />Look for the unused disk that matches the size you ordered (most likely /dev/sdb) - we will assume it is /dev/sdb for this example<br />fdisk /dev/sdb<br />n (new partition)<br />p (primary partition)<br />1 (partition number)<br />Press enter and accept the default cylinder values to allocate the entire hard drive<br />w (write the partition table)</p>
<p>You've now created your partition and need to format the drive:</p>
<blockquote>
<p>/sbin/mkfs.ext4 -L /backup /dev/sdb1</p>
<p>mkdir /backup</p>
<p>chmod 000 /backup</p>
<p>mount /dev/sdb1 /backup</p>
</blockquote>
<p>We now need to get the unique identifier for the new drive. Type: blkid</p>
<p>Look for the identifier with the label "/backup" and copy the UUID number to your clipboard e.g. 99e236dc-ca2c-4ee3-95cc-cf3e49e792cc</p>
<p>Now you need to tell the operating system that the drive with that UUID should be mounted at boot to /backup. Type:<br />pico /etc/fstab</p>
<p>Replace the line below with your UUID and then copy and paste it into the bottom of the file:<br />UUID=99e236dc-ca2c-4ee3-95cc-cf3e49e792cc /backup ext4 defaults,nofail 0 0</p>
<p>To save press: Ctrl O<br />Ctrl X<br /><br />You can now access your SATA drive at the mount point you specified.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[How Do I Access Webmin?]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[a1d0c6e83f027327d8461063f4ac58a6]]></guid>
<pubDate><![CDATA[Thu, 05 Jul 2012 12:27:24 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Webmin is a web based application that should be access through browser. Learn how to access Webmin following easy steps.
Webmin is automatically installed on all Linux variants at https://YOURIPADDRESS:10000/
Go there, accept the certificate warning, t...]]></description>
<content:encoded><![CDATA[<p>Webmin is a web based application that should be access through browser. Learn how to access Webmin following easy steps.</p>
<p>Webmin is automatically installed on all Linux variants at <a href="https://203.143.82.4:10000/">https://YOURIPADDRESS:10000/</a></p>
<p>Go there, accept the certificate warning, then login using:</p>
<ul>
<li>Username: root</li>
<li>Password: your VPS password</li>
</ul>
<p>Once you are logged in you can modify your system using Webmin. If you have forgotten your root password or IP Address please refer to the setup email sent to you immediately after your VPS was provisioned.</p>
<p>If you wish to install and manage the webserver Apache follow these instructions: <a href="http://vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/26/0/how-to-install-http-apache-and-php">http://vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/26/0/how-to-install-http-apache-and-php</a></p>
<p>For help on using Webmin see the WIKI at: <a href="http://doxfer.webmin.com/Webmin">http://doxfer.webmin.com/Webmin</a></p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Memcached Install on cPanel/WHM Servers]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[9fc3d7152ba9336a670e36d0ed79bc43]]></guid>
<pubDate><![CDATA[Tue, 08 Oct 2013 13:33:25 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[A complete guide on how to install Memcache on a cPanel/WHM server with root access. Follow step by step tutorial to learn fast.
Memcached is a free &amp; open source, high-performance, distributed memory object caching system, generic in nature, but int...]]></description>
<content:encoded><![CDATA[<p>A complete guide on how to install Memcache on a cPanel/WHM server with root access. Follow step by step tutorial to learn fast.</p>
<p>Memcached is a free &amp; open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. It is highly recommended for use on servers that utilise MySQL/MySQLi in high load environments using carts such as Magento.</p>
<p>After installing Memcached you would need to enable it within your CMS application. For Magento see:&nbsp;<a href="http://magebase.com/magento-tutorials/speeding-up-magento-with-apc-or-memcached/">http://magebase.com/magento-tutorials/speeding-up-magento-with-apc-or-memcached/</a></p>
<p>For older cPanel installation there are further instructions can be found from a post by David Ado and has been tested and works perfectly. Please visit:&nbsp;<a href="http://www.davidado.com/2012/09/07/install-memcached-in-a-whmcpanel-environment-centos/">http://www.davidado.com/2012/09/07/install-memcached-in-a-whmcpanel-environment-centos/</a>&nbsp;for full instructions on the installation of Memcached on older cPanel installations.</p>
<p>For Memcached installation on up to date cPanel please see below:</p>
<p><a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh">SSH</a> into your server</p>
<pre><strong># yum install memcached</strong></pre>
<p>Then, start memcached service</p>
<pre><strong># service memcached start</strong></pre>
<p><strong>Example:</strong></p>
<pre>root@server [~]# service memcached start
Starting memcached: [ OK ]</pre>
<p>Then, install PHP memcache</p>
<pre><strong># pecl install memcache</strong></pre>
<p>OR</p>
<p>We can install memcache from the source by following the steps below:</p>
<pre><strong># wget http://pecl.php.net/get/memcache</strong></pre>
<pre><strong># cd memcache (hit tab to fill out the version number)</strong></pre>
<pre><strong># phpize</strong></pre>
<p>Then, you can see something like this:</p>
<pre># phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
</pre>
<pre><strong># ./configure</strong></pre>
<pre><strong># make</strong></pre>
<pre><strong>#make install</strong></pre>
<p>Make sure memcache module is present in php.ini file. If not, add the memcache extension in php.ini file.</p>
<pre><strong># echo "extension=memcache.so" &gt;&gt; /usr/local/lib/php.ini</strong></pre>
<p>Finally, restart Apache</p>
<pre><strong># service httpd restart</strong></pre>
<p>Make sure memcached will be up even after a server reboot:</p>
<pre><strong># chkconfig --levels 235 memcached on</strong></pre>
<p>How to check if memcache is installed or not?</p>
<pre><strong>
root@server [~]# php -m | grep memcache
memcache
</strong></pre>
<p>That&rsquo;s it!!!</p>
<p>&nbsp;</p>
<div>&nbsp;</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Track outgoing connections using netstat]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[fe73f687e5bc5280214e0486b273a5f9]]></guid>
<pubDate><![CDATA[Tue, 08 May 2018 12:16:18 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[How to track ONLY outgoing connection to certain ports on Linux machines using Netstat
Sometimes it's required to filter incoming connections and listening ports in netstat output and monitor it continuously.
Below is the example of that:

watch -n5 "...]]></description>
<content:encoded><![CDATA[<h2>How to track ONLY outgoing connection to certain ports on Linux machines using Netstat</h2>
<p>Sometimes it's required to filter incoming connections and listening ports in netstat output and monitor it continuously.</p>
<p>Below is the example of that:</p>
<blockquote>
<p>watch -n5 "netstat -antwe | grep -Ev 'LISTEN|127.0.0.1' | gawk '{ print \$5, \$6, \$7 }' | grep -E ':80|:443'"</p>
</blockquote>
<p>Where:</p>
<p style="padding-left: 30px;"><strong>-n5</strong> is refreshing interval, you can increase it if connections disapper too quickly</p>
<p style="padding-left: 30px;"><strong>grep -Ev</strong> is excluding pattern from output</p>
<p style="padding-left: 30px;"><strong>gawk's fields $5, $6 and $7</strong> represent netstat fields: <strong>Foreign address + port, Connections state, UID of process owner</strong></p>
<p style="padding-left: 30px;"><strong>grep -E</strong> includes only ports you are interested in</p>
<p>&nbsp;</p>
<p>If <strong>gawk</strong> is not installed, then install using proper command:</p>
<blockquote>
<p>yum install gawk # for CentOS</p>
<p>apt-get install gawk # for Ubuntu</p>
<p>pacman -S gwak # on Archlinux</p>
</blockquote>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Install Redis Caching for Wordpress]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[c52f1bd66cc19d05628bd8bf27af3ad6]]></guid>
<pubDate><![CDATA[Fri, 22 May 2015 14:54:24 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[This step by step method will will teach how to inatall redis caching for Wordpress. Follow to learn fast.
Our users have reported approximately 30% increase in page loading speed by installing the Redis Caching module for&nbsp;Wordpress.
This can easil...]]></description>
<content:encoded><![CDATA[<p>This step by step method will will teach how to inatall redis caching for Wordpress. Follow to learn fast.</p>
<p>Our users have reported approximately 30% increase in page loading speed by installing the Redis Caching module for&nbsp;Wordpress.</p>
<p>This can easily be installed on cPanel servers as well as any other CentOS or Ubuntu webserver.</p>
<p><strong>Installing Redis</strong></p>
<p>To install Redis as daemon on a CentOS/RHEL/cPanel server, do the following steps.</p>
<p>Go to&nbsp;<a href="http://redis.io/download">http://redis.io/download</a>&nbsp;and&nbsp;determine the latest stable version (3.0.1 at the time of writing) - replace 3.0.1 in the instructions below with the latest version</p>
<p><a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh">SSH</a> into your server</p>
<pre>cd /usr/local/
wget http://download.redis.io/releases/redis-3.0.1.tar.gz
tar -xvzf redis-3.0.1.tar.gz
cd redis-3.0.1
make
cp src/redis-server /usr/local/bin
cp src/redis-cli /usr/local/bin
mkdir -p /etc/redis
mkdir -p /var/redis
cp redis.conf /etc/redis/redis.conf
</pre>
<p>nano /etc/redis/redis.conf<br />Find and set the following values:</p>
<pre>daemonize yes
port 6379
bind 127.0.0.1
dir  /var/redis/
logfile  /var/log/redis.log
pidfile  /var/run/redis.pid
</pre>
<p>Save the file (CTRL O)</p>
<p>Exit (CTRL X)</p>
<p>nano /etc/init.d/redis&nbsp;(reference <a href="https://gist.github.com/paulrosania/257849">https://gist.github.com/paulrosania/257849</a>)<br />Paste in the following</p>
<pre>#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig:   - 85 15 
# description:  Redis is a persistent key-value database
# processname: redis-server
# config:      /etc/redis/redis.conf
# config:      /etc/sysconfig/redis
# pidfile:     /var/run/redis.pid
 
# Source function library.
. /etc/rc.d/init.d/functions
 
# Source networking configuration.
. /etc/sysconfig/network
 
# Check that networking is up.
[ "$NETWORKING" = "no" ] &amp;&amp; exit 0
 
redis="/usr/local/bin/redis-server"
prog=$(basename $redis)
 
REDIS_CONF_FILE="/etc/redis/redis.conf"
 
[ -f /etc/sysconfig/redis ] &amp;&amp; . /etc/sysconfig/redis
 
lockfile=/var/lock/subsys/redis
 
start() {
    [ -x $redis ] || exit 5
    [ -f $REDIS_CONF_FILE ] || exit 6
    echo -n $"Starting $prog: "
    daemon $redis $REDIS_CONF_FILE
    retval=$?
    echo
    [ $retval -eq 0 ] &amp;&amp; touch $lockfile
    return $retval
}
 
stop() {
    echo -n $"Stopping $prog: "
    killproc $prog -QUIT
    retval=$?
    echo
    [ $retval -eq 0 ] &amp;&amp; rm -f $lockfile
    return $retval
}
 
restart() {
    stop
    start
}
 
reload() {
    echo -n $"Reloading $prog: "
    killproc $redis -HUP
    RETVAL=$?
    echo
}
 
force_reload() {
    restart
}
 
rh_status() {
    status $prog
}
 
rh_status_q() {
    rh_status &gt;/dev/null 2&gt;&amp;1
}
 
case "$1" in
    start)
        rh_status_q &amp;&amp; exit 0
        $1
        ;;
    stop)
        rh_status_q || exit 0
        $1
        ;;
    restart|configtest)
        $1
        ;;
    reload)
        rh_status_q || exit 7
        $1
        ;;
    force-reload)
        force_reload
        ;;
    status)
        rh_status
        ;;
    condrestart|try-restart)
        rh_status_q || exit 0
	    ;;
    *)
        echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
        exit 2
esac
</pre>
<p>Save the file (CTRL O)</p>
<p>Exit (CTRL X)</p>
<p>chmod 755 /etc/init.d/redis</p>
<p>Now make sure the daemon will start after server reboot.</p>
<pre>chkconfig --add redis
chkconfig redis on
</pre>
<p>service&nbsp;redis start</p>
<p>To make sure redis is working, run command "<strong>redis-cli ping"&nbsp;</strong>from commandline. If you get result "PONG", that shows redis is working.</p>
<p>Now install redis PHP extension, using following command.</p>
<pre>pecl install redis
</pre>
<p>nano /usr/local/lib/php.ini <br />Find the extension&nbsp;section and add a new line</p>
<pre>extension=redis.so;
</pre>
<p>Save the file (CTRL O)</p>
<p>Exit (CTRL X)</p>
<p>service httpd restart</p>
<p>&nbsp;</p>
<p><strong>Installing the Redis WordPress Plugin</strong></p>
<p>1. Go to <a href="https://wordpress.org/plugins/redis-cache/">https://wordpress.org/plugins/redis-cache/</a></p>
<p>2. Download the plugin and install it to your wordpress site.</p>
<p>3. In WordPress go to the Redis Cache Plugin page and click the green 'Enable Redis Object Cache' button. Redis may list as not installed prior to clicking that button, but if you have done the above correctly it will&nbsp;change the status to 'Connected'.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Solving Linux Time Drift]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[e2c420d928d4bf8ce0ff2ec19b371514]]></guid>
<pubDate><![CDATA[Fri, 21 Sep 2012 11:09:17 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Time drift is a major issue with Linux systems running under virtualisation platforms. To fix this issue follow instructions.
Time drift is a major issue with Linux systems running under virtualisation platforms. Using ntpdate to update your clock regula...]]></description>
<content:encoded><![CDATA[<p>Time drift is a major issue with Linux systems running under virtualisation platforms. To fix this issue follow instructions.</p>
<p>Time drift is a major issue with Linux systems running under virtualisation platforms. Using ntpdate to update your clock regularly and then hwclock to sync it is the general method. However, this can cause sudden time changes by a few seconds which causes services such as Dovecot to restart.</p>
<p>To fix this issue you can change the clock source in your grub.conf. With CentOS or Redhat based Linux Operating Systems:</p>
<ul>
<li>Edit the files at /etc/grub.conf &amp; /boot/grub/grub.conf</li>
<li>Change the kernel lines by adding&nbsp;clock=pit to the end of them:</li>
<li>For example:<br />kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/VolGroup00/LogVol00 clock=pit</li>
<li>Restart your VPS</li>
</ul>
<p>Generally CentOS will then keep time. However, if you have issues please see the article below (generally for Ubuntu)&nbsp;section 2 (install NTPD service) with configuration.</p>
<p>With Ubuntu</p>
<ul>
<li>See:&nbsp;<a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/304/0/ubuntu-time-drift">https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/304/0/ubuntu-time-drift</a></li>
</ul>
<p>If you are not sure how to do this, we can do this for you at a scheduled time, just contact us at <a href="mailto:support@vpsblocks.com.au">support@vpsblocks.com.au</a></p>
<p>Note that all new templates have these changes integrated into them.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[MySQL Tuning on Linux Hosts]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[38db3aed920cf82ab059bfccbd02be6a]]></guid>
<pubDate><![CDATA[Thu, 16 Apr 2015 12:42:21 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Get a benefit to your MySQL performance by using the MySQL Tuner. A complete tutorial on MySQL tuning on linux hosts.
MySQL Tuner
Sometimes you can find that default MySQL settings are not ideal for your installations. In most cases you can get a benefit ...]]></description>
<content:encoded><![CDATA[<p>Get a benefit to your MySQL performance by using the MySQL Tuner. A complete tutorial on MySQL tuning on linux hosts.</p>
<h2>MySQL Tuner</h2>
<p>Sometimes you can find that default MySQL settings are not ideal for your installations. In most cases you can get a benefit to your MySQL performance by using the MySQL Tuner.</p>
<p>You can use mysqltuner.pl script to check the MySQL state and show optimization recommendations which may significantly improve the performance.</p>
<p>First of all ensure your&nbsp;MySQL server has been&nbsp;running for at least 24 hours without reboots as mysqltuner needs as much stats collected as possible.</p>
<p>1. Make a backup of the current my.cnf file. The location differs from linux to linux.</p>
<p>Example:</p>
<blockquote>
<p>cp /etc/my.cnf /etc/my.cnf_original</p>
</blockquote>
<p>&nbsp;</p>
<p>2. Download the script from <a href="http://mysqltuner.pl">http://mysqltuner.pl</a></p>
<blockquote>
<p>wget -O mysqtuner.pl <a href="http://mysqltuner.pl">http://mysqltuner.pl</a></p>
</blockquote>
<p>&nbsp;</p>
<p>3. Make that file executable</p>
<blockquote>
<p>chmod +x mysqltuner.pl</p>
</blockquote>
<p>&nbsp;</p>
<p>4. Run it</p>
<blockquote>
<p>./mysqltuner.pl</p>
</blockquote>
<p>5. Carefully read the information the scripts generated. Please avoid just blindly copy/paste of any parameters shown there. If in doubt, Google what they mean and what damage might result if the changes are incorrect. We do not recommend making any changes with regards to innodb&nbsp;log file sizes without Googling how to do this. Most changes with regards to buffer and memory are safe to implement right away.</p>
<p>6. Insert recommended parameters or change existing ones in the current my.cnf file</p>
<blockquote>
<p>nano /etc/my.cnf</p>
</blockquote>
<p>When done press F2 and choose "Y" on prompt</p>
<p>&nbsp;</p>
<p>7. Reload MySQL server (if possible avoid restarting, just reload):</p>
<blockquote>
<p>service mysqld&nbsp;restart</p>
</blockquote>
<p><br />8. Leave the system running for at least 24h more</p>
<p>9. Measure &nbsp;server parameters, LA, wait%, cpu and memory utilization.</p>
<p>10. Run the mysqltuner.pl script again if required and see if there are other recommendations appeared</p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Got a packet bigger than ‘max_allowed_packet’ bytes]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[da4fb5c6e93e74d3df8527599fa62642]]></guid>
<pubDate><![CDATA[Mon, 19 Aug 2013 14:26:20 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Receiving 'Got a packet bigger than max_allowed_packet bytes' error? Follow our instructions to fix such issues.
If you receive an error from your MySQL server (or website with mySQL backend) stating 'Got a packet bigger than "max_allowed_packet" bytes' ...]]></description>
<content:encoded><![CDATA[<p>Receiving 'Got a packet bigger than max_allowed_packet bytes' error? Follow our instructions to fix such issues.</p>
<p>If you receive an error from your MySQL server (or website with mySQL backend) stating 'Got a packet bigger than "max_allowed_packet" bytes' then you need to increase your MySQL settings to accommodate the request.</p>
<p>You can do this live without any downtime.</p>
<p>1. Login to <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh">SSH</a></p>
<p>2. Once logged in type:</p>
<p style="padding-left: 30px;">mysql</p>
<p style="padding-left: 30px;">set global net_buffer_length=1000000;</p>
<p style="padding-left: 30px;">set global max_allowed_packet=1000000000;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Grub Will Not Boot Error 15 File Not Found]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[fa7cdfad1a5aaf8370ebeda47a1ff1c3]]></guid>
<pubDate><![CDATA[Fri, 11 Apr 2014 15:05:29 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[You may have broken grub. Know how to fix grub error 15: file not found issue on CentOS &amp; Ubuntu.
If you have updated your system and rebooted it without copying grub.conf to the boot directory, you may have broken grub.
To fix this you need to firs...]]></description>
<content:encoded><![CDATA[<p>You may have broken grub. Know how to fix grub error 15: file not found issue on CentOS &amp; Ubuntu.</p>
<p>If you have updated your system and rebooted it without copying grub.conf to the boot directory, you may have broken grub.</p>
<p>To fix this you need to firstly mount the CentOS DVD (preferably the one that matches your operating system version). See:&nbsp;https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/33/0/mount-a-dvd</p>
<p>You need to access your VPS via the web based console, see:&nbsp;https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/28/0/how-can-i-get-console-access-to-my-vps</p>
<p>You can then send a ctrl-alt-delete and enter the DVD boot mode.</p>
<p>Choose to load Linux Rescue</p>
<p>When prompted to mount the operating system choose 'Next' or 'Yes' to do so. Or if prompted for a rescue image, just select hard drives then /sda1</p>
<p>This will mount your entire VPS at /mnt/sysimage</p>
<p>Type:</p>
<ul>
<li>cp /mnt/sysimage/etc/grub.conf /mnt/sysimage/boot/grub/grub.conf</li>
<li>reboot</li>
</ul>
<p>Now remove the CD through the DVD control panel. Your system should now boot.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[List Number of Hits to Apache Per IP Address]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[74db120f0a8e5646ef5a30154e9f6deb]]></guid>
<pubDate><![CDATA[Tue, 25 Nov 2014 10:19:48 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[Find out what IP address has been hitting your webserver for traffic details. An effective guidelines for self learners.
If&nbsp;your server has started getting a lot more traffic and you want to find out what IP address has been hitting your webserver t...]]></description>
<content:encoded><![CDATA[<p>Find out what IP address has been hitting your webserver for traffic details. An effective guidelines for self learners.</p>
<p>If&nbsp;your server has started getting a lot more traffic and you want to find out what IP address has been hitting your webserver there is a one line command to do this.</p>
<p>1. Login to your server via SSH</p>
<p>2. Locate your access log (generally /etc/httpd/logs)</p>
<p>3. Enter the command:</p>
<p>cat /path/to/access_log |awk '{print $1}' |sort |uniq -c |sort -n |tail</p>
<p>So if&nbsp;your access logs are in the standard location /etc/httpd/logs you would enter:</p>
<p>cat /etc/httpd/logs/access_log |awk '{print $1}' |sort |uniq -c |sort -n |tail</p>
<p>&nbsp;</p>
<p>You can also get the current number of connections per IP address by entering the command:</p>
<div id="file-gistfile1-sh-LC3" class="line">netstat -tan<span class="pl-k">|</span> grep -v <span class="pl-s1"><span class="pl-pds">'</span>LISTEN<span class="pl-pds">'</span></span><span class="pl-k">|</span> awk <span class="pl-s1"><span class="pl-pds">'</span>{print $5}<span class="pl-pds">'</span></span><span class="pl-k">|</span> grep -v <span class="pl-s1"><span class="pl-pds">'</span>and<span class="pl-pds">'</span></span> <span class="pl-k">|</span>grep -v <span class="pl-s1"><span class="pl-pds">'</span>Address<span class="pl-pds">'</span></span> <span class="pl-k">|</span>cut -d<span class="pl-s1"><span class="pl-pds">'</span>:<span class="pl-pds">'</span></span> -f1 <span class="pl-k">|</span>sort -n <span class="pl-k">|</span> uniq -c <span class="pl-k">|</span> sort -rn <span class="pl-k">|</span> head -n10</div>
<p>&nbsp;</p>
<p><strong>Create iptop</strong></p>
<p>If you would like to create a program to view these like a top do the following:</p>
<p>nano /root/ipconnections</p>
<p>Paste this into the file:</p>
<p style="padding-left: 30px;">netstat -tan| grep -v 'LISTEN'| awk '{print $5}'| grep -v 'and' |grep -v 'Address' |cut -d':' -f1 |sort -n | uniq -c | sort -rn | head -n10<br />echo ''<br />echo 'TOTAL CONNECTIONS:' `netstat -tan | grep -v 'LISTEN' | wc -l`</p>
<p>Ctrl O to Save</p>
<p>Ctrl X to Quit</p>
<p>chmod 755 /root/ipconnections</p>
<p>nano /usr/sbin/iptop</p>
<p>Paste this into the file:</p>
<p style="padding-left: 30px;">watch -n 0.5 /root/ipconnections</p>
<p>Ctrl O to Save</p>
<p>Ctrl X to Quit</p>
<p>chmod 755 /usr/sbin/iptop</p>
<p>You can now&nbsp;type simply: iptop</p>
<p>This will show you the number of connections to your server per IP address and update twice a second.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Enable Ping / Echo in Iptables]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[3988c7f88ebcb58c6ce932b957b6f332]]></guid>
<pubDate><![CDATA[Sat, 16 Nov 2013 17:35:32 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[A linux based VPS need to allow iptables to respond to ping requests. Follow instructions to create an iptables rule.
If you would like your linux based VPS to respond to ping requests you will need to allow them in iptables. To do this create an iptable...]]></description>
<content:encoded><![CDATA[<p>A linux based VPS need to allow iptables to respond to ping requests. Follow instructions to create an iptables rule.</p>
<p>If you would like your linux based VPS to respond to ping requests you will need to allow them in iptables. To do this create an iptables rule (never use iptables -F to flush your rules or you will most likely lock yourself out of your SSH session):</p>
<p>SSH into the server using putty (<a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh">click here for help on using SSH</a>)</p>
<p>Once logged in type:</p>
<p>iptables -I INPUT -p icmp -m icmp --icmp-type echo-request -j ACCEPT<br />iptables-save</p>
<p>You should now be able to ping your server.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ubuntu Time Drift]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/ubuntu-time-drift]]></link>
<guid isPermaLink="false"><![CDATA[37bc2f75bf1bcfe8450a1a41c200364c]]></guid>
<pubDate><![CDATA[Thu, 22 Dec 2016 10:17:42 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[Tested config for Ubuntu 12/14/16 running under Hyper-V with no time drift
 
1. Kernel boot options
Ensure that cmdline has no other time/clock related parameters, but only "clock=pit".
To check/modify:
- open the file /etc/default/grub
- find the l...]]></description>
<content:encoded><![CDATA[<h2>Tested config for Ubuntu 12/14/16 running under Hyper-V with no time drift</h2>
<p> </p>
<h3>1. Kernel boot options</h3>
<p>Ensure that cmdline has no other time/clock related parameters, but only "clock=pit".</p>
<p>To check/modify:</p>
<p>- open the file <code>/etc/default/grub</code></p>
<p>- find the line with text <code>GRUB_CMDLINE_LINUX_DEFAULT</code></p>
<p>- ensure all is correct there, <code>clocksource=pit</code> set and NO other timer/clock related parameters existing</p>
<p>- save file if changed</p>
<p>- run "<code>update-grub"</code> to re-generate grub.cfg</p>
<p> </p>
<h3>2. Install NTPd service</h3>
<p>- run "apt-get install ntp"</p>
<p>- stop the service by command "service ntp stop"</p>
<p>- backup the file <code>/etc/ntp.conf</code> and replace the content as shown below:</p>
<blockquote>
<pre><code>tinker panic 0</code></pre>
<pre><code>tos maxdist 16</code></pre>
<pre><code>driftfile /var/lib/ntp/ntp.drift</code></pre>
<pre><code>server 172.30.66.8 iburst prefer</code><br /><code>server 0.au.pool.ntp.org iburst</code><br /><code>server 1.au.pool.ntp.org iburst</code><br /><code>server 0.oceania.pool.ntp.org iburst</code></pre>
<pre><code>restrict -4 default kod notrap nomodify</code><br /><code>restrict -6 default kod notrap nomodify</code></pre>
<pre><code>restrict 127.0.0.1</code><br /><code>restrict ::1</code></pre>
</blockquote>
<p>- start the service "service ntp start"</p>
<p><strong>Set ntp to start automatically after boot</strong></p>
<p>update-rc.d ntp enable</p>
<p>If it is the fresh Ubuntu install, jump to step 6.</p>
<p><em><strong>If your Ubuntu setup has the time drift fix applied earlier from our different article, do additional steps as below</strong></em>.</p>
<h3>3. Remove clock adjusting script</h3>
<p>- open the file <code>/etc/rc.local</code></p>
<p>- remove the string sh <code>/etc/clocksync/clocksync.sh &amp;</code></p>
<p>-  save the file</p>
<h3>4. Remove other adjustments</h3>
<p>- uninstall <code>adjtimex</code> by "apt-get purge adjtimex"</p>
<p>- if the file <code>/etc/adjtime</code> exists, edit it, remove all lines with digits and replace word UTC by LOCAL</p>
<p>- save the file</p>
<h3>5. Remove old NTP drift file</h3>
<p>- if existing, remove <code>/var/lib/ntp/ntp.drift</code></p>
<h3>6. Restart the VM</h3>
<h3>7. If still not syncing correctly</h3>
<p><strong>Set the ntp.conf file</strong></p>
<p># nano /etc/ntp.conf</p>
<p><strong>It should read like this (if it does not please change it to the below accordingly):</strong></p>
<p>tinker panic 0<br />tos maxdist 16<br />driftfile /var/lib/ntp/ntp.drift<br />server 172.30.66.8 iburst prefer minpoll 3<br />server 0.au.pool.ntp.org iburst<br />server 1.au.pool.ntp.org iburst<br />server 0.oceania.pool.ntp.org iburst<br />restrict -4 default kod notrap nomodify<br />restrict -6 default kod notrap nomodify<br />restrict 127.0.0.1<br />restrict ::1</p>
<p>CTRL-O to save</p>
<p><strong>Sync the time</strong></p>
<p># ntpd -gq</p>
<p><strong>Reinstall adjtimex</strong></p>
<p># apt-get install adjtimex</p>
<p><strong>This stops NTP, forces it to sync the clock (to “prime the pump”), sleeps for 100 seconds, forces a second clock sync, and restarts NTP. It produces output like this:</strong></p>
<p># /etc/init.d/ntp stop ; ntpd -q ; sleep 100s ; ntpd -q; /etc/init.d/ntp start</p>
<p>Stopping NTP server: ntpd.<br />ntpd: time set +12.262938s<br />ntpd: time set +2.603381s &lt;— drift per 100s<br />Starting NTP server: ntpd.</p>
<p><strong>If the second time set is +2.60 then run this command (these don't have to be exact): </strong></p>
<p># adjtimex -t 10260</p>
<p><strong>If the second time set is -2.60 then run this command (these don't have to be exact): </strong></p>
<p># adjtimex -t 9740</p>
<p># /etc/init.d/ntp stop ; ntpd -q ; sleep 100s ; ntpd -q; /etc/init.d/ntp start</p>
<p>Stopping NTP server: ntpd.<br />ntpd: time set +3.044932s<br />ntpd: time set -2.659021s<br />Starting NTP server: ntpd</p>
<p><strong>Most likely this will now report for example 2.6 in the other direction. This is normal. Now return the adjtimex to the default value:</strong></p>
<p># adjtimex -t 10000</p>
<p>Then reprime again:</p>
<p># /etc/init.d/ntp stop ; ntpd -q ; sleep 100s ; ntpd -q; /etc/init.d/ntp start</p>
<p>You should now see an output like this:</p>
<p>* Stopping NTP server ntpd [ OK ]<br />ntpd: time set -2.653074s<br />ntpd: time slew -0.006406s<br />* Starting NTP server ntpd [ OK ]</p>
<p><strong>Note that it now reports time slew (as it's only a very minor amount out). This is great.</strong></p>
<p><strong>You can now type:</strong></p>
<p># watch ntpq -p</p>
<p><em><strong>This should report the current status of the NTP servers and you should see the jitter falling down to below 3 on the 172.31.66.5 server. Your time is now sync'd correctly.</strong></em></p>
<p> </p>]]></content:encoded>
</item>
<item>
<title><![CDATA[SSH Session Slow to Authenticate - Fix]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[072b030ba126b2f4b2374f342be9ed44]]></guid>
<pubDate><![CDATA[Thu, 26 Jul 2012 13:40:39 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Waiting too longer to log into your VPS with ssh for the session to authenticate? Fix this issue by follow our easy tips.
If you are trying to log into your VPS with ssh and found you have to wait much longer than reasonable for the session to authentica...]]></description>
<content:encoded><![CDATA[<p>Waiting too longer to log into your VPS with ssh for the session to authenticate? Fix this issue by follow our easy tips.</p>
<p>If you are trying to log into your VPS with ssh and found you have to wait much longer than reasonable for the session to authenticate, the issue lies with a hostname lookup.</p>
<p>Essentially the session is slow because the SSH server is trying to lookup the hostname of the SSH client in DNS. This may not exist, and takes some time to do a reverse DNS lookup.</p>
<p>There are a couple of very simple ways to fix that:</p>
<ul class="simple">
<li>add "UseDNS no" to /etc/ssh/sshd_config (recommended)</li>
<li>add the client's net address to the server's /etc/hosts</li>
</ul>]]></content:encoded>
</item>
<item>
<title><![CDATA[Blocking Countries &amp; Exploited IPs]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[9b04d152845ec0a378394003c96da594]]></guid>
<pubDate><![CDATA[Tue, 02 Dec 2014 11:26:18 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[Learn to block a specific country known exploited IPs. Step by step tutorial will help you learn fast and apply. 
If you want to block a specific country known&nbsp;exploited IPs you can do so quite easily by running the below script on a daily basis in ...]]></description>
<content:encoded><![CDATA[<p>Learn to block a specific country known exploited IPs. Step by step tutorial will help you learn fast and apply. </p>
<p>If you want to block a specific country known&nbsp;exploited IPs you can do so quite easily by running the below script on a daily basis in a cron job.</p>
<p>1. First you need to SSH into your server</p>
<p>2. You need to install dos2unix</p>
<p>a. On Ubuntu/Debian type: apt-get install dos2unix</p>
<p>b. On CentOS/Fedora type: yum install dos2unix</p>
<p>3. Create a file and paste the below text into it, type: pico /root/blockips&nbsp;</p>
<blockquote>
<p>#!/bin/bash<br /><br /></p>
<p># Blacklist's names &amp; URLs arrays<br />bl_name=([0]='spyware')<br />bl_url=([0]='http://list.iblocklist.com/?list=bt_spyware&amp;fileformat=p2p&amp;archiveformat=gz')<br />bl_name=(${bl_name[*]} [1]='webexploit')<br />bl_url=(${bl_url[*]} [1]='http://list.iblocklist.com/?list=ghlzqtqxnzctvvajwwag&amp;fileformat=p2p&amp;archiveformat=gz')<br />bl_name=(${bl_name[*]} [2]='spider')<br />bl_url=(${bl_url[*]} [2]='http://list.iblocklist.com/?list=bt_spider&amp;fileformat=p2p&amp;archiveformat=gz')<br />bl_name=(${bl_name[*]} [3]='hijacked')<br />bl_url=(${bl_url[*]} [3]='http://list.iblocklist.com/?list=bt_hijacked&amp;fileformat=p2p&amp;archiveformat=gz')<br />bl_name=(${bl_name[*]} [4]='dshield')<br />bl_url=(${bl_url[*]} [4]='http://list.iblocklist.com/?list=bt_dshield&amp;fileformat=p2p&amp;archiveformat=gz')<br />bl_name=(${bl_name[*]} [5]='bogon')<br />bl_url=(${bl_url[*]} [5]='http://list.iblocklist.com/?list=bt_bogon&amp;fileformat=p2p&amp;archiveformat=gz')<br />bl_name=(${bl_name[*]} [6]='nigeria')<br />bl_url=(${bl_url[*]} [6]='http://list.iblocklist.com/?list=ng&amp;fileformat=p2p&amp;archiveformat=gz')<br /><br /></p>
<p># For each blacklist set above<br />for i in {0..6}; do<br /> # Download blacklist<br /> wget --output-document=/tmp/blacklist_${bl_name[$i]}.gz -w 3 ${bl_url[$i]} -q<br /><br /></p>
<p># Delete current iptables chain link<br /> iptables -D INPUT -j ${bl_name[$i]}<br /> # Flush current iptables chain<br /> iptables -F ${bl_name[$i]}<br /> # Delete current iptables chain<br /> iptables -X ${bl_name[$i]}<br /> # Create current iptables chain<br /> iptables -N ${bl_name[$i]}<br /> # Link current iptables chain to INPUT chain<br /> iptables -A INPUT -j ${bl_name[$i]}<br /><br /></p>
<p># Read blacklist<br /> while read line; do<br /> # Drop description, keep only IP range<br /> ip_range=`echo -n $line | sed -e 's/.*:\(.*\)-\(.*\)/\1-\2/'`;<br /> # Test if it's an IP range<br /> if [[ $ip_range =~ ^[0-9].*$ ]]; then<br /> # Add to the blacklist<br /> iptables -A ${bl_name[$i]} -m iprange --src-range $ip_range -j DROP<br /> fi<br /> done &lt; &lt;(zcat /tmp/blacklist_${bl_name[$i]}.gz | iconv -f latin1 -t utf-8 - | dos2unix)<br />done<br /><br /></p>
<p># Delete files<br />rm /tmp/blacklist*<br /><br /></p>
<p>exit 0</p>
</blockquote>
<p>4. You can modify that file so that it blocks any countries you would like. To do that you would add a new bl_name and bl_url entry and increase the number (from 6 to 7 for example), then you need to change the "for i in {0..6}; do" line to read&nbsp;"for i in {0..7}; do". To get the URLs for country and other blacklists please visit&nbsp;<a href="https://www.iblocklist.com/lists.php">https://www.iblocklist.com/lists.php</a>&nbsp;select&nbsp;the free p2p file format in a gz archive and copy the update url.</p>
<p>5. Press Ctrl O to Save</p>
<p>6. Press Ctrl X to Quit</p>
<p>7. Type: chmod 755 /root/blockips</p>
<p>8. To make this update daily, type: crontab -e</p>
<p>9. If requested choose nano or pico as your editor</p>
<p>10. At the bottom of the file paste the following</p>
<blockquote>
<p>0 5 * * 1 /root/blockips</p>
</blockquote>
<p>11. Press Ctrl O to Save</p>
<p>12. Press Ctrl X to Quit</p>
<p>13. You can also run the script now by typing: /root/blockips</p>
<p>14. Once the script is complete you can view iptables entries by typing: iptables -L</p>
<p><em>* Note the first time you run it you may see the below errors. This is normal and can be safely ignored (it occurs&nbsp;when it tries to delete existing entries for each blacklist specified and none exist).</em></p>
<p><em>iptables v1.4.12: Couldn't load target `nigeria':No such file or directory</em></p>
<p><em>Try `iptables -h' or 'iptables --help' for more information.</em><br /><em>iptables: No chain/target/match by that name.</em><br /><em>iptables: No chain/target/match by that name.</em></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Setting Up a Webserver Using Webmin]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[38b3eff8baf56627478ec76a704e9b52]]></guid>
<pubDate><![CDATA[Mon, 11 Mar 2013 13:25:10 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[Great tutorial available on setting up a webserver using webmin without cPanel. A step by step tutorial for new learners.
If you want to host websites and are happy to do without the friendly cPanel interface, there is a great tutorial available here:
h...]]></description>
<content:encoded><![CDATA[<p>Great tutorial available on setting up a webserver using webmin without cPanel. A step by step tutorial for new learners.</p>
<p>If you want to host websites and are happy to do without the friendly cPanel interface, there is a great tutorial available here:</p>
<p><a href="http://www.asep.us/2011/03/15/how-to-set-up-web-server-using-webmin-centos/">http://www.asep.us/2011/03/15/how-to-set-up-web-server-using-webmin-centos/</a></p>
<p>This shows you step by step how to setup your CentOS webserver using SSH and Webmin.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[MySQL Crashing]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[ec8ce6abb3e952a85b8551ba726a1227]]></guid>
<pubDate><![CDATA[Mon, 29 Sep 2014 10:06:55 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Learn to solve issues with MySQL crashing occasionally on your VPS. Follow step by step tutorial to learn and apply.
If you are having issues with MySQL crashing occasionally (or frequently) on your VPS, the most likely reason is it is hitting the open f...]]></description>
<content:encoded><![CDATA[<p>Learn to solve issues with MySQL crashing occasionally on your VPS. Follow step by step tutorial to learn and apply.</p>
<p>If you are having issues with MySQL crashing occasionally (or frequently) on your VPS, the most likely reason is it is hitting the open files limit imposed by MySQL default settings.</p>
<p>The default open files limit is 1024. This is fine for a few websites, but if you are hosting many websites this should be increased.</p>
<p>1. Login as root via SSH</p>
<p>2. Type: pico <span class="sy0">/</span>etc<span class="sy0">/</span>security<span class="sy0">/</span>limits.conf</p>
<p style="padding-left: 30px;">Add/Modify the lines so they read:</p>
<p style="padding-left: 30px;"><span class="sy0">*</span> soft nofile <span class="nu0">1024000</span><br /><span class="sy0">*</span> hard nofile <span class="nu0">1024000</span><br /><span class="sy0">*</span> soft nproc <span class="nu0">10240</span><br /><span class="sy0">*</span> hard nproc <span class="nu0">10240</span></p>
<p style="padding-left: 30px;">Save: CTRL O</p>
<p style="padding-left: 30px;">Quit: CTRL X</p>
<p>3. Type: <span class="kw2">pico </span><span class="sy0">/</span>etc<span class="sy0">/</span>security<span class="sy0">/</span>limits.d<span class="sy0">/</span><span class="nu0">90</span>-nproc.conf</p>
<p style="padding-left: 30px;">Add/Modify the lines so they read:</p>
<p style="padding-left: 30px;"><span class="sy0">*</span> soft nofile <span class="nu0">1024000</span><br /><span class="sy0">*</span> hard nofile <span class="nu0">1024000</span><br /><span class="sy0">*</span> soft nproc <span class="nu0">10240</span><br /><span class="sy0">*</span> hard nproc <span class="nu0">10240<br /></span><span class="nu0">root soft nproc unlimited</span></p>
<p style="padding-left: 30px;">Save: CTRL O</p>
<p style="padding-left: 30px;">Quit: CTRL X</p>
<p>4. Type: <span class="kw3">ulimit</span> <span class="re5">-Hn</span> <span class="nu0">1024000</span></p>
<p>5. Type: pico /etc/my.cnf</p>
<p style="padding-left: 30px;">Insert the following:</p>
<p style="padding-left: 30px;">open_files_limit = <span class="nu0">1024000</span></p>
<p style="padding-left: 30px;"><span class="nu0">If you have sections [mysqld] and [mysqld_safe] put the line under both headings.</span></p>
<p style="padding-left: 30px;">Save: CTRL O</p>
<p style="padding-left: 30px;">Quit: CTRL X</p>
<p>6. Type: service mysql restart</p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Installing Asterisk 11]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[eb160de1de89d9058fcb0b968dbbbd68]]></guid>
<pubDate><![CDATA[Fri, 24 May 2013 14:29:11 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[There is a couple of great guides on installing Asterisk on both CentOS 6 &amp; Ubuntu 12.&nbsp; Follow the tutorial &amp; do yourself.
CentOS: http://blogs.digium.com/2012/11/05/how-to-install-asterisk-11-on-centos-6/
Ubuntu: http://blogs.digium.com/20...]]></description>
<content:encoded><![CDATA[<p>There is a couple of great guides on installing Asterisk on both CentOS 6 &amp; Ubuntu 12.&nbsp; Follow the tutorial &amp; do yourself.</p>
<p>CentOS: <a href="http://blogs.digium.com/2012/11/05/how-to-install-asterisk-11-on-centos-6/">http://blogs.digium.com/2012/11/05/how-to-install-asterisk-11-on-centos-6/</a></p>
<p>Ubuntu: <a href="http://blogs.digium.com/2012/11/14/how-to-install-asterisk-11-on-ubuntu-12-4-lts/">http://blogs.digium.com/2012/11/14/how-to-install-asterisk-11-on-ubuntu-12-4-lts/</a></p>
<p>If you intend to run Asterisk, we recommend you select one of those platforms and follow the instructions in one of the guides above.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Missing Mysql.sock Not Found in tmp]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[bd4c9ab730f5513206b999ec0d90d1fb]]></guid>
<pubDate><![CDATA[Fri, 04 Apr 2014 15:45:06 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[Learn what to do if MySql.sock file is missing. A self learning guidelines for any learners.
Some programs require mysql.sock to be located at /tmp/mysql.sock
However, cPanel setups and some others now put the mysql.sock file into /var/lib/mysql
Theref...]]></description>
<content:encoded><![CDATA[<p>Learn what to do if MySql.sock file is missing. A self learning guidelines for any learners.</p>
<p>Some programs require mysql.sock to be located at /tmp/mysql.sock</p>
<p>However, cPanel setups and some others now put the mysql.sock file into /var/lib/mysql</p>
<p>Therefore, you can create a symlink so that /tmp/mysql.sock points to /var/lib/mysql.sock</p>
<p>To do this, login to your VPS via <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh">SSH</a></p>
<p>Type:</p>
<p>ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Finding IPs Hitting Webserver]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[a597e50502f5ff68e3e25b9114205d4a]]></guid>
<pubDate><![CDATA[Fri, 25 Jul 2014 15:00:07 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Guidelines to determine which IP addresses are hitting your web site the most. A quick learning tutorials for self learners.
If your webserver has started to come under increased load and you want to see which IPs have been most actively hitting your web...]]></description>
<content:encoded><![CDATA[<p>Guidelines to determine which IP addresses are hitting your web site the most. A quick learning tutorials for self learners.</p>
<p>If your webserver has started to come under increased load and you want to see which IPs have been most actively hitting your website, you can do the following:</p>
<p>1. <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh" target="_blank">SSH</a> into your server</p>
<p>2. Go to the directory where the access_logs are stored for Apache.</p>
<ul>
<li>For cPanel servers this is done by typing: cd /etc/httpd/logs/</li>
<li>Other locations include: /var/log/apache2/ or /var/log/httpd or /etc/apache2/logs</li>
</ul>
<p>3. Type the following command:&nbsp;tail -50000 access_log | awk '{print $1}' | sort | uniq -c | sort -n | tail</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Cannot Write to tmp Directory]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[069059b7ef840f0c74a814ec9237b6ec]]></guid>
<pubDate><![CDATA[Sat, 14 Sep 2013 18:27:02 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Cannot write to tmp directory file corruption even if there is space available? Follow step by step to solve such issues.
Sometimes particularly if the /tmp directory gets full on your server, the underlying tmpDSK file can get corrupted. If this occurs ...]]></description>
<content:encoded><![CDATA[<p>Cannot write to tmp directory file corruption even if there is space available? Follow step by step to solve such issues.</p>
<p>Sometimes particularly if the /tmp directory gets full on your server, the underlying tmpDSK file can get corrupted. If this occurs you will not be able to write to the /tmp directory even if there is space available.</p>
<p>To fix this do the following:</p>
<p>Login to your server via SSH then type the following commands:</p>
<pre class="shell" style="font-family: monospace;">lsof /tmp &nbsp; </pre>
<pre class="shell" style="font-family: monospace;">umount -l /tmp </pre>
<pre class="shell" style="font-family: monospace;">umount -l /var/tmp &nbsp; </pre>
<pre class="shell" style="font-family: monospace;"># This command removes the corrupt partition file </pre>
<pre class="shell" style="font-family: monospace;">rm -fv /usr/tmpDSK &nbsp; </pre>
<pre class="shell" style="font-family: monospace;"># Create a nice new one </pre>
<pre class="shell" style="font-family: monospace;">/scripts/securetmp</pre>
<pre class="shell" style="font-family: monospace;">If you wish to increase your tmp directory size, you can change the value inside the /scripts/securetmp file before running it - search for $tmpdsksize</pre>]]></content:encoded>
</item>
<item>
<title><![CDATA[Creating A File Based Swap Partition]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[1afa34a7f984eeabdbb0a7d494132ee5]]></guid>
<pubDate><![CDATA[Wed, 25 Sep 2013 12:21:11 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Need a swap partition on your VPS? you should use a file based swap partition. Learn the simple steps &amp; do it yourself
Use a file as a swap partition
If you require a swap partition on your VPS, it's recommended to use a file based swap partition. To ...]]></description>
<content:encoded><![CDATA[<p>Need a swap partition on your VPS? you should use a file based swap partition. Learn the simple steps &amp; do it yourself</p>
<h3>Use a file as a swap partition</h3>
<p>If you require a swap partition on your VPS, it's recommended to use a file based swap partition. To add one follow the below instructions.</p>
<p>The following dd command example creates a swap file with the name &ldquo;myswapfile&rdquo; under /root directory with a size of 1024MB (1GB).</p>
<pre># fallocate -l 2G /root/myswapfile

# ls -l /root/myswapfile
-rw-r--r--    1 root     root     1073741824 Aug 14 23:47 /root/myswapfile
</pre>
<p>Change the permission of the swap file so that only root can access it.</p>
<pre># chmod 600 /root/myswapfile
</pre>
<p>Make this file as a swap file using mkswap command.</p>
<pre># mkswap /root/myswapfile
Setting up swapspace version 1, size = 1073737 kB
</pre>
<p>Enable the newly created swapfile.</p>
<pre># swapon /root/myswapfile
</pre>
<p>To make this swap file available as a swap area even after the reboot, add the following line to the /etc/fstab file.</p>
<pre># pico /etc/fstab
/root/myswapfile               swap                    swap    defaults        0 0
</pre>
<p>Verify whether the newly created swap area is available for your use.</p>
<pre># swapon -s
Filename                        Type            Size    Used    Priority
/dev/sda2                       partition       4192956 0       -1
/root/myswapfile                file            1048568 0       -2

# free -k
             total       used       free     shared    buffers     cached
Mem:       3082356    3022364      59992          0      52056    2646472
-/+ buffers/cache:     323836    2758520
Swap:      5241524          0    5241524
</pre>
<p><strong>Note:</strong>&nbsp;In the output of swapon -s command, the Type column will say &ldquo;file&rdquo; if the swap space is created from a swap file.</p>
<p>If you don&rsquo;t want to reboot to verify whether the system takes all the swap space mentioned in the /etc/fstab, you can do the following, which will disable and enable all the swap partition mentioned in the /etc/fstab</p>
<pre># swapoff -a

# swapon -a
</pre>
<div>&nbsp;</div>
<div><strong>Single Cut/Paste version</strong></div>
<div>&nbsp;</div>
<div>dd if=/dev/zero of=/root/myswapfile bs=1M count=1024<br />chmod 600 /root/myswapfile<br />mkswap /root/myswapfile<br />swapon /root/myswapfile<br />pico /etc/fstab<br /><br />/root/myswapfile swap swap defaults 0 0</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[eAccelerator Filling Up/Tmp Directory]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[32bb90e8976aab5298d5da10fe66f21d]]></guid>
<pubDate><![CDATA[Thu, 04 Oct 2012 23:33:15 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Are you running out of space in your up/tmp directory? To fix this you need to change the cache directory that eAccelerator uses.
This article is for those running eAccelerator (common and recommended in cPanel for faster webserving). You may find you ar...]]></description>
<content:encoded><![CDATA[<p>Are you running out of space in your up/tmp directory? To fix this you need to change the cache directory that eAccelerator uses.</p>
<p><strong>This article is for those running eAccelerator (common and recommended in cPanel for faster webserving). You may find you are running out of space in your /tmp directory. To fix this you need to change the cache directory that eAccelerator uses.</strong></p>
<p><code>Login via SSH as root:</code></p>
<p># pico /usr/lib/php.ini</p>
<p>Find:</p>
<p>eaccelerator.cache_dir="/tmp/eaccelerator"</p>
<p>and change it from /tmp/eaccelerator to /var/cache/eaccelerator and save the file.</p>
<p>mkdir /var/cache/eaccelerator</p>
<p>chmod 755 /var/cache/eaccelerator</p>
<p>service httpd stop</p>
<p>rm -rf /tmp/eaccelerator</p>
<p>service httpd start</p>
<p><strong>UPDATE:</strong> If you simply want to clean out the /tmp/eaccerlator folder, the following command does the trick on CentOS and RedHat systems.</p>
<p><code>tmpwatch --mtime --all 336 /tmp/eaccelerator</code></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[ClamAV Manual Scanning]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[19f3cd308f1455b3fa09a282e0d496f4]]></guid>
<pubDate><![CDATA[Thu, 30 Apr 2015 10:37:28 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[You may also build ClamAV from sources to benefit from better scanning. Find ste by step tutorial to do it yourself.
If you need to scan particular location(s) on your VPS using ClamAV, please use following:
&nbsp;
1. logon to the VPS via SSH as root
...]]></description>
<content:encoded><![CDATA[<p>You may also build ClamAV from sources to benefit from better scanning. Find ste by step tutorial to do it yourself.</p>
<p>If you need to scan particular location(s) on your VPS using ClamAV, please use following:</p>
<p>&nbsp;</p>
<p>1. logon to the VPS via <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh" target="_blank">SSH </a>as root</p>
<p>2. run the command:</p>
<blockquote>
<p>clamscan -r /your/directory</p>
</blockquote>
<p>where -r means Recursive scan and /your/directory is the location you need to &nbsp;check</p>
<p>3. check the output of scanning</p>
<p>&nbsp;</p>
<p>Please note, that depending on files amount and their size the scanning process may take significantly long time.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ubuntu/Linux Time Drifting - Solved]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[ea5d2f1c4608232e07d3aa3d998e5135]]></guid>
<pubDate><![CDATA[Thu, 16 Aug 2012 12:19:54 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Time drifting when running a Linux guest under VMware ESX server, knows the way to solve time drifting problem easily.
The final working solution as of 27/03/2015:
NOTE: This method is now deprecated, correct settings in grub.conf and correct ntpd setti...]]></description>
<content:encoded><![CDATA[<p>Time drifting when running a Linux guest under VMware ESX server, knows the way to solve time drifting problem easily.</p>
<p><strong>The final working solution as of 27/03/2015:</strong></p>
<p><strong>NOTE: This method is now deprecated, correct settings in grub.conf and correct ntpd settings are all that is required for accurate time keeping. Please see:</strong></p>
<p><strong><a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/71/0/solving-linux-time-drift">https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/71/0/solving-linux-time-drift</a></strong></p>
<p>&nbsp;</p>
<p>1. Uninstall or disable ntpd service</p>
<blockquote>
<p>~# apt-get purge ntp -y</p>
</blockquote>
<p>or</p>
<blockquote>
<p>~# update-rc.d ntp disable</p>
</blockquote>
<p>2. Create the directory /etc/clocksync if necessary</p>
<blockquote>
<p>~# mkdir /etc/clocksync</p>
</blockquote>
<p>3. Create script clocksyncsh as below:</p>
<blockquote>
<p>#!/bin/bash<br />#######################################<br /># SIMPLE BASH SCRIPT TO CONTROL DRIFT<br />#######################################<br /># Copyright (c) Microsoft Corporation.<br /># All Rights Reserved.<br />#######################################<br /># Stop the NTP Daemon<br />if [ -f /etc/redhat-release ]<br />then<br />service ntpd stop &gt;&gt; /dev/null 2&gt;&amp;1<br />else<br />service ntp stop &gt;&gt; /dev/null 2&gt;&amp;1<br />fi<br /># Force Sync first time with NTP server, replace with custom one if required<br />ntpdate -s -b 0.au.pool.ntp.org<br /># ntpdate -s -b 0.au.pool.ntp.org<br /># Sync hw clock with System clock<br />hwclock --systohc<br />i=0<br />while true<br />do<br /># Keep Syncing system clock with h/w clock<br />hwclock --hctosys<br /># The time interval for which this script sleeps and force updates time<br />sleep 150<br />i=`expr $i + 1`<br /># Sync Hwclock against NTP after 60 sec<br />if [ "$i" -eq 4 ]; then<br />ntpdate -s -b&nbsp;0.au.pool.ntp.org<br />hwclock --systohc<br />i=0<br />fi<br />done</p>
</blockquote>
<p>4. Make the script executable</p>
<blockquote>
<p>~# chmod +x /etc/clocksync/clocksync.sh</p>
</blockquote>
<p>5. Edit /etc/rc.local as below:</p>
<blockquote>
<p>...</p>
<p># By default this script does nothing.</p>
<p>/etc/clocksync/clocksync.sh &amp;</p>
<p>exit 0</p>
</blockquote>
<p>6. Edit the /etc/default/grub file as below:</p>
<blockquote>
<p>...</p>
<p>GRUB_CMDLINE_LINUX_DEFAULT="clock=pit notsc divider=10"</p>
<p>...</p>
</blockquote>
<p>7. Update the grub.</p>
<blockquote>
<p>~# update-grub</p>
</blockquote>
<p>8. Reboot the system.</p>
<blockquote>
<p>~# reboot</p>
</blockquote>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Extend or Expand a SATA partition]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/extend-or-expand-a-sata-partition]]></link>
<guid isPermaLink="false"><![CDATA[006f52e9102a8d3be2fe5614f42ba989]]></guid>
<pubDate><![CDATA[Fri, 09 May 2014 11:51:09 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Know the all tricks that extend or expand a SATA partition. This method is only valid for Linux systems where you have purchased SATA space.
This article is only valid for Linux systems where you have purchased SATA space, and then increased the SATA spa...]]></description>
<content:encoded><![CDATA[<p>Know the all tricks that extend or expand a SATA partition. This method is only valid for Linux systems where you have purchased SATA space.</p>
<p><em>This article is only valid for Linux systems where you have purchased SATA space, and then increased the SATA space, and need to extend the existing SATA partition. These instructions will NOT work for extending your main NVME/Flash partition. If you are unsure please contact support and we are happy to do this for you.</em></p>
<h2>Extend Partition and Filesystem</h2>
<p>Before we start, let’s check the current disk configuration. /backup mount point is the partition we want to extend. We can see that the partition has 494MB of available space and 401MB is already used. We have already purchased the extra SATA space through the <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/153/0/add-sata-space-to-your-vps">control panel</a>, and we want to extend the partition to 1GB:</p>
<pre>[root@foo1 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_foo-LogVol01
                       13G  4.6G  7.7G  38% /
tmpfs                 376M     0  376M   0% /dev/shm
/dev/sda1             485M  105M  355M  23% /boot
<strong>/dev/sdb1             494M  402M   67M  86% /backup</strong></pre>
<pre>Note that the SATA partition is /dev/sdb1 and mounted at /backup</pre>
<h3><span style="font-family: verdana, geneva, sans-serif; font-size: 12pt;">1. Delete the partition</span></h3>
<pre>Please check if /dev/sdb formatted with MBR or GPT using command:<br /><br /># fdisk -l /dev/sdb<br /><br />[root@foo1 ~]# fdisk /dev/sdb -c=dos # only if MBR, otherwise no -c flag</pre>
<pre>Command (m for help): c<br />Switch to dos compatibility mode (this is important as likely the partition starts on 63)</pre>
<pre><br />Command (m for help): unit s<br />If it says "Changing display/entry units to cylinders" then you should type it again until you see "Changing display/entry units to sectors."</pre>
<pre><br />Command (m for help): p<br /><br />Disk /dev/sdb: 64.4 GB, 64424509440 bytes, 125829120 sectors<br />Units = sectors of 1 * 512 = 512 bytes<br />Sector size (logical/physical): 512 bytes / 4096 bytes<br />I/O size (minimum/optimal): 4096 bytes / 4096 bytes<br />Disk label type: dos<br />Disk identifier: 0xc546eb5a<br /><br /> Device Boot Start End Blocks Id System<br />/dev/sdb1 2048 83886079 41942016 83 Linux<br /><br />Note the start sector (2048 usually or sometimes 63) <br /><br />Command (m for help): d <br />Selected partition 1 <br />Command (m for help): p <br />Disk /dev/sdb: 1073 MB, 1073741824 bytes 255 heads, 63 sectors/track, 130 cylinders, total 2097152 sectors <br />Units = sectors of 1 * 512 = 512 bytes <br />Sector size (logical/physical): 512 bytes / 512 bytes <br />I/O size (minimum/optimal): 512 bytes / 512 bytes <br />Disk identifier: 0x2dbb9f13    <br /><br />Device Boot      Start         End      Blocks   Id  System <br /><br />Command (m for help): w <br />The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.</pre>
<h3>2. Create a new (larger) partition</h3>
<pre>[root@foo1 ~]# fdisk /dev/sdb -c=dos # see MBR/GPT notes above</pre>
<pre><br />Command (m for help): c<br />Switch to dos compatibility mode (this is important as likely the partition starts on 63)</pre>
<pre><br />Command (m for help): unit s<br />If it says "Changing display/entry units to cylinders" then you should type it again until you see "Changing display/entry units to sectors."</pre>
<pre> </pre>
<pre>Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First sector (2048-2097151, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-2097151, default 2097151): 
Using default value 2097151

Command (m for help): p

Disk /dev/sdb: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders, total 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2dbb9f13

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048     2097151     1047552   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.</pre>
<h3>3. Refresh partition tables in kernel data</h3>
<pre>[root@foo1 ~]# partprobe
</pre>
<h3>4. Resize your filesystem with resize2fs</h3>
<pre>[root@foo1 ~]# resize2fs /dev/sdb1 
resize2fs 1.41.12 (17-May-2010)
Resizing the filesystem on /dev/sdb1 to 1044192 (1k) blocks.
The filesystem on /dev/sdb1 is now 1044192 blocks long.</pre>
<h3>5. Check if filesystem is larger than before </h3>
<pre>[root@foo1 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_foo-LogVol01
                       13G  4.6G  7.7G  38% /
tmpfs                 376M     0  376M   0% /dev/shm
/dev/sda1             485M  105M  355M  23% /boot
/dev/sdb1             988M  402M  536M  43% /backup</pre>
<p> <br />Congratulations! The partition was successfully extended, as we can see all of the data was retained!</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Adding an IP Address in Ubuntu]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[44f683a84163b3523afe57c2e008bc8c]]></guid>
<pubDate><![CDATA[Mon, 06 Aug 2012 16:52:02 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[After you have ordered an extra IP Address through the cPanel, you will need to assign the new IP to the NIC in VPS.
Setting Up Multiple IPs in Ubuntu
After you have ordered an extra IP Address through the control panel (see http://www.vpsblocks.com.au/...]]></description>
<content:encoded><![CDATA[<p>After you have ordered an extra IP Address through the cPanel, you will need to assign the new IP to the NIC in VPS.</p>
<h2>Setting Up Multiple IPs in Ubuntu</h2>
<p>After you have ordered an extra IP Address through the control panel (see <a href="http://www.vpsblocks.com.au/support/Knowledgebase/Article/View/18/0/how-do-i-add-another-ip-address">http://www.vpsblocks.com.au/support/Knowledgebase/Article/View/18/0/how-do-i-add-another-ip-address</a>) you will need to assign the new IP to the NIC in your VPS.</p>
<p>The network config file you need to edit is at: /etc/network/interfaces</p>
<p><code>auto eth2<br />iface eth2 inet static<br />address 192.168.210.100<br />netmask 255.255.255.0<br />gateway 192.168.210.1</code></p>
<p>Adding more IP addresses to those interfaces is as simple as creating an alias, done by duplicating the information for the initial interface and appending a colon followed by 0,1,2,3,etc according to how many aliases are needed, minus the gateway (the initial IPs gateway will be used):</p>
<p><code>auto eth2:0<br />iface eth2:0 inet static<br />address 192.168.210.101<br />netmask 255.255.255.0<br /></code></p>
<p><code>auto eth2:1<br />iface eth2:1 inet static<br />address 192.168.210.102<br />netmask 255.255.255.0<br /></code></p>
<p>When finished run: /etc/init.d/networking restart</p>
<p>This will activate the changes and make the new IP address live.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Manually Creating a CSR]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[7e7757b1e12abcb736ab9a754ffb617a]]></guid>
<pubDate><![CDATA[Tue, 06 May 2014 14:11:42 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Learn the easiest way to manually generate a Certificate Signing Request (CSR) for your SSL certificate.
Please note: This article is for Linux servers NOT running cPanel
Prerequisites
What you'll need first is to install&nbsp;Openssl&nbsp;on your serv...]]></description>
<content:encoded><![CDATA[<p>Learn the easiest way to manually generate a Certificate Signing Request (CSR) for your SSL certificate.</p>
<p><em>Please note: This article is for Linux servers NOT running cPanel</em></p>
<h2>Prerequisites</h2>
<p>What you'll need first is to install&nbsp;<strong>Openssl</strong>&nbsp;on your server, this is a common package and will be available on all of the major distros through their package installer. Here is how you check to see if it is installed in a "Yum" style system such as CentOS or Fedora:</p>
<pre id="pre-0">&nbsp;</pre>
<pre id="pre-1">    # yum install openssl openssl-devel
</pre>
<p><a id="Generate_the_RSA_key" name="Generate_the_RSA_key"></a></p>
<h2>Generate the RSA key</h2>
<p>Create a RSA key:</p>
<div class="syntax">&nbsp;</div>
<pre id="pre-2">    # mkdir /root/domain.com.ssl/
    # cd /root/domain.com.ssl/

</pre>
<p>Type the following command to generate a private key.</p>
<div class="syntax">&nbsp;</div>
<pre id="pre-3">    # openssl genrsa -out /root/domain.com.ssl/domain.com.key 2048
</pre>
<p><a id="Create_a_CSR" name="Create_a_CSR"></a></p>
<h2>Create a CSR</h2>
<p>Type the following command to create a CSR with the RSA private key (output will be PEM format):</p>
<div class="syntax">&nbsp;</div>
<pre id="pre-4">    # openssl req -new -key /root/domain.com.ssl/domain.com.key -out /root/domain.com.ssl/domain.com.csr
</pre>
<p>When creating a CSR you must follow these conventions. Enter the information to be displayed in the certificate. The following characters can not be accepted: &lt; &gt; ~&nbsp;! @ # $&nbsp;% ^ * / \ ( )&nbsp;?.,&amp;. All fields are required.</p>
<table class="ssltable" border="2">
<tbody>
<tr>
<td>DN Field</td>
<td>Explanation</td>
<td>Example</td>
</tr>
<tr>
<td>Common Name</td>
<td>The fully qualified domain name for your web server. This must be an exact match.</td>
<td>If you intend to secure the URL&nbsp;<a class="external free" title="https://www.yourdomain.com" href="https://www.yourdomain.com/" rel="nofollow">https://www.yourdomain.com</a>, then your CSR's common name must be www.yourdomain.com. If you plan on getting a Wildcard certificate make sure to prefix your domain with a '*' ex. *.domain.com</td>
</tr>
<tr>
<td>Organization</td>
<td>The exact legal name of your organization. Do not abbreviate your organization name.</td>
<td>domain.com</td>
</tr>
<tr>
<td>Organization Unit</td>
<td>Section of the organization</td>
<td>Sales</td>
</tr>
<tr>
<td>City or Locality</td>
<td>The city where your organization is legally located.</td>
<td>Melbourne</td>
</tr>
<tr>
<td>State or Province</td>
<td>The state or province where your organization is legally located. Can not be abbreviated.</td>
<td>Victoria</td>
</tr>
<tr>
<td>Country</td>
<td>The two-letter ISO abbreviation for your country.</td>
<td>AU</td>
</tr>
</tbody>
</table>
<p>Do not enter extra attributes at the prompt.</p>
<ul>
<li>Warning: Leave the challenge password blank (press enter)</li>
</ul>
<p><a id="Verify_your_CSR" name="Verify_your_CSR"></a></p>
<h2>Verify your CSR</h2>
<div class="syntax">&nbsp;</div>
<pre id="pre-5">    # openssl req -noout -text -in /root/domain.com.ssl/domain.com.csr
</pre>
<p><a id="Submit_your_CSR" name="Submit_your_CSR"></a></p>
<h2>Submit your CSR</h2>
<p>From this point you have to take your CSR that you created here and submit it to a certificate authority. We offer Comodo certificates through the my account area.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Tracking Bandwidth - NetHogs]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[82aa4b0af34c2313a562076992e50aa3]]></guid>
<pubDate><![CDATA[Mon, 07 Apr 2014 08:50:41 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[NetHogs is a utility which allows you to see what bandwidth each process on your system is using at a given time.
* Please note this article contains extracts from:&nbsp;http://www.cyberciti.biz/faq/linux-find-out-what-process-is-using-bandwidth/
Instea...]]></description>
<content:encoded><![CDATA[<p>NetHogs is a utility which allows you to see what bandwidth each process on your system is using at a given time.</p>
<p>* Please note this article contains extracts from:&nbsp;<a href="http://www.cyberciti.biz/faq/linux-find-out-what-process-is-using-bandwidth/">http://www.cyberciti.biz/faq/linux-find-out-what-process-is-using-bandwidth/</a></p>
<p>Instead of breaking the traffic down per protocol or per subnet, like most such tools do, it groups bandwidth by process and does not rely on a special kernel module to be loaded. So if there's suddenly a lot of network traffic, you can fire up NetHogs and immediately see which PID is causing this, and if it's some kind of spinning process, kill it.</p>
<h2>Install nethogs under Debian or Ubuntu Linux</h2>
<p>Type the following&nbsp;<a href="http://www.cyberciti.biz/tips/linux-debian-package-management-cheat-sheet.html">apt-get command to install nethogs</a>&nbsp;package:<br /><code>$ sudo apt-get install nethogs</code></p>
<h2>Install nethogs under RHEL or CentOS or Fedora Linux</h2>
<p>First turn on EPEL repository&nbsp;and type the following yum command to install nethogs:</p>
<p><code>yum install epel-release</code></p>
<p><code>yum install nethogs</code></p>
<h2>How do I use nethogs?</h2>
<p>The syntax is:</p>
<pre class="bash">&nbsp;
nethogs
nethogs eth1
nethogs [option] eth0 eth1
nethogs [option] eth0 eth1 ppp0
sudo /usr/sbin/nethogs eth0
&nbsp;</pre>
<p>Sample outputs:</p>
<div id="attachment_13166" class="wp-caption aligncenter"><a href="http://www.cyberciti.biz/faq/linux-find-out-what-process-is-using-bandwidth/nethogs-output/" rel="attachment wp-att-13166"><img class="size-full wp-image-13166" src="http://s0.cyberciti.org/uploads/faq/2013/03/nethogs-output.png" alt="Fig.01: nethogs in action" width="503" height="140" /></a>
<p class="wp-caption-text">Fig.01: nethogs in action</p>
</div>
<p><br />Another output from one of my personal RHEL server:</p>
<div id="attachment_13167" class="wp-caption aligncenter"><a href="http://www.cyberciti.biz/faq/linux-find-out-what-process-is-using-bandwidth/nethogs-centos-rhel/" rel="attachment wp-att-13167"><img class="size-full wp-image-13167" src="http://s0.cyberciti.org/uploads/faq/2013/03/nethogs-centos-rhel.png" alt="Fig.02: Nethogs in action on my centos/rhel box" width="593" height="388" /></a>
<p class="wp-caption-text">Fig.02: Nethogs in action on my centos/rhel box</p>
</div>
<p>&nbsp;</p>
<h3>Keyboard shortcuts</h3>
<p>Use the following interactive controls:</p>
<ol>
<li><kbd><strong>m</strong></kbd>&nbsp;: Cycle between display modes (kb/s, kb, b, mb)</li>
<li><kbd><strong>r</strong></kbd>&nbsp;: Sort by received.</li>
<li><kbd><strong>s</strong></kbd>&nbsp;: Sort by sent.</li>
<li><kbd><strong>q</strong></kbd>&nbsp;: Quit and return to the shell prompt.</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[ Install HTTP (Apache) and PHP]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[4e732ced3463d06de0ca9a15b6153677]]></guid>
<pubDate><![CDATA[Wed, 20 Jun 2012 15:37:59 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[This article gives a step by step guide on how you can install HTTP (Apache) and PHP. Follow the tutorial &amp; do yourself.
Login via SSH
Type the following commands:

install httpd mod_ssl
chkconfig httpd on
yum install php-common php-gd php-mcryp...]]></description>
<content:encoded><![CDATA[<p>This article gives a step by step guide on how you can install HTTP (Apache) and PHP. Follow the tutorial &amp; do yourself.</p>
<p>Login via SSH</p>
<p>Type the following commands:</p>
<ul>
<li>install httpd mod_ssl</li>
<li>chkconfig httpd on</li>
<li>yum install php-common php-gd php-mcrypt php-pear php-pecl-memcache php-mhash php-mysql php-xml</li>
<li>/etc/init.d/httpd start</li>
</ul>
<p>To enable webmin to configure your Apache installation:</p>
<ul>
<li>Login to webmin on your server</li>
<li>Expand the 'Webmin' button on the left hand side</li>
<li>Select 'Webmin Configuration'</li>
<li>Click on 'Refresh Modules'</li>
</ul>
<p>Once this is complete, you will see 'Apache Webserver' as an option under the 'Servers' category on the left hand menu.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Updating Kernel CentOS 7]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[d96409bf894217686ba124d7356686c9]]></guid>
<pubDate><![CDATA[Mon, 15 Jun 2015 16:35:50 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Read the complete article and know the simple steps to update the kernel in CentOS 7 easily.
To update the kernel in CentOS&nbsp;7 is very simple.
Note: This article applies to CentOS 7.&nbsp;Clients with CentOS 6 or cPanel installed should read this ar...]]></description>
<content:encoded><![CDATA[<p>Read the complete article and know the simple steps to update the kernel in CentOS 7 easily.</p>
<p>To update the kernel in CentOS&nbsp;7 is very simple.</p>
<p>Note: This article applies to CentOS 7.&nbsp;Clients with CentOS 6 or cPanel installed should read <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/163/0/updating-kernel-centos-cpanel-and-fedora">this article</a>.</p>
<p><strong>1. Update the kernel</strong></p>
<ul>
<li>Type: yum update</li>
<li>Answer yes to all the questions (if there are no updates available this will also be displayed in which case there's no need to reboot below).</li>
</ul>
<p>It will display something similar to this:</p>
<blockquote>
<p>Running Transaction<br />Installing : kernel-2.6.32-504.23.4.el6.x86_64 1/2<br />Cleanup : kernel-2.6.32-431.29.2.el6.x86_64 2/2<br />Verifying : kernel-2.6.32-504.23.4.el6.x86_64 1/2<br />Verifying : kernel-2.6.32-431.29.2.el6.x86_64 2/2</p>
<p>Removed:<br />kernel.x86_64 0:2.6.32-431.29.2.el6</p>
<p>Installed:<br />kernel.x86_64 0:2.6.32-504.23.4.el6</p>
<p>Complete!<br />root@vps [/etc]#</p>
</blockquote>
<p>Reboot your server:</p>
<ul>
<li>Type: reboot</li>
</ul>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[CentOS 6 - move /boot to larger partition]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[a02ffd91ece5e7efeb46db8f10a74059]]></guid>
<pubDate><![CDATA[Mon, 27 Apr 2020 11:31:27 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Sometimes old systems are set up with small /boot partition at the beginning of partition table.
In this case it is impossible to expand boot partition and ones face the issue when there is not enough space to hold even 2 kernels.
The solution is to creat...]]></description>
<content:encoded><![CDATA[<p>Sometimes old systems are set up with small /boot partition at the beginning of partition table.</p>
<p>In this case it is impossible to expand boot partition and ones face the issue when there is not enough space to hold even 2 kernels.</p>
<p>The solution is to create a new partition at the end of drive and move /boot there.</p>
<p>First you need to expand your virtual disk so there is unpartitioned space. This is done in the virtualization system by your host.</p>
<p>Example below uses following defaults:</p>
<p>- the drive is GPT</p>
<p>- boot partition is <code>/dev/sda1</code></p>
<p>- new boot partition is <code>/dev/sda5</code></p>
<ol>
<li>Create new Linux partition at the end of drive with desired size. If your drive is GPT use <code>gdisk</code>, if MBR and less then 4 partitions exist you can use <code>fdisk</code>, otherwise convert drive to GPT first.</li>
<li>Probe the new partition: <code>partx -v -a /dev/sda</code></li>
<li><code><code>If you get the error:&nbsp;</code>Not enough space to build proposed filesystem while setting up superblock</code><br />You need to reboot the server.</li>
<li>Format the new drive: <code>mkfs.ext4 /dev/sda5</code></li>
<li>Copy everything from /dev/sda1 to /dev/sda5 in "dd" way using:<br /><code>dd if=/dev/sda1 of=/dev/sda5 bs=1M</code></li>
<li>Do the /dev/sda5 partition FS check and FS resize (as after "dd" it inherits size from /dev/sda1):<br /><code>e2fsck -fy /dev/sda5</code><br /><code>resize2fs /dev/sda5</code><br /><code>e2fsck -fy /dev/sda5</code></li>
<li>Un-mount /dev/sda1:<br /><code>umount /dev/sda1</code></li>
<li>Mount /dev/sda5 to /boot:<br /><code>mount /dev/sda5 /boot</code></li>
</ol>
<p>Now we need to tell GRUB to use <code>/dev/sda5</code> as <code>/boot</code> (/boot is root for GRUB in this case).</p>
<p>Run&nbsp;"<code>grub-install --recheck /dev/sda</code>".</p>
<p>After that check the file <code>/boot/grub/grub.conf</code> (ensure that /dev/sda5 mounted on /boot) and replace all entries of hd(0,0) with hd(0,4)</p>
<p>Change the UUID of the original /dev/sda1: <code>tune2fs /dev/sda1 -U random</code></p>
<p>Also, check&nbsp;<code>/etc/fstab</code> file that the new device UUID (or partition listed) is correct (whatever is being used there) for /boot mount point device.</p>
<p>You can find new UUID for /dev/sda5 by the command "<code>blkid</code>".</p>
<p>Reboot.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Some manual commands for information,&nbsp;although the above should work without issue:</p>
<p>All commands for copy paste assuming sda8</p>
<blockquote>
<p>partx -v -a /dev/sda<br />mkfs.ext4 /dev/sda8<br />dd if=/dev/sda1 of=/dev/sda8 bs=1M<br />e2fsck -fy /dev/sda8<br />resize2fs /dev/sda8<br />e2fsck -fy /dev/sda8<br />umount /dev/sda1<br />mount /dev/sda8 /boot<br />grub-install --recheck /dev/sda<br />tune2fs /dev/sda1 -U random<br />vi /boot/grub/grub.conf<br />mkfs.ext4 /dev/sda1</p>
<p>&nbsp;</p>
</blockquote>
<p>&nbsp;</p>
<p>If you just run "<code>grub-install /dev/sda</code>" it may still catch old /boot partition at /dev/sda1 as all data and headers are still existing there.</p>
<p>Instead of deleting /dev/sda1 and hoping it works we need to explicitly tell grub to use /dev/sda5 as our /boot partition.</p>
<p>In the shell run the command "<code>grub</code>"</p>
<p>Then follow the log below:</p>
<p><code>grub&gt; find /grub/stage1</code><br /><code>find /grub/stage1</code><br /><code>(hd0,0)</code><br /><code>(hd0,4)</code><br /><code>grub&gt; root (hd0,4)</code><br /><code>root (hd0,4)</code><br /><code>Filesystem type is ext2fs, partition type 0x83</code><br /><code>grub&gt; setup (hd0)</code><br /><code>setup (hd0)</code><br /><code>Checking if "/boot/grub/stage1" exists... no</code><br /><code>Checking if "/grub/stage1" exists... yes</code><br /><code>Checking if "/grub/stage2" exists... yes</code><br /><code>Checking if "/grub/e2fs_stage1_5" exists... yes</code><br /><code>Running "embed /grub/e2fs_stage1_5 (hd0)"... failed (this is not fatal)</code><br /><code>Running "embed /grub/e2fs_stage1_5 (hd0,4)"... failed (this is not fatal)</code><br /><code>Running "install /grub/stage1 (hd0) /grub/stage2 p /grub/grub.conf "... succeeded</code><br /><code>Done.</code><br /><code>grub&gt; quit</code></p>
<p>Please note:</p>
<ol>
<li>hd(0,0) is actually the first partition (/dev/sda1)</li>
<li>hd(0,4) is 5th partition (/dev/sda5)</li>
<li>We tell Grub to find "stage1" section and it shows two partitions: the old and new /boot</li>
<li>We choose to use /dev/sda5, in this case it is hd(0,4)</li>
<li>You can ignore those two failures reported by grub.</li>
</ol>]]></content:encoded>
</item>
<item>
<title><![CDATA[Expanding Linux Partition]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/expanding-linux-partition]]></link>
<guid isPermaLink="false"><![CDATA[f2217062e9a397a1dca429e7d70bc6ca]]></guid>
<pubDate><![CDATA[Mon, 06 Jan 2014 15:22:06 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[If your partition is GPT it should expand automatically upon ordering your disk upgrade. Know how to expand Linux Partition
Note: This article is NOT for expanding SATA space. To expand SATA space please click here.
If you are uncertain about doing this...]]></description>
<content:encoded><![CDATA[<p>If your partition is GPT it should expand automatically upon ordering your disk upgrade. Know how to expand Linux Partition</p>
<p>Note: This article is NOT for expanding SATA space. To expand SATA space please <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/168/0/extend-or-expand-a-sata-partition">click here</a>.</p>
<p><span style="color: #ff0000;"><em><strong>If you are uncertain about doing this we are happy to do this for you, doing it incorrectly could permanently damage your data, please lodge a ticket with support.</strong></em></span></p>
<p>If you have <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/88/0/how-to-upgrade-your-disk-space">upgraded</a> your NVME/Flash space, you may also need to expand the partition to make that space usable.</p>
<p>First, login to your VPS via <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh">SSH</a></p>
<p>Type: df -h</p>
<p>This will report a size for /dev/mapper/VolGroup00-LogVol00 slightly less than the size allocated (e.g. 9.8GB for a 10GB allocation).</p>
<p>If this does not (e.g. you have upgraded to 20GB but it still shows 9.8GB) then you need to resize your partition</p>
<p>Now you need to determine if your disks are set to GPT or MBR. To do that:</p>
<p>Type: fdisk -l /dev/sda</p>
<p>If it says: WARNING GPT at the start then you are trying to expand a GPT partition. If not, then your partition is MBR.</p>
<p>If your partition is GPT it should have been expanded automatically upon ordering your disk upgrade. If it wasn't it's most likely your root password in our system doesn't match your current root password. In this case please update your <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/105/0/how-do-i-change-my-stored-vps-password">stored password</a> and then contact support to have your partition expanded.</p>
<p>If your partition is MBR and /dev/sda4 is not listed then please continue. If /dev/sda4 is listed then you need to contact support to convert your disk type to GPT to support increasing your LVM partition.</p>
<p><strong>Expanding MBR</strong></p>
<p>Type: fdisk -l</p>
<p>You will see a device list e.g.:</p>
<p>   Device Boot      Start         End      Blocks   Id  System<br />/dev/sda1   *           1          14      103424   83  Linux<br />Partition 1 does not end on cylinder boundary.<br />/dev/sda2              14        1306    10380288   8e  Linux LVM</p>
<p>Take note of the last existing LVM partition (in this case /dev/sda2)</p>
<p>We need to create a new partition, in our example, the new partition will be partition number 3 (e.g. /dev/sda3)</p>
<p>Type:</p>
<p>fdisk /dev/sda<br />n<br />p<br />new partition number (e.g. 3)<br />{enter}<br />{enter}</p>
<p>This will create the new partition. Now we have to set it to the correct mode, still in fdisk type:</p>
<p>t<br />new partition number (e.g. 3)<br />8e<br />w</p>
<p>We have now created the new partition and written it to the partition table. </p>
<p> </p>
<p>You can do that by:</p>
<p>1. Rebooting the server</p>
<p>2. Running the command:</p>
<pre># partx -a -v /dev/sdX</pre>
<p>Where sdX is the actual drive (sda, sdb, sdc, etc). The flag -v means "verbose output", -a means "Update all partitions".</p>
<p>Once partitions re-synced, SSH back into the VPS (if required) and type:</p>
<p>vgextend VolGroup00 /dev/sda3   (where 3 is the new partition number)<br />lvextend -l +100%FREE /dev/VolGroup00/LogVol00<br />resize2fs /dev/VolGroup00/LogVol00</p>
<p>This will perform an online resize of the logical volume adding the new partition to it, and thus expanding the disk space available.</p>
<p>Once complete type: df -h</p>
<p>The results should confirm the increase in available space.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Install Mcrypt In Plesk For Linux]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[eae27d77ca20db309e056e3d2dcd7d69]]></guid>
<pubDate><![CDATA[Mon, 01 Sep 2014 12:24:44 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Know the easiest way to install mcrypt in Plesk for Linux. Just follow the steps or visit VPSBlocks Support for your help.
If you have Plesk installed and require mcrypt you need to&nbsp;do the following:
Login via SSH and use the following commands
wg...]]></description>
<content:encoded><![CDATA[<p>Know the easiest way to install mcrypt in Plesk for Linux. Just follow the steps or visit VPSBlocks Support for your help.</p>
<p>If you have Plesk installed and require mcrypt you need to&nbsp;do the following:</p>
<p>Login via <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh">SSH</a> and use the following commands</p>
<p style="padding-left: 30px;">wget&nbsp;http://www.atomicorp.com/installers/atomic.sh</p>
<p style="padding-left: 30px;">sh ./atomic.sh</p>
<p>Answer yes to the question&nbsp;regarding installing this repository</p>
<p style="padding-left: 30px;">yum install php-mcrypt</p>
<p>This may also want to update PHP, this will only update minor versions e.g 5.4.28 to 5.4.31. Answer yes to this and any questions regarding GPG keys.</p>
<p style="padding-left: 30px;">service httpd restart</p>
<p><br />Mcrypt should now be installed.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[GZip Compression not working in Vesta]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[621bf66ddb7c962aa0d22ac97d69b793]]></guid>
<pubDate><![CDATA[Fri, 17 Apr 2015 09:08:16 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[The current&nbsp;version of the Vesta control panel supports&nbsp;has gzip compiled into NGinx, however, the gzip types are listed incorrectly. To enable compression for NGinx (which if switched on is serving your website rather than Apache) you need to:...]]></description>
<content:encoded><![CDATA[<p>The current&nbsp;version of the Vesta control panel supports&nbsp;has gzip compiled into NGinx, however, the gzip types are listed incorrectly. To enable compression for NGinx (which if switched on is serving your website rather than Apache) you need to:</p>
<p>1. <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh">SSH</a> into your server</p>
<p>2. Type: nano /etc/nginx/nginx.conf</p>
<p>3. Find where it says gzip_types</p>
<p>4. Replace the gzip_types entry up to the next semi colon (next line) with the following:</p>
<p>gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/x-font-ttf font/opentype;</p>
<p>5. To Save Type: CTRL O</p>
<p>6. To Quit Type: CTRL X</p>
<p>7. To restart nginx: service nginx restart</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Change Root Password Debian, Ubuntu and CentOS 7 (Single User mod...]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[7ef605fc8dba5425d6965fbd4c8fbe1f]]></guid>
<pubDate><![CDATA[Thu, 09 Jan 2014 13:43:45 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[If you have forgotten your root password to any of the above operating systems, you will need to boot into single user mode and reset the root password.
To do this you need to access the web based console through the portal, see:&nbsp;https://www.vpsbloc...]]></description>
<content:encoded><![CDATA[<p>If you have forgotten your root password to any of the above operating systems, you will need to boot into single user mode and reset the root password.</p>
<p>To do this you need to access the web based console through the portal, see:&nbsp;https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/28/0/how-can-i-get-console-access-to-my-vps</p>
<p>Once you have access, reboot the machine and when you see the Grub loader, select the 'Recovery Mode' option from the list</p>
<p>Once selected press: e</p>
<p>Look for the line starting with linux&nbsp;(it contains the paths to VolGroup00)</p>
<p>After that word enter a space then type:&nbsp;&nbsp;init=/bin/bash</p>
<p>Press F10 ot CTRL-X to begin booting</p>
<p>This will boot directly to bash without requiring you to enter a password.</p>
<p>To mount the local disk type:&nbsp;mount -rw -o remount /</p>
<p>To change the root password then type: passwd root</p>
<p>Set the new password</p>
<p>Enter the command: touch /.autorelabel</p>
<p>Then restart the VPS (you will need to send ctrl-alt-del or hard boot it in the VPS Management section in the portal to restart the VPS - typing reboot will not work).</p>
<p>Once the VPS restarts you should be able to access using the newly configured root password.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Adding A New NIC In Ubuntu]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[c45147dee729311ef5b5c3003946c48f]]></guid>
<pubDate><![CDATA[Fri, 24 May 2013 12:15:45 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[If you are adding a second NIC in Ubuntu, It requires some reconfiguration of network settings within Ubuntu.
If you are adding a second NIC in Ubuntu, it's most likely that it will not automatically pick up the settings properly when you boot up the VPS...]]></description>
<content:encoded><![CDATA[<p>If you are adding a second NIC in Ubuntu, It requires some reconfiguration of network settings within Ubuntu.</p>
<p>If you are adding a second NIC in Ubuntu, it's most likely that it will not automatically pick up the settings properly when you boot up the VPS. It requires some reconfiguration of network settings within Ubuntu. Firstly, you'll probably need console access as your VPS may no longer be accessible, see: <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/28/0/how-can-i-get-console-access-to-my-vps">https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/28/0/how-can-i-get-console-access-to-my-vps</a></p>
<p>Once you have access via the console, do the following:</p>
<p>ifconfig -a</p>
<p>This will output the current NICs. Most likely you have one called eth0 and one called renameX. Keep a note of the two MAC addresses (HWaddr). If you have no network access to your VPS then the HWaddr of eth0 is the NIC you just added.</p>
<p>nano /etc/udev/rules.d/70-persistent-net.rules</p>
<p>Edit the above file using nano. If there is not a line for each NIC you need to add one:</p>
<p>SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="05:15:5d:02:12:0d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"</p>
<p>The ATTR address in the line should match the NIC you just added. Give it a name such as eth1. Before you save the file make you that you have one line for each NIC, and that the ATTR address in each line matches the ATTR addresses you copied down earlier.</p>
<p>Save the file and exit.</p>
<p>nano /etc/network/interfaces</p>
<p>Here you need to specify each NIC by name and set the IPs appropriately, for example:</p>
<p>auto lo<br />iface lo inet loopback</p>
<p>auto eth0<br />iface eth0 inet static<br />address 203.143.80.2<br />gateway 203.143.80.1<br />netmask 255.255.255.0</p>
<p>auto eth1<br />iface eth1 inet static<br />address 10.1.245.11<br />netmask 255.255.255.240</p>
<p>Once you have done that, save the file and then type:</p>
<p>/etc/init.d/networking restart</p>
<p>This should bring up the interfaces immediately, in our example running an ifconfig should list both eth0 and eth1.</p>
<p><a href="mailto:root@vps">root@vps</a>:~# ifconfig<br />eth0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Link encap:Ethernet&nbsp; HWaddr 05:1d:d8:b7:1f:73<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet addr:203.143.84.80.2 Bcast:203.143.80.255&nbsp; Mask:255.255.255.0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet6 addr: 2400:6800:ffff:2:21d:d8ff:feb7:1f73/64 Scope:Global<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet6 addr: fe80::21d:d8ff:feb7:1f73/64 Scope:Link<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet6 addr: 2400:6800:ffff:2:d92:a1a0:1e72:b375/64 Scope:Global<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UP BROADCAST RUNNING MULTICAST&nbsp; MTU:1500&nbsp; Metric:1<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX packets:4777 errors:0 dropped:0 overruns:0 frame:0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TX packets:199 errors:0 dropped:0 overruns:0 carrier:0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; collisions:0 txqueuelen:1000<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX bytes:493640 (493.6 KB)&nbsp; TX bytes:23365 (23.3 KB)</p>
<p>eth1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Link encap:Ethernet&nbsp; HWaddr 05:15:5d:02:12:0d<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet addr:10.1.245.11&nbsp; Bcast:10.1.245.15&nbsp; Mask:255.255.255.240<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet6 addr: fe80::215:5dff:fe02:120d/64 Scope:Link<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UP BROADCAST RUNNING MULTICAST&nbsp; MTU:1500&nbsp; Metric:1<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX packets:0 errors:0 dropped:137 overruns:0 frame:0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; collisions:0 txqueuelen:1000<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX bytes:0 (0.0 B)&nbsp; TX bytes:0 (0.0 B)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Interrupt:9 Base address:0xec00</p>
<p>lo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Link encap:Local Loopback<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet addr:127.0.0.1&nbsp; Mask:255.0.0.0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inet6 addr: ::1/128 Scope:Host<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UP LOOPBACK RUNNING&nbsp; MTU:16436&nbsp; Metric:1<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; collisions:0 txqueuelen:0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RX bytes:0 (0.0 B)&nbsp; TX bytes:0 (0.0 B)</p>
<p>If it doesn't, you can try restarting the server. Alternatively, you may have mixed up the mac addresses and assigned the incorrect IPs to each adapter. If this is the case you can simply edit the /etc/network/interfaces file again and swap the networking information for each interface, then restart networking again.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[PHPMailer Script Failing With Cannot Connect Error]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[819f46e52c25763a55cc642422644317]]></guid>
<pubDate><![CDATA[Mon, 27 May 2019 12:38:46 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[If you are running a mailing script based on the PHPMailer (or similar) libraries, you may find that even if port 25 and 587 outbound are open in the firewall you are receiving a cannot connect error.
This occurs because the PHPMailer has the options to u...]]></description>
<content:encoded><![CDATA[<p>If you are running a mailing script based on the PHPMailer (or similar) libraries, you may find that even if port 25 and 587 outbound are open in the firewall you are receiving a cannot connect error.</p>
<p>This occurs because the PHPMailer has the options to use direct sockets rather than standard SMTP port mailing. By default cPanel servers block direct socket access. If you are hosting sites you have built and are familiar with, then it should be safe to&nbsp;enable socket access.</p>
<p>To do that in WHM go to Tweak Settings -&gt; SMTP Tweaks. Look for the option SMTP_BLOCK and turn it off. This will allow direct socket access.</p>
<p>Alternatively you can adjust the setting in your PHPMailer script to use the mail method for SMTP which uses the sendmail binary instead of direct socket access.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[RPM database corrupted]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[f8c1f23d6a8d8d7904fc0ea8e066b3bb]]></guid>
<pubDate><![CDATA[Sat, 12 Sep 2020 09:00:37 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[If when any updates are running they receive errors containing: DB_RUNRECOVERY: Fatal error, run database recovery error
Then most likely the RPM database has become corrupted.
To fix this run the following commands in WHM -&gt; terminal or SSH on the ser...]]></description>
<content:encoded><![CDATA[<p>If when any updates are running they receive errors containing: DB_RUNRECOVERY: Fatal error, run database recovery error</p>
<p>Then most likely the RPM database has become corrupted.</p>
<p>To fix this run the following commands in WHM -&gt; terminal or SSH on the server:</p>
<blockquote>
<p>mkdir /root/rpmdbbackup<br />mv /var/lib/rpm/__db* /root/rpmdbbackup/ <br />rpm -vv --rebuilddb</p>
</blockquote>]]></content:encoded>
</item>
<item>
<title><![CDATA[NIC configuration on RedHat and CentOS]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[758874998f5bd0c393da094e1967a72b]]></guid>
<pubDate><![CDATA[Thu, 25 May 2017 12:23:42 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[The article covers RedHat based operating systems
OS will have NIC config files as:
/etc/sysconfig/network-scripts/ifcfg-ethX
where X is the interface number.
Typical content of ifcfg-eth0 (usually it is a public NIC on the VPS):
DEVICE=eth0 
BOOTPR...]]></description>
<content:encoded><![CDATA[<h2>The article covers RedHat based operating systems</h2>
<p>OS will have NIC config files as:</p>
<pre><tt>/etc/sysconfig/network-scripts/ifcfg-ethX</tt></pre>
<p>where X is the interface number.</p>
<p><span style="font-size: 12pt;">Typical content of ifcfg-eth0 (usually it is a <strong>public NIC</strong> on the VPS):</span></p>
<pre><tt>DEVICE=eth0 
BOOTPROTO=none # no DHCP, static IP
 # bring it up on boot
NM_CONTROLLED=no # not controlled by NetworkManager
IPADDR=203.143.xx.yy
NETMASK=255.255.255.0
GATEWAY=203.143.xx.1
DNS1=aa.bb.cc.dd
DNS2=ee.ff.gg.hh
PEERDNS=yes # modify /etc/resolv.conf according to DNS1/2 settings
USERCTL=no</tt></pre>
<p><span style="font-size: 12pt;">Typical content of ifcfg-eth1 (usually it is a<strong> private NIC</strong> on the VPS):</span></p>
<pre><tt>DEVICE=eth1 
BOOTPROTO=dhcp # DHCP protocol
 # bring it up on boot
NM_CONTROLLED=no # not controlled by NetworkManager
DEFROUTE=no # do not set default route here to avoid two default routes
</tt></pre>
<p>&nbsp;</p>
<p><span style="font-size: 12pt;">Disabling <strong>NetworkManager</strong>:</span></p>
<pre><tt>service NetworkManager stop</tt></pre>
<p>if <strong>not</strong> using systemd:</p>
<pre><tt>chkconfig NetworkManager off</tt></pre>
<p>if <strong>using</strong> systemd:</p>
<pre><tt>systemctl disable NetworkManager</tt></pre>
<p>&nbsp;</p>
<p><span style="font-size: 12pt;">Enabling <strong>Network</strong> service:</span></p>
<p>if <strong>not</strong> using systemd:</p>
<pre><tt>chkconfig network on</tt></pre>
<p>if <strong>using</strong> systemd:</p>
<pre><tt>systemctl enable network</tt></pre>]]></content:encoded>
</item>
<item>
<title><![CDATA[Disabling Strict Mode for MySQL 5.7+]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[a01a0380ca3c61428c26a231f0e49a09]]></guid>
<pubDate><![CDATA[Tue, 16 Jun 2020 16:46:48 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Upgrading from MySQL 5.6 or lower up to 5.7 or higher may find some of your application incompatible with STRICT mode. This mode controls how MySQL handles invalid or missing values. See: https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mode-stri...]]></description>
<content:encoded><![CDATA[<p>Upgrading from MySQL 5.6 or lower up to 5.7 or higher may find some of your application incompatible with STRICT mode. This mode controls how MySQL handles invalid or missing values. See: <a href="https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mode-strict">https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mode-strict</a></p>
<p>First you should upgrade the MySQL server. Once it has been upgraded you can disable STRICT mode.</p>
<p>To disable STRICT mode you need to edit the file at /etc/my.cnf and add the following line to the bottom of the file:</p>
<blockquote>
<p>sql_mode=""</p>
</blockquote>
<p>Once that is done restart MySQL and you should be safe to upgrade without affecting any running websites</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Mount Windows or cifs Share on Linux]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[43ec517d68b6edd3015b3edc9a11367b]]></guid>
<pubDate><![CDATA[Thu, 03 Jan 2013 15:21:03 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[Get the detail procedure to mount a Windows or cifs share on a Linux account. Visit us to know more!
Things you need to know first:
Your VPS Name: e.g. vps.yourvpsname.com
Your Username: e.g. vpsyourvps
Your Password
The Share Location: e.g. //sanspa...]]></description>
<content:encoded><![CDATA[<p>Get the detail procedure to mount a Windows or cifs share on a Linux account. Visit us to know more!</p>
<p><strong>Things you need to know first:</strong></p>
<p><strong>Your VPS Name: e.g. vps.yourvpsname.com</strong></p>
<p><strong>Your Username: e.g. vpsyourvps</strong></p>
<p><strong>Your Password</strong></p>
<p><strong>The Share Location: e.g. //sanspace.controlmyvps.com.au/VPS.YOURVPS.COM</strong></p>
<p><strong>1. To mount a Windows or cifs share on a Linux account first install cifs utilities</strong></p>
<p><em><strong>CentOS</strong></em></p>
<p>yum install cifs-utils nano</p>
<p><em><strong>Ubuntu/Debian</strong></em></p>
<p>aptitude install smbfs</p>
<p>OR</p>
<p>apt-get install smbfs</p>
<p><strong>2. Create a mount point</strong></p>
<p>mkdir -p /mnt/sanspace</p>
<p><strong>3. Mount the shared drive</strong></p>
<p>mount -t cifs //sanspace.controlmyvps.com.au/VPS.YOURVPS.COM -w -o username=YOURUSERNAME,password=YOURPASSWORD /mnt/sanspace</p>
<p><strong>4. Access the shared space</strong></p>
<p>cd /mnt/sanspace</p>
<p>ls -ls</p>
<p><strong>5. To make the mount point automount across reboots</strong></p>
<p>nano /etc/fstab<br />OR<br />pico /etc/fstab</p>
<p>Add the following line:</p>
<p>//sanspace.controlmyvps.com.au/VPS.YOURVPS.COM /mnt/sanspace cifs username=YOURUSERNAME,password=YOURPASSWORD 0 0</p>
<p><strong>If iptables is running you will also need to open an iptables port:</strong></p>
<p>iptables -I INPUT -p tcp -m tcp --dport 110 -j ACCEPT<br />service iptables save</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[MySQL Server Fails To Start]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[202cb962ac59075b964b07152d234b70]]></guid>
<pubDate><![CDATA[Wed, 21 Aug 2013 10:21:58 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Check the error log to see why the MySQL server does not start. Visit us to solve the problems.
If MySQL won't start, sometimes this can occur due to corruption in tables or in logs.
The first thing to try would be a MySQL repair, to do this:
1. Login ...]]></description>
<content:encoded><![CDATA[<p>Check the error log to see why the MySQL server does not start. Visit us to solve the problems.</p>
<p>If MySQL won't start, sometimes this can occur due to corruption in tables or in logs.</p>
<p>The first thing to try would be a MySQL repair, to do this:</p>
<p>1. Login to <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh">SSH</a> as root</p>
<p>2. Type: mysqlcheck --all-databases --auto-repair</p>
<p>The second thing to try if that doesn't work or if MySQL isn't starting at all, try renaming the innoDB log files:</p>
<p>1. Login to <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh">SSH</a> as root</p>
<p>2. Locate and rename or move the ib_logfilex file in the MySQL data directory (usually /var/lib/mysql)</p>
<p>3. Try starting MySQL now</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[MariaDB connections fail with PHP versions prior to 7.3]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[bbf94b34eb32268ada57a3be5062fe7d]]></guid>
<pubDate><![CDATA[Mon, 09 Nov 2020 09:16:15 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[There was a bug introduced in MariaDB 10.2.35 and 10.3.26 which breaks connectivity from PHP versions prior to 7.3.
Any sites running PHP 7.0-7.2 would receive the error:
Critical Error Could not connect to the database.
The resolve this upgrade MariaDB t...]]></description>
<content:encoded><![CDATA[<p>There was a bug introduced in MariaDB 10.2.35 and 10.3.26 which breaks connectivity from PHP versions prior to 7.3.</p>
<p>Any sites running PHP 7.0-7.2 would receive the error:</p>
<pre>Critical Error Could not connect to the database.</pre>
<p>The resolve this upgrade MariaDB to the latest version, or switch to PHP 7.3 or 7.4.</p>
<p>For details on this bug please see:&nbsp;https://jira.mariadb.org/browse/MDEV-24121</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ubuntu and Firewall Rules]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[7f39f8317fbdb1988ef4c628eba02591]]></guid>
<pubDate><![CDATA[Sun, 05 Aug 2012 11:19:36 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[With Ubuntu it's important to know how to set your iptables configuration to work at startup. Know the Ubuntu &amp; Firewall Rules.
With Ubuntu it's important to know how to set your iptables configuration to work at startup. To do this first create your...]]></description>
<content:encoded><![CDATA[<p>With Ubuntu it's important to know how to set your iptables configuration to work at startup. Know the Ubuntu &amp; Firewall Rules.</p>
<p>With Ubuntu it's important to know how to set your iptables configuration to work at startup. To do this first create your iptables rules (never use iptables -F to flush your rules or you will most likely lock yourself out of your SSH session):</p>
<p>iptables -P INPUT ACCEPT<br />iptables -A INPUT -i lo -j ACCEPT<br />iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT<br />iptables -I INPUT -p tcp -m tcp --dport 20:22 -j ACCEPT<br />iptables -I INPUT -p tcp -m tcp --dport 25 -j ACCEPT<br />iptables -I INPUT -p tcp -m tcp --dport 53 -j ACCEPT<br />iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT<br />iptables -I INPUT -p tcp -m tcp --dport 110 -j ACCEPT<br />iptables -I INPUT -p tcp -m tcp --dport 113 -j ACCEPT<br />iptables -I INPUT -p tcp -m tcp --dport 143 -j ACCEPT<br />iptables -I INPUT -p tcp -m tcp --dport 443 -j ACCEPT<br />iptables -A INPUT -p tcp --dport 10000 -j ACCEPT<br />iptables -P INPUT DROP<br />iptables -P FORWARD DROP<br />iptables -P OUTPUT ACCEPT<br />iptables -L -v<br />iptables-save</p>
<p>This will enable the common ports required and make your changes live. However, on startup they will be lost again. You should now follow the 'Configuration on startup' instructions found on the Ubuntu help page:</p>
<p><a href="https://help.ubuntu.com/community/IptablesHowTo">https://help.ubuntu.com/community/IptablesHowTo</a></p>
<p>This will help you setup your iptables rules file and make it&nbsp;run when your VPS starts up.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Corrupted SSH After VPS Cloning]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[c0e190d8267e36708f955d7ab048990d]]></guid>
<pubDate><![CDATA[Mon, 22 Sep 2014 14:37:46 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[After successful cloning of existing Linux based VPS, inaccessible SSH may occur. In that case we have to regenerate keys
After successful cloning of existing Linux based VPS it may happen of inaccessible SSH.
The reason might be old ssh host keys, copi...]]></description>
<content:encoded><![CDATA[<p>After successful cloning of existing Linux based VPS, inaccessible SSH may occur. In that case we have to regenerate keys</p>
<p>After successful cloning of existing Linux based VPS it may happen of inaccessible SSH.</p>
<p>The reason might be old ssh host keys, copied from the cloning donor.</p>
<p>&nbsp;</p>
<p>In that case we have to regenerate keys.</p>
<p>&nbsp;</p>
<p><strong>Debian/Ubuntu:</strong></p>
<p>Remove old keys:</p>
<blockquote>
<p># /bin/rm -v /etc/ssh/ssh_host_*</p>
</blockquote>
<p>Reconfigure new keys:</p>
<blockquote>
<p># dpkg-reconfigure openssh-server</p>
</blockquote>
<p>&nbsp;</p>
<p>Sample output:</p>
<blockquote>
<p>Creating SSH2 RSA key; this may take some time ...<br />Creating SSH2 DSA key; this may take some time ...<br />Restarting OpenBSD Secure Shell server: sshd.</p>
<p>&nbsp;</p>
</blockquote>
<p><strong>Centos:</strong></p>
<p>Remove old keys:</p>
<blockquote>
<p># /bin/rm -v /etc/ssh/ssh_host_*</p>
</blockquote>
<p>Just re-start SSHD:</p>
<blockquote>
<p># /etc/init.d/sshd restart</p>
</blockquote>
<p>&nbsp;</p>
<p>&nbsp;</p>
<pre>&nbsp;</pre>]]></content:encoded>
</item>
<item>
<title><![CDATA[Updating Kernel No Space in boot]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[2b24d495052a8ce66358eb576b8912c8]]></guid>
<pubDate><![CDATA[Fri, 06 Dec 2013 12:51:09 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[When update your kernel using yum &amp; receive an error that there is no space in/boot, you need to remove old kernels.
If you are trying to update your kernel using yum and receive an error that there is no space in /boot then you will need to remove o...]]></description>
<content:encoded><![CDATA[<p>When update your kernel using yum &amp; receive an error that there is no space in/boot, you need to remove old kernels.</p>
<p>If you are trying to update your kernel using yum and receive an error that there is no space in /boot then you will need to remove old kernels that are no longer in use.</p>
<p>First type:<br />uname -r</p>
<p>This will tell you the current kernel (do not delete that one)</p>
<p>Now type:<br />rpm -q kernel</p>
<p>This will list all the kernels currently installed.</p>
<p>For each one you want to delete type:<br />yum remove&nbsp;kernel-2.6.x-x.x.x.elx.x86_64</p>
<p><strong>Alternatively run these commands to set the max kernels and update the kernel</strong></p>
<p>[ ! -h /etc/grub.conf ] &amp;&amp; mv -f /etc/grub.conf /boot/grub/grub.conf &amp;&amp; ln -s /boot/grub/grub.conf /etc/grub.conf</p>
<p>yum install yum-utils -y &amp;&amp; package-cleanup --oldkernels --count=1 -y &amp;&amp; sed -i 's/installonly_limit=.*/installonly_limit=2/g' /etc/yum.conf &amp;&amp; yum clean all &amp;&amp; yum update -y</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Track Spammer on Plesk Linux]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[69adc1e107f7f7d035d7baf04342e1ca]]></guid>
<pubDate><![CDATA[Mon, 08 Sep 2014 09:41:25 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[This article explains how to track down a SPAMming script or breached SMTP account if your server is sending SPAM.
Parallels have provided an article with a full explanation of how to track down a SPAMming script or breached SMTP account if your server is...]]></description>
<content:encoded><![CDATA[<p>This article explains how to track down a SPAMming script or breached SMTP account if your server is sending SPAM.</p>
<p>Parallels have provided an article with a full explanation of how to track down a SPAMming script or breached SMTP account if your server is sending SPAM.</p>
<p>It's extremely important to take care of any SPAM issues immediately once you become aware of the problem.</p>
<p>You can view the mail queue on a Plesk Linux server by logging into SSH and typing:</p>
<p>/usr/local/psa/admin/sbin/mailqueuemng</p>
<p>To delete the mail queue type:</p>
<p>postsuper -d ALL</p>
<p>To track down the SPAMmer please see (section "Statistics and Reports"):</p>
<p><a href="https://docs.plesk.com/en-US/onyx/administrator-guide/mail/protection-from-outbound-spam.71349/">https://docs.plesk.com/en-US/onyx/administrator-guide/mail/protection-from-outbound-spam.71349/</a></p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Install Apache, PHP &amp; MySQL (CentOS)]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[03afdbd66e7929b125f8597834fa83a4]]></guid>
<pubDate><![CDATA[Thu, 16 Aug 2012 10:57:57 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[If you have chosen a CentOS distribution of Linux, you can easily install Apache, PHP and MySQL through SSH.
If you have chosen a CentOS distribution of Linux (not cPanel as it automatically installs everything), you can easily install Apache, PHP and My...]]></description>
<content:encoded><![CDATA[<p>If you have chosen a CentOS distribution of Linux, you can easily install Apache, PHP and MySQL through SSH.</p>
<p>If you have chosen a CentOS distribution of Linux (not cPanel as it automatically installs everything), you can easily install Apache, PHP and MySQL through SSH.</p>
<p>First login to your server through your SSH client (we recommend Putty)</p>
<p>Type the following:</p>
<p style="padding-left: 30px;">yum install -y httpd mysql php php-mysql</p>
<p>This will install Apache, MySQL and PHP with MySQL support.</p>
<p>You can administer your installation of Apache through WebMin (access at <a href="http://youripaddress:10000/">http://youripaddress:10000/</a>)</p>
<p>You will need to modify your MIME TYPES to support PHP. This is easily done through WebMin as is setting up virtual hosts. We recommend looking at this article:</p>
<p><a href="http://www.techrepublic.com/blog/doityourself-it-guy/diy-configure-apache-with-the-help-of-webmin/1594">http://www.techrepublic.com/blog/doityourself-it-guy/diy-configure-apache-with-the-help-of-webmin/1594</a></p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Search For Text Inside Files On Linux]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[3636638817772e42b59d74cff571fbb3]]></guid>
<pubDate><![CDATA[Fri, 09 May 2014 14:16:34 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Visit us today and know the easiest way to search for text inside files on Linux. Follow the steps and do it yourself.
To search for text inside files on Linux the easiest way is to type:
grep -H -r "texttofind" /home/ 2&gt;/dev/null
grep : The command...]]></description>
<content:encoded><![CDATA[<p>Visit us today and know the easiest way to search for text inside files on Linux. Follow the steps and do it yourself.</p>
<p>To search for text inside files on Linux the easiest way is to type:</p>
<p>grep -H -r "texttofind" /home/ 2&gt;/dev/null</p>
<p>grep : The command<br />-H : Return just the filename<br />-r &nbsp;: Search recursively<br />&nbsp;"texttofind" : The text you are searching for - must be in quotation marks<br />/home/ : The directory to start searching in, to search the entire server just put /<br />2&gt;/dev/null : This prevents output of file not found or access denied errors&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Tar Recursively Including File Pattern]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[cfa0860e83a4c3a763a7e62d825349f7]]></guid>
<pubDate><![CDATA[Wed, 24 Jun 2015 12:48:21 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[To tar/gzip all PHP files within a folder recursively read the following command and do it yourself.
To tar/gzip all PHP files within a folder recursively you would enter the root directory you want to recurse, and issue the following command in SSH to i...]]></description>
<content:encoded><![CDATA[<p>To tar/gzip all PHP files within a folder recursively read the following command and do it yourself.</p>
<p>To tar/gzip all PHP files within a folder recursively you would enter the root directory you want to recurse, and issue the following command in SSH to include all php and html files (this is a foolproof way which requires two commands but works regardless of the number of files):</p>
<p>find ./ -name "*.php" -o -name "*.html" &gt; /root/filelist<br />tar -czvf /root/archive.tar.gz -T /root/filelist</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Find Last Full Day Modified Files on Linux]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[85d8ce590ad8981ca2c8286f79f59954]]></guid>
<pubDate><![CDATA[Mon, 28 Jul 2014 19:01:09 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Know the command to find all files modified in the last 24 hours in a particular specific directory &amp; sub-directories.
To find all files modified in the last 24 hours (last full day) in a particular specific directory and its sub-directories:
find /...]]></description>
<content:encoded><![CDATA[<p>Know the command to find all files modified in the last 24 hours in a particular specific directory &amp; sub-directories.</p>
<p><strong>To find all files modified in the last 24 hours (last full day) in a particular specific directory and its sub-directories:</strong></p>
<p><em>find /directory_path -mtime -1 -print</em></p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Second Gateway on Ubuntu]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[158f3069a435b314a80bdcb024f8e422]]></guid>
<pubDate><![CDATA[Thu, 02 Mar 2017 14:36:59 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[If you have a DHCP based second NIC on Ubuntu, it will have two gateways. You may find when you reboot the server sometimes it takes the incorrect gateway and makes it default meaning that your&nbsp;system has no internet access.
You can find out what th...]]></description>
<content:encoded><![CDATA[<p>If you have a DHCP based second NIC on Ubuntu, it will have two gateways. You may find when you reboot the server sometimes it takes the incorrect gateway and makes it default meaning that your&nbsp;system has no internet access.</p>
<p>You can find out what the default route is by typing:</p>
<p>ip r s</p>
<p>To make your system delete any incorrect route and add a specific default route you need to edit your interfaces file at</p>
<p>/etc/network/interfaces</p>
<p>Add the following to the bottom of the file</p>
<blockquote>
<p>post-up ip route del default</p>
<p>post-up ip route add default via <em><strong>203.143.X.1</strong></em> dev <em><strong>eth0</strong></em></p>
</blockquote>
<p>Of course you need to specify the correct gateway for your IP address (which is also listed earlier in the file) and ensure you specify the correct NIC (e.g. eth0).</p>
<p>To test you will need to reboot the server as restarting networking may not work properly.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Deleting Large Number of Files in SSH]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[b1d10e7bafa4421218a51b1e1f1b0ba2]]></guid>
<pubDate><![CDATA[Tue, 09 Sep 2014 11:03:59 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Know the command to delete an unlimited number of files in the fastest manner.
In SSH you may find a circumstance where you want to delete more than the allowed number of files. In this case you would get the error: Argument list too long
To delete an u...]]></description>
<content:encoded><![CDATA[<p>Know the command to delete an unlimited number of files in the fastest manner.</p>
<p>In <a href="https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/41/0/how-do-i-use-ssh">SSH</a> you may find a circumstance where you want to delete more than the allowed number of files. In this case you would get the error: Argument list too long</p>
<p>To delete an unlimited number of files in the fastest manner use this command:</p>
<p>find /folder&nbsp;-print0 | xargs -0 rm -f</p>
<p>This would delete all files in /folder.&nbsp;</p>
<p>Replace /folder with the full path to the folder containing the files you want removed.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Finding A File On Linux]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[149e9677a5989fd342ae44213df68868]]></guid>
<pubDate><![CDATA[Fri, 09 May 2014 14:19:31 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[Finding a file in a Linux system can be difficult if you don't know how. Know the best way by reading this steps.
The easiest way to find a file on Linux is to:

SSH to your linux server
Install mlocate (assuming it's not already installed):

CentOS...]]></description>
<content:encoded><![CDATA[<p>Finding a file in a Linux system can be difficult if you don't know how. Know the best way by reading this steps.</p>
<p>The easiest way to find a file on Linux is to:</p>
<ul>
<li>SSH to your linux server</li>
<li>Install mlocate (assuming it's not already installed):
<ul>
<li>CentOS/Fedora: yum install mlocate</li>
<li>Ubuntu/Debian: apt-get install mlocate</li>
</ul>
</li>
<li>Answer yes to download and install mlocate</li>
<li>You now need to update the file location database by typing: updatedb</li>
<li>Wait for it to complete, may take quite a while depending on the number of files on your server</li>
</ul>
<p>To find a specific file type: locate filetofind</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[CentOS Boot Interactively]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[4c5bde74a8f110656874902f07378009]]></guid>
<pubDate><![CDATA[Fri, 06 Jun 2014 15:20:06 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[If your server is having difficulty completing boot cycle, determine what service is causing issues by booting interactively.
If your server is having difficulty completing the boot cycle, you can determine what service is causing issues by booting inter...]]></description>
<content:encoded><![CDATA[<p>If your server is having difficulty completing boot cycle, determine what service is causing issues by booting interactively.</p>
<p>If your server is having difficulty completing the boot cycle, you can determine what service is causing issues by booting interactively.</p>
<p>To do this, you need to login to the console of the server, see:&nbsp;https://www.vpsblocks.com.au/support/Knowledgebase/Article/View/28/0/how-can-i-get-console-access-to-my-vps</p>
<ul>
<li>Restart the VPS</li>
<li>Press a key when prompted to view the list of kernels</li>
<li>Highlight the first one and press 'a' to modify the kernel arguments</li>
<li>At the end of the line type: confirm</li>
<li>Press Enter</li>
</ul>
<p>This will now boot and ask you to confirm loading each service.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Updating Kernel on Debian and Ubuntu]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[f718499c1c8cef6730f9fd03c8125cab]]></guid>
<pubDate><![CDATA[Mon, 15 Jun 2015 12:01:34 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[From this article you will learn the simple steps to update the kernel in Debian or Ubuntu.
To update the kernel in Debian or Ubuntu&nbsp;is very simple.
1. Update the kernel

Type: apt-get update &amp;&amp; apt-get upgrade linux-image linux-headers (...]]></description>
<content:encoded><![CDATA[<p>From this article you will learn the simple steps to update the kernel in Debian or Ubuntu.</p>
<p>To update the kernel in Debian or Ubuntu&nbsp;is very simple.</p>
<p><strong>1. Update the kernel</strong></p>
<ul>
<li>Type: apt-get update &amp;&amp; apt-get upgrade linux-image linux-headers (note, you need to be root to do that, otherwise use sudo)</li>
<li>Answer yes to all the questions</li>
<li>Reboot the VPS</li>
</ul>
<p><strong>-OR-</strong></p>
<p><strong>2. Full system update</strong></p>
<ul>
<li>Type: apt-get update &amp;&amp; apt-get upgrade (note, you need to be root to do that, otherwise use sudo)</li>
<li>Answer yes to all the questions</li>
<li>Reboot the VPS</li>
</ul>]]></content:encoded>
</item>
<item>
<title><![CDATA[Protected multilib versions error when updating with yum]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[4f4adcbf8c6f66dcfc8a3282ac2bf10a]]></guid>
<pubDate><![CDATA[Mon, 23 Nov 2020 09:38:49 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[If you receive an error about protected multilib versions chances are that a reinstall of the latest package is required to force an update without breaking any packages.
Here is an example trying to update. Firstly, it finds an update, but says it's alre...]]></description>
<content:encoded><![CDATA[<p>If you receive an error about protected multilib versions chances are that a reinstall of the latest package is required to force an update without breaking any packages.</p>
<p>Here is an example trying to update. Firstly, it finds an update, but says it's already installed and does not reinstall it.</p>
<p><code>yum update glib2</code></p>
<p><code>--&gt; Running transaction check</code><br /><code>---&gt; Package glib2.x86_64 0:2.56.1-5.el7 will be updated</code><br /><code>---&gt; Package glib2.x86_64 0:2.56.1-8.el7 will be an update</code><br /><code>--&gt; Finished Dependency Resolution</code></p>
<p><code>Dependencies Resolved</code></p>
<p><code>=====================================================================================================================================</code><br /><code> Package Arch Version Repository Size</code><br /><code>=====================================================================================================================================</code><br /><code>Updating:</code><br /><code> glib2 x86_64 2.56.1-8.el7 updates 2.5 M</code></p>
<p><code>Transaction Summary</code><br /><code>=====================================================================================================================================</code><br /><code>Upgrade 1 Package</code></p>
<p><code>Total download size: 2.5 M</code><br /><code>Is this ok [y/d/N]: y</code><br /><code>Downloading packages:</code><br /><code>Delta RPMs disabled because /usr/bin/applydeltarpm not installed.</code><br /><code>glib2-2.56.1-8.el7.x86_64.rpm | 2.5 MB 00:00:00</code><br /><code>Running transaction check</code><br /><code>Running transaction test</code></p>
<p><br /><code>Transaction check error:</code><br /><code> package glib2-2.56.1-8.el7.x86_64 is already installed</code></p>
<p><code>Error Summary</code><br /><code>-------------</code></p>
<p>&nbsp;</p>
<p>Now you&nbsp;can try to reinstall, but will likely receive a multilib error:</p>
<p><code>[root@vps ~]# yum reinstall glib2</code><br /><code>Loaded plugins: fastestmirror</code><br /><code>Loading mirror speeds from cached hostfile</code><br /><code> * base: ftp.swin.edu.au</code><br /><code> * extras: ftp.swin.edu.au</code><br /><code> * updates: ftp.swin.edu.au</code><br /><code>Resolving Dependencies</code><br /><code>There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).</code><br /><code>--&gt; Running transaction check</code><br /><code>---&gt; Package glib2.x86_64 0:2.56.1-8.el7 will be an update</code><br /><code>---&gt; Package glib2.x86_64 0:2.56.1-8.el7 will be erased</code><br /><code>--&gt; Finished Dependency Resolution</code><br /><code>Error: Multilib version problems found. This often means that the root</code><br /><code> cause is something else and multilib version checking is just</code><br /><code> pointing out that there is a problem. Eg.:</code></p>
<p><code>1. You have an upgrade for glib2 which is missing some</code><br /><code> dependency that another package requires. Yum is trying to</code><br /><code> solve this by installing an older version of glib2 of the</code><br /><code> different architecture. If you exclude the bad architecture</code><br /><code> yum will tell you what the root cause is (which package</code><br /><code> requires what). You can try redoing the upgrade with</code><br /><code> --exclude glib2.otherarch ... this should give you an error</code><br /><code> message showing the root cause of the problem.</code></p>
<p><code>2. You have multiple architectures of glib2 installed, but</code><br /><code> yum can only see an upgrade for one of those architectures.</code><br /><code> If you don't want/need both architectures anymore then you</code><br /><code> can remove the one with the missing update and everything</code><br /><code> will work.</code></p>
<p><code>3. You have duplicate versions of glib2 installed already.</code><br /><code> You can use "yum check" to get yum show these errors.</code></p>
<p><code>...you can also use --setopt=protected_multilib=false to remove</code><br /><code> this checking, however this is almost never the correct thing to</code><br /><code> do as something else is very likely to go wrong (often causing</code><br /><code> much more problems).</code></p>
<p><code>Protected multilib versions: glib2-2.56.1-8.el7.x86_64 != glib2-2.56.1-5.el7.x86_64</code></p>
<p>&nbsp;</p>
<p>In this case you then need grab the latest version from the multilib output and reinstall it (in the above case "glib2-2.56.1-8.el7.x86_64"):</p>
<p><code>yum reinstall glib2-2.56.1-8.el7.x86_64</code></p>
<p><code>--&gt; Running transaction check</code><br /><code>---&gt; Package glib2.x86_64 0:2.56.1-5.el7 will be updated</code><br /><code>---&gt; Package glib2.x86_64 0:2.56.1-8.el7 will be an update</code><br /><code>---&gt; Package glib2.x86_64 0:2.56.1-8.el7 will be erased</code><br /><code>--&gt; Finished Dependency Resolution</code></p>
<p><code>Dependencies Resolved</code></p>
<p><code>=====================================================================================================================================</code><br /><code> Package Arch Version Repository Size</code><br /><code>=====================================================================================================================================</code><br /><code>Updating:</code><br /><code> glib2 x86_64 2.56.1-8.el7 updates 2.5 M</code><br /><code>Removing:</code><br /><code> glib2 x86_64 2.56.1-8.el7 installed 12 M</code></p>
<p><code>Transaction Summary</code><br /><code>=====================================================================================================================================</code><br /><code>Upgrade 1 Package</code><br /><code>Remove 1 Package</code></p>
<p><code>Total size: 2.5 M</code><br /><code>Is this ok [y/d/N]: y</code><br /><code>Downloading packages:</code><br /><code>Running transaction check</code><br /><code>Running transaction test</code><br /><code>Transaction test succeeded</code><br /><code>Running transaction</code><br /><code> Updating : glib2-2.56.1-8.el7.x86_64 1/3</code><br /><code> Cleanup : glib2.x86_64 2/3</code><br /><code> Verifying : glib2-2.56.1-8.el7.x86_64 1/2</code><br /><code> Verifying : glib2-2.56.1-5.el7.x86_64 2/2</code><br /><code> Verifying : glib2-2.56.1-8.el7.x86_64 3/2</code></p>
<p><code>Removed:</code><br /><code> glib2.x86_64 0:2.56.1-8.el7</code></p>
<p><code>Updated:</code><br /><code> glib2.x86_64 0:2.56.1-8.el7</code></p>
<p><code>Complete!</code></p>
<p>&nbsp;</p>
<p>The package is now updated properly and without any errors when rechecking using yum update.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Vesta Malformed Value in Exim Mainlog Preventing Email Delivery]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/vesta-malformed-value-in-exim-mainlog-preventing-email-delivery]]></link>
<guid isPermaLink="false"><![CDATA[66368270ffd51418ec58bd793f2d9b1b]]></guid>
<pubDate><![CDATA[Fri, 21 Jan 2022 14:20:11 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[If you are running Vesta and email is suddenly not being delivered. You can check the mail log located at /var/log/exim4/mainlog
You may find an error that looks like this:
2021-12-19 03:39:42 1mxheU-000374-0o == mail@domain.com R=localuser T=local_deli...]]></description>
<content:encoded><![CDATA[<p>If you are running Vesta and email is suddenly not being delivered. You can check the mail log located at /var/log/exim4/mainlog</p>
<p>You may find an error that looks like this:</p>
<p>2021-12-19 03:39:42 1mxheU-000374-0o == mail@domain.com R=localuser T=local_delivery defer (-1): Malformed value “0MM” (expansion of “${extract{6}{:}{${lookup{$l$….</p>
<p></p>
<p>This is a bug in Vesta caused by incorrect Exim config written if you have set the mailbox quota to unlimited.</p>
<p>To fix it, modify the mailbox within the Vesta panel and set the quota to a large value for example 20000 MB.</p>
<ul>
<li>Login to Vesta -&gt;</li>
<li>User -&gt; Login to the user account -&gt;</li>
<li>Mail -&gt;</li>
<li>Hover over the domain and click on the -&gt;</li>
<li>List x Accounts -&gt;</li>
<li>Click Edit next to the mailbox in question -&gt;</li>
<li>Enter 20000 in the Quota field (click on the unlimited symbol if it won't let you enter a value -&gt;</li>
<li>Click Save</li>
</ul>]]></content:encoded>
</item>
<item>
<title><![CDATA[Missing Accounts in WHM / cPanel]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[f4f6dce2f3a0f9dada0c2b5b66452017]]></guid>
<pubDate><![CDATA[Thu, 10 Dec 2020 14:02:43 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[If you go to WHM -&gt; List Accounts and a lot of accounts are suddenly missing. This may be because cPanel has recently changed the minimum UID and GID that users are setup with. This setting used to be 500, and is now 1000.
Unfortunately if the script /...]]></description>
<content:encoded><![CDATA[<p>If you go to WHM -&gt; List Accounts and a lot of accounts are suddenly missing. This may be because cPanel has recently changed the minimum UID and GID that users are setup with. This setting used to be 500, and is now 1000.<br /><br /></p>
<p>Unfortunately if the script <br />/scripts/updateuserdomains --force --verbose<br />is run, it may only grab users with UIDs higher than 1000.<br /><br />To fix this you need to modify the setting at /etc/login.defs<br /><br />#<br /># Min/max values for automatic uid selection in useradd<br />#<br />UID_MIN <strong>500</strong><br />UID_MAX 60000<br /><br /># System accounts<br />SYS_UID_MIN 201<br />SYS_UID_MAX 999<br /><br />#<br /># Min/max values for automatic gid selection in groupadd<br />#<br />GID_MIN <strong>500</strong><br />GID_MAX 60000<br /><br />After modifying that file, you can run the script again:<br /><span>/scripts/updateuserdomains --force --verbose<br /></span>This should update WHM with the correct information for all your accounts.</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Plesk MySQL check from console]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[ad972f10e0800b49d76fed33a21f6698]]></guid>
<pubDate><![CDATA[Sat, 04 Apr 2020 10:53:15 +1100]]></pubDate>
<dc:creator />
<description><![CDATA[If you need to check and repair all database you need MySQL root password which is unknown to user when running Plesk.
Here is how to do that:
mysqlcheck -uadmin -p`cat /etc/psa/.psa.shadow` --auto-repair -A
Please note, no space after "-p" and back quote...]]></description>
<content:encoded><![CDATA[<p>If you need to check and repair all database you need MySQL root password which is unknown to user when running Plesk.</p>
<p>Here is how to do that:</p>
<p><code>mysqlcheck -uadmin -p`cat /etc/psa/.psa.shadow` --auto-repair -A</code></p>
<p>Please note, no space after "-p" and back quotes are <strong>important!</strong></p>
<p>&nbsp;</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Find directory where inodes are being used]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/]]></link>
<guid isPermaLink="false"><![CDATA[82cec96096d4281b7c95cd7e74623496]]></guid>
<pubDate><![CDATA[Thu, 03 Oct 2019 08:52:56 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[If you have run out of inodes&nbsp;no new files can be created, this causes all sorts of issues. Generally this doesn't happen unless there is a script or something that is creating millions of files that it really shouldn't be.
To see first run: df -i
If...]]></description>
<content:encoded><![CDATA[<p>If you have run out of inodes&nbsp;no new files can be created, this causes all sorts of issues. Generally this doesn't happen unless there is a script or something that is creating millions of files that it really shouldn't be.</p>
<p>To see first run: df -i</p>
<p>If you have used 100% of your inodes on a&nbsp;drive then you need to run:</p>
<p>find */ | sed 's!/.*!!' | uniq -c</p>
<p>Start at / and move your way up the folder until you determine where all the files are.</p>
<p>Then remove the offending files, as there is likely millions in the folder to remove them you will need to move into the folder where the files exist and type:</p>
<p>find . -type f -print -delete</p>]]></content:encoded>
</item>
<item>
<title><![CDATA[Putty Couldn't Agree a Host Key Algorithm]]></title>
<link><![CDATA[https://www.vpsblocks.com.au/support/index.php?/Knowledgebase/Article/View/putty-couldnt-agree-a-host-key-algorithm]]></link>
<guid isPermaLink="false"><![CDATA[ddb30680a691d157187ee1cf9e896d03]]></guid>
<pubDate><![CDATA[Wed, 22 Jun 2022 17:09:18 +1000]]></pubDate>
<dc:creator />
<description><![CDATA[If you try to connect to a modern version of Linux (for example Ubuntu 22), and receive the error "Couldn't agree a host key algorithm", such as:

This is because your version of Putty is too old. Please update your version of Putty at the Putty officia...]]></description>
<content:encoded><![CDATA[<p>If you try to connect to a modern version of Linux (for example Ubuntu 22), and receive the error "Couldn't agree a host key algorithm", such as:</p>
<p><img src="https://www.vpsblocks.com.au/images/support/PuttyKeyAlgorithm.jpg" title="Key Algorithm Error" width="642" height="318" alt="" /></p>
<p>This is because your version of Putty is too old. Please update your version of Putty at the Putty official website at: <a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html">https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html</a></p>
<p></p>]]></content:encoded>
</item>
</channel>
</rss>