<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>ZeroStopBits — Musings &amp; Tutorials</title>
    <link>https://www.zerostopbits.com/musings-and-tutorials/</link>
    <atom:link href="https://www.zerostopbits.com/feed.xml" rel="self" type="application/rss+xml"/>
    <description>Sysadmin notes, CentOS, MySQL, MariaDB and PHP walkthroughs, and occasional company updates from ZeroStopBits.</description>
    <language>en-us</language>
    <lastBuildDate>Fri, 07 Dec 2018 02:08:19 +0000</lastBuildDate>
    <item>
      <title>How to Reset MySQL/MariaDB Root Password</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-reset-mysql-mariadb-root-password/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-reset-mysql-mariadb-root-password/</guid>
      <pubDate>Fri, 07 Dec 2018 02:07:13 +0000</pubDate>
      <category>Tutorials</category>
      <description>In today’s article, I’m going to show you the process to reset MySQL/MariaDB root passwords. This should work for all versions, but your mileage may vary. This trick is especially useful if you run into the following error in the mysql/mariadb error log while trying other reset methods: [Server] Fatal error: Please read &quot;Security&quot; section…</description>
      <content:encoded><![CDATA[<p>In today&#8217;s article, I&#8217;m going to show you the process to reset MySQL/MariaDB root passwords. This should work for all versions, but your mileage may vary.</p>
<p>This trick is especially useful if you run into the following error in the mysql/mariadb error log while trying other reset methods:</p>
<pre class="code" tabindex="0"><code>&#x5B;Server] Fatal error: Please read &quot;Security&quot; section of the manual to find out how to run mysqld as root!
&#x5B;Server] Aborting</code></pre>
<h2>1. Create the password reset file</h2>
<p>Create the init file:</p>
<pre class="code" tabindex="0"><code>nano /root/mysql-init</code></pre>
<p>Paste the following command into the file (<strong class="hl-warn">change 123abc to whatever you want the new password to be</strong>):</p>
<pre class="code" tabindex="0"><code>ALTER USER 'root'@'localhost' IDENTIFIED BY '123abc';</code></pre>
<p>Save the file and exit the editor</p>
<h2>2. Start MySQL/MariaDB with the init file</h2>
<p>Make sure mysqld is stopped:</p>
<pre class="code" tabindex="0"><code>ps aux | grep sql</code></pre>
<p>Should display something similar to the following:</p>
<pre class="code" tabindex="0"><code>root     16632  0.0  0.0 112704   932 pts/0    S+   18:02   0:00 grep --color=auto sql</code></pre>
<p>If it display something like this instead:</p>
<pre class="code" tabindex="0"><code>mysql     2938  0.0  0.0 113308  1556 ?        Ss   Dec04   0:00 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
mysql     3259  2.8  2.7 1580000 217248 ?      Sl   Dec04  87:15 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --open-files-limit=4096 --pid-file=/var/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock
root     16582  0.0  0.0 112708   928 pts/0    S+   18:01   0:00 grep --color=auto sql</code></pre>
<p>Then kill the mysqld process by running the following (<strong class="hl-warn">replace the PID with the correct one from your output</strong>):</p>
<pre class="code" tabindex="0"><code>kill 3259</code></pre>
<p>Verify that the mysqld process has been stopped, then start mysqld using the following command:</p>
<pre class="code" tabindex="0"><code>mysqld --user=root --skip-grant-tables --init-file=/root/mysql-init &amp;</code></pre>
<p>If all went smoothly, that should log you into MySQL/MariaDB and you&#8217;re done!</p>
]]></content:encoded>
    </item>
    <item>
      <title>Install MySQL 8.0.13 on CentOS 7.5 (1804)</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/install-mysql-8-0-13-on-centos-7-5-1804/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/install-mysql-8-0-13-on-centos-7-5-1804/</guid>
      <pubDate>Thu, 22 Nov 2018 20:34:24 +0000</pubDate>
      <category>Tutorials</category>
      <description>Today I’m going to show you how to install MySQL 8.0.13 on CentOS 7.5 (1804). This tutorial assumes that you are running a stock/default installation of CentOS 7.5, and have NOT previously installed MySQL or MariaDB. 1. Make sure you’re NOT already running MySQL/MariaDB Run the following command: mysql -v Should output the following:…</description>
      <content:encoded><![CDATA[<p>Today I&#8217;m going to show you how to install MySQL 8.0.13 on CentOS 7.5 (1804).</p>
<p><strong class="hl-warn">This tutorial assumes that you are running a stock/default installation of CentOS 7.5, and have NOT previously installed MySQL or MariaDB.</strong></p>
<h2>1. Make sure you&#8217;re NOT already running MySQL/MariaDB</h2>
<p>Run the following command:</p>
<pre class="code" tabindex="0"><code>mysql -v</code></pre>
<p>Should output the following:</p>
<pre class="code" tabindex="0"><code>-bash: mysql: command not found</code></pre>
<p>Perfect, let&#8217;s keep going!</p>
<h2>2. Add the MySQL 8.0 Repository</h2>
<p>Run the following command to add the MariaDB 10.3 repository to yum:</p>
<pre class="code" tabindex="0"><code>rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm</code></pre>
<p>Should see some output similar to:</p>
<pre class="code" tabindex="0"><code>Retrieving https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
warning: /var/tmp/rpm-tmp.ETGjnt: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                          ################################# &#x5B;100%]
Updating / installing...
   1:mysql80-community-release-el7-1  ################################# &#x5B;100%]</code></pre>
<p>Awesome, let&#8217;s move on!</p>
<h2>3. Install MySQL 8.0 and verify success</h2>
<p>Run the following command to install MySQL 8.0:</p>
<pre class="code" tabindex="0"><code>yum install mysql-community-server mysql-community-client</code></pre>
<p>The output should look something like:</p>
<pre class="code" tabindex="0"><code>=============================================================================================================================================
 Package                               Arch                  Version                                  Repository                        Size
=============================================================================================================================================
Installing:
 mysql-community-client                x86_64                8.0.13-1.el7                             mysql80-community                 26 M
 mysql-community-server                x86_64                8.0.13-1.el7                             mysql80-community                381 M
Installing for dependencies:
 mysql-community-common                x86_64                8.0.13-1.el7                             mysql80-community                554 k
 mysql-community-libs                  x86_64                8.0.13-1.el7                             mysql80-community                2.3 M
 net-tools                             x86_64                2.0-0.22.20131004git.el7                 base                             305 k

Transaction Summary
=============================================================================================================================================</code></pre>
<p>Once yum does it&#8217;s thing, start the MySQL daemon:</p>
<pre class="code" tabindex="0"><code>systemctl start mysqld</code></pre>
<p>Then verify that the service has started and the installation is complete:</p>
<pre class="code" tabindex="0"><code>mysql -v</code></pre>
<p>You should see output similar to the following:</p>
<pre class="code" tabindex="0"><code>Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.13 MySQL Community Server - GPL

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.</code></pre>
<p>Awesome, type &#8220;quit&#8221; to exit, and let&#8217;s wrap this up by securing the installation!</p>
<h2>4. Securing the Installation</h2>
<p>Run the following command</p>
<pre class="code" tabindex="0"><code>mysql_secure_installation</code></pre>
<p>Now answer the questions that you will be prompted for (the answers I&#8217;ve provided are generally what you want to do as well:</p>
<pre class="code" tabindex="0"><code>Enter current password for root (enter for none):
Set root password? &#x5B;Y/n] y
Remove anonymous users? &#x5B;Y/n] y
Disallow root login remotely? &#x5B;Y/n] y
Remove test database and access to it? &#x5B;Y/n] y
Reload privilege tables now? &#x5B;Y/n] y</code></pre>
<p>Voila, that&#8217;s it! You&#8217;ll now be up and running with a secured installation of MySQL 8.0.13.</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Upgrade MariaDB 5.5 to MariaDB 10.3 on CentOS 7.5 (1804)</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-upgrade-mariadb-5-5-to-mariadb-10-3-on-centos-7-5-1804/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-upgrade-mariadb-5-5-to-mariadb-10-3-on-centos-7-5-1804/</guid>
      <pubDate>Wed, 21 Nov 2018 00:05:49 +0000</pubDate>
      <category>Tutorials</category>
      <description>In this tutorial, I’ll show you how to upgrade MariaDB 5.5 to MariaDB 10.3 on CentOS 7.5 (1804). This tutorial assumes that you are running a stock/default installation of CentOS 7.5, and have already installed MariaDB 5.5. 1. Make sure you’re running MariaDB 5.5 Run the following command: mysql -v Should output the following:…</description>
      <content:encoded><![CDATA[<p>In this tutorial, I&#8217;ll show you how to upgrade MariaDB 5.5 to MariaDB 10.3 on CentOS 7.5 (1804).</p>
<p><strong class="hl-warn">This tutorial assumes that you are running a stock/default installation of CentOS 7.5, and have already installed MariaDB 5.5.</strong></p>
<h2>1. Make sure you&#8217;re running MariaDB 5.5</h2>
<p>Run the following command:</p>
<pre class="code" tabindex="0"><code>mysql -v</code></pre>
<p>Should output the following:</p>
<pre class="code" tabindex="0"><code>Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.60-MariaDB MariaDB Server</code></pre>
<p>Perfect, let&#8217;s keep going!</p>
<h2>2. Add the MariaDB 10.3 Repository</h2>
<p>Run the following command to add the MariaDB 10.3 repository to yum:</p>
<pre class="code" tabindex="0"><code>nano /etc/yum.repos.d/maria10-3.repo</code></pre>
<p>Paste the following into the editor</p>
<pre class="code" tabindex="0"><code># MariaDB 10.3 CentOS repository list - created 2018-11-19 23:14 UTC
# http://downloads.mariadb.org/mariadb/repositories/
&#x5B;mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1</code></pre>
<p>Save and close the editor, then move to the next step</p>
<h2>3. Upgrade to MariaDB 10.3 and verify success</h2>
<p>Run the following command to upgrade to MariaDB 10.3:</p>
<pre class="code" tabindex="0"><code>yum -y upgrade maria*</code></pre>
<p>Output should look something like this:</p>
<pre class="code" tabindex="0"><code>=============================================================================================================================================
 Package                            Arch                       Version                                     Repository                   Size
=============================================================================================================================================
Installing:
 MariaDB-client                     x86_64                     10.3.10-1.el7.centos                        mariadb                      53 M
     replacing  mariadb.x86_64 1:5.5.60-1.el7_5
 MariaDB-compat                     x86_64                     10.3.10-1.el7.centos                        mariadb                     2.8 M
     replacing  mariadb-libs.x86_64 1:5.5.60-1.el7_5
 MariaDB-server                     x86_64                     10.3.10-1.el7.centos                        mariadb                     123 M
     replacing  mariadb-server.x86_64 1:5.5.60-1.el7_5
Installing for dependencies:
 MariaDB-common                     x86_64                     10.3.10-1.el7.centos                        mariadb                     157 k

Transaction Summary
=============================================================================================================================================</code></pre>
<p>Once yum does it&#8217;s thing, restart the MariaDB daemon:</p>
<pre class="code" tabindex="0"><code>systemctl restart mariadb</code></pre>
<p>Then verify that the service has started and the installation is complete:</p>
<pre class="code" tabindex="0"><code>mysql -v</code></pre>
<p>You should see output similar to the following:</p>
<pre class="code" tabindex="0"><code>Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.3.10-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.</code></pre>
<p>Sweet, you&#8217;re now running MariaDB 10.3!</p>
]]></content:encoded>
    </item>
    <item>
      <title>Install MariaDB 10.3.10 on CentOS 7.5 (1804)</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/install-mariadb-10-3-10-on-centos-7-5-1804/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/install-mariadb-10-3-10-on-centos-7-5-1804/</guid>
      <pubDate>Mon, 19 Nov 2018 23:37:03 +0000</pubDate>
      <category>Tutorials</category>
      <description>In this tutorial, I’ll show you how to install MariaDB 10.3.10 on CentOS 7.5 (1804). This tutorial assumes that you are running a stock/default installation of CentOS 7.5, and have NOT previously installed MariaDB. If you have already installed MariaDB, please see our tutorial on How to Upgrade MariaDB 5.5 to MariaDB 10.3 on CentOS…</description>
      <content:encoded><![CDATA[<p>In this tutorial, I&#8217;ll show you how to install MariaDB 10.3.10 on CentOS 7.5 (1804).</p>
<p><strong class="hl-warn">This tutorial assumes that you are running a stock/default installation of CentOS 7.5, and have NOT previously installed MariaDB. If you have already installed MariaDB, please see our tutorial on</strong> <a href="https://www.zerostopbits.com/musings-and-tutorials/how-to-upgrade-mariadb-5-5-to-mariadb-10-3-on-centos-7-5-1804/">How to Upgrade MariaDB 5.5 to MariaDB 10.3 on CentOS 7.5 (1804)</a></p>
<h2>1. Make sure you&#8217;re NOT already running MySQL/MariaDB</h2>
<p>Run the following command:</p>
<pre class="code" tabindex="0"><code>mysql -v</code></pre>
<p>Should output the following:</p>
<pre class="code" tabindex="0"><code>-bash: mysql: command not found</code></pre>
<p>Perfect, let&#8217;s keep going!</p>
<h2>2. Add the MariaDB 10.3 Repository</h2>
<p>Run the following command to add the MariaDB 10.3 repository to yum:</p>
<pre class="code" tabindex="0"><code>nano /etc/yum.repos.d/maria10-3.repo</code></pre>
<p>Paste the following into the editor</p>
<pre class="code" tabindex="0"><code># MariaDB 10.3 CentOS repository list - created 2018-11-19 23:14 UTC
# http://downloads.mariadb.org/mariadb/repositories/
&#x5B;mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1</code></pre>
<p>Save and close the editor, then move to the next step</p>
<h2>3. Install MariaDB 10.3 and verify success</h2>
<p>Run the following command to install MariaDB 10.3:</p>
<pre class="code" tabindex="0"><code>yum install MariaDB-server MariaDB-client</code></pre>
<p>Once yum does it&#8217;s thing, start the MariaDB daemon:</p>
<pre class="code" tabindex="0"><code>systemctl start mariadb</code></pre>
<p>Then verify that the service has started and the installation is complete:</p>
<pre class="code" tabindex="0"><code>mysql -v</code></pre>
<p>You should see output similar to the following:</p>
<pre class="code" tabindex="0"><code>Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.3.10-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.</code></pre>
<p>Awesome, type &#8220;quit&#8221; to exit, and let&#8217;s wrap this up by securing the installation!</p>
<h2>4. Securing the Installation</h2>
<p>Run the following command</p>
<pre class="code" tabindex="0"><code>mysql_secure_installation</code></pre>
<p>Now answer the questions that you will be prompted for (the answers I&#8217;ve provided are generally what you want to do as well:</p>
<pre class="code" tabindex="0"><code>Enter current password for root (enter for none):
Set root password? &#x5B;Y/n] y
Remove anonymous users? &#x5B;Y/n] y
Disallow root login remotely? &#x5B;Y/n] y
Remove test database and access to it? &#x5B;Y/n] y
Reload privilege tables now? &#x5B;Y/n] y</code></pre>
<p>Aaaaaand that&#8217;s it! You should now be up and running with a secured installation of MariaDB 10.3.</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Upgrade PHP 5.4 to PHP 7.3 on CentOS 7.5 (1804)</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-upgrade-php-5-4-to-php-7-3-on-centos-7-5-1804/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-upgrade-php-5-4-to-php-7-3-on-centos-7-5-1804/</guid>
      <pubDate>Sun, 18 Nov 2018 01:28:14 +0000</pubDate>
      <category>Tutorials</category>
      <description>This tutorial will show you how to upgrade PHP 5.4 to PHP 7.3 on CentOS 7.5 (1804). I’m assuming that you are running a stock installation of CentOS, and already have PHP 5.4 installed. 1. Verify current version of PHP Type in the following to see the current PHP version: php -v The output…</description>
      <content:encoded><![CDATA[<p>This tutorial will show you how to upgrade PHP 5.4 to PHP 7.3 on CentOS 7.5 (1804).</p>
<p><strong class="hl-warn">I&#8217;m assuming that you are running a stock installation of CentOS, and already have PHP 5.4 installed.</strong></p>
<h2>1. Verify current version of PHP</h2>
<p>Type in the following to see the current PHP version:</p>
<pre class="code" tabindex="0"><code>php -v</code></pre>
<p>The output should match this:</p>
<pre class="code" tabindex="0"><code>PHP 5.4.16 (cli) (built: Apr 12 2018 19:02:01)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies</code></pre>
<p>Cool, let&#8217;s move on!</p>
<h2>2. Install the REMI and EPEL repositories</h2>
<p>If you don&#8217;t already have them, install the Remi and EPEL repositories:</p>
<pre class="code" tabindex="0"><code>rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://rpms.remirepo.net/enterprise/remi-release-7.rpm</code></pre>
<p>Enable the Remi repository globally:</p>
<pre class="code" tabindex="0"><code>nano /etc/yum.repos.d/remi.repo</code></pre>
<p>Under the section that looks like [remi] make the following changes:</p>
<pre class="code" tabindex="0"><code>&#x5B;remi]
name=Remi's RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/remi/$basearch/
#mirrorlist=https://rpms.remirepo.net/enterprise/7/remi/httpsmirror
mirrorlist=http://cdn.remirepo.net/enterprise/7/remi/mirror
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi</code></pre>
<p>Type CTRL-O to save and CTRL-X to close the editor</p>
<p>Enable the Remi PHP7.3 Repository:</p>
<pre class="code" tabindex="0"><code>nano /etc/yum.repos.d/remi-php73.repo</code></pre>
<p>Under the section that looks like [remi-php73] make the following changes:</p>
<pre class="code" tabindex="0"><code>&#x5B;remi-php73]
name=Remi's PHP 7.3 RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php73/$basearch/
mirrorlist=https://rpms.remirepo.net/enterprise/7/php73/httpsmirror
mirrorlist=http://cdn.remirepo.net/enterprise/7/php73/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi</code></pre>
<p><strong class="hl-warn">Make sure you un-comment the HTTPS mirror-list as well. The HTTP mirror seems to run into issues every now and then.</strong></p>
<p>Type CTRL-O to save and CTRL-X to close the editor</p>
<h2>3. Upgrade PHP 5.4 to PHP 7.3</h2>
<p>Now we can upgrade PHP. Just type in the following command:</p>
<pre class="code" tabindex="0"><code>yum -y upgrade php*</code></pre>
<p>Once the upgrade has completed, verify that you have PHP 7.3 installed:</p>
<pre class="code" tabindex="0"><code>php -v</code></pre>
<p>Output should look like:</p>
<pre class="code" tabindex="0"><code>PHP 7.3.0RC5 (cli) (built: Nov  6 2018 10:22:47) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies</code></pre>
<p>You&#8217;re now running with PHP 7.3!</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Upgrade PHP 5.4 to PHP 7.0 on CentOS 7.5 (1804)</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-upgrade-php-5-4-to-php-7-0-on-centos-7-5-1804/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-upgrade-php-5-4-to-php-7-0-on-centos-7-5-1804/</guid>
      <pubDate>Fri, 16 Nov 2018 03:45:18 +0000</pubDate>
      <category>Tutorials</category>
      <description>This tutorial will show you how to upgrade PHP 5.4 to PHP 7.0 on CentOS 7.5. The assumption is that you are running a stock installation of CentOS, and already have PHP 5.4 installed. 1. Verify current version of PHP Type in the following to see the current PHP version: php -v The output…</description>
      <content:encoded><![CDATA[<p>This tutorial will show you how to upgrade PHP 5.4 to PHP 7.0 on CentOS 7.5.</p>
<p><strong class="hl-warn">The assumption is that you are running a stock installation of CentOS, and already have PHP 5.4 installed.</strong></p>
<h2>1. Verify current version of PHP</h2>
<p>Type in the following to see the current PHP version:</p>
<pre class="code" tabindex="0"><code>php -v</code></pre>
<p>The output should match this:</p>
<pre class="code" tabindex="0"><code>PHP 5.4.16 (cli) (built: Apr 12 2018 19:02:01)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies</code></pre>
<p>Cool, let&#8217;s continue!</p>
<h2>2. Install the REMI and EPEL repositories</h2>
<p>If you don&#8217;t already have them, install the Remi and EPEL repositories:</p>
<pre class="code" tabindex="0"><code>rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://rpms.remirepo.net/enterprise/remi-release-7.rpm</code></pre>
<p>Enable the Remi repository globally:</p>
<pre class="code" tabindex="0"><code>nano /etc/yum.repos.d/remi.repo</code></pre>
<p>Under the section that looks like [remi] make the following changes:</p>
<pre class="code" tabindex="0"><code>&#x5B;remi]
name=Remi's RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/remi/$basearch/
#mirrorlist=https://rpms.remirepo.net/enterprise/7/remi/httpsmirror
mirrorlist=http://cdn.remirepo.net/enterprise/7/remi/mirror
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi</code></pre>
<p>Type CTRL-O to save and CTRL-X to close the editor</p>
<p>Enable the Remi PHP7.0 Repository:</p>
<pre class="code" tabindex="0"><code>nano /etc/yum.repos.d/remi-php70.repo</code></pre>
<p>Under the section that looks like [remi-php70] make the following changes:</p>
<pre class="code" tabindex="0"><code>&#x5B;remi-php70]
name=Remi's PHP 7.0 RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php70/$basearch/
#mirrorlist=https://rpms.remirepo.net/enterprise/7/php70/httpsmirror
mirrorlist=http://cdn.remirepo.net/enterprise/7/php70/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi</code></pre>
<p>Type CTRL-O to save and CTRL-X to close the editor</p>
<h2>3. Upgrade PHP 5.4 to PHP 7.0</h2>
<p>Now we can upgrade PHP. Just type in the following command:</p>
<pre class="code" tabindex="0"><code>yum -y upgrade php*</code></pre>
<p>Once the upgrade has completed, verify that you have PHP 7.0 installed:</p>
<pre class="code" tabindex="0"><code>php -v</code></pre>
<p>Output should look like:</p>
<pre class="code" tabindex="0"><code>PHP 7.0.32 (cli) (built: Sep 11 2018 13:20:19) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies</code></pre>
<p>Sweet deal, upgrade is done!!</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Upgrade PHP 5.4 to PHP 5.6 on CentOS 7.5 (1804)</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-upgrade-php-5-4-to-php-5-6-on-centos-7-5-1804/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-upgrade-php-5-4-to-php-5-6-on-centos-7-5-1804/</guid>
      <pubDate>Fri, 16 Nov 2018 01:58:46 +0000</pubDate>
      <category>Tutorials</category>
      <description>This tutorial will show you how to upgrade PHP 5.4 to PHP 5.6 on CentOS 7.5. The assumption is that you are running a stock installation of CentOS, and already have PHP 5.4 installed. 1. Verify current version of PHP Type in the following to see the current PHP version: php -v The output…</description>
      <content:encoded><![CDATA[<p>This tutorial will show you how to upgrade PHP 5.4 to PHP 5.6 on CentOS 7.5.</p>
<p><strong class="hl-warn">The assumption is that you are running a stock installation of CentOS, and already have PHP 5.4 installed.</strong></p>
<h2>1. Verify current version of PHP</h2>
<p>Type in the following to see the current PHP version:</p>
<pre class="code" tabindex="0"><code>php -v</code></pre>
<p>The output should match this:</p>
<pre class="code" tabindex="0"><code>PHP 5.4.16 (cli) (built: Apr 12 2018 19:02:01)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies</code></pre>
<p>Perfect, let&#8217;s continue!</p>
<h2>2. Install the REMI and EPEL repositories</h2>
<p>If you don&#8217;t already have them, install the Remi and EPEL repositories:</p>
<pre class="code" tabindex="0"><code>rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://rpms.remirepo.net/enterprise/remi-release-7.rpm</code></pre>
<p>Enable the Remi repository globally:</p>
<pre class="code" tabindex="0"><code>nano /etc/yum.repos.d/remi.repo</code></pre>
<p>Under the section that looks like [remi] make the following changes:</p>
<pre class="code" tabindex="0"><code>&#x5B;remi]
name=Remi's RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/remi/$basearch/
#mirrorlist=https://rpms.remirepo.net/enterprise/7/remi/httpsmirror
mirrorlist=http://cdn.remirepo.net/enterprise/7/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi</code></pre>
<p>Also, under the section that looks like [remi-php55] make the following changes:</p>
<pre class="code" tabindex="0"><code>&#x5B;remi-php56]
name=Remi's PHP 5.6 RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php56/$basearch/
#mirrorlist=https://rpms.remirepo.net/enterprise/7/php56/httpsmirror
mirrorlist=http://cdn.remirepo.net/enterprise/7/php56/mirror
# NOTICE: common dependencies are in &quot;remi-safe&quot;
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi</code></pre>
<p>Type CTRL-O to save and CTRL-X to close the editor</p>
<h2>3. Upgrade PHP 5.4 to PHP 5.6</h2>
<p>Now we can upgrade PHP. Just type in the following command:</p>
<pre class="code" tabindex="0"><code>yum -y upgrade php*</code></pre>
<p>Once the upgrade has completed, verify that you have PHP 5.6 installed:</p>
<pre class="code" tabindex="0"><code>php -v</code></pre>
<p>Output should look like:</p>
<pre class="code" tabindex="0"><code>PHP 5.6.38 (cli) (built: Oct 24 2018 12:50:38)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies</code></pre>
<p>Sweet deal, upgrade is done!!</p>
]]></content:encoded>
    </item>
    <item>
      <title>Another Long Overdue Update…..</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/another-long-overdue-update/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/another-long-overdue-update/</guid>
      <pubDate>Wed, 07 Nov 2018 08:31:44 +0000</pubDate>
      <category>Musings</category>
      <description>Hey All, So it’s been almost 3 years since I last made any changes to the site, or even wrote content for that matter. Looking back at it all, I’m realizing that I should have probably put more effort into at least putting out some tutorials, as I have amassed a massive backlog of content…</description>
      <content:encoded><![CDATA[<p>Hey All,</p>
<p>So it&#8217;s been almost 3 years since I last made any changes to the site, or even wrote content for that matter. Looking back at it all, I&#8217;m realizing that I should have probably put more effort into at least putting out some tutorials, as I have amassed a massive backlog of content to write about. No concrete timelines or anything of the sort on the horizon, but there will definitely be more up to date content incoming.</p>
<p>I also finally got sick of staring at the last version of the site, and decided to rebuild (let me know what you think yea?).</p>
<p>I&#8217;m also shifting the focus of ZSB a bit. While I&#8217;ll still offer managed shared hosting, vps hosting, and server management, I&#8217;m thinking of either spinning all of that off into another brand, or forking this blog off onto it&#8217;s own.</p>
<p>Anywho, thanks for giving this a read, and stay tuned for further updates!</p>
<p>&lt;3</p>
]]></content:encoded>
    </item>
    <item>
      <title>Creating VLANs on a Juniper EX3300</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/juniper-ex3300-creating-vlans/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/juniper-ex3300-creating-vlans/</guid>
      <pubDate>Wed, 21 Oct 2015 09:37:01 +0000</pubDate>
      <category>Tutorials</category>
      <description>Hello everyone here is an easy guide for creating Vlans on a Juniper EX3300. The hardware we used in this guide was a Juniper EX3300 with image version ex-3300-12.3R10.2. If you are like me and are use to using Cisco switches Juniper is a completely different beast. The below assumes you have already start cli.…</description>
      <content:encoded><![CDATA[<p>Hello everyone here is an easy guide for creating Vlans on a Juniper EX3300. The hardware we used in this guide was a Juniper EX3300 with image version ex-3300-12.3R10.2. If you are like me and are use to using Cisco switches Juniper is a completely different beast. The below assumes you have already start cli. Lets begin&#8230; Before anything run the following for the interfaces you will be using. This will remove it from the inet family.This command prevents the system from spitting out the following error&#8221;When ethernet-switching family is configured on an interface, no other family type can be configured on the same interface. error: configuration check-out failed&#8221; So lets you run:</p>
<pre class="code" tabindex="0"><code>zerostopbits#delete interfaces ge-0/0/12 unit 0 family inet</code></pre>
<pre class="code" tabindex="0"><code>zerostopbits#delete interfaces ge-0/0/13 unit 0 family inet
zerostopbits#delete interfaces ge-0/0/14 unit 0 family inet
zerostopbits#delete interfaces ge-0/0/15 unit 0 family inet</code></pre>
<pre class="code" tabindex="0"><code>zerostopbits#delete interfaces ge-0/0/16 unit 0 family inet</code></pre>
<pre class="code" tabindex="0"><code>zerostopbits#delete interfaces ge-0/0/17 unit 0 family inet</code></pre>
<p>Remember to save always save by running the command below.</p>
<pre class="code" tabindex="0"><code>zerostopbits#commit</code></pre>
<p>After you will create the vlan. The following will give it a VLAN name and VLAN ID.</p>
<pre class="code" tabindex="0"><code>zerostopbits#set vlans ipv6client vlan-id 200
zerostopbits#commit</code></pre>
<p>(note: ipv6client can be replaced with any name along with VLAN-ID) The following will assign ports to your vlan</p>
<pre class="code" tabindex="0"><code>zerostopbits#set interfaces ge-0/0/12 unit 0 family ethernet-switching vlan members ipv6client
zerostopbits#set interfaces ge-0/0/13 unit 0 family ethernet-switching vlan members ipv6client
zerostopbits#set interfaces ge-0/0/14 unit 0 family ethernet-switching vlan members ipv6client
zerostopbits#set interfaces ge-0/0/15 unit 0 family ethernet-switching vlan members ipv6client
zerostopbits#set interfaces ge-0/0/16 unit 0 family ethernet-switching vlan members ipv6client
zerostopbits#set interfaces ge-0/0/17 unit 0 family ethernet-switching vlan members ipv6client
commit</code></pre>
<p>This is how you add an IP ranges to the VLAN</p>
<pre class="code" tabindex="0"><code>zerostopbits#set interfaces vlan unit 200 family inet address 10.1.2.3/27
zerostopbits#commit</code></pre>
<p>You can run the above command for as many address you need to add. Be sure to save with the Commit command once done.</p>
<pre class="code" tabindex="0"><code>zerostopbits#set vlans ipv6client l3-interface vlan.200
zerostopbits#commit</code></pre>
]]></content:encoded>
    </item>
    <item>
      <title>VPS Hosting: 5 Things to do with your new VPS</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/vps-hosting-5-things-to-do-with-your-new-vps/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/vps-hosting-5-things-to-do-with-your-new-vps/</guid>
      <pubDate>Mon, 19 Oct 2015 23:36:19 +0000</pubDate>
      <category>Tutorials</category>
      <description>So you’ve bought yourself a shiny new VPS, but have no idea what to do with it. Well, you’ve come to the right place! We’re going to discuss the top 5 things to do with your new VPS, and we’re going to show you how to apply these 5 points to your Ubuntu, or CentOS…</description>
      <content:encoded><![CDATA[<p>So you&#8217;ve bought yourself a shiny new VPS, but have no idea what to do with it. Well, you&#8217;ve come to the right place!</p>
<p>We&#8217;re going to discuss the top 5 things to do with your new VPS, and we&#8217;re going to show you how to apply these 5 points to your Ubuntu, or CentOS VPS. I chose Ubuntu and CentOS because they are the most commonly used Linux server environments for running profit-based systems. This information is available thanks to TyIzaeL over at /r/linux. You can find the full 2015 survey (as well as the 2013 and 2014 editions) at his blog; https://brashear.me/blog/2015/08/24/results-of-the-2015-slash-r-slash-linux-distribution-survey/</p>
<h2>1. Update Kernel/Software, Immediately.</h2>
<p>First things first, your new VPS hosting package is most likely going to be built from a template, and this template is probably not going to be current in terms of software and kernel updates. We need to fix that! Not keep your VPS updated can cause potential security holes in the kernel and packages to remain exposed to internet.</p>
<h3>CentOS 6.7/7.1</h3>
<pre class="code" tabindex="0" data-lang="bash"><code>yum -y upgrade
shutdown -r now</code></pre>
<h3>Ubuntu 12.04/14.04/15.04</h3>
<pre class="code" tabindex="0" data-lang="bash"><code>sudo apt-get update &amp;&amp; sudo apt-get -y dist-upgrade
shutdown -r now</code></pre>
<p>Now, we can muck around with different kernels, and different security implements, but this article is being written as more of a general &#8220;beginners guide to VPS&#8221;. I definitely don&#8217;t want to be responsible for anyone breaking GRUB or anything like that ^_^. So stay tuned for that fun, scary stuff in later, more detailed write-ups!</p>
<h2>2. Install Important and Useful Packages</h2>
<p>Now that we&#8217;ve updated your VPS to the latest kernel and software available, we can begin to install some packages to make your life easier, help harden your VPS against attacks, and give you greater insight on what your VPS is doing.</p>
<p>We&#8217;re going to install the below packages. Some of these are personal favorites, some are good to have around, and some should probably come already installed, but alas.</p>
<p class="indent-1">ntp &#8211; Network Time Protocol daemon &#8211; Honestly, I don&#8217;t understand why this isn&#8217;t installed and activated with EVERY distro. There are too many reasons to list why you should want your systems time to be accurate.</p>
<p class="indent-1">wget &#8211; World Wide Web + Get &#8211; I promise you&#8217;ll be using this many times over the course of your VPS administration. Simply, it pulls files from the Internet! Neat!</p>
<p class="indent-1">nano &#8211; Probably the most easy-to-use editor out there. You&#8217;ll be using nano to edit configurations, and all sorts of files. Some people might bash me for even suggesting an opposing editor to vi, but let&#8217;s face it. Nano is easy.</p>
<p class="indent-1">htop &#8211; I have yet to figure out what the H stands for, but this utility extends on the functionality of the top command. It&#8217;s cleaner, and you can custom define some pretty cool settings to help you quickly monitor usage stats.</p>
<p class="indent-1">iotop &#8211; Simply, Input/Output top. This utility allows you to monitor which processes on your system are using up the hard disks. Very useful if you&#8217;re trying to diagnose why your system is running slow</p>
<p class="indent-1">iptraf &#8211; I love iptraf, it&#8217;s just… so cool. iptraf allows you to monitor your network interfaces in a sweet graphical interface.</p>
<p class="indent-1">ncdu &#8211; NCurses Disk Usage &#8211; ahh, another one of my favorites. This nifty little command will scan your system, populate a list of every directory you want it to, and spit out a VERY human-readable breakdown of your systems disk usage.</p>
<p class="indent-1">mtr &#8211; Another network diagnostics utility. mtr allows you to aggregate UDP or ICMP pings/echos, in order to generate a report on any given route your system takes and the latency of said route.</p>
<p class="indent-1">man &#8211; Manuals &#8211; Does this need an explanation? Very handy to have installed if you need to quickly check out how to use a specific command or utility.</p>
<h3>CentOS 6.7/7.1</h3>
<p>Some of these packages are not available in the base CentOS repositories. Check out our article on how to Install the EPEL and Remi Repositories before running the below command. Otherwise, you won&#8217;t be able to install some of these goodies! 🙁</p>
<p>Time to install the goodness:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>yum -y install wget nano ntp iotop iptraf man mtr htop ncdu gcc glibc-static</code></pre>
<p>Set the correct timezone for your VPS server (DO NOT COPY/PASTE: make sure you put YOUR timezone into the command):</p>
<pre class="code" tabindex="0" data-lang="bash"><code>mv /etc/localtime /etc/localtime.bak
ln -s /usr/share/zoneinfo/YOUR/TIMEZONE /etc/localtime</code></pre>
<p>Now let&#8217;s get an accurate time for our VPS and make sure it stays accurate:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>ntpdate pool.ntp.org
service ntpd start
chkconfig ntpd on</code></pre>
<h3>Ubuntu 12.04/14.04/15.04</h3>
<p>Thankfully, Ubuntu and apt-get are pretty good about having the latest and greatest in terms of software already in their base repository. Most of these packages should be pre-installed, but i&#8217;ve included them just in case.</p>
<p>Simply run the below command, and you&#8217;ll be good to go:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>sudo apt-get install wget nano ntp iotop iptraf man mtr htop ncdu gcc glibc-static</code></pre>
<p>Make sure your timezone is correct. Ubuntu provides a neat utility to make this process easy:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>dpkg-reconfigure tzdata</code></pre>
<p>Now you can start NTP:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>ntpdate pool.ntp.org
/etc/init.d/ntp start</code></pre>
<h2>3. Harden the OS, Secure SSH</h2>
<p>The next step we need to take, is to harden your VPS server against possible attacks and other potential issues. We&#8217;re going to be securing SSH, enabling automatic yum and apt-get updates, and installing CSF/LFD, linux-maldetect, rkhunter, chkrootkit, and clamav.</p>
<p>Now I know that seems like a lot to do, but trust me, it&#8217;ll be quick, painless, and totally worth it.</p>
<h3>Securing the OpenSSH Server</h3>
<h3>CentOS 6.7/7.1 and Ubuntu 12.04/14.04/15.04</h3>
<p>Edit the SSH configuration file:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>nano /etc/ssh/sshd_config</code></pre>
<p>Find the below lines, and configure them like below. (MAKE SURE YOU SET YOUR OWN PORT!! DONT COPY/PASTE!)</p>
<pre class="code" tabindex="0"><code>Port 12345
PermitRootLogin no
HostKey /etc/ssh/ssh_host_rsa_key
RSAAuthentication yes
PubkeyAuthentication yes</code></pre>
<h3>Enable Automatic Updating</h3>
<h3>CentOS 6.7/7.1</h3>
<p>Install the yum-cron package to enable automatic updates:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>yum -y install yum-cron
service yum-cron start
chkconfig yum-cron on</code></pre>
<h3>Ubuntu 12.04/14.04/15.04</h3>
<p>This is a work in progress. There are a few ways to do it, and they&#8217;re not quite the simplest methods.</p>
<p>Installing a GOOD Firewall (ConfigServer Firewall)<br>
ConfigServer Firewall (commonly known as CSF) is a Stateful Packet Inspection (SPI) firewall, and a Intrusion Detection System (IDS) rolled into one. It&#8217;s a very powerful utility to have, and makes managing iptables MUCH easier. Both CentOS and Ubuntu come packaged with iptables by default, and process for installing and configuring CSF will be the same on both.</p>
<p>I highly recommend reading the documentation on how to further tweak/configure the CSF installation. You can find at at http://download.configserver.com/csf/readme.txt</p>
<h3>CentOS 6.7/7.1 and Ubuntu 12.04/14.04/15.04</h3>
<p>First, we need to make sure the libwww Perl module is installed:</p>
<p><strong>(Ubuntu)</strong></p>
<pre class="code" tabindex="0" data-lang="bash"><code>apt-get -y install libwww-perl</code></pre>
<p><strong>(CentOS)</strong></p>
<pre class="code" tabindex="0" data-lang="bash"><code>yum -y install perl-libwww-perl</code></pre>
<p>Now, we can go ahead and install CSF:</p>
<pre class="code" tabindex="0"><code>cd /usr/src
rm -fv csf.tgz
wget https://download.configserver.com/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh</code></pre>
<p>CSF will try to automatically add your local IP address to its whitelist, as well as automatically allow any custom SSH ports you have configured. Having said that, we still need to enter the configuration files and ensure that only the ports you want are open, and that both CSF and LFD are not in &#8220;TESTING&#8221; mode.</p>
<pre class="code" tabindex="0" data-lang="bash"><code>nano /etc/csf/csf.conf</code></pre>
<p>Find the following lines in the configuration file, and modify them to suite your needs:</p>
<pre class="code" tabindex="0"><code>TCP_*, UDP_*, IPV6, TCP6_*, UDP6_*</code></pre>
<p>After you configure your ports, find the below line and set it like so:</p>
<pre class="code" tabindex="0"><code>TESTING = &quot;0&quot;</code></pre>
<p>Now restart CSF and LFD:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>/etc/init.d/csf restart
/etc/init.d/lfd restart</code></pre>
<h3>Installing rootkit scanners (rkhunter and chkrootkit)</h3>
<p>We&#8217;re installing both of these rootkit scanners because, why not? One may detect something that the other doesn&#8217;t, and that&#8217;s a plus in our book. After installation, we&#8217;ll set up cron scripts to keep them updated, have them run nightly, and send out alerts if anything is detected.</p>
<h3>CentOS 6.7/7.1 and Ubuntu 12.04/14.04/15.04</h3>
<h4>Install rkhunter</h4>
<p>Run the following to get rkhunter downloaded, extracted, and installed:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>cd /usr/src
wget http://downloads.sourceforge.net/project/rkhunter/rkhunter/1.4.2/rkhunter-1.4.2.tar.gz
tar -xzvf rkhunter-1.4.2.tar.gz
cd rkhunter-1.4.2
sh installer.sh --install</code></pre>
<p>Create the nightly cron script:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>nano /usr/local/bin/rkhunternightly
chmod 755 /usr/local/bin/rkhunternightly</code></pre>
<p>Add the following into the file (MAKE SURE TO CHANGE THE EMAIL!!):</p>
<pre class="code" tabindex="0" data-lang="bash"><code>#!/bin/sh
( /usr/local/bin/rkhunter --versioncheck
/usr/local/bin/rkhunter --update
/usr/local/bin/rkhunter --cronjob --report-warnings-only
) | /usr/bin/mail -s &quot;rkhunter Report - `date +%D`&quot; admin@yourdomain.com</code></pre>
<p>Automate rkhunter via crontab:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>sudo crontab -u root -e</code></pre>
<p>Add the following line to the root crontab:</p>
<pre class="code" tabindex="0"><code>0 1 * * * /usr/local/bin/rkhunterscript -c --cronjob</code></pre>
<p>That will configure rkhunter to scan at 1:00AM nightly, and send you an email with the results.</p>
<h4>Install chkrootkit</h4>
<p>Download, extract, and install chkrootkit:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>cd /usr/src
wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz
tar -xzvf chkrootkit.tar.gz
cd chkrootkit-0.50
make sense</code></pre>
<p>Automate chkrootkit via crontab:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>sudo crontab -u root -e</code></pre>
<p>Add the following to the crontab (MAKE SURE TO CHANGE THE EMAIL!!):</p>
<pre class="code" tabindex="0"><code>10 1 * * * /usr/src/chkrootkit-0.50/chkrootkit 2&amp;gt;&amp;1 | mail -s &quot;chkrootkit Report - `date +%D`&quot; admin@yourdomain.com)</code></pre>
<p>That will configure chkrootkit to scan at 1:10AM nightly, and send you an email with the results. We&#8217;ve offset the time here to give rkhunter a chance to finish running before chkrootkit starts.</p>
<h3>Installing Virus and Malicious File Scanners (clamav and linux-maldet)</h3>
<h4>Install ClamAV</h4>
<p>ClamAV is a decent virus scanner for Linux systems. I&#8217;ve honestly never had ClamAV register a hit, but we want to install it anyways for a couple of reasons. One being that it never hurts to have another eye on things, and two, we&#8217;re going to need the clamscan engine for our final piece of security software.</p>
<h3>CentOS 6.7/7.1</h3>
<p>Install the ClamAV daemon and set it to start on boot:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>yum -y install clamav clamd
chkconfig clamd on
/etc/init.d/clamd start
freshclam</code></pre>
<p>Edit the crontab for root:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>sudo crontab -u root -e</code></pre>
<p>Add the following to schedule ClamAV to run nightly, and send us a report:</p>
<pre class="code" tabindex="0"><code>0 2 * * * clamscan -ri --exclude-dir=^/sys\|^/proc\|^/dev / | mail -s &quot;ClamAV Report - `date +%D`&quot; email@yourdomain.com</code></pre>
<h3>Ubuntu 12.04/14.04/15.04</h3>
<p>Install the ClamAV daemon and set it to start on boot:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>apt-get -y install clamav clamav-daemon
/etc/init.d/clamav-freshclam start
/etc/init.d/clamav-daemon start
freshclam</code></pre>
<p>Edit the crontab for root:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>sudo crontab -u root -e</code></pre>
<p>Add the following to schedule ClamAV to run nightly, and send us a report:</p>
<pre class="code" tabindex="0"><code>0 2 * * * clamscan -ri --exclude-dir=^/sys\|^/proc\|^/dev / | mail -s &quot;ClamAV Report - `date +%D`&quot; email@yourdomain.com</code></pre>
<h3>Install Linux Malware Detect (otherwise known as LMD, maldet, linux-maldet)</h3>
<p>maldet is a powerful piece of software that provides deep scans of your system. We won&#8217;t go into the configuration details in this article, as that is being saved for another write-up. By default, when ClamAV is installed on a system, linux-maldet will use the clamscan engine to significantly speed up it&#8217;s scanning times.</p>
<h3>CentOS 6.7/7.1 and Ubuntu 12.04/14.04/15.04</h3>
<p>Install maldet:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>cd /usr/src
wget http://www.rfxn.com/downloads/maldetect-current.tar.gz
tar xzvf maldetect-current.tar.gz
cd maldetect-1.5
sh install.sh</code></pre>
<p>Edit the maldet configuration file, to configure email reports</p>
<pre class="code" tabindex="0" data-lang="bash"><code>nano /usr/local/maldetect/conf.maldet</code></pre>
<p>Turn email reporting on, and set your email (MAKE SURE YOU CHANGE THE EMAIL!!):</p>
<pre class="code" tabindex="0"><code>email_alert=&quot;1&quot;
email_addr=&quot;you@domain.com&quot;</code></pre>
<h2>4. Configuring Monitoring</h2>
<p>There are a ton of different services we can and should configure to monitor our system, both locally, and remotely. I&#8217;m not going to delve into setting up the more complex systems in this article, but stay tuned for those future docs.</p>
<p>osquery<br>
linux-dash<br>
Cacti<br>
Nagios<br>
MRTG</p>
<p>The quickest and easiest to install and configure from the bunch are linux-dash and MRTG. If you want some quick insights into your system, with some trend graphing to boot, I recommend getting those two installed first. Ideally, you want your monitoring appliances to be on a separate server and network. In case something happens to your VPS, you wouldn&#8217;t know about it if these packages were installed locally.</p>
<h2>5. Have Fun with your VPS!</h2>
<p>Now that we&#8217;ve got all the boring security stuff out of the way, you&#8217;ve reached the most critical step.</p>
<p>At this point, you can install Apache, MySQL, and PHP to turn your VPS into a webserver, or you can instal BIND or PowerDNS and turn it into a DNS box, you can even aggregate your syslogs from other servers and use your VPS as a monitoring/reporting server. There are so many applications for a VPS, that even trying to list them all would be pointless. Just have fun with your VPS.</p>
<p>I want to know what you guys think. Drop a comment below and let me know what you would do differently, or what you would do with your personal VPS.</p>
]]></content:encoded>
    </item>
    <item>
      <title>The Great IPv6 Debate.. Is Over. Maybe?</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/the-great-ipv6-debate-is-over-maybe/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/the-great-ipv6-debate-is-over-maybe/</guid>
      <pubDate>Tue, 13 Oct 2015 21:45:53 +0000</pubDate>
      <category>Musings</category>
      <description>With ARIN’s announcement on September 24th 2015, that their Free Pool of IPv4 addresses has officially been depleted, comes the end of an era. The end of the IPv4 vs IPv6 battles, the end of tip-toeing around the subject of deploying IPv6, the end of IPv4. Will the world now finally accept IPv6 into it’s…</description>
      <content:encoded><![CDATA[<p>With ARIN&#8217;s announcement on September 24th 2015, that their Free Pool of IPv4 addresses has officially been depleted, comes the end of an era. The end of the IPv4 vs IPv6 battles, the end of tip-toeing around the subject of deploying IPv6, the end of IPv4. Will the world now finally accept IPv6 into it&#8217;s loving embrace and begin wide-spread deployment of this taboo protocol?</p>
<p>Probably not anytime soon. At least, in my opinion.</p>
<p>The problems you run into are the same problems that prevented most organizations from deploying IPv6 from the get-go. I&#8217;d like to illustrate some of these points, and in doing so, perhaps spread some awareness as to WHY it is taking so long for IPv6 adoption to become mainstream.</p>
<h2>1. IPv6 Deployments Cost Money</h2>
<p>Money, Money, Money, must be funny. Not really, it&#8217;s actually kind of sad. I say money before hardware and software because it really does boil down to this. IPv6 has been around for a while, with the IETF releasing several RFC&#8217;s defining Internet Protocol version 6 (IPv6) starting with <a href="https://tools.ietf.org/html/rfc1883">RFC 1883</a>.</p>
<p>Now people will tell you things like, &#8220;oh IPv6 isn&#8217;t or wasn&#8217;t supported by such and such hardware&#8221; or &#8220;but IPv6 doesn&#8217;t work with X software&#8221;. Those people were and are right. IPv6 WASN&#8217;T supported by many hardware and software platforms. Why though? Well, think of it in these terms; would YOU want to invest countless amount of $$$ in order to make a transition from IPv4 to IPv6 when instead you could simply keep buying up IPv4 address space? Changing out hardware, developing new software, updating existing software, working with any 3rd party vendors to introduce cross-compatibility, the list of things you&#8217;d have to do goes on and on!</p>
<p>This problem continues to exist today. As of this writing, there are only 25168 active IPv6 prefixes being announced via BGP. Compare that to the 574541 active IPv4 prefixes being announced, and you start to see the bigger picture. Of the 25168 active IPv6 prefixes, the vast majority are being announced by the major telecom and communications companies; including; Sprint, Time Warner Cable, Cox, Comcast, AT&amp;t, Verizon, T-Mobile, and well, you get the idea. Why though? The answer is simple, money!</p>
<p>IPv4 is a valuable commodity now. Why would a for-profit organization waste that commodity on it&#8217;s end-users, when a cheaper long-term solution is available? By shifting towards IPv6-Only deployments, these guys free up valuable IPv4 address space, which they can now sell, lease out, or return to local RIR&#8217;s, FOR PROFIT.</p>
<p>The same trend exists with software developers. The slow adoption rate of IPv6 within certain softwares can be directly attributed to a lack of interest in spending money on research, development, and deployment. Take WHM/cPanel for example. This is a control panel which dominates the industry in terms of usage. Most web hosting companies use WHM/cPanel to provide a platform for their users to build websites on. It wasn&#8217;t until October 1st 2013 that WHM/cPanel introduced IPv6 support into their 11.40 branch, and it STILL isn&#8217;t 100% stable for use.</p>
<p>Overall, IPv6 adoption rates are on the rise. While the trend towards adoption still leans heavily towards major Telecom and Broadband providers, we&#8217;re seeing upticks in adoption by a variety of other services. End-user demands have played a major role is pushing IPv6 adoption forward, and as demand continues to rise, we&#8217;ll start to see IPv6 deployments become commonplace in corporate infrastructures.</p>
<h2>
2. IPv6 Deployment Takes Time and Resources (Which equal what? Money!)</h2>
<p>The next major obstacle in my mind is the fact that there is never enough time, and never enough staff to get the job done. Do you focus on fixing bugs, introducing new features, and maintaining end-user support? Or do you focus on redesigning your application and/or network to support that IPv6 thing?</p>
<p>The reality of things is that time and resources are finite, you have to keep your customers happy and you can&#8217;t overwhelm your staff. Everyone was aware that IPv4 depletion was imminent, they simply chose to put off IPv6 adoption until the very last moment. It&#8217;s a human trait, we don&#8217;t change until pushed to the very brink of destruction.</p>
<h2>
3. Software Support for IPv6</h2>
<p>What about legacy platforms whose developers have either closed shop, or are otherwise missing in action? Unfortunately, unless those platforms are open-source, they will continue to rely on IPv4. The IPv4 and IPv6 protocols can not directly communicate with each other, thankfully, there are mechanisms developed to deal with this situation such as Dual IP stack implementation, Tunneling, and Proxying and translation for IPv6-only hosts.</p>
<p>You again run into the problems of money and time/resources. While these technologies to enable transition exist, many organizations either lack the money and time, or lack the desire to expend money and time towards deploying these technologies to facilitate the transition to IPv6. It&#8217;s not as simple as flipping and switch and, VOILA!, IPv6 is now supported. You need to update your underlying network, your server configurations, your software configurations, your DNS settings, the list goes on and on.</p>
<p>In my opinion, we&#8217;ll see widespread adoption in software once end-user demand reaches critical mass. Many newer networked programs are shipping with IPv6 support baked in, but for those legacy and stubborn pieces of code, it&#8217;s going to take end-user&#8217;s kicking and screaming to force developers into rewriting their code.</p>
<h2>
4. Hardware Support for IPv6</h2>
<p>Hardware support goes last on my list because we&#8217;ve had hardware support since almost as long as IPv6 was defined. Many hardware implementations back then were software based, but nowadays, most modern networking devices have support built in. The likes of Cisco, IBM, Nortel, to name a few, have been actively involved with IPv6 deployment since the 90&#8217;s.</p>
<p>The major excuse when it comes to hardware is again, related directly to money. Upgrading hardware costs time and money, and when you&#8217;re a for-profit organization, you don&#8217;t necessarily have the inclination to spend either. Like I mentioned earlier, there is the potential for profit to be made by simply reclaiming IPv4 address space, and turning around and leasing, selling, or returning said space. You could even cover your hardware upgrade costs.</p>
<p>As stated several times in this article, IPv6 support and deployment IS on the rise. It&#8217;s going to take continued end-user demand to push it forward, and it&#8217;s going to take some far-sighted individuals within their organizations to help facilitate that deployment.</p>
<p>While IPv4 isn&#8217;t going anywhere anytime soon, IPv6 is the future. Submit a ticket, write to your Senators, call the President, do whatever you need to do to enable an accelerated adoption of IPv6.</p>
<p>You can actively view the status of IPv6 route tables by visiting <a href="http://www.cidr-report.org/v6/as2.0/">http://www.cidr-report.org/v6/as2.0/</a></p>
]]></content:encoded>
    </item>
    <item>
      <title>Install the EPEL and Remi Repositories on CentOS</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/install-epel-remi-repositories-centos/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/install-epel-remi-repositories-centos/</guid>
      <pubDate>Tue, 13 Oct 2015 01:17:53 +0000</pubDate>
      <category>Tutorials</category>
      <description>In this mini article, I’m going to show you how to install the EPEL and Remi Repositories on CentOS. These repositories contain some useful tools and utilities, which can help improve your life as a Systems Administrator. They also contain updated versions of certain softwares, such as MariaDB and PHP. Let’s begin! 1. Install the EPEL…</description>
      <content:encoded><![CDATA[<p>In this mini article, I&#8217;m going to show you how to install the EPEL and Remi Repositories on CentOS. These repositories contain some useful tools and utilities, which can help improve your life as a Systems Administrator. They also contain updated versions of certain softwares, such as MariaDB and PHP.</p>
<p>Let&#8217;s begin!</p>
<h2>1. Install the EPEL and Remi Repositories</h2>
<p>This step literally can&#8217;t get any easier. Simply run the below commands, and the repositories will be downloaded and installed on your system</p>
<h3>CentOS 6.7</h3>
<pre class="code" tabindex="0" data-lang="bash"><code>rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm</code></pre>
<pre class="code" tabindex="0" data-lang="bash"><code>rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm</code></pre>
<h3>CentOS 7.1</h3>
<pre class="code" tabindex="0" data-lang="bash"><code>rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm</code></pre>
<pre class="code" tabindex="0" data-lang="bash"><code>rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm</code></pre>
<p>Enable the REMI repository globally:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>nano /etc/yum.repos.d/remi.repo</code></pre>
<p>Under the section that looks like [remi] make the following changes:</p>
<pre class="code" tabindex="0"><code>&#x5B;remi]
name=Remi's RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi</code></pre>
<p>You&#8217;re done!</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Install Apache, MariaDB, and PHP on CentOS 7.1</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-install-apache-mariadb-and-php-on-centos-7-1/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-install-apache-mariadb-and-php-on-centos-7-1/</guid>
      <pubDate>Sun, 11 Oct 2015 01:13:19 +0000</pubDate>
      <category>Tutorials</category>
      <description>In this article, I’ll be showing you how to install Apache 2.4, MariaDB 10.1, and PHP 5.6 on CentOS 7.1.1503. This article assumes you are running a fresh installation of CentOS 7.1, and that you have not yet configured any services. 1. Upgrade CentOS 7.1 As always, with any freshly installed system, let’s…</description>
      <content:encoded><![CDATA[<p>In this article, I&#8217;ll be showing you how to install Apache 2.4, MariaDB 10.1, and PHP 5.6 on CentOS 7.1.1503. This article assumes you are running a fresh installation of CentOS 7.1, and that you have not yet configured any services.</p>
<h2>1. Upgrade CentOS 7.1</h2>
<p>As always, with any freshly installed system, let&#8217;s upgrade the kernel and any other packages that may need updating.</p>
<pre class="code" tabindex="0" data-lang="bash"><code>yum -y upgrade</code></pre>
<p>Once the upgrade has completed, restart your system to apply any upgraded kernels.</p>
<pre class="code" tabindex="0" data-lang="bash"><code>shutdown -r now</code></pre>
<p>Once your system is back online, we can move on to the next step.</p>
<h2>2. Install EPEL/Remi Repositories</h2>
<p>Install the EPEL and Remi repositories to enable access to PHP 5.6.</p>
<pre class="code" tabindex="0" data-lang="bash"><code>rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm</code></pre>
<p>Enable the REMI repository globally:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>nano /etc/yum.repos.d/remi.repo</code></pre>
<p>Under the section that looks like [remi] make the following changes:</p>
<pre class="code" tabindex="0"><code>&#x5B;remi]
name=Remi's RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi</code></pre>
<p>Also, under the section that looks like [remi-php55] make the following changes:</p>
<pre class="code" tabindex="0"><code>&#x5B;remi-php56]
name=Remi's PHP 5.6 RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/php56/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/php56/mirror
# WARNING: If you enable this repository, you must also enable &quot;remi&quot;
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi</code></pre>
<p>Type CTRL-O to save and CTRL-X to close the editor</p>
<h2>3. Install the Official MariaDB Repository</h2>
<p>Install the Official MariaDB repository to get the latest version of MariaDB, and keep it up-to-date with yum updates.</p>
<p>Type in the following to add the MariaDB repository to your system:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>nano /etc/yum.repos.d/MariaDB.repo</code></pre>
<p>Next, you need to copy and paste the following content into the editor:</p>
<pre class="code" tabindex="0"><code>&#x5B;mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1</code></pre>
<p>Type in CTRL-O to save, and CTRL-X to exit</p>
<h2>3. Install Apache 2.4.6, MariaDB 10.1, and PHP 5.6.</h2>
<p>Now we can install the actual Apache, MariaDB, and PHP packages:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>yum install mariadb-client mariadb-server httpd php</code></pre>
<p>Start Apache 2.4.6, and configure it to start on boot:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>systemctl start httpd.service
systemctl enable httpd.service</code></pre>
<p>Add the firewall rules to open up ports 80 and 443</p>
<pre class="code" tabindex="0" data-lang="bash"><code>firewall-cmd --permanent --zone=public --add-service=http 
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload</code></pre>
<p>Start MariaDB 10.1, and configure it to start on boot:</p>
<pre class="code" tabindex="0" data-lang="bash"><code>systemctl start mysql.service
systemctl enable mysql.service</code></pre>
<p>Make sure to run mysql_secure_installation after installing MariaDB 10.1. We&#8217;l be posting a detailed guide on How to Install MariaDB 10.1 on CentOS 7.1.</p>
<p>That&#8217;s it!</p>
<p>I hope you found this guide useful, Please leave any comments, suggestions, or questions in the box below.</p>
]]></content:encoded>
    </item>
    <item>
      <title>How To Manually Install WordPress 4.3.1 on CentOS 6.7</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-manually-install-wordpress-4-3-1-on-centos-6-7/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-manually-install-wordpress-4-3-1-on-centos-6-7/</guid>
      <pubDate>Sat, 10 Oct 2015 19:35:56 +0000</pubDate>
      <category>Tutorials</category>
      <description>Installing WordPress on CentOS couldn’t be easier. We just need to make sure that Apache, MySQL, and PHP are installed and operational, then upload the WordPress files to the Apache VirtualHost directory. If you need help setting up Apache, MySQL, and PHP please read through the following articles first, as I will be assuming you…</description>
      <content:encoded><![CDATA[<p>Installing WordPress on CentOS couldn&#8217;t be easier. We just need to make sure that Apache, MySQL, and PHP are installed and operational, then upload the WordPress files to the Apache VirtualHost directory.</p>
<p>If you need help setting up Apache, MySQL, and PHP please read through the following articles first, as I will be assuming you already have these configured:</p>
<p><a href="https://www.zerostopbits.com/musings-and-tutorials/how-to-install-apache-mysql-and-php-on-centos-6-7/">How to Install Apache, MySQL, and PHP on CentOS 6.7</a></p>
<p><a href="https://www.zerostopbits.com/musings-and-tutorials/how-to-create-a-virtualhost-in-apache-2-2-on-centos-6-7/">How to Create a VirtualHost in Apache</a></p>
<p>Now, let&#8217;s jump right into installing WordPress!</p>
<h2>1. Verify Apache, MySQL and PHP are ready</h2>
<p>First we need to make sure that Apache, MySQL (or MariaDB in this case), and PHP are installed and running.</p>
<p>Check Apache status:</p>
<pre class="code" tabindex="0"><code>service httpd status</code></pre>
<p>Should look something like:</p>
<pre class="code" tabindex="0"><code>httpd (pid 31884) is running...</code></pre>
<p>Check MySQL/MariaDB status:</p>
<pre class="code" tabindex="0"><code>service mariadb status</code></pre>
<p>or</p>
<pre class="code" tabindex="0"><code>service mysqld status</code></pre>
<p>Should output something like:</p>
<pre class="code" tabindex="0"><code>SUCCESS! MySQL running (31985)</code></pre>
<p>Make sure PHP is installed:</p>
<pre class="code" tabindex="0"><code>php -v</code></pre>
<p>Should output something like:</p>
<pre class="code" tabindex="0"><code>PHP 5.6.14 (cli) (built: Sep 30 2015 14:07:43) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies</code></pre>
<p>Everything looks good! Now we can download WordPress, and get it installed!</p>
<h2>2. Download, extract, and prepare WordPress</h2>
<p>First things first, let&#8217;s move into your home directory:</p>
<pre class="code" tabindex="0"><code>cd ~</code></pre>
<p>Now let&#8217;s pull the WordPress files, extract them, and copy them to our VirtualHost</p>
<pre class="code" tabindex="0"><code>wget https://wordpress.org/latest.tar.gz
tar xzvf latest.tar.gz
cp -av wordpress/* /var/www/virtual/yourdomain.com/public_html</code></pre>
<p>Set the directory/file permissions and prepare configuration</p>
<pre class="code" tabindex="0"><code>cd /var/www/virtual/yourdomain.com/public_html
chown -R apache:apache ../public_html
mv wp-config-sample.php wp-config.php</code></pre>
<p>Let&#8217;s create the WordPress database and user. Make sure to take note of what settings you use, as you&#8217;ll need it for the next step. Don&#8217;t just copy/paste the below commands, change them to something unique to keep your WordPress database secure.</p>
<pre class="code" tabindex="0"><code>mysql -u root -p
create database wordpress;
grant all on wordpress.* to 'wpuser'@'localhost' identified by 'somepass!';
quit</code></pre>
<p>Now we need to modify the wp-config.php file to include your database settings.</p>
<pre class="code" tabindex="0"><code>nano wp-config.php</code></pre>
<p>Find the below block, and input your database name, user, and password.</p>
<pre class="code" tabindex="0"><code>// ** MySQL settings ** //

/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');

/** MySQL database username */
define('DB_USER', 'wpuser');

/** MySQL database password */
define('DB_PASSWORD', 'somepass!');

/** MySQL hostname */
define('DB_HOST', 'localhost');</code></pre>
<p>You also want to set the Unique Keys and Salts. This will help keep your WordPress installation a little more secure.</p>
<p>Go to https://api.wordpress.org/secret-key/1.1/salt/</p>
<p>Copy the entire output from that screen. It should look something like:</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-Screen-shot-2015-10-10-at-11.49.29-AM.png" alt="" width="782" height="199" loading="lazy" decoding="async"></p>
<p>Now, in your wp-config.php file, find the section that looks like:</p>
<pre class="code" tabindex="0"><code>// ** Authentication Unique Keys and Salts. ** //</code></pre>
<p>Delete the empty keys and salts, and simply paste yours right in</p>
<p>You&#8217;re now ready to run the WordPress Installer!</p>
<h2>3. Run WordPress Installer</h2>
<p>All you need to do at this point, is select your Language and create your WordPress Admin account. It&#8217;s that simple.</p>
<p>Select your Language:</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-Screen-shot-2015-10-10-at-11.53.09-AM.png" alt="" width="1439" height="725" loading="lazy" decoding="async"></p>
<p>Select Site Title, and WordPress Admin user (I recommend using something that will be hard for malicious bots/users to guess.)</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-Screen-shot-2015-10-10-at-11.53.59-AM.png" alt="" width="1438" height="876" loading="lazy" decoding="async"></p>
<p>Success! (I told you it was easy ^_^)</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-Screen-shot-2015-10-10-at-11.54.29-AM.png" alt="" width="1439" height="684" loading="lazy" decoding="async"></p>
<p>Log in and verify</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-Screen-shot-2015-10-10-at-11.54.45-AM-1024x507.png" alt="" width="1024" height="507" loading="lazy" decoding="async"> <img src="https://www.zerostopbits.com/assets/img/posts/2015-10-Screen-shot-2015-10-10-at-11.54.55-AM-1024x625.png" alt="" width="1024" height="625" loading="lazy" decoding="async"></p>
<p>Awesome!</p>
<p>I hope this article was able to help you install WordPress without too much trouble. The key to making sure everything goes smoothly is double-checking your configuration files, and your file/directory permissions. That&#8217;s usually the cause of most errors, if any. Thanks for reading, and please feel free to leave a comment with any questions, comments, or love you may have 😉</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Flush the DNS Cache on Windows</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-flush-the-dns-cache-on-windows/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-flush-the-dns-cache-on-windows/</guid>
      <pubDate>Thu, 08 Oct 2015 23:09:54 +0000</pubDate>
      <category>Tutorials</category>
      <description>Occasionally, you need to flush the DNS cache on Windows. This article will show you how to do that on Windows 98/NT/2000 and Windows XP, Windows 7 and Vista, Windows 8 and 8.1, and Windows 10. 1. Windows XP and Windows 98/NT/2000 Flushing the DNS cache on Windows XP couldn’t be easier. Simply do the…</description>
      <content:encoded><![CDATA[<p>Occasionally, you need to flush the DNS cache on Windows. This article will show you how to do that on Windows 98/NT/2000 and Windows XP, Windows 7 and Vista, Windows 8 and 8.1, and Windows 10.</p>
<p class="indent-1"><strong>1. Windows XP and Windows 98/NT/2000</strong></p>
<p class="indent-2">Flushing the DNS cache on Windows XP couldn&#8217;t be easier. Simply do the following:</p>
<p class="indent-2">Click <code>Start</code>, then <code>Run</code>. Type in <code>cmd</code> and press enter.</p>
<p class="indent-2">In the dialog box that pops open, type in the following:</p>
<p class="indent-3"><code>ipconfig /flushdns</code></p>
<p class="indent-2">You&#8217;ll see a message that states:</p>
<p class="indent-3"><code>Successfully flushed the DNS Resolver Cache.</code></p>
<p class="indent-1"><strong>2. Windows 7 and Windows Vista</strong></p>
<p class="indent-2">To flush the DNS cache on Windows 7 and Windows Vista, simply take the following steps:</p>
<p class="indent-2">Click <code>Start</code> and type the word <code>cmd</code> into the search box.</p>
<p class="indent-2">Right click the <code>command prompt</code> icon, and select <code>Run as Administrator</code></p>
<p class="indent-2">A dialog box with a black screen will open up. Type the following command in, and press enter:</p>
<p class="indent-3"><code>ipconfig /flushdns</code></p>
<p class="indent-2">You should see a message pop up that says:</p>
<p class="indent-3"><code>Successfully flushed the DNS Resolver Cache.</code></p>
<p class="indent-1"><strong>3. Windows 8 and Windows 8.1</strong></p>
<p class="indent-2">First, ensure you are on the Windows 8 Start Screen. That&#8217;s the screen with all the block tiles.</p>
<p class="indent-2">Simple type in <code>cmd</code> and the Windows Search bar will appear on the right hand side of your screen, showing the search results.</p>
<p class="indent-2">Right click on <code>Command Prompt</code> then click <code>Run as Administrator</code></p>
<p class="indent-2">Type the following command into the screen that open up:</p>
<p class="indent-3"><code>ipconfig /flushdns</code></p>
<p class="indent-2">You should see a message pop up that says:</p>
<p class="indent-3"><code>Successfully flushed the DNS Resolver Cache.</code></p>
<p class="indent-1"><strong>4. Windows 10</strong></p>
<p class="indent-2">To flush the DNS cache on Windows 10, first ensure you are on the Windows 10 desktop.</p>
<p class="indent-2">Right-click on the Start Menu and choose <code>Command Prompt (Admin)</code></p>
<p class="indent-2">Type the below command into the command prompt window:</p>
<p class="indent-2"><code>ipconfig /flushdns</code></p>
<p class="indent-2">You should see a message pop up that says:</p>
<p class="indent-3"><code>Successfully flushed the DNS Resolver Cache.</code></p>
<p>As you can probably tell, the process for flushing the DNS cache on all Windows operating systems is pretty much the same. The biggest different is figuring out HOW to get to the command prompt. I hope this article helps anyone who needs it.</p>
<p>You can also check out our article on <a href="https://www.zerostopbits.com/musings-and-tutorials/how-to-flush-the-dns-cache-on-osx-mac/">How to Flush the DNS Cache on OSX/Mac</a></p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Install MariaDB 10 on CentOS 6.7</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-install-mariadb-10-on-centos-6-7/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-install-mariadb-10-on-centos-6-7/</guid>
      <pubDate>Thu, 08 Oct 2015 01:38:34 +0000</pubDate>
      <category>Tutorials</category>
      <description>This article will show you how to install MariaDB 10 on CentOS 6.7. I will be assuming that you DO NOT already have MySQL installed, and that you are installing MariaDB 10 on a freshly installed, stock CentOS 6.7 installation. 1. Add the Official MariaDB Yum Repository First off, we need to add the…</description>
      <content:encoded><![CDATA[<p>This article will show you how to install MariaDB 10 on CentOS 6.7.</p>
<p><strong class="hl-warn">I will be assuming that you <strong>DO NOT already have MySQL installed</strong>, and that you are installing MariaDB 10 on a freshly installed, stock CentOS 6.7 installation.</strong></p>
<h2>1. Add the Official MariaDB Yum Repository</h2>
<p>First off, we need to add the Office MariaDB Yum Repository.</p>
<p>Type in the following to add the MariaDB repository to your system:</p>
<pre class="code" tabindex="0"><code>nano /etc/yum.repos.d/MariaDB.repo</code></pre>
<p>Next, you need to copy and paste the following content into the editor:</p>
<pre class="code" tabindex="0"><code>&#x5B;mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1</code></pre>
<p>Type in CTRL-O to save, and CTRL-X to exit</p>
<h2>2. Install MariaDB 10</h2>
<p>Now you can install MariaDB 10, enter the following command:</p>
<pre class="code" tabindex="0"><code>yum -y install MariaDB-server MariaDB-client</code></pre>
<p>Once the install has completed, start MariaDB. The command is similar to how you would start MySQL:</p>
<pre class="code" tabindex="0"><code>service mysql start</code></pre>
<p>Now check to make sure that MariaDB 10 is installed:</p>
<pre class="code" tabindex="0"><code>mysql -v</code></pre>
<p>You should see output similar to the following:</p>
<pre class="code" tabindex="0"><code>Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.0.21-MariaDB MariaDB Server</code></pre>
<p>And you&#8217;re done!</p>
]]></content:encoded>
    </item>
    <item>
      <title>CentOS 7.1 Reference Guide</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/centos-7-1-reference-guide/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/centos-7-1-reference-guide/</guid>
      <pubDate>Wed, 07 Oct 2015 10:37:00 +0000</pubDate>
      <category>Tutorials</category>
      <description>A number of changes were made in CentOS 7 that are fairly different from previous iterations. This page will attempt to identify and address the differences and how to deal with them. Differences include: Default XFS filesystem (need more research on XFS and Butter FS To fill out filesystem) ifconfig is gone setup is…</description>
      <content:encoded><![CDATA[<p>A number of changes were made in CentOS 7 that are fairly different from previous iterations. This page will attempt to identify and address the differences and how to deal with them. Differences include:</p>
<ul>
<li>Default XFS filesystem (need more research on XFS and Butter FS To fill out filesystem)</li>
<li>ifconfig is gone</li>
<li>setup is gone</li>
<li>service network restart command no longer changes the IP of an interface after it&#8217;s been reconfigured.</li>
<li>IP aliases are a thing of the past</li>
</ul>
<h3>Filesystem</h3>
<p>Beware CentOS 7.1  partitioner will try to use xfs by default. Most people will try and get away from xfs. We are partial to still using ext4. For larger partitions you can use btrfs (butter FS).</p>
<h3>Ifconfig is gone</h3>
<p>CentOS 7 has done away with our beloved ifconfig command. It has been replaced with the &#8220;ip&#8221; command. Here are some common uses:</p>
<pre class="code" tabindex="0"><code>ip addr</code></pre>
<p>Is like the basic ifconfig command, shows interfaces and configured IP addresses</p>
<pre class="code" tabindex="0"><code>ip addr add 10.1.2.3/27 dev enp2s0</code></pre>
<p>Adds IP 10.1.2.3/27 to network interface enp2s0</p>
<p>You can still use ifup and ifdown commands to bring an interface up or down, respectively.<br>
alternatively, you can use the ip command to bring an interface up or down:</p>
<pre class="code" tabindex="0"><code># ip link set eth1 down
# ip link set eth1 up</code></pre>
<p>You can also always install ifconfig command by entering the following command:</p>
<pre class="code" tabindex="0"><code>yum provides ifconfig
yum install net-tools</code></pre>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-Ifconfig_install.jpg" alt="" width="1393" height="913" loading="lazy" decoding="async"></p>
<h3>setup is gone</h3>
<p>use the new tool:</p>
<pre class="code" tabindex="0"><code>nmtui</code></pre>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-CentOS_7_1_nmtui.jpg" alt="" width="1600" height="1200" loading="lazy" decoding="async"></p>
<p>The tool is pretty intuitive and should be pretty easy to figure out once you mess with it some. Note that instead of typing in a netmask such as 255.255.255.248 you will just put the CIDR number at the end of the IP, e.g. 192.168.1.42/29</p>
<h3>service network restart</h3>
<p>The command no longer automatically brings down all interfaces and bring them up with new IPs. You need to bounce the interface manually. After setting up a new ip address using nmtui issue the following commands:</p>
<pre class="code" tabindex="0"><code>systemctl restart network
ip link set en01 down
ip link set en01 up</code></pre>
<p>This example of course assumes that the nic you configured is names en01. Interface could also be named something else run the ip command to find out the interfaces name.</p>
<h3>Ip aliases</h3>
<p>CentOS 7 does away with ip interfaces (e.g. eth0:1, eth0:2, etc) and instead just allows you to add multiple IP addresses straight to the interface. the nmtui lets you do this easily by just continuing to add IPs to the interface you have selected. If you look at the config file in /etc/sysconfig/network-scripts/ the lines for multiple IPs will look like so:</p>
<pre class="code" tabindex="0"><code>IPADDR0=10.2.0.5
PREFIX0=24
IPADDR1=192.168.1.40
PREFIX1=29
IPADDR2=192.8.8.1
PREFIX2=27</code></pre>
<p>This setup gives the interface a primary IP of 10.2.0.5/24, and adds IPs 192.168.1.40/29 and 192.8.8.1/27</p>
]]></content:encoded>
    </item>
    <item>
      <title>Resetting root password on CentOS 7.1 / RHEL</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/resetting-root-password-centos-7-1-rhel/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/resetting-root-password-centos-7-1-rhel/</guid>
      <pubDate>Wed, 07 Oct 2015 09:02:36 +0000</pubDate>
      <category>Tutorials</category>
      <description>This article will explain step by step on how to reset the password on your CentOS 7.1 server. This article assumes that you have direct access to your server, via KVM/IPMI, or standing in front of the console directly, plugged in with keyboard/mouse. You were brought here either because you lost or forgot your root…</description>
      <content:encoded><![CDATA[<p>This article will explain step by step on how to reset the password on your CentOS 7.1 server. This article assumes that you have direct access to your server, via KVM/IPMI, or standing in front of the console directly, plugged in with keyboard/mouse.  You were brought here either because you lost or forgot your root password. It could also be that your admin is on vacation and forgot to give you access to your server just in case he was unreachable.</p>
<p>The image below probably looks familiar as you are unable to login to your server. You will have to reboot your server either by Ctrl alt del or issue a cold reboot.</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-Centos_7_1_reset_password_unable_to_login_as_root.jpg" alt="" width="1022" height="289" loading="lazy" decoding="async"></p>
<p>Once the server has been rebooted I would suggest you spam the space key on your keyboard so that it boot stops a grub menu. You will be seeing something like this:</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-Centos_7_1_reset_password_Select_latest_kernel.jpg" alt="" width="720" height="404" loading="lazy" decoding="async"></p>
<p>Once the prompt has stopped at the grub menu highlight the latest kernel version. In this case it will be &#8220;CentOS Linux 7 (core), with Linux 3.10.0-229.14.1.el7.x86_64&#8221;. Once you have highlighted or selected your latest kernel press &#8216;e&#8217; from your keyboard. This will allow you to edit your Kernel and it will looks something like this:</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-Centos_7_1_reset_password_replacing_rhgb_with_init.jpg" alt="" width="719" height="402" loading="lazy" decoding="async"></p>
<p>You will have to go down to the linux16 line and replace &#8220;rhgb quiet&#8221; with &#8220;init=/bin/bash&#8221; . When adding the line please keep in mind that the text is entered without quotes. If you do not see &#8220;rhgb quiet&#8221; you can just put init=/bin/bash at the end of the kernel line.  Once you have replaced &#8220;rhgb quiet&#8221; it will look like this:</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-Centos_7_1_reset_password_adding_bin_bash_linux16.jpg" alt="" width="721" height="398" loading="lazy" decoding="async"></p>
<p>Once you are done editing you may go ahead and press ctrl+x on your keyboard. This will start the boot process with the parameters we have set above. Once boot up has been completed it will drop you into the bash prompt that will look like this:</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-Centos_7_1_reset_password_entered_bash_prompt.jpg" alt="" width="1024" height="768" loading="lazy" decoding="async"></p>
<p>You will need to have read-write permissions in order to change the root password. This can be accomplished using the following command:</p>
<pre class="code" tabindex="0"><code>mount -o remount,rw /</code></pre>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-Centos_7_1_reset_password_mounting_root_readwrite.jpg" alt="" width="1024" height="768" loading="lazy" decoding="async"></p>
<p>Now that you have mounted root filesystem into read-write mode you can reset the root password with the following command:</p>
<pre class="code" tabindex="0"><code>passwd root</code></pre>
<p>Once you have successfully entered your new root password,  Your prompt will look something like this:</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-Centos_7_1_reset_password_set_new_password.jpg" alt="" width="1023" height="768" loading="lazy" decoding="async"></p>
<p>Now that you have successfully reset your root password. You will have to update your SELinux parameters. You can do this using the following command:</p>
<pre class="code" tabindex="0"><code>touch /.autorelabel</code></pre>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-Centos_7_1_reset_password_selinux_touch_autorelabel.jpg" alt="" width="1024" height="768" loading="lazy" decoding="async"></p>
<p>Once you have finished updating your SELinux paramaters. You will have to reboot your server. You can do this by running the following command:</p>
<pre class="code" tabindex="0"><code>#exec /sbin/init</code></pre>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-Centos_7_1_reset_password_running_exec_sbin.jpg" alt="" width="1025" height="767" loading="lazy" decoding="async"></p>
<p>Once you are at login prompt you will be able to gain access to your server with the new login information.</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-new_system_password.jpg" alt="" width="1021" height="281" loading="lazy" decoding="async"></p>
<p>Congratulations! You&#8217;ve successfully reset your root password on CentOS 7.1/RHEL!</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Install MySQL 5.6 on CentOS 6.7</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-intall-mysql-5-6-on-centos-6-7/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-intall-mysql-5-6-on-centos-6-7/</guid>
      <pubDate>Wed, 07 Oct 2015 00:05:40 +0000</pubDate>
      <category>Tutorials</category>
      <description>This article will show you how to install MySQL 5.6 on CentOS 6.7. In writing this how-to, I have assumed that you are running a stock installation of CentOS 6.7, and that you DO NOT already have MySQL installed. 1. Install the MySQL Community repository First, we need to install the Official MySQL Community repository,…</description>
      <content:encoded><![CDATA[<p>This article will show you how to install MySQL 5.6 on CentOS 6.7.</p>
<p><strong class="hl-warn">In writing this how-to, I have assumed that you are running a stock installation of CentOS 6.7, and that you <strong>DO NOT already have MySQL installed</strong>.</strong></p>
<h2>1. Install the MySQL Community repository</h2>
<p>First, we need to install the Official MySQL Community repository, this is done by entering the following commands:</p>
<pre class="code" tabindex="0"><code>rpm -Uvh http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm</code></pre>
<p>You should now be ready to install MySQL 5.6!</p>
<h2>2. Installing MySQL 5.6</h2>
<p>Type in the following commands to install MySQL 5.6</p>
<pre class="code" tabindex="0"><code>yum -y install mysql mysql-server</code></pre>
<p>Type in the below to verify the correct packages were installed:</p>
<pre class="code" tabindex="0"><code>rpm -qa | grep mysql</code></pre>
<p>The output should look similar to the following:</p>
<pre class="code" tabindex="0"><code>mysql-community-release-el6-5.noarch
mysql-community-common-5.6.27-2.el6.x86_64
mysql-community-client-5.6.27-2.el6.x86_64
mysql-community-server-5.6.27-2.el6.x86_64
mysql-community-libs-5.6.27-2.el6.x86_64
mysql-community-libs-compat-5.6.27-2.el6.x86_64</code></pre>
<p>Now you can start MySQL 5.6 using the following command:</p>
<pre class="code" tabindex="0"><code>chkconfig mysqld on
service mysqld start</code></pre>
<p>Verify that MySQL 5.6 is running:</p>
<pre class="code" tabindex="0"><code>mysql -v</code></pre>
<p>And you should see output similar to the following:</p>
<pre class="code" tabindex="0"><code>Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.27 MySQL Community Server (GPL)</code></pre>
<p>That&#8217;s all she wrote!</p>
<p>Upgrading from MySQL 5.5 is a fairly easy process, and I&#8217;ll be writing a guide on that soon. However, upgrading from earlier versions of MySQL (such as MySQL 5.1) requires a bit more work. I&#8217;ll see writing on article on How to Upgrade MySQL 5.1 to MySQL 5.6 on CentOS 6.7 so stay tuned!</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Upgrade PHP 5.3 to PHP 5.6 on CentOS 6.7</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-upgrade-php-5-3-to-php-5-6-on-centos-6-7/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-upgrade-php-5-3-to-php-5-6-on-centos-6-7/</guid>
      <pubDate>Tue, 06 Oct 2015 22:57:52 +0000</pubDate>
      <category>Tutorials</category>
      <description>In this article, I’m going to show you how to upgrade PHP 5.3 to PHP 5.6 on CentOS 6.7. This article assumes you have a stock installation of CentOS, and that you already have PHP 5.3 installed 1. Verify current version of PHP Type in the following to see the current PHP version: php…</description>
      <content:encoded><![CDATA[<p>In this article, I&#8217;m going to show you how to upgrade PHP 5.3 to PHP 5.6 on CentOS 6.7.</p>
<p><strong class="hl-warn">This article assumes you have a stock installation of CentOS, and that you already have PHP 5.3 installed</strong></p>
<h2>1. Verify current version of PHP</h2>
<p>Type in the following to see the current PHP version:</p>
<pre class="code" tabindex="0"><code>php -v</code></pre>
<p>Should output something like:</p>
<pre class="code" tabindex="0"><code>PHP 5.3.3 (cli) (built: Jul 9 2015 17:39:00) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies</code></pre>
<p>Great, now we can move on!</p>
<h2>2. Install the Remi and EPEL RPM repositories</h2>
<p>If you haven’t already done so, install the Remi and EPEL repositories</p>
<pre class="code" tabindex="0"><code>rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm</code></pre>
<p>Enable the REMI repository globally:</p>
<pre class="code" tabindex="0"><code>nano /etc/yum.repos.d/remi.repo</code></pre>
<p>Under the section that looks like [remi] make the following changes:</p>
<pre class="code" tabindex="0"><code>&#x5B;remi]
name=Remi's RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi</code></pre>
<p>Also, under the section that looks like [remi-php55] make the following changes:</p>
<pre class="code" tabindex="0"><code>&#x5B;remi-php56]
name=Remi's PHP 5.6 RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/php56/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/php56/mirror
# WARNING: If you enable this repository, you must also enable &quot;remi&quot;
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi</code></pre>
<p>Type CTRL-O to save and CTRL-X to close the editor</p>
<h2>3. Upgrade PHP 5.3 to PHP 5.6</h2>
<p>Now we can upgrade PHP. Simply type in the following command:</p>
<pre class="code" tabindex="0"><code>yum -y upgrade php*</code></pre>
<p>Once the update has completed, let&#8217;s verify that you have PHP 5.6 installed:</p>
<pre class="code" tabindex="0"><code>php -v</code></pre>
<p>Should see output similar to the following:</p>
<pre class="code" tabindex="0"><code>PHP 5.6.14 (cli) (built: Sep 30 2015 14:07:43) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies</code></pre>
<p>You&#8217;re done!</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Upgrade PHP 5.3 to PHP 5.5 on CentOS 6.7</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-install-upgrade-php-5-3-to-php-5-5-on-centos-6-7/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-install-upgrade-php-5-3-to-php-5-5-on-centos-6-7/</guid>
      <pubDate>Tue, 06 Oct 2015 22:52:47 +0000</pubDate>
      <category>Tutorials</category>
      <description>In this article, I’m going to show you how to upgrade PHP 5.3 to PHP 5.5 CentOS 6.7. This article assumes you have a stock installation of CentOS, and that you already have PHP 5.3 installed 1. Verify current version of PHP Type in the following to see the current PHP version: php -v…</description>
      <content:encoded><![CDATA[<p>In this article, I&#8217;m going to show you how to upgrade PHP 5.3 to PHP 5.5 CentOS 6.7.</p>
<p><strong class="hl-warn">This article assumes you have a stock installation of CentOS, and that you already have PHP 5.3 installed</strong></p>
<h2>1. Verify current version of PHP</h2>
<p>Type in the following to see the current PHP version:</p>
<pre class="code" tabindex="0"><code>php -v</code></pre>
<p>Should output something like:</p>
<pre class="code" tabindex="0"><code>PHP 5.3.3 (cli) (built: Jul 9 2015 17:39:00) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies</code></pre>
<p>Great, now we can move on!</p>
<h2>2. Install the Remi and EPEL RPM repositories</h2>
<p>If you haven’t already done so, install the Remi and EPEL repositories</p>
<pre class="code" tabindex="0"><code>rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm</code></pre>
<p>Enable the REMI repository globally:</p>
<pre class="code" tabindex="0"><code>nano /etc/yum.repos.d/remi.repo</code></pre>
<p>Under the section that looks like [remi] make the following changes:</p>
<pre class="code" tabindex="0"><code>&#x5B;remi]
name=Remi's RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi</code></pre>
<p>Also, under the section that looks like [remi-php55] make the following changes:</p>
<pre class="code" tabindex="0"><code>&#x5B;remi-php55]
name=Remi's PHP 5.5 RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/php55/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/php55/mirror
# WARNING: If you enable this repository, you must also enable &quot;remi&quot;
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi</code></pre>
<p>Type CTRL-O to save and CTRL-X to close the editor</p>
<h2>3. Upgrade PHP 5.3 to PHP 5.5</h2>
<p>Now we can upgrade PHP. Simply type in the following command:</p>
<pre class="code" tabindex="0"><code>yum -y upgrade php*</code></pre>
<p>Once the update has completed, let&#8217;s verify that you have PHP 5.5 installed:</p>
<pre class="code" tabindex="0"><code>php -v</code></pre>
<p>Should see output similar to the following:</p>
<pre class="code" tabindex="0"><code>PHP 5.5.30 (cli) (built: Oct 1 2015 09:29:18) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies</code></pre>
<p>You&#8217;re done!</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Install WHMCS 6.1 on a VPS or Dedicated Server running CentOS 6.7</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-install-whmcs-6-1-on-a-vps-or-dedicated-server-running-centos-6-7/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-install-whmcs-6-1-on-a-vps-or-dedicated-server-running-centos-6-7/</guid>
      <pubDate>Sun, 04 Oct 2015 07:52:37 +0000</pubDate>
      <category>Tutorials</category>
      <description>In this article, I’m going to show you how to install WHMCS on a VPS or a Dedicated server running CentOS 6.7. This should work on almost any version of CentOS 6, but don’t quote me on that! Package changes might change in a way that is unforeseen! This article assumes you have a general…</description>
      <content:encoded><![CDATA[<p>In this article, I&#8217;m going to show you how to install WHMCS on a VPS or a Dedicated server running CentOS 6.7. This should work on almost any version of CentOS 6, but don&#8217;t quote me on that! Package changes might change in a way that is unforeseen!</p>
<p>This article assumes you have a general understanding of Linux and the command line, and that you know <a href="https://www.zerostopbits.com/musings-and-tutorials/how-to-install-apache-mysql-and-php-on-centos-6-7/">How to Install Apache, MySQL, and PHP on CentOS 6.7</a>.</p>
<p>Additionally, this article assumes that you are running upgraded version of the MySQL, and PHP binaries.</p>
<p>Without further ado, let&#8217;s jump into getting WHMCS set up!</p>
<h2>1. Verify That Apache, MySQL, and PHP are running</h2>
<p>First, if you haven&#8217;t yet configured Apache for VirtualHosts, I suggest you read my article on <a href="https://www.zerostopbits.com/musings-and-tutorials/how-to-create-a-virtualhost-in-apache-2-2-on-centos-6-7/">How To Configure a VirtualHost for Apache 2.2 on CentOS 6.7</a></p>
<p>If you&#8217;ve got that out of the way, we can move on to verifying that all the required services for WHMCS are installed and operational.</p>
<h3>Check Apache and PHP Status</h3>
<p>First type in the following, to make sure the service is running:</p>
<pre class="code" tabindex="0"><code>service httpd status</code></pre>
<p>You should see the following:</p>
<pre class="code" tabindex="0"><code>httpd (pid 1499) is running...</code></pre>
<p>Looking good. Let&#8217;s continue.</p>
<p>Create a directory to contain your WHMCS installation. You can name it whatever you want, just keep in mind this is how users will access WHMCS, and they will see what you name it in the URL bar. For this article, we&#8217;re going to be calling the directory &#8220;whmcshome&#8221;</p>
<p>Once you&#8217;ve confirmed your VirtualHost is in place, we can take a look at MySQL</p>
<h3>Check MySQL Status</h3>
<p>Type in the following:</p>
<pre class="code" tabindex="0"><code>service mysqld status</code></pre>
<p>You should see the following:</p>
<pre class="code" tabindex="0"><code>mysqld (pid 26003) is running...</code></pre>
<p>Now we need to create the WHMCS user and database. Type the following and enter your MySQL password (if configured)</p>
<pre class="code" tabindex="0"><code>mysql -u root -p</code></pre>
<p>Create the WHMCS Database:</p>
<pre class="code" tabindex="0"><code>create database whmcs;</code></pre>
<p>Create the WHMCS User:</p>
<pre class="code" tabindex="0"><code>grant all on whmcs.* to 'whmcs'@'localhost' identified by 'yourpassword';</code></pre>
<p>Flush the Privilege Tables and Quit:</p>
<pre class="code" tabindex="0"><code>flush privileges;
quit</code></pre>
<p>MySQL should also be good now, moving on!</p>
<h2>2. Download Required PHP Packages</h2>
<p>WHMCS requires some extra PHP packages installed in order to work.</p>
<pre class="code" tabindex="0"><code>yum -y install gd php-mbstring php-gd php-mysql php-pdo php-ZendFramework-Db-Adapter-Pdo-Mysql</code></pre>
<p>We&#8217;re also going to need to install the IonCube Loader for PHP. We could do this manually… but that&#8217;s such a drag.</p>
<p>If you haven&#8217;t already done so, install the Remi and EPEL repositories</p>
<pre class="code" tabindex="0"><code>rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm</code></pre>
<p>Let&#8217;s enable the REMI repository globally:</p>
<pre class="code" tabindex="0"><code>nano /etc/yum.repos.d/remi.repo</code></pre>
<p>Under the section that looks like [remi] make the following changes:</p>
<pre class="code" tabindex="0"><code>&#x5B;remi]
name=Remi's RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi</code></pre>
<p>Now install the php-ioncube-loader package:</p>
<pre class="code" tabindex="0"><code>yum -y install php-ioncube-loader</code></pre>
<p>Confirm that everything installed correctly:</p>
<pre class="code" tabindex="0"><code>php -v</code></pre>
<p>You should now see the ioncube loader:</p>
<pre class="code" tabindex="0"><code>PHP 5.4.45 (cli) (built: Sep 2 2015 18:54:00) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.0.18, Copyright (c) 2002-2015, by ionCube Ltd.
with Suhosin v0.9.38, Copyright (c) 2007-2015, by SektionEins GmbH</code></pre>
<h2>3. Download WHMCS 6.1 and Extract to VirtualHost Server Root</h2>
<p>If you haven&#8217;t already created an an account, head over to WHMCS, and sign up.</p>
<p>I would post a download link here, but you need to be a member in order to access it.</p>
<p>Once you&#8217;ve downloaded WHMCS, you&#8217;ll be left with a zip file. When you extract the zip file, you should see x3 things; the EULA, the README, and a directory called whmcs.</p>
<p>Open the whmcs directory, and using your favorite SFTP/FTP client, upload the contents into your whmcshome directory.</p>
<h2>4. Set up WHMCS File and Folder Permissions</h2>
<p>Make sure you navigate into your whmcshome directory. The next few commands will contain relative paths.</p>
<pre class="code" tabindex="0"><code>cd /var/www/virtual/yourdomain.com/public_html/whmcshome</code></pre>
<p>Then, let&#8217;s rename the configuration file and set temporary permissions so that the WHMCS installer can write to it:</p>
<pre class="code" tabindex="0"><code>mv configuration.php.new configuration.php
chmod 777 configuration.php</code></pre>
<p>Next, let&#8217;s make sure the permissions for some directories are set correctly:</p>
<pre class="code" tabindex="0"><code>chmod 777 templates_c/
chmod 777 downloads/
chmod 777 attachments/</code></pre>
<h2>5. Run the WHMCS Installer</h2>
<p>Now that you&#8217;ve uploaded the WHMCS files and set the correct file and directory permissions, you can direct your web browser to the installer URL. Should be something like: http://yourdomain.com/whmcshome/install/install.php</p>
<p>Step 1.  Agree to the WHMCS EULA (if you want)</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-whmcs-install-step1.png" alt="" width="1240" height="831" loading="lazy" decoding="async"></p>
<p>Step 2.  Make sure you see the green box letting you know your system passes the requirements check</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-whmcs-install-step2.png" alt="" width="1225" height="781" loading="lazy" decoding="async"></p>
<p>Step 3.  Enter MySQL information from Section 1. Leave the host and port settings alone, default should be fine.</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-whmcs-install-step3.png" alt="" width="1239" height="794" loading="lazy" decoding="async"></p>
<p>Step 4.  Enter the settings you want for your admin area</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-whmcs-install-step4.png" alt="" width="1251" height="780" loading="lazy" decoding="async"></p>
<p>Step 5.  Success!</p>
<p><img src="https://www.zerostopbits.com/assets/img/posts/2015-10-whmcs-install-step5.png" alt="" width="1241" height="998" loading="lazy" decoding="async"></p>
<h2>6. Secure WHMCS Installation</h2>
<p>Now that we&#8217;ve successfully installed WHMCS, we need to secure it. The success page from Step 5 tells you the basics on how to do this. I&#8217;ll be writing a more in-depth article on how to do this, but for now, here is the link on How to Further Secure WHMCS.</p>
<p>Nice work! You&#8217;ve installed WHMCS and are on your way to web hosting happiness!</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Create a VirtualHost in Apache 2.2 on CentOS 6.7</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-create-a-virtualhost-in-apache-2-2-on-centos-6-7/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-create-a-virtualhost-in-apache-2-2-on-centos-6-7/</guid>
      <pubDate>Thu, 24 Sep 2015 21:39:12 +0000</pubDate>
      <category>Tutorials</category>
      <description>In this article, I’ll be showing you how to create a VirtualHost container for your domain on Apache 2.2 running on CentOS 6.7. This article assumes you have already installed Apache 2.2. If you haven’t, you can following my guide on How to Install Apache, MySQL, and PHP on CentOS 6.7. That should get you…</description>
      <content:encoded><![CDATA[<p>In this article, I&#8217;ll be showing you how to create a VirtualHost container for your domain on Apache 2.2 running on CentOS 6.7. This article assumes you have already installed Apache 2.2. If you haven&#8217;t, you can following my guide on <a href="https://www.zerostopbits.com/musings-and-tutorials/how-to-install-apache-mysql-and-php-on-centos-6-7/">How to Install Apache, MySQL, and PHP on CentOS 6.7</a>. That should get you up to speed!</p>
<h2>1. Confirm Apache 2.2 is correctly installed and running</h2>
<p>Type in the following command to verify your Apache version:</p>
<pre class="code" tabindex="0"><code>httpd -v</code></pre>
<p>Output should look like:</p>
<pre class="code" tabindex="0"><code>Server version: Apache/2.2.15 (Unix)
Server built: Aug 24 2015 17:52:49</code></pre>
<p>Now let&#8217;s confirm Apache is running:</p>
<pre class="code" tabindex="0"><code>service httpd status</code></pre>
<p>Output should look like:</p>
<pre class="code" tabindex="0"><code>httpd (pid 26102) is running...</code></pre>
<p>Perfect!</p>
<h2>2. Configure VirtualHost container</h2>
<p>Apache stores the configuration files not directly related to the core in &#8220;/etc/httpd/conf.d&#8221;. Any time you create a VirtualHost, you&#8217;ll want to make sure you put it in this directory. It&#8217;s not a requirement, but it keeps your system looking nice and tidy.</p>
<p>First, we need to configure the httpd.conf file for VirtualHost&#8217;s.</p>
<pre class="code" tabindex="0"><code>nano /etc/httpd/conf/httpd.conf</code></pre>
<p>Scroll to the bottom of the configuration file (press and hold CTRL-V) and add the following line:</p>
<pre class="code" tabindex="0"><code>NameVirtualHost *:80</code></pre>
<p>Now type CTRL-O to save, and CTRL-X to exit</p>
<p>Next, let&#8217;s create the actual VirtualHost file</p>
<pre class="code" tabindex="0"><code>nano /etc/httpd/conf.d/yourdomain.com.conf</code></pre>
<p>You&#8217;re now going to have to copy/paste the following into that file. <strong class="hl-warn">(NOTE: MAKE SURE YOU CHANGE YOURDOMAIN.COM TO YOUR ACTUAL DOMAIN!!)</strong></p>
<pre class="code" tabindex="0"><code>&lt;VirtualHost *:80&gt;
ServerAdmin webmaster@yourdomain.com
DocumentRoot /var/www/virtual/yourdomain.com/public_html
ServerName www.yourdomain.com
ServerAlias yourdomain.com
ErrorLog /var/www/virtual/yourdomain.com/logs/error_log
CustomLog /var/www/virtual/yourdomain.com/logs/access_log combined

&lt;Directory &quot;/var/www/virtual/yourdomain.com&quot;&gt;
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
&lt;/Directory&gt;

&lt;/VirtualHost&gt;</code></pre>
<p>Type CTRL-O to save, and CTRL-X to close the file.</p>
<p><strong class="hl-warn">At this point, I need to re-iterate that this guide is based on the assumption you followed my previous guide. If you simply copy/paste everything, you probably won&#8217;t have a working web server.</strong></p>
<p>Create the DocumentRoot and Log Directory we specified in the VirtualHost configuration file:</p>
<pre class="code" tabindex="0"><code>mkdir -p /var/www/virtual/yourdomain.com/public_html
mkdir -p /var/www/virtual/yourdomain.com/logs
chown -R apache:apache /var/www/virtual/
chmod -R 755 /var/www/virtual/</code></pre>
<h2>3. Test VirtualHost and confirm everything is working</h2>
<p>Now, let&#8217;s test out your VirtualHost, and make sure everything is working correctly.</p>
<p>Move into your VirtualHost&#8217;s DocumentRoot. This is where you&#8217;ll store all of your web content:</p>
<pre class="code" tabindex="0"><code>cd /var/www/virtual/yourdomain.com/public_html</code></pre>
<p>Create an index file so we can test functionality:</p>
<pre class="code" tabindex="0"><code>nano index.html</code></pre>
<p>Copy and paste the following into the file:</p>
<pre class="code" tabindex="0"><code>&lt;h3&gt;Hello World!&lt;/h3&gt;</code></pre>
<p>Type CTRL-O to save, and CTRL-X to close the file.</p>
<p>Now restart Apache:</p>
<pre class="code" tabindex="0"><code>service httpd restart</code></pre>
<p>Should produce the following output:</p>
<pre class="code" tabindex="0"><code>Stopping httpd: &#x5B; OK ]
Starting httpd: &#x5B; OK ]</code></pre>
<p>If you&#8217;ve already updated DNS at your registrar and pointed yourdomain.com to your server&#8217;s IP address, you should now be able to open up a browser, and type in the URL yourdomain.com. It should load up the &#8220;Hello World!&#8221; index file that we created.</p>
<p>If you haven&#8217;t updated DNS yet, but want to check if everything is working, we can do the following:</p>
<p>http://your-server-ip</p>
<p>That about wrap this tutorial up! Thanks for reading, hopefully this helps you get Apache 2.2 and VirtualHosts up and running.</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Upgrade MySQL 5.1 to MySQL 5.5 on CentOS 6.7</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-upgrade-mysql-5-1-to-mysql-5-5-on-centos-6-7/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-upgrade-mysql-5-1-to-mysql-5-5-on-centos-6-7/</guid>
      <pubDate>Thu, 24 Sep 2015 20:22:48 +0000</pubDate>
      <category>Tutorials</category>
      <description>Today you’re going to learn how to upgrade MySQL 5.1 to MySQL 5.5 on CentOS 6.7. This article assumes that you are running the CentOS BASE version of MySQL 5.1. We are ALSO assuming that you are not running this on a live, production environment. If you do plan on running this on a live…</description>
      <content:encoded><![CDATA[<p>Today you&#8217;re going to learn how to upgrade MySQL 5.1 to MySQL 5.5 on CentOS 6.7. This article assumes that you are running the CentOS BASE version of MySQL 5.1. We are ALSO assuming that you are not running this on a live, production environment.</p>
<p><strong class="hl-warn">If you do plan on running this on a live server, please make sure to backup your databases beforehand. You will also need to run the <em><strong>mysql_upgrade</strong></em> command after the upgrade from 5.1 to 5.5, to make sure all databases and tables are compatible.</strong></p>
<h2>1. Confirm your version of MySQL is CentOS 6.7 default</h2>
<p>Type in the following to confirm that you have CentOS 6.7 default of MySQL 5.1 installed:</p>
<pre class="code" tabindex="0"><code>rpm -qa | grep mysql</code></pre>
<p>Output should look similar to the following:</p>
<pre class="code" tabindex="0"><code>mysql-server-5.1.73-5.el6_6.x86_64
mysql-libs-5.1.73-5.el6_6.x86_64
mysql-5.1.73-5.el6_6.x86_64</code></pre>
<p>Everything looks good, moving on!</p>
<h2>2. Install and activate the REMI and EPEL RPM Repositories</h2>
<p>If you have not done so already, install and activate the REMI and EPEL repositories;</p>
<pre class="code" tabindex="0"><code>rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm</code></pre>
<p>Now to enable the REMI repository globally:</p>
<pre class="code" tabindex="0"><code>nano /etc/yum.repos.d/remi.repo</code></pre>
<p>Under the section that looks like [remi] make the following changes:</p>
<pre class="code" tabindex="0"><code>&#x5B;remi]
name=Remi's RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi</code></pre>
<p>Type CTRL-O to save, and CTRL-X to exit</p>
<h2>3. Update MySQL from 5.1 to 5.5</h2>
<p>Simply type in the following:</p>
<pre class="code" tabindex="0"><code>yum -y update mysql*</code></pre>
<p>Once that&#8217;s done, we can verify:</p>
<pre class="code" tabindex="0"><code>rpm -qa | grep mysql</code></pre>
<p>And we should see something similar to the below:</p>
<pre class="code" tabindex="0"><code>mysql-5.5.45-1.el6.remi.x86_64
compat-mysql51-5.1.54-1.el6.remi.x86_64
mysql-libs-5.5.45-1.el6.remi.x86_64
mysql-server-5.5.45-1.el6.remi.x86_64</code></pre>
<p>Now we need to make sure MySQL is working correctly.</p>
<p>If you&#8217;ve set a root password already, type the following;</p>
<pre class="code" tabindex="0"><code>mysql -u root -p</code></pre>
<p>If you have not yet set a root password, you can simply type;</p>
<pre class="code" tabindex="0"><code>mysql</code></pre>
<p>You should see something similar to the following</p>
<pre class="code" tabindex="0"><code>Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.45 MySQL Community Server (GPL) by Remi</code></pre>
<p>There you go! That was easy right?</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Upgrade PHP 5.3 to PHP 5.4 on CentOS 6.7</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-upgrade-php-5-3-to-php-5-4-on-centos-6-7/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-upgrade-php-5-3-to-php-5-4-on-centos-6-7/</guid>
      <pubDate>Wed, 23 Sep 2015 21:35:06 +0000</pubDate>
      <category>Tutorials</category>
      <description>I’m going to show you how to upgrade PHP 5.3 to PHP 5.4 on CentOS 6.7. This article is assuming that you are running the CentOS 6.7 default version of PHP 5.3. 1. Confirm your version of PHP is the CentOS 6.7 default Type in the following: rpm -qa | grep php Should output similar…</description>
      <content:encoded><![CDATA[<p>I&#8217;m going to show you how to upgrade PHP 5.3 to PHP 5.4 on CentOS 6.7. <em>This article is assuming that you are running the CentOS 6.7 default version of PHP 5.3.</em></p>
<h2>1. Confirm your version of PHP is the CentOS 6.7 default</h2>
<p>Type in the following:</p>
<pre class="code" tabindex="0"><code>rpm -qa | grep php</code></pre>
<p>Should output similar to the following:</p>
<pre class="code" tabindex="0"><code>php-cli-5.3.3-46.el6_6.x86_64
php-common-5.3.3-46.el6_6.x86_64
php-5.3.3-46.el6_6.x86_64</code></pre>
<p>Great, let&#8217;s move on.</p>
<h2>2. Install and activate the REMI and EPEL RPM Repositories</h2>
<p>Type in the following to download and install the required files:</p>
<pre class="code" tabindex="0"><code>rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm</code></pre>
<p>Now to enable the REMI repository globally:</p>
<pre class="code" tabindex="0"><code>nano /etc/yum.repos.d/remi.repo</code></pre>
<p>Under the section that looks like [remi] make the following changes:</p>
<pre class="code" tabindex="0"><code>&#x5B;remi]
name=Remi's RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi</code></pre>
<p>Press CTRL-O to save, and CTRL-X to exit, and we can continue.</p>
<h2>3. Update PHP from 5.3 to 5.4</h2>
<p>Easy as pie, simply type in the following:</p>
<pre class="code" tabindex="0"><code>yum -y update php*</code></pre>
<p>Once that&#8217;s done, we can verify:</p>
<pre class="code" tabindex="0"><code>rpm -qa | grep php</code></pre>
<p>And we should see something similar to the below:</p>
<pre class="code" tabindex="0"><code>php-common-5.4.45-1.el6.remi.x86_64
php-5.4.45-1.el6.remi.x86_64
php-cli-5.4.45-1.el6.remi.x86_64</code></pre>
<p>Make sure PHP is working correctly:</p>
<pre class="code" tabindex="0"><code>php -v</code></pre>
<p>You should see something similar to the following:</p>
<pre class="code" tabindex="0"><code>PHP 5.4.45 (cli) (built: Sep 2 2015 18:54:00) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies</code></pre>
<p>And that&#8217;s all she wrote!</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Flush the DNS Cache on OSX/Mac</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-flush-the-dns-cache-on-osx-mac/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-flush-the-dns-cache-on-osx-mac/</guid>
      <pubDate>Wed, 23 Sep 2015 20:33:45 +0000</pubDate>
      <category>Tutorials</category>
      <description>Sometimes, you need to flush the DNS cache on OSX/Mac. This can be for any number of reasons, but usually, this is done when you have either updated DNS settings at your domain registrar or when you have updated a page on your website and need to see the updated version in your web browser. Thankfully,…</description>
      <content:encoded><![CDATA[<p>Sometimes, you need to flush the DNS cache on OSX/Mac. This can be for any number of reasons, but usually, this is done when you have either updated DNS settings at your domain registrar or when you have updated a page on your website and need to see the updated version in your web browser.</p>
<p>Thankfully, OSX/Mac makes it easy to flush your DNS cache with a few simple commands.</p>
<h2>1. Flush DNS Cache on OSX/Mac</h2>
<p>First thing&#8217;s first, you need to open up a Terminal window. You can do this a couple of ways.</p>
<p>The long way:</p>
<p><em><strong>Applications &gt; Utilities &gt; Terminal</strong></em></p>
<p>Or by using the shortcut shortcut:</p>
<p><em><strong>Command + Space &gt; type in &#8220;terminal&#8221;</strong></em> (without the quotes)</p>
<h3>OS X Yosemite</h3>
<p>Type in the following to reset the DNS cache in OS X Yosemite v10.10.4:</p>
<pre class="code" tabindex="0"><code>sudo killall -HUP mDNSResponder</code></pre>
<p>Type in the following to reset the DNS cache in OS X Yosemite v10.10 through v10.10.3:</p>
<pre class="code" tabindex="0"><code>sudo discoveryutil mdnsflushcache</code></pre>
<h3>OS X Mavericks 10.9, Mountain Lion 10.8, and Lion 10.7</h3>
<p>Type in the following to reset the DNS cache:</p>
<pre class="code" tabindex="0"><code>sudo killall -HUP mDNSResponder</code></pre>
<h3>Mac OS X Snow Leopard v10.6</h3>
<p>Type in the following to reset the DNS cache:</p>
<pre class="code" tabindex="0"><code>sudo dscacheutil -flushcache</code></pre>
<p>I hope this helps if you&#8217;re having trouble figuring out the different variations of how to flush the DNS cache on OSX/Mac.</p>
<p>We also have an article on <a href="https://www.zerostopbits.com/musings-and-tutorials/how-to-flush-the-dns-cache-on-windows/">How to Flush the DNS Cache on Windows</a> for anyone who&#8217;s interesed.</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Install Apache, MySQL, and PHP on CentOS 6.7</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-install-apache-mysql-and-php-on-centos-6-7/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-install-apache-mysql-and-php-on-centos-6-7/</guid>
      <pubDate>Fri, 18 Sep 2015 23:23:38 +0000</pubDate>
      <category>Tutorials</category>
      <description>Installing Apache, MySQL, and PHP on CentOS 6.7 couldn’t be easier. Today, we’re going to show you just how quickly you can prepare your server for an unlimited number of uses. Keep in mind, this article is written with the assumption that you are running a freshly installed vps server, or dedicated server running CentOS…</description>
      <content:encoded><![CDATA[<p>Installing Apache, MySQL, and PHP on CentOS 6.7 couldn&#8217;t be easier. Today, we&#8217;re going to show you just how quickly you can prepare your server for an unlimited number of uses.</p>
<p>Keep in mind, this article is written with the assumption that you are running a freshly installed vps server, or dedicated server running CentOS 6.7.</p>
<h2>1. Update and configure the system, and disable SELinux</h2>
<p>While not strictly necessary, the first thing we always do when deploying a vps server or dedicated server is update the system. This process will download the latest kernel, any software updates that might be pending, as well as the nano editor, which makes life much easier when editing configuration files.</p>
<pre class="code" tabindex="0"><code>yum -y upgrade &amp;&amp; yum -y install nano</code></pre>
<p>Once that process has completed, lets go ahead and disable SELinux</p>
<pre class="code" tabindex="0"><code>nano /etc/sysconfig/selinux</code></pre>
<p>Once you’re in the editor, find the following line:</p>
<pre class="code" tabindex="0"><code>SELINUX=enabled</code></pre>
<p>And change it to:</p>
<pre class="code" tabindex="0"><code>SELINUX=disabled</code></pre>
<p>We also want to make sure your server has nameservers correctly configured. If running a VPS server, this is usually done already.</p>
<pre class="code" tabindex="0"><code>nano /etc/resolv.conf</code></pre>
<p>If the above command returns an empty file, or a file with no nameserver entries in it, simply add the following to add Google’s Open DNS Resolver’s to your server:</p>
<pre class="code" tabindex="0"><code>nameserver 8.8.8.8
nameserver 8.8.4.4</code></pre>
<p>Now reboot your server;</p>
<pre class="code" tabindex="0"><code>shutdown -r now</code></pre>
<p>and let&#8217;s move on to the next steps!</p>
<h2>2. Install Apache, MySQL, PHP, and some additional packages</h2>
<p>Now that your system is up-to-date, we can begin to install the basic components of your web server.</p>
<pre class="code" tabindex="0"><code>yum -y install httpd mysql mysql-server php wget ntp</code></pre>
<p>This command will install the following packages on your system:</p>
<p>httpd-2.2<br>
php-5.3<br>
mysql-5.1<br>
ntp-4.2<br>
wget-1.12</p>
<p>While these packages are not the latest available, they should suffice for most applications you intend on running. However, if you need the latest and greatest, stay tuned for our articles on how to upgrade apache 2.2 to 2.4, <a href="https://www.zerostopbits.com/musings-and-tutorials/how-to-upgrade-php-5-3-to-php-5-4-on-centos-6-7/">how to upgrade php 5.3 to 5.4</a>, and <a href="https://www.zerostopbits.com/musings-and-tutorials/how-to-upgrade-mysql-5-1-to-mysql-5-5-on-centos-6-7/">how to upgrade mysql 5.1 to 5.5</a>.</p>
<p>We installed the ntp package to make sure your server is keeping time properly. To configure this package, it&#8217;s as easy as doing the following:</p>
<pre class="code" tabindex="0"><code>chkconfig ntpd on
ntpdate pool.ntp.org
service ntpd start</code></pre>
<h2>3. Configure Apache, MySQL, and PHP</h2>
<p>Great, you&#8217;ve got the basic packages installed and ready to go, whats next?</p>
<p>Let&#8217;s configure Apache to prepare it for some VirtualHost&#8217;s, so you can start adding your websites and domains to your server!</p>
<pre class="code" tabindex="0"><code>mkdir -p /var/www/virtual/
chown -R apache:apache /var/www/virtual/
chmod -R 755 /var/www/virtual/</code></pre>
<p>That created the directory where your websites data will live. To further configure the VirtualHost, you can follow my guide on <a href="https://www.zerostopbits.com/musings-and-tutorials/how-to-create-a-virtualhost-in-apache-2-2-on-centos-6-7/">how to create a virtualhost in apache</a>.</p>
<p>Now, we&#8217;re going to configure some basic Apache settings.</p>
<pre class="code" tabindex="0"><code>nano /etc/httpd/conf/httpd.conf</code></pre>
<p>Find the following lines, and change them as noted below. You can use CTRL-W to search through the configuration file:</p>
<pre class="code" tabindex="0"><code>ServerName serverhostname.yourdomain.com:80 (enter your server hostname here)

DirectoryIndex index.html index.html.var index.php

ServerSignature Off

ServerTokens Prod</code></pre>
<p>Save the configuration file using CTRL-O, and close the file with CTRL-X</p>
<p>Enter the following commands to start Apache, and make sure it starts on boot.</p>
<pre class="code" tabindex="0"><code>chkconfig httpd on
service httpd start</code></pre>
<p>Chances are, you&#8217;re also going to need to open up port 80 on the iptables firewall. To do that, we need to do the following:</p>
<pre class="code" tabindex="0"><code>nano /etc/sysconfig/iptables</code></pre>
<p>Find the following line:</p>
<pre class="code" tabindex="0"><code>-A INPUT -i lo -j ACCEPT</code></pre>
<p>And add the below line immediately underneath:</p>
<pre class="code" tabindex="0"><code>-A INPUT -m tcp -p tcp --dport 80 -j ACCEPT</code></pre>
<p>Hit CTRL-O to save, and CTRL-X to close the configuration file.</p>
<p>Now restart iptables for the changes to take effect:</p>
<pre class="code" tabindex="0"><code>service iptables restart</code></pre>
<p>Now let&#8217;s configure MySQL for a basic environment. First, we need to &#8220;secure&#8221; the installation, thankfully, MySQL comes packaged with a script that automates most of this p<br>
rocess:</p>
<pre class="code" tabindex="0"><code>chkconfig mysqld on
service mysqld start</code></pre>
<p>Now that MySQL has started, run the following script:</p>
<pre class="code" tabindex="0"><code>mysql_secure_installation</code></pre>
<p>You want to make sure you set a root password, remove anonymous user, disallow root login remotely, and remove the test database. The output should look similar to below:</p>
<pre class="code" tabindex="0"><code>&#x5B;root@vps ~]# mysql_secure_installation

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Set root password? &#x5B;Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
... Success!

Remove anonymous users? &#x5B;Y/n] y
... Success!

Disallow root login remotely? &#x5B;Y/n] y
... Success!

Remove test database and access to it? &#x5B;Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reload privilege tables now? &#x5B;Y/n] y
... Success!</code></pre>
<p>We could further tune and tweak MySQL at this point, but that is beyond the scope of this article.</p>
<p>Likewise, PHP and Apache can and should be further tuned depending on your application, but at this point, you should have a working webserver! You can test this by visiting http://your-ip-address</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to Install cPanel on a VPS or Dedicated Server</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/how-to-install-cpanel-on-a-vps-or-dedicated-server/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/how-to-install-cpanel-on-a-vps-or-dedicated-server/</guid>
      <pubDate>Fri, 18 Sep 2015 05:39:53 +0000</pubDate>
      <category>Tutorials</category>
      <description>So you’ve got your vps hosting plan or your dedicated server online and operational. Congratulations! Now you get to dive into the fun stuff, so without further ado, let’s get started! No clue what this article is about? Check out our post on 7 Easy Steps to Starting Your Own Web Hosting Company and catch…</description>
      <content:encoded><![CDATA[<p>So you&#8217;ve got your vps hosting plan or your dedicated server online and operational. Congratulations! Now you get to dive into the fun stuff, so without further ado, let&#8217;s get started!</p>
<p>No clue what this article is about? Check out our post on <a href="https://www.zerostopbits.com/musings-and-tutorials/7-easy-steps-to-starting-your-own-web-hosting-companybusiness/">7 Easy Steps to Starting Your Own Web Hosting Company</a> and catch up!</p>
<h2>1. Log in to server using SSH and prepare for install</h2>
<p>I highly recommend that anyone getting into running their own hosting panel learn the basics of systems administration and server management. One of the most basic and commonly used commands is SSH. SSH stands for Secure Shell, and it&#8217;s the defacto way of connecting to almost every server on the planet (except you Windows&#8230;)</p>
<pre class="code" tabindex="0"><code>alpha:~ admin$ ssh root@104.250.134.11
root@104.250.134.11's password: 
&#x5B;root@testing ~]#</code></pre>
<p>What you see above, is me passing the username (root) @ the IP of your vps server (104.250.134.11). Type in or copy and paste your password, and you&#8217;re in!</p>
<p>Now, we need to set some things up so the cPanel/WHM install runs smoothly. Type the following command in:</p>
<pre class="code" tabindex="0"><code>yum -y install nano &amp;&amp;&amp;nbsp;yum -y upgrade</code></pre>
<p>What that command did is allows us to install an easy to use text editor, so you can continue with the next step in a much simpler fashion. Also, we just upgraded the kernel and all software packages that needed updating. Kernel updates usually require a reboot, but we&#8217;ll get to that in a moment.</p>
<p>Now, we need to type in the following command, to disable SELinux:</p>
<pre class="code" tabindex="0"><code>nano /etc/sysconfig/selinux</code></pre>
<p>Once you&#8217;re in the editor, find the following line:</p>
<pre class="code" tabindex="0"><code>SELINUX=enabled</code></pre>
<p>And change it to:</p>
<pre class="code" tabindex="0"><code>SELINUX=disabled</code></pre>
<p>Double check that you have nameserver entries installed on your server. Usually, if you are running a vps, the provisioning process includes these entries. Dedicated servers might require you to add them, in the following way:</p>
<pre class="code" tabindex="0"><code>nano /etc/resolv.conf</code></pre>
<p>If the above command returns an empty file, or a file with no nameserver entries in it, simply add the following to add Google&#8217;s Open DNS Resolver&#8217;s to your server:</p>
<pre class="code" tabindex="0"><code>nameserver 8.8.8.8
nameserver 8.8.4.4</code></pre>
<p>At this point, reboot your server</p>
<pre class="code" tabindex="0"><code>shutdown -r now</code></pre>
<p>You should now be ready to move on to the next step, installing cPanel.</p>
<h2>2. Download and run cPanel install script</h2>
<p>cPanel/WHM recommends a MINIMUM of 2GB RAM, and 40GB of disk space for installation. Our <a href="https://www.zerostopbits.com/vps-hosting/">Business VPS plan</a> is the bare minimum required for this, so that&#8217;s what we&#8217;re running this demo on.</p>
<p>Once you&#8217;ve completed Step #1, type in the following command, and get the installing going. Be aware that this installation can take a while, there is a lot of stuff being installed and configured.</p>
<pre class="code" tabindex="0"><code>cd /home &amp;&amp; curl -o latest -L https://securedownloads.cpanel.net/latest &amp;&amp; sh latest</code></pre>
<p>You should at this point see something very similar to the following:</p>
<pre class="code" tabindex="0"><code>&#x5B;root@testing ~]# cd /home &amp;&amp; curl -o latest -L https://securedownloads.cpanel.net/latest &amp;&amp; sh latest
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 24891 100 24891 0 0 42811 0 --:--:-- --:--:-- --:--:-- 231k
Verifying archive integrity... All good.
Uncompressing Cpanel &amp; WHM Installer.....
____ _
___| _ \ __ _ _ __ ___| |
/ __| |_) / _` | '_ \ / _ \ |
| (__| __/ (_| | | | | __/ |
\___|_| \__,_|_| |_|\___|_|

Installer Version v00047 r27be79bb1d9572b5d8ca3e80b7067f031299df36</code></pre>
<p>Go stretch your legs, drink some coffee (or beer), and give this anywhere from 20 minutes to 1 hour to run it&#8217;s course.</p>
<p>Once the installation has completed you&#8217;ll be greeted with a screen that appears similar to the following:</p>
<pre class="code" tabindex="0"><code>2015-09-17 20:43:48 196 ( INFO): cPanel install finished in 42 minutes and 55 seconds!
2015-09-17 20:43:48 738 ( INFO): Congratulations! Your installation of cPanel &amp; WHM 11.50 is now complete. The next step is to configure your server. 
2015-09-17 20:43:48 738 ( INFO): 
2015-09-17 20:43:48 738 ( INFO): Before you configure your server, ensure that your firewall allows access on port 2087.
2015-09-17 20:43:48 738 ( INFO): On RHEL, CentOS, and CloudLinux systems, execute /scripts/configure_firewall_for_cpanel to accomplish this.
2015-09-17 20:43:48 738 ( INFO): 
2015-09-17 20:43:48 738 ( INFO): After ensuring that your firewall allows access on port 2087, you can configure your server.
2015-09-17 20:43:48 738 ( INFO): 
2015-09-17 20:43:48 738 ( INFO): 1. Open your preferred browser
2015-09-17 20:43:48 738 ( INFO): 
2015-09-17 20:43:48 738 ( INFO): 2. Type https://104.250.134.11:2087 in the address bar
2015-09-17 20:43:48 738 ( INFO): 
2015-09-17 20:43:48 738 ( INFO): 3. Enter the word root in the Username text box
2015-09-17 20:43:48 738 ( INFO): 
2015-09-17 20:43:48 738 ( INFO): 4. Enter your root password in the Password text box
2015-09-17 20:43:48 738 ( INFO): 
2015-09-17 20:43:48 738 ( INFO): 5. Click the Login button
2015-09-17 20:43:48 738 ( INFO): 
2015-09-17 20:43:48 738 ( INFO): Visit http://go.cpanel.net/whminit for more information about first-time configuration of your server.
2015-09-17 20:43:48 738 ( INFO): 
2015-09-17 20:43:48 738 ( INFO): Visit http://support.cpanel.net or http://go.cpanel.net/whmfaq for additional support
2015-09-17 20:43:48 738 ( INF
O): 
2015-09-17 20:43:48 738 ( INFO): Thank you for installing cPanel &amp; WHM 11.50!</code></pre>
<p>42 minutes huh? Not bad! 😉</p>
<h2>3. You&#8217;re done installing cPanel!</h2>
<p>Congratulations, that wasn&#8217;t so hard right? It definitely gets easier the more you do it, and some companies even have this process automated. Since you&#8217;re not those guys, hopefully this post will give you a hand if you need it.</p>
<p>You could technically start using cPanel immediately after installation, but that&#8217;s not such a good idea. There are plenty of settings you should adjust before putting clients on the server, and there are a few plugins that really help tighten down the security.</p>
<p>Stay tuned for the next article on How to Configure cPanel</p>
]]></content:encoded>
    </item>
    <item>
      <title>7 Easy Steps to Starting Your Own Web Hosting Company/Business</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/7-easy-steps-to-starting-your-own-web-hosting-companybusiness/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/7-easy-steps-to-starting-your-own-web-hosting-companybusiness/</guid>
      <pubDate>Thu, 17 Sep 2015 23:21:37 +0000</pubDate>
      <category>Tutorials</category>
      <description>In my opinion, one of the hardest things to do in life is starting your own business, especially starting your own web hosting company. Don’t misunderstand me, starting and running the business is definitely not easy, but that’s the easiest part of it all. The truly hard part is on a personal level. Deciding to…</description>
      <content:encoded><![CDATA[<p>In my opinion, one of the hardest things to do in life is starting your own business, especially starting your own web hosting company. Don’t misunderstand me, starting and running the business is definitely not easy, but that’s the easiest part of it all. The truly hard part is on a personal level. Deciding to take the risk, and just diving head-first into an industry you may or may not understand.</p>
<p>Well folks, I’m here to give you a few simple tips that hopefully demystify the process of starting your own web hosting company!</p>
<p class="indent-1"><strong>1. Decide on a Company and Domain Name:</strong></p>
<p class="indent-2">First things first, you need a name, and this can be anything really. For example, my company name is ZeroStopBits. What does that even mean? Why are there zero stop bits? I want more stop bits! I want ALL the stop bits! I came up with the name while tinkering with my Cisco 6509 Layer 3 switch.</p>
<p class="indent-2">I was punching in the COM port on my putty session when I was presented with the option to enter the amount of “stop bits” on the line. Think of a stop bit as a way for the communicating machines to know when a transmission has ended, and to continue to the next transmission. So I thought, “Hey.. if I call my company ZeroStopBits… then it’s like I’m saying we never stop transmitting!”</p>
<p class="indent-2">Having said all of that, the vast majority of hosting company’s like to have to word “host” somewhere in their company name (HostGator, DreamHost, etc..). This has the added benefit of immediately identifying your business type, with the drawback of being really cliche and overused. Other companies, such as mine, like to name themselves after ideas or concepts in the IT industry (Layer3, etc..)</p>
<p class="indent-2">At the end of the day, you need to go with a name that you really like. Things like branding and ease of use go hand in hand with recognition. Once people know who you are, it won’t matter what your company is named. You could call it hahawhatthelol.com and people would know what you’re about!</p>
<p class="indent-2">Make sure to first check if the name is available in your state! (California: kepler.sos.ca.gov)</p>
<p><strong>2. Open up a DBA or Corporation</strong> </p>
<p class="indent-2">Now that the boring creative stuff is out of the way, you can jump into the fun world of corporate structure!</p>
<p class="indent-2">Once you’ve picked a name and snatched up that domain, you need to register your business with the State and Federal government. Being that my company was registered out of California, I’ll only be able to provide examples regarding my State’s process, but most states have similar if not easier method.</p>
<p class="indent-2">First decide on wether you want a DBA (Doing Business As – Fictitious Name) or a Corporation (S Corp, C Corp, LLC). I won’t go deep into the details, as that is a whole additional blog post. Personally, I filed my business as an LLC with the State of California, then elected for S Corporation status with the Federal government (IRS… grrr). My thought process here was that I can have the flexibility in corporate structure that an LLC provides, along with the benefits of limited liability, as well as the benefits of filing taxes as an S Corporation. California LLC forms can be found at the <a href="http://www.sos.ca.gov">California Secretary of State Website</a> and you can information on filing a DBA in Los Angeles at the <a href="https://www.lavote.net">Los Angeles County Clerk’s Website</a></p>
<p><strong>3. Get a bank account</strong></p>
<p class="indent-2">This step is literally the easiest of the lot. Banks want your money (duh), so they make it insanely simple to open an account. Once you have your DBA or LLC forms stamped, and your business is official in the eyes of the State, you can simply walk in to the bank of your choosing, hand over the relevant corporate documents, and you’ll be out of there in 30 minutes. Make sure you bring 2-3 forms of ID, these guys are real sticklers on that.</p>
<p><strong>4. Decide on business type and model</strong></p>
<p class="indent-2">Here we go… the good stuff. Your bread and butter, your night and day, your sun and moon, your… well, you get the idea.</p>
<p class="indent-2">There are many many MANY different types of business models you can apply. There is no right or wrong one, and whatever you choose is probably going to equal the same amount of work. Having said that, here are a few of these models with a brief explanation as to what they are and how they work:</p>
<p class="indent-3"><strong>ISP</strong> – These guys run the datacenters and/or networks your servers will be using. An ISP can be either a Tier 1, Tier 2, or Tier 3. They can either “peer” with each other, which means freely pass traffic bi-directionally, or they can purchase bandwidth.</p>
<p class="indent-4">Tier 1 – Almost always pure transit. Companies that operate on this level are Level3, Cogent, Zayo, GTT, Telia, etc. These guys don’t deal with hosting, they just move traffic back and forth.</p>
<p class="indent-4">Tier 2 – These guys usually peer with other Tier 1’s and Tier 2’s, but they also buy traffic from other ISP’s. Some companies on this list include PCCW, FiberRing, and Internap. Most of these companies STILL don’t deal with hosting, they’re just not big enough to be considered a Tier 1.</p>
<p class="indent-4">Tier 3 – Here we go, these are the big players in the hosting world today. Most of their bandwidth is purchased from Tier 1 and Tier 2 ISP’s, but their networks are massive in size. These are companies like Google, Rackspace, Amazon, GoDaddy, HostGator, etc..</p>
<p class="indent-4">Becoming an ISP is not a realistic goal for self-starters and those trying to break into the industry. This requires massive amounts of time, effort, and most importantly, money.</p>
<p class="indent-3"><strong>Hosting Provider</strong> – These are companies that provide the simpler types of services such as; managed web hosting, vps hosting, server management, hosted spam-free email, managed it solutions, etc.</p>
<p class="indent-4">A hosting provider usually diversifies their offerings as much as possible. You can see this model at work by looking at companies like GoDaddy, HostGator, BlueHost, DreamHost, etc… They offer all kinds of services, in an attempt to capture the greatest amount of market-share possible. This is what we do at ZeroStopBits. Maybe a customer comes to my site and decides he doesn’t want any <a href="https://www.zerostopbits.com/managed-web-hosting/">managed web hosting</a>, but he DOES want some <a href="https://www.zerostopbits.com/vps-hosting/">VPS hosting</a>! Well, I just might have made a sale because I was able to offer the customer different options.</p>
<p class="indent-4">Becoming a Hosting Provider isn’t all that complicated, it just requires an immense amount of time and the ability to split your focus on many different tasks. You need to make sure every single service you offer is up to snuff, otherwise, you risk upsetting your entire product ecosystem.</p>
<p class="indent-3"><strong>Reseller</strong> – These guys buy a reseller hosting package from a company like ZeroStopBits, relabel it, then sell that same hosting as if it were their own product.</p>
<p class="indent-4">Being a reseller is one of the easiest ways to get into the hosting business. You don’t have to buy servers, or a datacenter, or anything really. All you need is a reseller hosting account, and you can rebrand and sell it as your own product. The hosting company you buy the account from handles any server or network issues, and all you need to do is your own support! Some companies even offer whitelabel tech support services, which means all you literally have to do is make sales, and they take care of the rest for you!</p>
<p class="indent-4">This is a great option if you don’t want to spend more than a few hundred dollars, and get your hosting company off the ground and operational.</p>
<p class="indent-3"><strong>Affiliate</strong> – These guys can make CRAZY money, all while doing virtually nothing.</p>
<p class="indent-4">Almost every hosting provider offers an affiliates program. In a nutshell, they give you a bunch of banners, images, links, etc.. with a specific code tied to your account. You then take those resources, and plaster them on your personal website. Your website can be anything, a food blog, personal blog, news site, whatever you want!</p>
<p class="indent-4">You make money on a commission basis. Meaning, for every sale you generate for the hosting provider, you make $$$$. Generate more sales, make more $$$$. Easy!</p>
<p><strong>5. Get dedicated server, vps hosting plan, or reseller plan</strong></p>
<p class="indent-2">This step really all depends on the choice you make in Step #4, and I’m going to try and break it down the best I can.</p>
<p class="indent-3"><strong>Hosting Provider</strong> – So you want to be a hosting provider? Cool. Prepare for the pain.</p>
<p class="indent-4"><strong>&#8211; You need at the bare minimum 1 server</strong></p>
<p class="indent-4">– You can purchase the server outright, and install it at a colocation facility</p>
<p class="indent-4">– You can lease a Dedicated Server, and the hosting provider you lease from will give you the metaphorical keys</p>
<p class="indent-4">– You can lease x2 VPS servers, and size them appropriately. For example; our Business, Team, and Enterprise <a href="https://www.zerostopbits.com/vps-hosting/">VPS Hosting</a> packages would work perfectly.</p>
<p class="indent-5"><strong>Got the server(s), what’s next?</strong></p>
<p class="indent-5">– My suggestion would be to virtualize that puppy. There are many different options available for this, the common ones being VMWARE ESXi, Citrix XEN, and Proxmox. Proxmox is free, and it’s my platform of choice.</p>
<p class="indent-5">– Install the virtualization software, and make x2 VM’s.</p>
<p class="indent-5">– VM 1 will be your MAIN server. That’s where you’ll keep all of your website data. Create a decently sized VM (2CPU, 4GB RAM, 150GB HDD) to start. This VM will be used to house your management software, and any other software you’ll be using to manage your company.</p>
<p class="indent-5">– VM 2 will be your HOSTING server. This gets the MAX amount of resources available, and here is where you will install your hosting control panel (cPanel/WHM, Directadmin etc..)</p>
<p class="indent-3"><strong>Reseller Hosting</strong> – Pre-packaged and ready to go, all you have to do is configure for your business</p>
<p class="indent-4"><strong>&#8211; Sign Up for a Reseller Hosting plan</strong></p>
<p class="indent-4">– Reseller hosting plans usually come with the management panel and hosting panel pre-installed for you. All you really have to do is configure them to suit your businesses pricing, and configurations.</p>
<p> – You&#8217;re usually given x2 IP&#8217;s for your nameservers, and the ability to rebrand the management and hosting panels with your own company image.</p>
<p> – This is a great option for those who don&#8217;t want to do through the hassle of Step #6 below.</p>
<p><strong>6. Get a management panel, and a hosting control panel</strong></p>
<p class="indent-2">Now you need to decide on what management platform you’re going to use to manage your billing, support, server deployment, affiliate, etc..</p>
<p class="indent-3">There are a few options here, with the three most popular being Blesta, HostBill and WHMCS. Personally, since I already knew how to install and configure WHMCS, I went with that option. However, HostBill and Blesta are also great options. If you’re just getting started, I would recommend using WHMCS, as there is a ton of documentation and community knowledge you can use to help get it going.</p>
<p class="indent-2">Once you get your management platform installed and configured, you can move on to deciding what hosting control panel to use.</p>
<p class="indent-3">The most popular BY FAR are cPanel/WHM, and DirectAdmin. cPanel has been around forever, most customers know how to use it, and their community and paid support is top-notch. DirectAdmin has a bit of a learning curve. You need to be familiar with Linux systems in general to get it going, and it does require some more tweaking than cPanel.</p>
<p class="indent-3">If this is your first rodeo, I’d suggest sticking with the tried and true cPanel/WHM platform. I&#8217;ve written an article on <a href="https://www.zerostopbits.com/musings-and-tutorials/how-to-install-cpanel-on-a-vps-or-dedicated-server/">How to Install cPanel on a VPS or Dedicated Server</a> that you may find useful.</p>
<p><strong>7. advertise, advertise, advertise!</strong></p>
<p class="indent-2">Now this might seem like a duh sort of thing, but you’d be surprised how many people ignore this crucial step. SEO is very important, but good advertising and promotion will generally lead to more sales than SEO on it’s own.</p>
<p class="indent-3">Get your business Facebook, Twitter, and Google Adwords accounts. It takes some fine-tuning to get your audience targeted correctly, but once you’ve got it, you’ve got it. The traffic flow is pretty amazing, and the more targeted your advertisements, the more sales you make!</p>
<p class="indent-3">I also suggest heading over to <a href="https://webhostingtalk.com">WebHostingTalk</a> and signing up over there. They have advertisement forums that generate leads and the community has a ton of resources collected on the web hosting industry.</p>
<p><strong>Summary</strong></p>
<p>You got this far? Nice work.. hopefully you learned something today, and will be taking steps towards launching your own web hosting company. The road is unkind and full of obstacles, but if you make it, there is no greater feeling of elation. I wish you well in your endeavors, and send me a shootout when you’re a billionaire!</p>
<p class="indent-1">Keep your eyes on this blog for more posts on everything related to the web hosting industry, including tips and tricks, tutorials, news, and offers on our managed web hosting, vps hosting, it solutions, and server management offerings!</p>
]]></content:encoded>
    </item>
    <item>
      <title>A Site Redesign… Again</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/a-site-redesign-again/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/a-site-redesign-again/</guid>
      <pubDate>Mon, 31 Aug 2015 00:08:28 +0000</pubDate>
      <category>Musings</category>
      <description>Hey everyone! So the long overdue redesign has finally happened. My fingers are bleeding and my eyes a blur, but I’m happy with the results (never satisfied). I completely changed the look and feel of the homepage, managed web hosting, and server management pages. I think the site has a fresh new look and I’m…</description>
      <content:encoded><![CDATA[<p>Hey everyone!</p>
<p>So the long overdue redesign has finally happened. My fingers are bleeding and my eyes a blur, but I&#8217;m happy with the results (never satisfied). I completely changed the look and feel of the homepage, managed web hosting, and server management pages. I think the site has a fresh new look and I&#8217;m hoping you all agree.</p>
<p>Also, I added a new page under Office &gt; IT Solutions. Basically, I&#8217;ve been going to offices and installing, configuring, and repairing everything from workstations to networks for the past 8 years. I just never had that information made public. So, I&#8217;m happy to say that starting today, the public at large can now see what all I&#8217;ve got to offer.</p>
<p>Maybe in the future I&#8217;ll start writing about how to do all of these changes, in case anyone else wants to do the same for their own websites.</p>
<p>In any case, this is just step ? out of infinity.. I&#8217;ll be posting about new developments as they come.</p>
<p>As always, thanks for reading and stay tuned for the next update!</p>
<p>Thank you.</p>
]]></content:encoded>
    </item>
    <item>
      <title>The Blog has been Launched… Maybe?</title>
      <link>https://www.zerostopbits.com/musings-and-tutorials/the-blog-has-been-launched-maybe/</link>
      <guid isPermaLink="false">https://www.zerostopbits.com/the-blog-has-been-launched-maybe/</guid>
      <pubDate>Wed, 01 Apr 2015 23:23:08 +0000</pubDate>
      <category>Musings</category>
      <description>Hey all, So this post marks the official launch of the ZSB Blog. The plan for the future of said blog is to provide current, relevant information regarding the web hosting industry, and technology in general. Stay posted for more. I’ll hopefully be updating this thing at least once a week, excluding the occasional public…</description>
      <content:encoded><![CDATA[<p>Hey all,</p>
<p>So this post marks the official launch of the ZSB Blog. The plan for the future of said blog is to provide current, relevant information regarding the web hosting industry, and technology in general.</p>
<p>Stay posted for more. I&#8217;ll hopefully be updating this thing at least once a week, excluding the occasional public service announcement (oh god zero-days nooo&#8230;).</p>
<p>Anywho, thanks for giving this a read, see ya!</p>
<p>&#8211; Z</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
