Install phpMyAdmin from source

   Overview

   In this tutorial we will give a quick instruction on downloading and installing phpMyAdmin from the source on a general setup.

   phpMyAdmin is a popular web based MySQL management environment used by many developers. On popular distributions you can quickly install phpMyAdmin using package managers. This tutorial focuses on the installation from the source files when installing with package manager is not applicable.

   Full script

   

       cd /usr/share

   

       wget https://files.phpmyadmin.net/phpMyAdmin/4.6.5.2/phpMyAdmin-4.6.5.2-english.tar.gz

   

       tar xzf phpMyAdmin-4.6.5.2-english.tar.gz

   

       mv phpMyAdmin-4.6.5.2-english phpmyadmin

   

       chmod -R 0755 phpmyadmin

   Installation

   In order to install phpMyAdmin you might need administrative priviledges on your server as well as administator user for the MySQL database server.

   Our recommended location for installing phpMyAdmin is ‘/usr/share’, so we start with:

   

       cd /usr/share

   Download the latest version of phpMyAdmin from the official site (https://www.phpmyadmin.net/):

   

       wget https://files.phpmyadmin.net/phpMyAdmin/4.6.5.2/phpMyAdmin-4.6.5.2-english.tar.gz

   and extract the files from the archive:

   

       tar xzf phpMyAdmin-4.6.5.2-english.tar.gz

   rename the folder:

   

       mv phpMyAdmin-4.6.5.2-english phpmyadmin

   change permissions:

   

       chmod -R 0755 phpmyadmin

   Adding Apache2 alias

   The last step to enable access to the phpMyAdmin is to add an alias to the folder in the Apache2 configuration.

   To do it either edit the apache2.conf or add a new ‘phpmyadmin.conf’ file in the Apache2 configuration folder.

   To add an alias, you must include the following lines in your Apache2 configuration:

   

       Alias /phpmyadmin “/usr/share/phpmyadmin/”
       <Directory “/usr/share/phpmyadmin/”>
            Order allow,deny
            Allow from all
            Require all granted
       </Directory>

   After changing the configuration you must restart the Apache2 service:

   RHEL / CentOS:

   

       service httpd restart

   Debian / Ubuntu:

   

       service apache2 restart

    

   With that your phpMyAdmin should be ready to use and accessible at your server address – “/phpmyadmin”.

Installing Monit to watch and restart Linux services on CentOS 7

   Monit is an awesome small, free tool that can save you a lot of troubles by simply monitoring and eventually restarting a service. It’s simplicity and yet fairly large flexibility make it SysAdmins and DevOps best friend.

    

   Installation:

   To setup monit you should start from installing it:

   

       yum install monit

    

   Configuration:

   Once set up, you can configure the service to be monitored by adding configuration files for each service in the ‘/etc/monit.d/’ directory.

    

   The service templates are pretty straight forward. You can find a plenty of example templates at:

   https://mmonit.com/wiki/Monit/ConfigurationExamples#apache

    

   Build your solid applications with monit and CloudBalkan

Generating a certificate signing request (CSR) with OpenSSL

   Certificate Signing Request is most often used to request a signed SSL certificate.

   The CSR contains your company and domain information, encrypted with a strong asymetric encryption key.

   To generate an CSR you can use OpenSSL:

   

       openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr

   This one line generates both the encryption key and the CSR itself. As a result you’ll get a ‘.csr’ file which will be used for requesting the SSL certificate and a ‘.key’ file containing the encryption private key. 

   Important!: You will need the private key later, to install the SSL certificate on your web server. Keep it safe and do not send your private key to anyone.

    

    

Backup files on a remote Linux server using ‘tar’ and SSH

   Have you ever been in the situation where you have to backup a server that is 100% full and you really can’t free up any space even to create an archive.

   Yeah if you’re on a cloud server you can just add some more storage, but how about when you’re actually migrating a physical one to the Cloud?

    

   There’s an easy, little one liner that could save you in that case:

   

       tar czf – /var/src_folder | ssh root@server.cloudbalkan.com “cat > /var/dst_file.tar.gz”

   What it does is that it archives or tarbals the source folder, compresses the output and directly streams it over ssh to a remote server and save it into a file there.

    

   This way you don’t need any free space to temorarily store the archive on the source server.

   You could also use those command to backup your servers on a remote machine on a schedule using a cron.

    

   Your ideas on solid ground

   CloudBalkan

    

CloudBalkan – PCI DSS compliance certified

   We believe that Cloud means security, and often security needs some solid proof for it. CloudBalkan is proud to declare its compliance to PCI DSS security standards, for all forms of payment and personal data processing on our platforms. Trust is important and we will keep working hard on providing top quality services on solid ground.

    

   

    

A lot more cloud storage for the same price at CloudBalkan

   Hi CloudBalkanians,

   We’re happy to announce that we’re increasing the storage space for you cloud server up to double, keeping the same price.

   CloudBalkan has done some hard work to provide you more, solid storage space, and we’ll keep constantly improving our cloud services in response to your needs.

    

   We are giving you more storage for your ideas

   All cloud server plans get more storage space. The smallest plan, the 0.5G RAM is now resized to 32GB of storage. Enough for more data and application even when you don’t need lots of computing power yet. You can get up to 160GB storage with our 8G RAM cloud virtual machine.

   Check the updated plans on the prices page.

    

   How can you start using the new cloud storage spaces?

   We’ve updated all of our current plans. As this update is free we’ve enabled the upgraded storage space for all current virtual machines and servers. You can start using it immediately, just by resizing your servers partition.

   All new virtual machines and servers are built with the new specification. We won’t offer legacy plans as you simply get the more storage for absolutely no added cost.

    

   What makes the cloud servers at CloudBalkan better?

   We work hard and smart to provide a solid service for your business. But solid doesn’t have to mean complex or expensive for you. Adding a lot more storage space to our cloud servers aims to enable you to acomplish more and more tasks when data is getting bigger.

   We are now making the fast and reliable storage provided by CloudBalkan nearly double, for the same price.

    

   So you can start your big ideas on solid ground.

    

Setting up an Apache Virtual Host on Ubuntu Server Linux

   Hi CloudBalkanians,

   Here are some quick tips on setting up Virtual Hosts under Ubuntu Server.

   On the Ubuntu Server you will find the Apache Virtual Hosts in two folders:

   /etc/apache2/sites-available/

   and

   /etc/apache2/sites-enabled/

    

   The first one all set up virtual hosts configuration files, where the second one contains only the active virtual hosts.

   To setup a new one, create a ‘.conf’ file in the /etc/apache2/sites-available/ folder and open it with a text editor.

   You grab the following short example as a base for you virtual hosts:

   

        ServerName example.com        ServerAdmin admin@example.com        DocumentRoot /var/www/example                        Options Indexes FollowSymLinks                AllowOverride All                Require all granted                # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,        # error, crit, alert, emerg.        #LogLevel info ssl:warn        ErrorLog ${APACHE_LOG_DIR}/example-error.log        CustomLog ${APACHE_LOG_DIR}/example-access.log combined

   It’s pretty minimalistic, but yet quite enough for a lot of web applications.

    

   Here are some short explanations of what you can modify in the example.

   The ‘ServerName’ directive defines the domain to be captured by the VirtualHost.

   The ‘DocumentRoot’ specifies the web root folder for the VirtualHost.

   The ‘Directory’ section sets directory specific settings. In this case it defines a few important settings for the ‘DocumentRoot’ folder.

   The ‘Options Indexes FollowSymLinks’ setting enables directory listing – ‘Indexes’ and the usage of symlinks.

   The ‘AllowOverride All’ defines the settings overrides allowed when using ‘.htaccess’ files.

   The ‘Require all granted’ option just enable unrestricted access to the directory.

    

   Once you’re ready with the file there’s only one more step to get your new virtual host working. You must enable it by creating a symlink in the ‘sites-enabled’ folder.

   You can also use the following commands:

   

sudo a2ensite examplesudo service apache2 reload

   A quick reload of the Apache2 service and you should be ready.

    

   Bring your ideas on solid ground with CloudBalkan.

Setting up NodeJS on your Ubuntu Server

NodeJS has gained a significant popularity in the last few years, providing a powerful and flexible server side scripting technology. The ease of using NodeJS can be seen even in the simplified setup of an working environment.

We recommend the NodeSource NodeJS repo, to obtain a newer version, so thats what we will show in the following example.

 

   Full script:

sudo curl -sL https://deb.nodesource.com/setup_6.x | sudo bash -
sudo apt -y install nodejs

 

   Installation:

The whole setup is pretty much automated and simplified. The first line will download and run a script that adds the NodeSource repository. Once it is done you can just install NodeJS.

After the installation is complete you’ll get the ‘node’ command as well as the ‘npm’ package manager so you can go with setting up you cool NodeJS project.

 

Grow your ideas on solid ground!
CloudBalkan

Disable remote SSH access with root

   Hi CloudBalkanians,

   As we’ve mentioned before in the “How to secure your linux cloud machine” article, direct SSH access with the ‘root’ user might be a big risk for your cloud machine. That’s why disabling ‘root’ remote access is often considered a good practice.

   Before you start, make sure that you have another user enabled for remote login.

   To disable remote access with the ‘root’ user, edit the /etc/ssh/sshd_config, find the following line:

#PermitRootLogin yes

   and change it to 

PermitRootLogin no

   A quick restart of the SSH server:

/etc/init.d/sshd restart

   And you’re there.

    

   Have a great day!

   
   Grow your ideas on solid ground!
   CloudBalkan

Your first steps on the cloud

Hi CloudBalkanians,

We’ve designed a cloud that makes your server management as simple as possible, to save your time and give a solid ground for your ideas.

You can start a cloud server for your new project in 5 clicks.

To help you make the choices we have put together a few recommendations how to start.

Read More