Get Social

Installing and configuring the adminer on debian (phpmyadmin alternative)

On my current work, there was a task to install and adjust this tool.

What is it? According to Wikipedia: “Adminer (formerly known as phpMinAdmin) is a tool for managing content in MySQL databases (since version 2 also in PostgreSQL, MS SQL, SQLite and Oracle databases).

Next – go to his site and get acquainted closer … We see that there is simply an adminer, and there is – adminer-mysql. We need for mysql. Since the package for it is still in the sid branch, it will not turn out beautifully from the repository. We will not connect this branch so that the package manager does not become littered, especially since the entire utility is one file and we can have the latest version simply by downloading it from the site. On our Debian server, create a directory and download the latest version of adminer:

mkdir /var/www/adminer
cd /var/www/adminer
wget https://www.adminer.org/latest-mysql.php

Next, create a configuration file for Apache:

nano /etc/apache2/conf.d/adminer.conf

Add the following entry:

Alias /adminer /var/www/adminer

<Directory /var/www/adminer>
        Options FollowSymLinks
        DirectoryIndex latest-mysql.php

        <IfModule mod_php5.c>
                AddType application/x-httpd-php .php

                php_flag magic_quotes_gpc Off
                php_flag track_vars On
                php_flag register_globals Off
                php_value include_path .
        </IfModule>
</Directory>

Now, use it with url: http://yourserver/adminer

P.S. It is also possible to change the interface – you just need to download the file adminer.css to the adminer.php directory.

How quickly make a blog on WordPress?

Only few steps need to install wordpress on clean / new server.

[Step 1] Choose a domain name for your blog.

This step includes think of a name and choose a domain name registrar provider.
Comparing domain registrars, we must remember that cheap does not always mean really cheap. It may be an extension of 2-year is much more expensive. Maybe it is necessary to order additional services such as hosting.

[Step 2] Choose and install a CMS for your blog.

I chose between Drupal and WordPress. Because I already dealt with Drupal 6th and 7th version, I decided to extend the experience and install WordPress. I’m going to start wordpress.org and start discover wordpress. Next, follow the instructions to put the engine on your web server (I prefer Debian GNU / Linux as the platform).

cd /var/www/

(current version at the official wordpress site is always available via the link https://wordpress.org/latest.zip or https://wordpress.org/latest.tar.gz):

wget https://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
mv wordpress mynewblog.com

[Step 3] Now – create MySQL database:

mysql -u root -p
 CREATE DATABASE blogdb;
 GRANT ALL PRIVILEGES ON blogdb.* TO "user"@"localhost" IDENTIFIED BY "pass";
 FLUSH PRIVILEGES;
 EXIT

Do not forget to set up connection for the WordPress, as indicated in its manual (it is clear that the name of the database, database user name and password you need to specify your own).

[Step 4] After that edit Apache config:

nano /etc/apache2/conf.d/mynewblog.conf

Add here:

<VirtualHost *:80>
   ServerName mynewblog.com
   DocumentRoot /var/www/mynewblog.com 
 <Directory "/var/www/mynewblog.com">
   AllowOverride All
   Order deny,allow
   Allow from all
   AddHandler application/x-httpd-php .php .html
 </Directory>
</VirtualHost>

Graciously ask Apache to reread configuration files:

apachectl graceful

[Step 5] What is the result?

Now you may follow url, like http://mynewblog.com and customize the interface of the CMS under your new blog needs.


P.S. For better security of your web server, you can configure Apache to run as a different user:

# install multiuser MPM for Apache
aptitude install apache2-mpm-itk

# change wordpress filse owner
chown -R nobody:nogroup /var/www/mynewblog.pp.ua/

# permit wp-content directory writing privileges to group
chmod -R g+w /var/www/mynewblog.pp.ua/wp-content

Then add in the Apache config file the following lines (and restart it again):

<Directory "/var/www/mynewblog.pp.ua">
  ...
  AssignUserID www-data nogroup
  ...
</Directory>
Pages:12