you can install the phpredis extension from the Ubuntu respositories.
First, if you don’t have it installed already, let’s install Redis:
sudo apt-get install redis-server
After we get Redis installed (and/or verified that it was installed), we can install the PHP module for Redis:
sudo apt-get install php5-redis
After the module is done installing, you will want to restart your webserver and/or process manager (php-fpm, spawncgi, et cetera). Once you’ve restarted, you can check phpinfo() for a new section labeled Redis.
On Ubuntu 14.x System, you may try:
Install Redis 2.8.9
sudo apt-add-repository ppa:chris-lea/redis-server
sudo apt-get update
sudo apt-get install redis-server
Remove Redis 2.8.9
sudo apt-get purge--auto-remove redis-server
We are going to install the latest version of varnish which is 5.2 at the time of writing. In order to install the latest version, we have to download the source and compile it. You have to install some dependencies to compile the Varnish:
apt-get install make automake autotools-dev libedit-dev libjemalloc-dev libncurses-dev libpcre3-dev libtool pkg-config python-docutils python-sphinx
Now you can download the Varnish from the repository:
You can also download and install other release from here:
Extract the “tar.gz” file with the command below:
tar xvzf varnish-5.*.tar.gz
Switch to the extracted directory and start compiling: Continue reading “Install Varnish on Debian 8” »
Step 1 — Creating the Directory Structure
The first step that we are going to take is to make a directory structure that will hold the site data that we will be serving to visitors.
Our document root, the top-level directory that Apache looks at to find content to serve, will be set to individual directories under the /var/www directory. We will create a directory for each of the virtual hosts we’ll configure.
Within each of these directories, we’ll create a folder called public_html that will hold the web pages we want to serve. This gives us a little more flexibility in how we deploy more complex web applications in the future; the public_html folder will hold web content we want to serve, and the parent folder can hold scripts or application code to support web content.
Create the directories using the following commands:
sudo mkdir -p /var/www/example.com/public_html
sudo mkdir -p /var/www/test.com/public_html
Since we created the directories with sudo, they are owned by our root user. If we want our regular user to be able to modify files in our web directories, we change the ownership, like this: Continue reading “Apache Virtual Hosts on Debian 8” »
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” »
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” »
Install SNMPD first
SNMPd is not installed by default. You must first install snmpd.
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” »
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” »
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” »
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.
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” »
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” »