Install Debian Jessie

Posted on by admin
Install Debian Jessie Average ratng: 7,1/10 7476 reviews

One of the most important thing to set up a Linux server is for the purposes of deploying a website(s). According to NetCraft.com’s February 2016 survey of the 1 million busiest websites in the world, roughly 49.90% of them run on Apache.

Apr 15, 2016  In this tutorial, I’m going to show you how to install docker on Debian 8 Jessie server. The Linux version of Docker is split into docker-engine and docker-compose. Docker supports 64 bit system with Linux kernel 3.10+. To check whether your Debian system is 32 bit or 64 bit, use uname. Debian Releases / Debian “jessie” Release Information / Debian “jessie” Installation Information. Installing Debian 8.11. To install Debian 8.11 (jessie), download any of the following images (all i386 and amd64 CD/DVD images can be used on USB sticks too): netinst CD image (generally 150-280 MB).

This tutorial will walk through the basics of installing and configuring a Linux server (specifically Debian 8 Jessie) to function as a LAMP server.

What is LAMP Sever?

In the computing world LAMP acronym for Linux (Here using Debian 8), Apache, MySQL and PHP (LAMP).

LAMP commonly used to reference software stack (specifically MySQL and PHP) on a web server.

Before diving into the configuration aspects, it is important to know about Apache web server.

What is Apache?

Apache was one of the “original” web servers and traces its beginnings back to 1995. Apache is still widely used today and benefits from longevity, high amounts of documentation, and tons of modules to add flexibility.

Installing and Configuring a MySQL and PHP

1. This first portion will describe Debian as a MySQL, and PHP server. The Linux segment of the LAMP should already be done by installing Debian 8 by following article on TecMint:

Once Debian is ready, now its time to install necessary software using the ‘apt‘ meta-packager.

During the installation operation, the system may ask you to set a MySQL root user password.

2. After MySQL and PHP installation finishes, it is often recommended to secure MySQL installation using mysql_secure_installation utility.

Once you execute the below command, it will ask the user to remove things such as anonymous users, test databases, and remove remote root user login to the SQL database.

Since we already set MySQL root password during MySQL installation, so, just enter that password to make any changes.

MySQL Secure Installation

3. The next set of questions will be in regards to remove anonymous users, the ‘test‘ database, and remove remote root access to the database.

4. Now that MySQL is configured, let’s move ahead to make some PHP basic settings for this particular server. While there are bunch of settings that can be configured for PHP, but we will do few basic ones that mostly always needed.

Open php configuration file is located at /etc/php5/apache2/php.ini.

Now search for the string “memory_limit” and increase the limit as per your application needs.

Another important setting to check is the “max_execution_time” and again by default it will be set to 30. If an application require more this setting can be changed.

At this point, MySQL and PHP5 are ready to start hosting sites. Now it is time to configure Apache2.

Installing and Configuring Apache2

6. Now it’s time to configure Apache 2 to finish the configuration of the a LAMP server. The first step to configuring Apache2 is to actually install the software using the apt meta-packager.

This will install all the necessary files and dependencies for Apache2. Once installed, the Apache web server will be up and serving a default web page. There are several ways to confirm that the Apache web server is up and running. The easiest option is to use the lsof utility:

The other option is to simply navigate to the IP address of the web server. Assuming a default installation of Debian, the system will likely be setup to use DHCP to obtain an IP address automatically. To determine the IP address of the server, one of two utilities can be used. Either utility will work in this situation.

Check IP Address

Regardless of which utility used, the IP address obtained can be entered into a web browser on a computer on the same network to confirm that Apache is displaying the default page.

At this point Apache is up and running. While the Debian default page is a flashy website, most users will want to host something custom. The next steps will walk through setting up Apache 2 to host a different website.

7. Debian has packaged some useful utilities for managing both sites and modules. Before walking through how to use these utilities, it is important to understand the functions they serve.

  1. a2ensite: This utility is used to enable a website after the appropriate configuration file has been created.
  2. a2dissite: This utility is used to disable a website by specifying the website’s configuration file.
  3. a2enmod: This utility is used to enable extra Apache2 modules.
  4. a2dismod: This utility is used to disable extra Apache2 modules.
  5. a2query: This utility can be used to gather information about sites currently enabled.

First of let’s gather some experience with the first two. Since Apache 2 is currently hosting the ‘default webpage‘ let’s go ahead and disable it with a2dissite.

Disable Default Apache Page

This command will disable the default apache website seen in the above screenshot. However, in order for any changes to take effect, the Apache 2 configuration must be reloaded.

This command will instruct Apache 2 to update the enabled/disabled sites that it is currently hosting. This can be confirmed by attempting to connect to the web server’s IP address again and noticing that nothing is displayed (some computers will cache information, if the machine still shows the default website after the previous two commands are run, try clearing out the web-browsers cache). Another option to confirm that the site is no longer enabled is to use the a2query utility.

There is a lot going on in this screen-shot so let’s break things down. The green box above is a2query -s which instructs Apache 2 to state what sites are currently being served.

The yellow box is a2dissite 000-default.conf followed by service apache2 reload. These two command instruct Apache 2 to disable the default site and then reload the active/inactive sites.

The red box is a2query -s being issued again but notice that this time Apache responds back that nothing is being served. Lets walk through creating a non-default site now. The first step is to switch to the Apache 2 configuration directory which is /etc/apache2 using the cd utility.

There are several important files and directories in this directory, however for brevity’s sake only the necessities will be covered here. The first thing to do when setting up a new site is to create a new configuration file in the ‘sites-available‘ directory. Change directories into the ‘sites-available‘ directory and then create a new configuration file.

This will copy the configuration from the default site into the new site configuration file for further modification. Open the new site configuration page with a text editor.

Within this file there is one very important line for getting a website hosted, that line is the ‘DocumentRoot‘ line. This line tells Apache where the necessary web files are that it should serve when requests come in for particular resources. For now this line will be set to a directory that doesn’t exist but will shortly and will contain a simple website for this Debian server to display.

Apache New Site Configuration

Save the changes to this file and exit the text editor. Now the directory that Apache 2 was just told to serve files from needs to be created and populated with files. While this article will work HTML files, there isn’t possibly enough time to walk through how to create a full functioning website and leaves that process to the reader. So lets create the directory for apache to serve and add a basic html webpage to it called ‘index.html‘.

The above commands will create a new directory called ‘tecmint‘ as well as a new file called ‘index.html‘ in the tecmint directory.

The echo command will place some text into that file so that it will actually display something in the web browser when Apache serves the website.

Note: The page created for this tutorial by the author will display differently! Now using the commands previously discussed, Apache needs to be told to serve this new html document.

The last command above will simply confirm that Apache2 is indeed serving the newly created website. At this point, navigate a web-browser to the server’s IP address again and see if the newly created web-site is being displayed (again computers like to cache data and as such, several refreshes may be necessary to get the new webpage).

If the newly created “It’s ALIVE!!!” site is showing up, then Apache 2 has been successfully configured and is displaying the website. Congratulations! While this is a simple setup that prepares a Linux LAMP server to host a site, there are far more complex things that can be done and the configuration depends greatly on that end goal.

Share
Active2 years, 3 months ago

Despite trying both the official installation mechanism using the new apt repo described here, as well as the curl -fsSL https://get.docker.com/ sh route, I still get E: Unable to locate package docker-engine from APT when I try to apt-get install docker-engine.

My versions are:

The only file in my /etc/apt/sources.list.d is docker.list which contains:

apt-cache policy docker-engine doesn't find it either:

How might I resolve this?

DebianAlexAlex
5,4104 gold badges38 silver badges65 bronze badges

4 Answers

Edit your sources.list and change the following line from:

to

Update and install docker:

Edit

To install a specific version of docker-engine download the .deb package from here, e,g the latest one is docker-engine_1.9.1-0~jessie_amd64.deb:

Maybe you will get an error , to fix it run:

Transmissionitinance
5,2932 gold badges33 silver badges65 bronze badges
GAD3RGAD3R
2,3901 gold badge12 silver badges29 bronze badges
Jessie

Your dpkg architecture is probably using 32bit. You can check this using:

Fix it by adding amd64 as a foreign architecture:

Update your package lists and check for docker-engine:

Source: https://wiki.debian.org/Multiarch/HOWTO

Mark HoekMark Hoek

Login as root user

Create this file if it does not exist:

Add this as content of your backports.list

Now perform your apt-get update

Install the CA certificates

Add the new GPG key

Now open /etc/apt/sources.list.d/docker.list (or create when it does not exist)

Add as content:

Perform again your update:

Verify that APT is pulling from the right repository.

Update again

Install Docker:

Start the docker daemon.

Verify docker is installed correctly.

lvthillolvthillo
11.9k7 gold badges52 silver badges79 bronze badges

Hi guys I faced the same problem and recently found a script automated the docker installation process in debian 8. You could see the snippet here (https://gist.github.com/frgomes/a6f889583860f5b330c06c8b46fa0f42). Credit goes to the original script creator.

I add this on line 4 to removed older versions of Docker if it were existed:

and few line on line 7:

Debian Jessie Install Gnome Desktop

Then as superuser:

Debian Jessie Packages

And you get latest docker instead of v 1.5-1:

geomarsgeomars

Not the answer you're looking for? Browse other questions tagged dockerdebiandocker-engine or ask your own question.