Category Archives: Hosting

dpkg: error processing mysql-server-5.5 (–configure):

If you trying install mysql on fresh Debian VPS (OpenVZ template):

Stopping MySQL database server: mysqld.
/var/lib/dpkg/info/mysql-server-5.5.postinst: line 146: logger: command not found
ATTENTION: An error has occured. More info is in the syslog!
/var/lib/dpkg/info/mysql-server-5.5.postinst: line 236: logger: command not found
dpkg: error processing mysql-server-5.5 (–configure):
subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.5; however:
Package mysql-server-5.5 is not configured yet.

Quick fix:

apt-get install bsdutils

also you can get such errors:

dpkg: error processing mysql-server (–configure):
dependency problems – leaving unconfigured
Errors were encountered while processing:
mysql-server-5.5
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Ruby on Rails 3 and Ruby 1.9 on cPanel

bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel source "$HOME/.rvm/scripts/rvm" echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc

rvm install 1.9.2
rvm –default 1.9.2

gem install bundler
gem install passenger
passenger-install-apache2-module

vi /usr/local/apache/conf/includes/pre_main_global.conf
LoadModule passenger_module /home/ruby/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
PassengerRoot /home/ruby/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.11
PassengerRuby /home/ruby/.rvm/wrappers/ruby-1.9.2-p290/ruby
PassengerResolveSymlinksInDocumentRoot on

cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak-modrails
/usr/local/cpanel/bin/apache_conf_distiller –update
/scripts/rebuildhttpdconf
/etc/init.d/httpd restart

chmod ugo+x ~
chmod ugo+rX -R ~/.rvm

Using Rails apps:
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) source "$HOME/.rvm/scripts/rvm" echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
rvm install 1.9.2
rvm –default 1.9.2
gem install rails

rails new hello_world

Gems to the vendor/ directory:
bundle install –deployment
bundle install –path vendor/bundle

Pointing a site to Rails:
mv ~/public_html ~/public_html.bak
ln -s ~/hello_world/public ~/public_html
alternatively you can put Rails into a subdirectory (or subdomain, add-on domain, etc.):
ln -s ~/hello_world/public ~/public_html/hello-world

environments:
export RAILS_ENV=production
echo “export RAILS_ENV=production” >> ~/.bashrc
rake assets:precompile
touch tmp/restart.txt

author of that instructions is Dave James Miller

Ioncube encode

ioncube_encoder5 /projects/myproject –into /encoded-projects
ioncube_encoder5 –with-license key.php –passphrase yourpassphrasehere /projects/myproject –into /encoded-projects

with make_license:

./make_license –passphrase yourpassphrasehere –header-line ‘‘ –property “UserName=’Chuck Norris'”
or
/make_license –passphrase yourpassphrasehere –header-line ‘‘ \
–property “UserName=’Chuck Norris'” –allowed-server example.com,www.example.com