Category Archives: Hosting

install remi

On CentOS/RHEL/Scientific Linux 7 x86_64:
wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm

On CentOS/RHEL/Scientific Linux 6 i386 or x86_64:
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm

## for RHEL only
rhn-channel –add –channel=rhel-$(uname -i)-server-optional-6
On CentOS/RHEL/Scientific Linux 5 i386 or x86_64:

wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5.rpminstall

remi install php55

Replacement of default PHP by version 5.6 installation (simplest):
yum-config-manager --enable remi-php56
yum update

Parallel installation of version 5.6 as Software Collection (x86_64 only):
yum --enablerepo=remi install php56

Replacement of default PHP by version 5.5 installation (simplest):
yum-config-manager --enable remi-php55
yum update

Parallel installation of version 5.5 as Software Collection (x86_64 only):
yum --enablerepo=remi install php55

Fatal error: mysql.user table is damaged. Please run mysql_upgrade

mysqld_safe –skip-grant-tables –user=root &
mysql_fix_privilege_tables
pkill mysqld
/etc/init.d/mysqld restart

Or maybe clean database file reinstall if first suggestion not working:

2016-03-23T12:23:41.909337Z 0 [ERROR] Fatal error: mysql.user table is damaged. Please run mysql_upgrade.
2016-03-23T12:23:41.909405Z 0 [ERROR] Aborting

mysql_upgrade
mysql_upgrade: Got error: 2002: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) while connecting to the MySQL server

Not working? Still:

mysql
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

Maybe?
mysql_install_db
[WARNING] mysql_install_db is deprecated. Please consider switching to mysqld –initialize

mv /var/lib/mysql /var/lib/mysql___
mysqld –initialize –explicit_defaults_for_timestamp –user=mysql

2016-03-23T12:29:58.232282Z 0 [Warning] InnoDB: New log files created, LSN=45790
2016-03-23T12:29:58.343355Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-03-23T12:29:58.398447Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: f4c53304-f0f2-11e5-bb28-f6d02e74bd56.
2016-03-23T12:29:58.398839Z 0 [Warning] Gtid table is not ready to be used. Table ‘mysql.gtid_executed’ cannot be opened.
2016-03-23T12:29:58.399354Z 1 [Note] A temporary password is generated for root@localhost: **********

Now restore database from: /var/lib/mysql___ or sql dump backups.

You can face this issue after MySQL server upgrade. So you need backup all database before upgrading anything.

directadmin php selector

If you have CustomBuild 2.0 and are using 2 php versions/types, this feature will let the client select which of the 2 is associated with the .php extension.
It also allows for the 2nd php version to be specified, to use either of the 2 php types.. but the extension will change based on the version of php selected (Eg php53 or php54, etc.)

Note that the httpd.conf rewrite requires an apache restart, which can take upto 1 full minute.
The php version selector does not use .htaccess files to make the changes, rather direct changes to the tokens used in the templates.

SKINS:
user/modify_domain.html

add after the HAS_MULTIPLE_IPS section (after the |*endif|)

|*if HAS_PHP_SELECTOR=”yes”|

|PHP_SELECTOR_TABLE|
|*endif|