Tag Archives for " debian "

How to resize root partition without losing data

I signed up for a promotion with my VPS vendor for a one-time fee for a permanent increase in available space. The change was made on the provider’s side – now I had to make changes on my side.
Of course the question arose how to do it, so as not to reinstall the system and not to lose data. And to keep potential VPS downtime as low as possible.
So how did I do it?
As a reminder: my system is Debian 9, ALWAYS do backup and you do it on your own responsibility.

Continue reading

DirectAdmin recursive set “proper” permission for files and folders

You must use console and type for all users files and folders:

find /home/*/domains/*/public_html -type f -exec chmod 644 {} \;
 find /home/*/domains/*/public_html -type d -exec chmod 755 {} \; 

If you want use only for specified directory just change patt pattern…

Have good day 🙂

Installing latest stable Git on Debian 6.0

I want install on my Debian 6 git. Apt-get install git give me old version. So, step by step to install latest stable git version on Debian:

apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev
wget https://www.kernel.org/pub/software/scm/git/git-1.8.4.1.tar.gz
tar -zxf git-1.8.4.1.tar.gz
cd git-1.8.4.1
make prefix=/usr/local all
make prefix=/usr/local install

Ups…. result make:

LINK git-credential-store
libgit.a(utf8.o): In function `reencode_string_iconv':
/root/git-1.8.4.1/utf8.c:530: undefined reference to `libiconv'
libgit.a(utf8.o): In function `reencode_string_len':
/root/git-1.8.4.1/utf8.c:569: undefined reference to `libiconv_open'
/root/git-1.8.4.1/utf8.c:588: undefined reference to `libiconv_close'
/root/git-1.8.4.1/utf8.c:582: undefined reference to `libiconv_open'
collect2: ld returned 1 exit status
make: *** [git-credential-store] Error 1

So download and compile necessary library libiconv:

wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
tar -zxvf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/local/libiconv
make
make install

and repeat make, make install from beginning…That’s all!

Have a nice day 🙂

How to install ImageMagick and php extension Imagick on Debian 6.0 + DirectAdmin?

After few months I want to install ImageMagick and Imagick on new server and again digging how to do this. To avoid this next time I wrote those post.

My config is: Debian 6.0, OpenVZ, DirectAdmin, php as php-fpm.

So, first install ImageMagick:Continue reading

New install DirectAdmin on Debian 6.0 x64 OpenVZ, Spam Assassin, CSF and other – my notes

After another install DirectAdmin on VPS and loosing time to search in many place information how to do this or that I wrote this few notes to keep steps in one place. Maybe it will be useful for you. My system was Debian 6.0 x64, VPS on OpenVZ.Continue reading

How to block brute force attack automatically in DirectAdmin?

In modern version of DirectAdmin is Brute Force Monitor. Doing good job, make alert when brute force attack is carried out. But you must eventually manually block IP, from whose attack is coming.

Of course there are ways to make it automatic. I assume your server use CSF + LFD installed and working. In other cases particular script should looks different.Continue reading

Debian install php_intl problem configure: error: Unable to detect ICU prefix

Problem with install php_intl on Debian?

Get: configure: error: Unable to detect ICU prefix or /usr/local/icu/bin/icu-config failed. Please verify ICU install prefix and make sure icu-config works.?

Easy solution – just:

apt-get install libicu-dev

PHP Warning: PHP Startup: apc: Unable to initialize module Module compiled with module API=20060613 PHP compiled with module API=20090626

Did you see that?

PHP Warning:  PHP Startup: apc: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0

It may happen with other pecl modules because those mostly was compiled for php 5.2.

My configuration DirectAdmin, Debian 5

Solution?Continue reading

Imagick install error: “configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.”

Simple solution:

aptitude install php-pear imagemagick php5-dev libmagick9-dev

libmagick9-dev – this remove all trouble from “configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.”.Continue reading

How to resolve: This build of “eAccelerator” was compiled for PHP version 5.2.14-0.dotdeb.0.

System: Debian Lenny 5.0, DirectAdmin, after successfully update php to 5.2.14 after download and comile from source eaccelerator and test by php -v I got:

This build of “eAccelerator” was compiled for PHP version 5.2.14-0.dotdeb.0. Rebuild it for your PHP version (5.2.14) or download precompiled binaries.

Bad news because actually I`ve PHP in version 5.2.14! After some research I have solutions.

UPDATE:

/usr/local/php5/bin/phpize

./configure --enable-eaccelerator=shared --with-php-config=/usr/local/php5/bin/php-config

make

make install

in my case I must move compiled eaccelerator file from  /usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/eaccelerator.so to php extension dir /usr/lib/php5/20060613+lfs/. (update: easier and more logical it is change extension_dir in php.ini)

Have a nice day 🙂