Skip to main content

Posts

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu

About LAMP LAMP stack is a group of open source software used to get web servers up and running. The acronym stands for Linux, Apache, MySQL, and PHP. Since the linux server is already running Ubuntu, the linux part is taken care of. Here is how to install the rest. Set Up The steps in this tutorial require the user to have root privileges on your linux server. You can see how to set that up in the   Initial Server Setup   in steps 3 and 4.   Step One—Install Apache Apache is a free open source software which runs over 50% of the world’s web servers. To install apache, open terminal and type in these commands: # sudo apt-get update # sudo apt-get install apache2 That’s it. To check if Apache is installed, direct your browser to your server’s IP address (eg. http://12.34.56.789). The page should display the words “It works!" How to Find your Server’s IP address You can run the following command to reveal your server’s IP address. # ifconfig...

Steps to follow after Linux Server installation

The Basics When you first begin to access your fresh new server, there are a few early steps you should take to make it more secure. Some of the first tasks required on a linux server can include setting up a new user, providing them with the proper privileges, and configuring SSH.   Step One—Root Login Once you know your IP address and root password, login as the main user, root. It is not encouraged to use root on a linux server on a regular basis, and this tutorial will help you set up an alternative user to login with permanently. # ssh root@123.45.67.890 The terminal will show: The authenticity of host '69.55.55.20 (69.55.55.20)' can't be established. ECDSA key fingerprint is 79:95:46:1a:ab:37:11:8e:86:54:36:38:bb:3c:fa:c0. Are you sure you want to continue connecting (yes/no)? Go ahead and type yes, and then enter your root password. Step Two—Change Your Password Currently your root password is the default one that was sent to you...

How To Install DenyHosts on Linux

About DenyHosts DenyHosts is a security tool written in python that monitors server access logs to prevent brute force attacks on a linux server. The program works by banning IP addresses that exceed a certain number of failed login attempts.   Step One—Install Deny Hosts DenyHosts is very easy to install on Ubuntu #  apt-get install denyhosts On RHEL/Centos: We need   epel repo   to install fail2ban on RHEL/Centos based machines. So, download the rpm:- # wget   http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm and, then install # yum install denyhosts Once the program has finished downloading, denyhosts is installed and configured on your linux server.   Step Two—Whitelist IP Addresses After you install DenyHosts, make sure to whitelist your own IP address. Skipping this step will put you at risk of locking yourself out of your own machine.   Open up the list of allowed hosts al...

How To Protect SSH with fail2ban on Linux Machines

About Fail2Ban Servers do not exist in isolation and those linux servers with only the most basic SSH configuration can be vulnerable to brute force attacks. fail2ban provides a way to automatically protect linux servers from malicious behavior. The program works by scanning through log files and reacting to offending actions such as repeated failed login attempts.   Step One—Install Fail2Ban On ubuntu/Debian # apt-get install fail2ban On RHEL/Centos We need epel repo to install fail2ban on RHEL/Centos based machines. So, download the rpm:- # wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm and, then install fail2ban # yum install fail2ban Step Two—Copy the Configuration File The default fail2ban configuration file is location at /etc/fail2ban/jail.conf. The configuration work should not be done in that file, however, and we should instead make a local copy of it. # cp /etc/fail2ban/jail.conf /etc/fail...