linux server

Update CentOS / DirectAdmin Server with custombuild 2.0

Here is how to use latest version of custombuild 2.0 . The commands for custombuild 2.0 are basically identical to custombuild 1.1 and 1.2, so all this stuff should look familiar. Here are instructions to custombuild 1.x.

Update server via custombuild

Download latest version of custombuild 2.0

cd /usr/local/directadmin
mv custombuild custombuild-01
wget http://files.directadmin.com/services/custombuild/2.0/custombuild.tar.gz
tar xvzf custombuild.tar.gz
cd custombuild
./build

Setup options.conf: Change PHP version to 5.5 (5.5 is stable, if your setup works with 5.3, it will likely work with 5.5), Apache to 2.4, and mysql to 5.6 (plus set it to install)

vi options.conf

now change to the following:

Tags: linux server custombuild

MySQL dump all databases via mysqldump -- the proper way

Here's a command that properly dumps all databases, in case you wanted to restore a full backup.

For whatever reason, many sites are using improper characters ( ' –– ' , ' – ' ) to display this mysqldump command line--copy pasting will throw up an error stating something like:


mysqldump: Got error: 1049: Unknown database '??extended-insert' when selecting the database

Here is a sample of wrong characters, which appear just fine, but won't work:


mysqldump ––extended-insert ––all-databases ––add-drop-database ––disable-keys ––flush-privileges ––quick ––routines ––triggers > all-databases.sql

or


mysqldump –extended-insert –all-databases –add-drop-database –disable-keys –flush-privileges –quick –routines –triggers > /root/all-databases.sql

Tags: mysql linux server admin

How to install Apache Solr 3.x for Drupal 7 or Drupal 6

First we'll need to install Java 1.6 JDK, and be on PHP 5.2 or higher (You can check my PHP installation tutorial here. Also I'm on CentOS.

Install Java 1.6 JDK


yum install java-1.6*

Install Apache Solr

We're going to install Apache Solr into /usr/local/share; however you can install it somewhere else if you'd like (e.g. install it in the root dir / )


cd /usr/local/share

Download Apache Solr. We're going to use the latest version at the time of this writing: Apache Solr 3.5. Look for the latest version here: http://www.apache.org/dyn/closer.cgi/lucene/solr/

Tags: Server Drupal linux server apache solr solr

How to install PECL uploadprogress w/ PHP 7 support

Original uploadprogress doesn't seem to be developed any longer, and hence doesn't support PHP 7. However, there's a PHP 7 compatible version we can use:

cd /usr/local/src/
git clone https://github.com/Jan-E/uploadprogress.git
cd uploadprogress
phpize
./configure
make
make install

Now add the extension to your php.ini

vi /usr/local/lib/php.ini

Add the following to your extensions section:

extension=uploadprogress.so

Restart apache

service httpd restart

Here are additional steps you may need to take: https://www.drupal.org/node/2718253#comment-11159883

Or if you are using PHP 5.X:

Tags: Drupal linux server media

New Server Checklist for directadmin (2009)

-Add all your ips in directadmin under "IP management"
(and assign 2 ips to admin)
http://xx.xxx.xxx.xxx:2222/CMD_IP_MANAGER

-Register nameserver at registrar
(namecheap.com is my fav; networksolution.com is the worst for this... it's not longer an option you can click on the website, you have to send an email request for this)

-Add nameservers to server:
1. go to user level, and add the new domain you registered (leave default settings, and tweak them after)
2. go back to reseller level, and click "nameserver" and select 2 ips you want to use and click "create" then set the 2 new nameservers for "Set the Nameservers that will be assigned to new users" (it should be added by default)

-Share nameserver ips (so you're able to add other domains to them):

Tags: Server howto linux server