How to correctly install wkhtmltopdf on debian 64 bit?

Ubuntu and Debian packages are compatible most times but not in all cases, i think this is the trouble you’re having you’re trying to use the Ubuntu’s .deb for Debian instead you should get the Debian specific file, (it works for both jessie and wheezy)

wget http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-wheezy-amd64.deb
sudo dpkg -i wkhtmltox-0.12.1_linux-wheezy-amd64.deb

Then in the /etc/init.d/openerp-server or /etc/init.d/odoo-server script(s), depending on your which one you have

add /usr/local/bin to the front of path environment variable for example,

PATH=/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin,

This tells odoo where to look for system binaries it requires or optionally you can copy the files to /usr/bin, if you don’t want to mess with those files

sudo cp /usr/local/bin/wkhtmlto* /usr/bin/

Src: http://stackoverflow.com/questions/38262173/how-to-correctly-install-wkhtmltopdf-on-debian-64-bit

Share

LHMP- Linux Haiwatha Mysql PHP simplistic new breed!!

hiawathaStep 1 – Setup repository for pre-compiled Hiawatha Debian binaries

The first thing you’ll need to do is to setup the repository for Hiawatha Webserver. You may also compile it on your own if you wish, but for this tutorial we’ll be using the pre-compiled binaries.

First, get and install the repository’s public key:

apt-key adv --recv-keys --keyserver keys.gnupg.net 79AF54A9

Open up and edit sources.list with:

nano /etc/apt/sources.list

Add the following to sources.list:

deb http://mirror.tuxhelp.org/debian/ squeeze main

Save the changes that you have made, then exit.

Read more

Share

Postfix using Gmail as a Mail Relay with Debian 7

Prerequisites

Before starting this tutorial, you should have:

  • Debian 7 installed
  • Your fully qualified domain name (FQDN)
  • All updates installed :
apt-get update

A valid username and password for the SMTP mail provider, such as Mandrill, or SendGrid
Make sure the libsasl2-modules package is installed and up to date:

apt-get install libsasl2-modules

Read more

Share

Remove apache, phpmyadmin etc from ubuntu 16.04

You can remove the packages in Ubuntu by executing the commands:

dpkg --purge phpmyadmin
dpkg --purge mysql-server
dpkg --purge apache2.2-common

Or

You have option also to remove the following packages:

sudo apt-get remove apache2*
sudo apt-get remove phpmyadmin 
sudo apt-get remove mysql-server
sudo apt-get remove php5

Or

sudo apt-get --purge apache2*
sudo apt-get --purge phpmyadmin 
sudo apt-get --purge mysql-server
sudo apt-get --purge php5
Share

Installing SqlMap in Ubuntu / any Linux distro for SQL Injection

SQLMAP is a automated SQL injection tool which does most of the work for you. If you don’t know what SQL injection is head over here: https://en.wikipedia.org/wiki/SQL_injection

Using SQLMAP, you can “hack” many databases in very short time. In the next post, i will show you how to dump database tables and credentials from a vulnerable database and explore.

Even if the passwords are stored using hashing functions ( https://en.wikipedia.org/wiki/Hash_function ), you can crack these hashes using online tools.

Here is the complete video guide for installation:

Read more

Share

Increase MySQL connections max_connections

If you need to increase MySQL Connections without MySQL restart do like below

mysql> show variables like 'max_connections';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 100 |
+-----------------+-------+
1 row in set (0.00 sec)

mysql> SET GLOBAL max_connections = 150;
Query OK, 0 rows affected (0.00 sec)

mysql> show variables like 'max_connections';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 150 |
+-----------------+-------+
1 row in set (0.00 sec)
These settings will change at MySQL Restart.

For permanent changes add below line in my.cnf and restart MySQL

max_connections = 150
Share

Fixing error: ‘Access denied for user ‘debian-sys-maint’@’localhost’ (using password: YES)’

For all you Ubuntu/MySQL developers out there, have you ever seen the following?

neo@thematrix:~$ sudo /etc/init.d/mysql restart
* Stopping MySQL database server mysqld [fail]
* Starting MySQL database server mysqld [ OK ]
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'

So, what is this “debian-sys-maint” user?  Well, this MySQL user is created for the Ubuntu to be able to start/stop the database and to carry out other maintenance operations.

Sounds well enough, but then why do I keep running into the “access denied” problem for this user?  Well, the issue is that with each update to MySQL, the user’s password in the database is overwritten.  Ubuntu seems to go to the file /etc/mysql/debian.cnf in order to find this user’s password, but obviously the password is out of sync after the update has been applied.

As a result of this behaviour, I’ll run into the “access denied” problem every so often.  Thankfully, the solution to this issue is fairly simple.

Read more

Share