Install Problems: CentOS 7.2, Apache, MariaDB, PHP, Postfix, Dovecot, Bind

Discussion in 'Tips/Tricks/Mods' started by iNet Specialists, Apr 11, 2016.

  1. iNet Specialists

    iNet Specialists New Member

    First, thanks for supporting free and open source software that we can all use and contribute to. This post is primarily informational and I have already solved our own installation problems. It boiled down to either missing packages or packages that needed to be replaced for correct functionality.

    There are a number of things that came up during the installation that I wanted to make note of in hopes that it will make things more straigtforward for other users or can be adjusted in the installation process to better mitigate upstream OS changes.

    This system was a new install using:
    CentOS 7.2 (in an OpenVZ container)
    Apache, MariaDB, PHP, Postfix, Dovecot, Amavisd-new, Bind
    ISPConfig (most recent as of this post)
    Except for the preliminary OS and network settings, I was loosely following the Perfect Server install here:


    a. Install seemed to think that Dovecot was not installed and was trying to configure Courier.
    b. Install seemed to think that MyDNS was installed instead of Bind
    c. Install failed to create Apache vhost structure or ISPConfig Web UI
    d. The 'htf-common-issues.php' script could not detect some services
    e. Package php-pecl-apc not found
    f. Some PHP application using PDO exhibited problems with database access.
    g. Using the uninstall script followed by the install script issued an error

    Problem #1: Requirement for net-tools and which packages

    []# yum install which
    and, if not installed from the tutorial yet
    []# yum install net-tools
    Short-term: Add clear notes that these are required for ISPConfig install
    Long-term: Adjust code to use newer versions of the necessary commands

    These two packages will be missing from many CentOS 7 and RHEL 7 minimal installations.

    The tutorial does address installing the net-tools package, however, it does so in an area related to the firewall and does not mention that it is required for many other parts of the ISPconfig installation.

    Specifically, 'ifconfig' and 'netstat' are both deprecated in favor of 'ip' and 'ss' respectively. A better solution would be to adjust the code to use the new commands to capture the information. The new commands are also included in CentOS 6, but I did not check other distros or earlier versions of CentOS.

    The tutorial does not mention the need for the 'which' command at all. In fact, a better replacment for this command would be to use the 'type' command as it is included in the shell interface and is not a separate package.

    Problem #2: MySQL is replaced by MariaDB by default

    []# yum remove php-mysql
    []# yum install php-mysqlnd
    []# systemctl restart httpd
    Note: this tutorial specifically installs php-mysql.

    This was difficult to find due to the fact that some PHP applications would work fine, but others would have all sorts of issues. It turned out that the applications that used PDO had problems with the php-mysql driver because of the upgraded MariaDB database server. Since the two packages are incompatible, it is best to install the php-myslqnd package.

    Support for one database server over the other should not be a problem. I believe that the php-mysqlnd driver works equally well with both. The problem seemed to be the way PDO works with the different drivers. I have not witnessed any further problems with PHP and PDO since this change.

    Problem #3: Package php-pecl-apc is not available

    []# yum install php-pecl-apcu
    The php-pecl-apc package is no longer supported and the php-pecl-apcu package is structured to support future changes in the Zend framework.

    Problem #4: Restart the database server when removing database users

    As I was testing, uninstalling ISPConfig, and then re-installing, I learned that it wasn't enough to uninstall, remove the database user, and then re-install. The installer would throw an error.
    ERROR: Unable to load SQL-Dump into database table.
    After this occurred, it was necessary to manually remove the database, remove the database user, flush privileges, and restart the MariaDB server. I used phpMyAdmin to accomplish the first three, and the command below to do the last.
    In order to work around this, it was necessary to restart the MariaDB server before trying to run the install program again.
    []# systemctl restart mariadb
    Once I started to remember to do this between uninstall/install, I had no further problems.

    I truly hope that these notes will help someone.

    Jesse Norell likes this.

Share This Page