Cloud Hosting

How to Use Grep Commands on Linux or FreeBSD

Jose Velazquez September 4, 2015 by under Cloud Hosting 0 Comments

Verified and Tested 08/31/15


Few things are more frustrating than wanting to do something and not knowing how to do it.  In this How-to, we will be going over the  GREP commands so we could make our lives easier and work more effective in our sessions.


You need a Linux server that is configured with a static IP address. If you do not have a server already, you can visit Linux Cloud Hosting page and spin a new server up in under 30 seconds.

GREP In A Nutshell

To understand how to work in GREP, we need to know what GREP is and what it does. An acronym for “Global Regular Expression Print”, GREP is a command that allows you to manipulate the way requested information is printed/viewed.

Searching A Single File

With the following grep command you can search for a single file from a specified location. It is simply read as getting MyText from MyFile, and the command reads as follows.

grep "MyText" MyFile

Searching Multiple Files

With the following grep command you can search for multiple files from a specified location.Its is simply read as get MyText from MyFile in any format(tis could be TXT, JPEG, PHP, etc.)

grep "MyText" MyFile_txt

Searching And Ignoring Files

With the following command, you could search for specific files at the same time ignore irrelevant ones. MyFile being the file that you want and the second grep text after the pipe is the one that is irrelevant, and you want to be ignored.

grep MyFile | grep -v IrrelevantFile

Counting Words In a Specified File

With the -c variable, you can count how many of the same word or phrase in a specific file. Want to know how many times MyWord appears in myfile.txt?

grep -c "MyWord" myfile.txt

Searching Before And After

With the –context= and -C command we can search words before and after a specified words or phrases in specific locations. Want to know how many lines are before and after MyWord?

grep --context=3 MyWord MyFile.txt
grep -C 3 'MyWord' MyFile.txt

Searching Patterns

With the egrep command, we can do an extended search using | (pipe) to search for wanted and unwanted words. Want to know where is a line that specifies multilple words from MyFile.txt?

egrep 'UnwatedWord|WantedWord' MyFile.txt

Searching Case Sensitive Words

With the -i command we can find a specified word no matter if it’s in upper case or lower case letters. Want to know where is MyWord no matter how its written?

grep -i MyWord MyFile

Searching Patterns In gzip Files

With the zgrep command, we can find a specified word no matter if it’s in upper case or lower case letters in the any .gz file. Want to know where is MyWord no matter how its written in all of my .gz files?

zgrep -i MyWord *.gz

Searching For Whole Words

With the -w command, we can find whole specified words displaying their whole line. Want to know the lines that contain is MyWord withing MyFile?

grep -w MyWord MyFile.txt

To search a word ending with MyWord, anywhere, Run the following command:

grep 'MyWord>' *

Showing Specified File Names

With this – l command we can see all files that end without specified name. In this case .myfile. You could accomplish this with the following command:

grep -l 'main' *.myfile

Showing Line Numbers

With the -n command, we can view all of the numbers in lines of the specified words that the error appeared.

grep -n MyWord lg Myfile

Recursive search

With the -R command, you will be able to see all files in any directories and subdirectories.

grep -R store*

To view a file

With the –color command, you could also search for a specific word and display it in color for easy reading.

grep --color MyWord MyFile.txt

Congratulations! This completes this tutorial on GREP Commands. We hope that you found this information useful just like it was to me.  Thank you for following along! Check back with us for further updates and try any of our top cloud hosting solutions.

Write for Atlantic.Net FAQ

Atlantic.Net NOC September 3, 2015 by under Cloud Hosting 0 Comments

Frequently Asked Questions

Q. I want to write an article on a certain topic, but how do I know that someone else isn’t already working on a very similar article?

A. First, verify that we haven’t already published an article covering same topic on our community site or blog. If your search there doesn’t turn up any published articles, email us at [email protected] with your topic, and we’ll let you know if someone else might already be working on it. If not, we’ll give you exclusive rights for two weeks to complete the article. If it’s not completed in that two-week period, we may open that topic up to any writer, so the sooner the better!


Q. Are there particular topics you would like covered?

A. We are always looking to expand the range of topics our community section covers. If you’d like some suggestions, let us know at [email protected], and we’ll send you a list of what topics we are looking for.


Q. I have an idea for an article, but I’m not sure if it’s a “How To” or a “What Is” article. How can I determine which section it should belong to?

A. Categorizing articles is an editorial decision, so you don’t have to worry about making that determination yourself. We’ll take care of that! If you’re not sure how an article topic might fit, send us a pitch at [email protected], and we’ll evaluate it and see if we can give you a good starting point.


Q. What document format do you use?

A. We prefer files with as little extraneous formatting as possible, so plain old text, html, or .md files are sufficient. You can include them as an email attachment to [email protected], or provide us link to the file sharing service we can download it from.


Q. Do you offer a discount on server usage for writers to use as a testing platform for articles currently being written?

A. We do not currently offer a discount program for writers, but it is something we are considering in the future. If we do roll out this sort of program, we will let all of our writers know!


Q. Do articles need to be specifically relevant to the products and services that Atlantic.Net offers?

A. Not necessarily. While we do want to have a library of reference articles directly relevant to the services and platforms our customers are using, we are also tech nerds and welcome informative articles on a wide variety of technologies.

We do draw the line, however, when it comes to topics which violate our Acceptable Use Policy. So, for example, we’re not likely to publish an article on how to DDoS your grandmother (and seriously, why would you do that?).


Q. Can I write an article in a language other than English?

A. We are actively looking into the possibility and logistics of publishing translations of our articles into other languages. If this sort of program becomes something we will be opening up to our writers, we’ll let interested writers now!


How to Install wget on CentOS 6.7 with a wget Cheat Sheet

Ray Leon September 3, 2015 by under Cloud Hosting 0 Comments
Verified and Tested 09/03/2015


In this quick and simple article, we will install wget command on a CentOS 6.7 server and we have included a wget cheat sheet. Wget is a free software package for downloading files using HTTP, HTTPS and FTP.


A CentOS 6.7 server with Root privileges. If you do no have a server, you can spin up an efficient and reliable SSD Cloud server from Atlantic.Net.

Installing wget on a CentOS 6.7

Install wget using the following command:

yum install wget

You will be asked if it is okay to install the downloaded size, you would just type yfor yes and press Enter to continue. I have screenshot a successful install below

anet-How to install wget on a CentOS 6

Successful Installation of wget

Once installed, you can use it to download files or even entire web sites.

Quick wget Cheat Sheet

To download a single file from a website using the following command:


If your web page requires a username and password use the following command:

wget --user=youruser --password=yourpassword

Download a file from an ftp site using the following command:


If your ftp site requires a username and password use the following command:

wget ---ftp-user=youruser --ftp-password=yourpassword

Download and entire website using the following command:

wget -r

Download and save it in a specific path using the following command:

wget --directory-prefix=folder/nextfolder

Download a file and save it under a different name using the following command:

wget --output-document=filename.php

Resume an interrupted file download using the following command:

wget --continue

Limit download speed of a file using the following command:

wget --limit-rate=1000k

Now you have successfully installed wget and have some examples to work with! You can see the wget manual by running “wget -h”. Please check back here for more updates or check out our related how-to’s below.

Why Businesses & Developers Choose WordPress

Adnan Raja September 2, 2015 by under Cloud Hosting 0 Comments
  • The Incredible Scope of WordPress
  • The Price is Right
  • Ready to Use Off-the-Shelf
  • Choose Your Own Adventure
  • SEO-Friendliness
  • Security
  • User-Friendliness
  • Support When You Need It
  • Multimedia Integration
  • Immediate Access to Fast WordPress hosting

The Incredible Scope of WordPress

Popularity certainly isn’t the only factor when choosing a content management system (CMS), but a quick look at the statistics shows that WordPress certainly has that base covered. In 2011, WordPress was used on 14.7% of the top 1 million sites worldwide. At that time, there were about 500,000 WordPress posts each day. According to Technorati, 48 of the top 100 blogs were using WordPress, and it was translated into 40 languages. Still today, WordPress is a massive presence on the Internet.

Read More

How to : Authoritative BIND9 DNS Server on CentOS 6 : Install & Configuration

Stephen Flynn September 2, 2015 by under Cloud Hosting 0 Comments


In this how-to article, we will walk you through the installation of a secure BIND9 authoritative DNS server on CentOS 6.7

What is BIND?

BIND is open source software that implements the Domain Name System (DNS) protocols for the Internet. It is a reference implementation of those protocols, but it is also production-grade software, suitable for use in high-volume and high-reliability applications.
ISC (Internet Systems Consortium)


Outline of Configuration Steps

  1. Basic Server Preparation.
  2. Installation of the BIND software packages.
  3. Configuration of the BIND software packages.
  4. Adding a test zone (domain)
  5. Testing your DNS server


Before you begin this how-to article, you will need to make sure that you have these prerequisites done first.

– CentOS 6.7 Server – If you do not have a server available, you can spin one up in via our cloud hosting services page.
– Your preferred text editor installed – We will be using nano in this tutorial.


1 – Basic Server Preparation

First, make sure that you are logged in as the root user account.

sudo su -

Next, we are going to make sure the core operating system is fully updated.

yum update -y

Now that your system is fully updated, we will update the firewall (enabled by default) to allow DNS (TCP Port 53 / UDP Port 53) to access your server.

iptables -I INPUT 5 -m state --state NEW -m tcp -p tcp --dport 53 -j ACCEPT 
iptables -I INPUT 5 -m state --state NEW -m udp -p udp --dport 53 -j ACCEPT
service iptables save
service iptables restart

Note: The 5 following INPUT in two of the above lines indicates the line number at which the rule will be inserted. If you’ve made any changes from the default CentOS iptables ruleset, it’s likely your line numbers may be different. For a refresher on managing iptables, you can find some useful tips here.


2 – Installation of the BIND DNS Software Packages

We are now ready to install the BIND software packages on your server.

yum install -y bind bind-utils bind-chroot
  • bind : The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server
  • bind-utils : Utilities for querying DNS name servers
  • bind-chroot : A chroot runtime environment for the ISC BIND DNS server


Now that you have the required BIND software packages installed, we are ready to start the BIND services and set them to start automatically upon a server reboot.

service named start
chkconfig named on


3 – Configuration of the BIND DNS Server

Upon starting the BIND DNS server, the chroot package automatically mounts all the configuration files in the /var/named/chroot directory of your server. When you run BIND (or any other process) in a chroot jail, the process is simply unable to see any part of the filesystem outside the jail.

For reference, the base directory you will be working in for any BIND configurations is /var/named/chroot

First, let’s change to that directory for the remainder of these steps.

cd /var/named/chroot

Now, let’s create some directories and a configuration setting file for your new server and set the ownership.  These directories will be used to store forward and reverse zone files for your DNS server.

mkdir var/named/fwd-zones
mkdir var/named/rev-zones

chown -R named:named var/named/fwd-zones
chown -R named:named var/named/rev-zones

touch etc/zones.conf
chown root:named etc/zones.conf

Next, we are going to edit the etc/named.conf configuration file.  We will walk you through the entire setup so that you understand what each option is doing for your server.

nano etc/named.conf

Upon initial installation, the default configuration file will be the below (if you would like to jump to final etc/named.conf, you can find it below):

// named.conf
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
// See /usr/share/doc/bind*/sample/ for example named configuration files.

options {
        listen-on port 53 {; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { localhost; };
        recursion yes;

        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;

        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";

        managed-keys-directory "/var/named/dynamic";

logging {
        channel default_debug {
                file "data/";
                severity dynamic;

zone "." IN {
        type hint;
        file "";

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

The available configuration settings and options in BIND are very extensive. In this article we will be covering only the options to setup your server to be an authoritative DNS server and secure your server from recursive DNS amplification attacks.

For a more in-depth explanation of all of these options, we recommend the folks at

Listening Options

The first configuration option we are going to change is the listening options for your server.  By default, the server is setup to listen only on the local loopback address (  We are going to change this to listen on all interfaces on your server.  Replace the following lines inside the options { } clause of the configuration file.

        listen-on port 53 { any; };
        listen-on-v6 port 53 { any; };


ACLs (Access Control Lists)

We are now going to add some ACL (Access Control List) rules to the configuration.  These ACLs will be used to extend the security settings for the query lookup options as well as the recursive query options. The first rule–which we’ll call “allowed-queries”–will be used to allow any source address to query your DNS server. The second rule–we’ll call this one “allowed-recursion”–will be used to restrict recursive lookup to only the localhost address.

Add the below ACL policy rules just above the options { } clause.

// ACL - Allow queries from ANY source address
acl "allowed-queries" {

// ACL - Allow recursion from LOCALHOST only.
acl "allowed-recursion" {;

options {

Next, we are going to change the configuration value of the allow-query statement variable to use the new ACL we just created. The allow-query statement defines who (i.e., source networks) are allowed to query your DNS server.  Replace the following line inside the options { } clause of the configuration file.

     allow-query     { "allowed-queries"; };

Restricting Recursion

Now we need to secure the recursion lookup permission on your server.  Recursion is a technique in which a DNS server queries other DNS servers on behalf of the requesting client to fully resolve the name, and then sends an answer back to the client. Attackers can use this technique to cause DNS servers with open recursion enabled to unwittingly participate in a DDoS (Distributed Denial of Service) attack. Therefore, if a DNS server in your network is not intended to receive recursive queries, recursion should be disabled on that server or secured not to allow unauthorized sources to use this technique.

By default, the BIND DNS server is configured to allow any source IP to request recursion. We are going to add a configuration variable to restrict who can use this server for recursive requests using the second ACL that we created– “allowed-recursion”.  Add the following statement inside the options { } clause of the configuration file, just below the statement recursion yes;.

     recursion yes;
     allow-recursion { "allowed-recursion"; };

We are now going to add an include statement to the configuration file.  This statement will be used to include the authoritative zone data (domains) that your server will be configured to respond to. Add the following line below the close of the option { } clause, just after the last include statement.

include "/etc/zones.conf";

We have now completed the configuration changes in the etc/named.conf configuration file.  You can now save and exit your changes.


New named.conf File

For review, your etc/named.conf configuration file should now look like the below:

// named.conf
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
// See /usr/share/doc/bind*/sample/ for example named configuration files.

// ACL - Allow queries from ANY source address
acl "allowed-queries" {

// ACL - Allow recursion from LOCALHOST only.
acl "allowed-recursion" {;

options {
        listen-on port 53 { any; };
        listen-on-v6 port 53 { any; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { "allowed-queries"; };
        recursion yes;
        allow-recursion { "allowed-recursion"; };

        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;

        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";

        managed-keys-directory "/var/named/dynamic";

logging {
        channel default_debug {
                file "data/";
                severity dynamic;

zone "." IN {
        type hint;
        file "";

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
include "/etc/zones.conf";


4 – Adding Your First Zone (Domain)

We are now going to add your first zone that your DNS server will be authoritative for.  We will be using a testing domain (example.tld) for this step as the example.

First, we will create a new file in the directory var/named/fwd-zones that we created earlier.

touch var/named/fwd-zones/;
chown named:named var/named/fwd-zones/;

Next, we are going to add the example zone record data for this domain.  Edit the new file that we just created and add the zone data to the configuration file.

nano var/named/fwd-zones/

Zone Data

; zone file for example.tld
$TTL 14400     ; 4 hours - default TTL for zone
$ORIGIN example.tld.

;; SOA Resource Record
@             IN      SOA   ns1.example.tld. hostmaster.example.tld. (
                        2015010100 ; se = serial number
                        12h        ; ref = refresh
                        15m        ; ret = update retry
                        3w         ; ex = expiry
                        3h         ; min = minimum

;; Name Servers
              IN      NS
ns1           IN      A

;; Mail Exchange Resource Records
@             IN      MX  10  mail.example.tld.

;; Web Server Resource Records
@             IN      A
www           IN      CNAME   @

;; FTP Server Resource Records
ftp           IN      A

Once you have made all the changes you need to make, save and exit.

Now we are going to edit the etc/zones.conf configuration file to include the new domain we just created.

nano etc/zones.conf

Now add the below parameters to the configuration file.

zone "example.tld" in {
     type master;
     file "fwd-zones/";
     allow-transfer { none; };

Once done, save and exit this file.

We are now ready to restart your DNS services so that all the new configurations load.

service named restart;

If everything restarted successfully, without any errors, you should receive the following response:

Stopping named: .                                          [  OK  ]
Starting named:                                            [  OK  ]


5 – Testing Your DNS Server

We are now ready to test the functionality of your new DNS server.  First, we are going to confirm that your DNS server is responding for the zone (domain) that we just created.  Execute the following command:

dig example.tld -t ANY @localhost

You should see the below similar response output from your server.  The key response values to look for are the ;; ANSWER SECTION: values.  This output lets you know that the server has responded to your request with the record data that you entered in the previous steps.

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.37.rc1.el6_7.2 <<>> example.tld -t ANY @localhost
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61421
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;example.tld.                   IN      ANY

example.tld.            14400   IN      SOA     ns1.example.tld. hostmaster.example.tld. 2015010100 43200 900 1814400 10800
example.tld.            14400   IN      NS      ns1.example.tld.
example.tld.            14400   IN      MX      10 mail.example.tld.
example.tld.            14400   IN      A

ns1.example.tld.        14400   IN      A

;; Query time: 0 msec
;; WHEN: 
;; MSG SIZE  rcvd: 147

The second test we are going to do is to check that your server is responding to recursive lookups from the localhost.  Execute the below command to begin the test:

dig -t ANY @localhost

If the server is setup as expected, you should receive a similar recursive ;; ANSWER SECTION: response.

;; ANSWER SECTION:             86400   IN      SOA 4294967295 7200 1800 1209600 300             600     IN      MX      50             600     IN      MX      40             600     IN      MX      10             600     IN      MX      20             600     IN      MX      30             3600    IN      TXT     "v=spf1 ~all"             86400   IN      TYPE257 \# 19 0005697373756573796D616E7465632E636F6D             300     IN      AAAA    2607:f8b0:4008:804::200e             300     IN      A             172800  IN      NS             172800  IN      NS             172800  IN      NS             172800  IN      NS

;; AUTHORITY SECTION:             172800  IN      NS             172800  IN      NS             172800  IN      NS             172800  IN      NS

;; ADDITIONAL SECTION:         172800  IN      A         172800  IN      A         172800  IN      A         172800  IN      A

The last test that we are going to do is to validate that your server is NOT open to a DNS amplification attack. The folks at have set up a simple test you can use with dig:

dig +short TXT @

      (replace with the IP address or domain name of the DNS server you are testing)

A response of "open-resolver-detected" indicates that you have recursion enabled. No response, in this case, is a good thing.

The site also has a browser-based tool available for testing for this vulnerability.

Upon testing with your public IP address, you should receive the following similar response:

Successful Open Recursive DNS Resolver Test

Successful Open Recursive DNS Resolver Test



You now have an authoritative DNS server configured and running. Thank you for reading! Check out some of the related articles below and thanks for trying our reliable cloud hosting solutions at Atlantic.Net.

How to Install MediaWiki on Ubuntu 14.04

Arnaldo Arrieta September 1, 2015 by under Cloud Hosting 0 Comments


MediaWiki is a wiki application written in PHP that the Wikimedia Foundation developed to run several of their projects. The encyclopedia Wikipedia is the most popular of these projects.

A wiki is a type of website that allows its users to create and edit content in a collaborative manner. It can be used in several ways, including as a knowledge base, documentation library, community website, or company intranet.

These kinds of websites are especially useful in contexts where several people need to create and modify pages in a quick and easy way.

This guide will show you how to install and set up the application, giving you the basis to deploy your own wiki site.

We will use the domain name “” in this guide. Replace it with the domain name or IP address you have configured on your server.



– An Ubuntu 14.04 server. You can run MediaWiki on a different flavor of GNU/Linux, but the steps outlined below could differ. If you do not have one, why not spin up a fast SSD Cloud server from Atlantic.Net.

Installing MediaWiki on Ubuntu 14.04

Before you begin, make sure your system is updated. From the command line, type:

sudo apt-get update
sudo apt-get upgrade

Proceed to install the package:

sudo apt-get install mediawiki

The package management system will install all the dependencies required.

The MySQL database server is one of these dependencies. If MySQL is not already installed on your server, then the installer will prompt you for a password for the root MySQL user. Remember to choose a unique, secure password, different from the server user’s. Keep this password handy. You’ll need it again later during this installation.


There are also certain optional software packages used by MediaWiki that could be installed at this time. Although optional, they do provide useful features:

Imagemagick: a package used to create image thumbnails.
PHP5-intl: a PHP extension used for Unicode normalization.
PHP-apc: a package that provides cache features to PHP.


To install these optional packages, from the command line:

sudo apt-get install imagemagick php5-intl php-apc


Initial Configuration of MediaWiki

There are several configuration tasks to perform both on the server and with the guided web GUI before you will be able to use the wiki.

Configure Apache

The first step is to configure the Apache web server.

Using your preferred text editor, open the /etc/mediawiki/apache.conf file and uncomment the line beginning with Alias.

# Uncomment this to add an alias.
# This does not work properly with virtual hosts..
Alias /mediawiki /var/lib/mediawiki
# Uncomment the following line (instead of the one above)
# to use the custom directory '/intranet'
#Alias /intranet /var/lib/mediawiki

<Directory /var/lib/mediawiki/>
    Options +FollowSymLinks
    AllowOverride All
    <IfVersion >= 2.3>
            Require all granted
    <IfVersion < 2.3>
            order allow,deny
            allow from all
[remaining configuration cut]

With this setting, the wiki will be accessible using a web browser and going to the /mediawiki directory under your domain or IP address.

If you want to change the “/mediawiki” directory, simply replace the first “mediawiki” appearing in that line. Leave the second as it is because it is indicating the path where the files are located. There is a second Alias line included in the example above to demonstrate the configuration necessary to make your wiki accessible at


The second step is to tell the Apache web server to use the file you just modified. Edit the Apache main configuration file /etc/apache2/apache2.conf. At the end of the file, add the following line:

Include /etc/mediawiki/apache.conf

Finally, restart Apache to apply the changes. From the command line:

sudo apache2ctl restart


Configure MediaWiki

Using your web browser go to

If you changed the alias before, use the name you chose (from our example:


MediaWiki initial setup page

MediaWiki initial setup page

MediaWiki will now show its version. It will also say “LocalSettings.php not found”. We’ll be creating that file based on the next few steps. Get started by clicking on the link to “set up the wiki”.


MediaWiki installation: language selection

MediaWiki installation: language selection

On this page, you can choose the language for your wiki. Select your preferred options and click “Continue”.

If you are curious about any of the parameters MediaWiki is asking you to select, you can click on the “help” link next to each input or selection field to open a short help window explaining its purpose.



At this point, MediaWiki performs several checks before proceeding with the configuration.

If all is OK, the message “The environment has been checked. You can install MediaWiki” will appear. Press “Continue” to advance to the next step.

MediaWiki installation: environment checks complete

MediaWiki installation: environment checks complete

The wiki installer will let you know if some of the optional software packages are missing, but it will let you continue anyway.

Connect to Database

In this step, you must provide the information to establish the connection with the database.

Enter the MySQL root password in “Database password” and click on “Continue”.

MediaWiki installation: initial database settings

MediaWiki installation: initial database settings

Creating the database and tables MediaWiki uses requires the MySQL root account (here’s where you’ll need that password from above). On the next screen, you will be able to tell MediaWiki to use another MySQL user for its normal operation.

Database Settings for MediaWiki

Uncheck “Use the same account as for installation” and enter a username and password for the MySQL account you will use to run MediaWiki. If the user does not exist yet, be sure to check the box for “Create the account if it does not already exist”.

On this screen, there are other settings related to the database. If you do not have special reasons for changing them, just leave the defaults options and click “Continue”.

MediaWiki installation: new database settings

MediaWiki installation: new database settings



Input the name for your wiki, and the administrator account settings.

Leave the “Ask me more questions” selected and click “Continue”.

MediaWiki installation: administration settings

MediaWiki installation: administration settings



Select the options that best fit your needs and press “Continue”. If you need help making your selection, remember to take a look at the “help” links that provide more information about each option.

Complete the Installation

MediaWiki now has all the configuration settings it needs to finish the installation process. If it does not detect any problems, it will proceed to commit these changes into a file called “LocalSettings.php”. You will then see a prompt to download the file to the system you are running your browser on.

MediaWiki installation: LocalSettings.php file download

MediaWiki installation: LocalSettings.php file download

The last step requires you to copy the downloaded file to the /etc/mediawiki folder of your MediaWiki server.

You can transfer the file via something like scp or Filezilla, for example. You could also create the LocalSettings.php file on the MediaWiki server with your preferred text editor and copy and paste the contents from the file you just downloaded.

Security Tip:

Once you have added the configuration file into your server, you should change its owner/group and adjust its permissions. The Apache default user and group (www-data) should have ownership over this file. The permissions should let only that user read and write the file. From your server command line run:

sudo chown www-data:www-data /etc/mediawiki/LocalSettings.php
sudo chmod 600 /etc/mediawiki/LocalSettings.php


Once you have completed this last step, back in your browser click the “enter your wiki” link. Or just access (if you used a custom alias, then use that term instead, e.g.

Now your wiki is ready to be used.

MediaWiki successfully installed

MediaWiki successfully installed


Changing the logo

Although instruction about further tuning your wiki exceeds the purpose of this guide, there is a quick customization you might want to make at this moment: change the logo that appears by default.

According to the MediaWiki documentation, a good logo size is 135x135px or 150x150px. Bigger sizes will get cut off.

Copy your logo image file to /var/lib/mediawiki/skins/common/images.

Open /etc/mediawiki/LocalSettings.php with the text editor of your choice and edit the $wgLogo line. Replace the last part of the path with the name of the file you copied. For example:

$wgLogo             = "$wgStylePath/common/images/mylogo.png";

Save the change and access your wiki one more time. Your wiki will now display your custom logo.

More Resources

The default main page of your wiki includes several useful links where you can learn more about all the features included with MediaWiki and the ways to use it.

An excellent starting point is the MediaWiki User’s Guide.

Thank you for following along this how-to, please check out our other related articles at the bottom of the page.

How to Vim Tips for Beginners (or, Help! I Have To Use Vim!)

Atlantic.Net NOC August 31, 2015 by under Cloud Hosting 0 Comments


Perhaps you are happily configuring a cloud server or following along in an online tutorial, and you end up, by accident or by necessity (I’m looking at you, Minimal Install), having to use a text editor like Vi or Vim. Do you break out into a cold sweat? Do you get the shakes? Do you feel the uncontrollable urge to flip the desk?

Frustrated non-Vim user

Photo: Peter Hess / licensed under CC BY 2.0

It happens. Vim (I’ll be using “Vim” from here on out, since these tips can be used in either Vi or Vim) can be a confusing landscape to navigate. Devotees may swear by it, but for most of you, it is the text editor of the Beast and should be avoided at all costs. Except when it can’t. For those situations, this quick reference will try to help you navigate your way back to what must seem like much saner pastures.


– New to Vim
– Fear/hatred of Vim
– Stuck in Vim
– I don’t want to learn it, I just want to get on with life!

Quick Links


Why can’t I just type in Vim?

Vim works in different modes in which the keyboard keys can perform different actions based on the mode you’re in (kind of the way a game controller’s controls might behave differently in a game based on whether you are flying a plane or running through ancient ruins).

Vim generally starts in “Normal” mode, where many of the keys are mapped to different actions (some of you may consider the name of this mode an oxymoron).

To get to a mode where you can just start typing–called “Insert” mode in Vim world–type:


You should see “– INSERT –” show up in the lower left of your screen.

Vim insert mode

Vim insert mode

Most instances of Vim will provide this context clue to help you identify what mode you are in. Some older instances of Vi, though, do not present this clue. Even Vim users hate it when we find ourselves in this situation.

For all you Vim grognards, yes, there are other ways to enter “Insert” mode. This is arguably the most straightfoward. And how did you get here?


To get back to “Normal” mode (which is important if you want to save, quit, or executate any of the other actions below), press ‘Esc’.

Note: The remaining tips will be executable in “Normal” mode, so remember to ‘Esc’ out of “Insert” mode before trying to complete these actions!


Exit Vim

“I accidentally ended up in Vim and want to quit!”:

:q   [then press 'Enter]

“But I’ve made some changes I want to keep before I quit”:

:wq   [then press 'Enter']

“I just want to get out and I don’t care to save any changes I might have accidentally made while mashing keys!”:

:q!   [then press 'Enter']


Navigation in Vim

Go to the top of the document:



Go to the bottom of the document:



Navigation, measured by page:

Ctrl+u   [Up by half a page]
Ctrl+b   [Back by a full page (equivalent to 'Page Up')]

Ctrl+d   [Down half a page]
Ctrl+f   [Forward by a full page (equivalent to 'Page Down')]


Find and Replace in Vim

“I need to find a particular string” (e.g., waldo):

/waldo   [then press 'Enter']

To find the next occurence of the string you are searching, press ‘n’ (as in “next”). If you’ve gone too far, you can cycle backwards through matches with a capital ‘N’ (as in…, “NO! Too far! Go back!”)


To replace all instances of one string with another (e.g., find all references to “waldo” and replace with “carmen sandiego”):

:%s/waldo/carmen sandiego/gc   [then press 'Enter']

The ‘c’ at the end of this command will ask you for confirmation for each replacement before continuing (use the standard ‘y’ and ‘n’ to confirm or deny each substitution). If you leave the ‘c’ off, it will replace all instances without confirming.


Delete in Vim

To delete a line of text, make sure your cursor is somewhere in the line you want to delete:


You can use this command to delete multiple adjacent lines, as well. Just place your cursor in the first line you’d like to delete, then prepend the number of lines to delete before the dd (e.g., to delete 10 lines, 10dd).


Undo in Vim

To undo the last thing you did, type:


You can keep pressing ‘u’ to undo each previous action, at least as far back as your session’s buffer goes (so, for example, you could undo the changes you made, but not the changes you or another user made before last editing the file).


Care To Learn More?

If you’ve made it this far, I hope you have found some of these tips useful. If you’re interested in perhaps dipping your toe a little further into the Vim pool, you can, on the command line of a Linux device with Vim installed, type vimtutor to start some guided lessons. Or, if you prefer something a little less intimidating, you could always try the game Vim Adventures!

What is: Javascript Frameworks – An Introduction

Siddharth Gutta August 28, 2015 by under Cloud Hosting 0 Comments
Target Audience:

This article assumes only a basic familiarity with front-end web development and serves as an introduction to JavaScript in modern web development.


Javascript code

Photo: Dmitry Baranovskiy / licensed under CC BY 2.0

The web is evolving. Websites, and more specifically, web design paradigms are changing constantly, and front-end developers must be aware of the latest trends in development to create the best projects. The tried and true languages of the web have been HTML, CSS, and JavaScript for nearly two decades. That still holds true today. How these languages are implemented has changed signficiantly, though, and none more so than JavaScript. JavaScript is seen the most today via web browsers, where client-side scripts interact with users.

Modern websites and web apps rarely, if ever, utilize pure Javascript. Rather, developers have created new frameworks with JavaScript that speed up development, improve functionality, and allow for the creation of agile, modern web apps. This article serves as an introductory overview of the concept of frameworks.

JavaScript Frameworks vs. Libraries

Understanding JavaScript frameworks necessitates an understanding of JavaScript libraries and the differences between the two. Often, the terms are used interchangeably, but each has its own particular role to play despite some overlap that may occur. A library is a set of pre-written code that acts as a toolkit for a developer. For example, jQuery–which aids in handling events or creating animations, among many other benefits–is one of the most used JavaScript libraries. Libraries, while useful, do not impose any structure onto a developer’s code. Frameworks, in contrast, impose structure and what this structure actually does will be discussed in the next section.

JavaScript frameworks are tools designed to speed up development and organize code used to build modern web apps. They exist to solve problems more directly rather than providing an open set of tools like most libraries do. The earliest frameworks were created to help manage what were becoming large and unwieldy codebases and to simplify the process of creating dynamic web apps that do not function like traditional server-side web apps.

Why are JavaScript Frameworks important?

Web apps have exploded in popularity over the past decade. Companies like Twitter and Airbnb don’t require you to download specific software to your devices (outside of mobile apps) to use their services. Rather, they have created web interfaces their users interact with. Web apps from these companies and countless others incorporate client-side loading to create a smoother user experience. Coding these modern web apps, even small ones, requires a large amount of JavaScript to create the desired client-side functionality. As web apps had increased in popularity, developers noticed that they were writing nearly the same code over and over again to produce the same basic features. They realized that it would be a lot more efficient to have tools to speed up this process.

What JavaScript frameworks help create are MVCs. An MVC (Model View Controller) is a concept that is key in developing structured user interfaces with client-side loading functionality. Constructing complex user interfaces that run in a web browser is incredibly time consuming, and you’ll likely write similar code that has been written over and over again. JavaScript frameworks serve to organize JavaScript for apps looking to quickly perform tasks client-side without constantly going to a cloud server.

These Frameworks help give web applications structure and cut down time spent working to create new MVCs. They may contain several libraries attempting to simplify everything from templating to working with Document Object Models. Each framework contains different libraries and tools that best suit different types of web apps. Understanding why JavaScript frameworks were first developed is extremely helpful when trying to learn more about individual ones and comparing them to each other.

We hope you have enjoyed this introduction to Javascript frameworks. Please check back with us for new updates soon and check out our exciting cloud hosting solutions and our one-click cloud hosted applications.

How to Install Nginx on CentOS 6.7

Jose Velazquez August 27, 2015 by under Cloud Hosting 0 Comments
Verified and Tested 08/27/15


This how-to will walk you through installing Nginx on CentOS 6.7.  Nginx is a powerful web server software that can be used on your server. It is also known for its high performance and low memory usage which will allow fewer resources to be used but getting the job done efficiently.

What Do You Need?

You need a CentOS 6.7 server that is configured with a static IP address. If you do not have a server already, you can visit Atlantic.Net Cloud Hosting page and spin up a reliable cloud server in under 30 seconds

Server Preparation

To get started, login to your CentOS 6.7 via SSH or the VNC Console in Atlantic.Net Cloud servers are set up as minimal installations in order to avoid having unnecessary packages from being installed and never used. Because of this, let’s make sure that your server is fully up-to-date.

sudo yum update

With the server up-to-date, we can continue the installation process of your server.

Install EPEL and Nginx on CentOS 6.7

In order to install Nginx, we will need to use the apt-get command so we can install the software. Also, we will need to install EPEL in order for the Nginx installation installs correctly.

Run the command to install the EPEL:

sudo yum install epel-release

Run the command to install Nginx:

sudo yum install nginx

Run the command to start the service:

sudo /etc/init.d/nginx start

To make sure that Nginx starts when rebooted, insert the following:

chkconfig nginx on

You will now have NGINX installed on your server. This can be verified by typing in the following with your IP ADDRESS on your browser (http://YOUR.IP.ADD.RESS )

This is the default webpage when installing Nginx on CentOS 6.7

This is the default webpage when installing Nginx on CentOS 6.7

What Next?

You now have your CentOS 6.7 server with Nginx installed. You can now begin building high performance websites using your newly installed web server.

Thank you for following along in this How-To! Check back with us for any new updates and try any of our industry-leading cloud hosting solutions.

How to Set up a Minecraft Server on CentOS 6.7

Atlantic.Net NOC August 26, 2015 by under Cloud Hosting 0 Comments
Verified and Tested 02/04/2015


This guide will walk you through setting up a Minecraft (version 1.8.1) server on CentOS6.7 64bit with nifty startup and shutdown scripts for easy management.


A CentOS 6.7 64-bit server, if you do not have a server then spin up a super fast Minecraft server today!

Setting up a Minecraft Server on CentOS 6.7

First, we install our prerequisite software:

yum install nano java-1.8.0-openjdk screen wget -y

Now, we create and enter the directory that the server will reside in:

mkdir /Minecraft cd /Minecraft/

Next, we download the actual Minecraft server application and make it executable:

chmod +x minecraft_server*.jar

Agree to the EULA that you definitely read:

echo 'eula=true' > eula.txt

The next steps are to create a handy script that allows us to start the server without remembering any arbitrary Java or screen CLI syntax:

echo 'cd /Minecraft' > /usr/bin/startcraft
echo '/usr/bin/screen -d -m sh -c "/usr/bin/java -Xmx768M -Xms768M -jar /Minecraft/minecraft_server.1.8.1.jar nogui"' >> /usr/bin/startcraft

Depending on the size of the server, you may want to adjust the “Xmx” and “Xms” values. These are the amount of RAM allocated to the Minecraft server instance. Mojang recommends 1GB of dedicated RAM, but you can get away with less if there will be very few people on at once.
If you end up upgrading the server in the future, or just wish to change the value after following this tutorial, simply use “nano” to edit the startcraft command:

nano /usr/bin/startcraft

Now we make “startcraft” executable:

chmod +x /usr/bin/startcraft

Now let’s test that this half of the setup is working:

screen –r
Sample Output

Sample Output

You should now see some text detailing that the server is starting/has started. Use Control + A then D to detach from the screen.

For the final step of the basic setup, we open up the default Minecraft port on the firewall:

iptables -I INPUT 1 -p tcp -m tcp --dport 25565 -j ACCEPT iptables-save > /etc/sysconfig/iptables

To stop the server process gracefully, we would need to enter the screen session:

screen –r

Although we are not at a prompt, we can still type Minecraft server commands here (/give, /op, etc). The command to stop the server is simply “stop.” When it has completed the shutdown process, the screen session will terminate. To run the server once again, just type “startcraft

Alternatively, we can setup a simple script to inject the “stop” command into the screen session:

echo 'screen -p 0 -X stuff "stop$(printf \\r)"' > /usr/bin/stopcraft chmod +x /usr/bin/stopcraft

To stop the server now, simply run “stopcraft” anytime:


Now you can start and stop the server with single commands without ever having to type out java stuff or jump into screen!

Don’t forget to give your username OP status. This can be done without touching screen with the following command:

screen -p 0 -X stuff "op USERNAME$(printf \\r)"

Replace “USERNAME” with your username.
Once you have it, you can perform any commands including /op while in-game. Depending on the circumstances, you may need to log into the server in the Minecraft game before you can OP yourself.

If you wish to have the “startcraft” script run when the server starts, simply run this command:

echo '/usr/bin/startcraft' >> /etc/rc.d/rc.local

The next step you will likely want to take is to point a DNS record to your server’s IP for easy connecting/distribution. You can read about using our cloud DNS manager here:

Finished! This page details all of the options you can modify in your “/Minecraft/” file:

Happy crafting! Be sure to contact us for all of your VPS Cloud hosting needs!

New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4