stress test your web server with httperf

Httperf is a tool for measuring web server performance. It provides a flexible facility for generating various HTTP workloads and for measuring server performance.

NOTE : for accurate results, it’s best to run httperf from a remote machine and not from the localhost

to install httperf in red-hat based distributions (additional repo are needed. For centos you’ll need rpmforge, see here for installation)

yum install httperf

or in debian based

apt-get install httperf

An example of httperf stress test Continue reading “stress test your web server with httperf” »

Share

Enable root logins using ssh in Debian 8.0

By default you can no longer login using ssh as root with just a password since it is more secure to use a pre-shared key. However, you can you can still enable root logins using password authentication.

To do this you need to edit the ssh config file ‘/etc/ssh/sshd_config/sshd_config’ as root.

# vi /etc/ssh/sshd_config

Then find the entry in the Authentication section of the file that says ‘PermitRootLogin’ and change ‘without-password’ to ‘yes’. Continue reading “Enable root logins using ssh in Debian 8.0” »

Share

Add Linux machine on LibreNMS

Install SNMPD first

SNMPd is not installed by default. You must first install snmpd.

apt-get update
apt-get install snmpd lsb -y

Backup default snmp.conf file on the ‘/etc/snmp/’ directory and copy new one from the librenms directory.

mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.asli
cp /opt/librenms/snmpd.conf.example /etc/snmp/snmpd.conf

or instead copy-paste below snmpd text Continue reading “Add Linux machine on LibreNMS” »

Share

Perfect Backup MX using Postfix

This is quite simple, and with a very simple setup, and does not require that much, since we do not need to send out e-mails from clients from this server, or use ASMTP. I find that MySQL is not needed here, but could be used. I will use normal flat files, since the number of domains to run a backup for is most likely a rather small number. 

This setup can be editet to run all times of different checks, antivirus etc.  Normally you would make sure that the setup is exactly the same on both the primary MTA, and the backup. It hardenens the systems, and should reduce spam, and unwanted traffic. Create public DNS entries. Remember to create an MX record with an lower priority than the primary mail server, or else this will not work! 

Example:example.com. 43200 IN MX 10 mail.example.com.
example.com. 43200 IN MX 20 backup.example.com.

After this these two records are created with A records pointing to different IPs (different servers).  Continue reading “Perfect Backup MX using Postfix” »

Share

Installing Certbot on Debian 8

root@server:~# cat /etc/apt/sources.list

deb http://ftp.de.debian.org/debian/ jessie main
deb-src http://ftp.de.debian.org/debian/ jessie main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

deb http://ftp.de.debian.org/debian/ jessie-updates main
deb-src http://ftp.de.debian.org/debian/ jessie-updates main

deb http://ftp.debian.org/debian jessie-backports main

Continue reading “Installing Certbot on Debian 8” »

Share

Apache Virtual Hosts on Debian 7

Virtual Hosts are used to run more than one domain off of a single IP address. This is especially useful to people who need to run several sites off of one virtual private server– each will display different information to the visitors, depending on which website the user is accessing.There is no limit to the number of virtual hosts that can be added to a VPS.

Set Up
The steps in this tutorial require the user to have root privileges. You can see how to set that up in the Initial Server Setup. Choose whichever username you fancy.

Additionally, you need to have apache already installed and running on your virtual server. If you haven’t already done so, use the following command:

sudo apt-get install apache2

Continue reading “Apache Virtual Hosts on Debian 7” »

Share

Install PSiTransfer on Debian 8 A Simple Open Source Self-hosted File Sharing Solution

PSiTransfer, which is a simple and open source file sharing utility. Using PSiTransfer, we can either share our files locally or globally. Unlike transfer.sh, it is not a website. It is actually a self-hosted file sharing platform. You can deploy it on home system to share files over local area network. Or, you can deploy it on a VPS or Cloud, so that you can access or share your files from anywhere, using any Internet-enabled device. Since, it comes with built-in web server, you don’t need to deploy any other extra software. All you need is a web browser to access or share your stuffs. Continue reading “Install PSiTransfer on Debian 8 A Simple Open Source Self-hosted File Sharing Solution” »

Share

Simple way to tune apache performance using mpm prefork module

There could be many reasons why your website performance is poor, one of them can possibly be that Apache is not coping with the load. Below you’ll find ready to consume configuration to make Apache performance better using the Apache MPM prefork module.

To do this, just include the below lines into your httpd.conf apache configuration file:

<IfModule mpm_prefork_module>
 StartServers 2
 MinSpareServers 2
 MaxSpareServers 5
 MaxClients 200 #must be customized
 ServerLimit 200 #must be customized
 MaxRequestsPerChild 100
 </IfModule>

KeepAlive Off

Some explanations are here:

Continue reading “Simple way to tune apache performance using mpm prefork module” »

Share

Install And Configure Varnish Cache With Apache On Debian 7

Varnish Cache is a web accelerator, sometimes referred to as a HTTP accelerator or a reverse HTTP proxy, that will significantly enhance your web performance.

Varnish speeds up a website by storing a copy of the page served by the web server the first time a user visits that page. The next time a user requests the same page, Varnish will serve the copy instead of requesting the page from the web server.

This means that your web server needs to handle less traffic and your website’s performance and scalability go through the roof. Varnish cache will increase the delivery of your web content by 80 % or more, depending on your architecture. Continue reading “Install And Configure Varnish Cache With Apache On Debian 7” »

Share

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