Close

How to Easily Remove Old Kernels in Ubuntu 16.04

For LVM, encrypted, or limited-storage systems, you need to regularly remove old kernels to prevent your computer (/boot partition) from running out of storage space.

Removing old kernels is easy. You can do it manually, or set unattended-upgrades to do it automatically. For details, open terminal from App Launcher or via Ctrl+Alt+T shortcut keys, and follow the steps below:

Remove Automatically Installed Kernels:

1. To remove the kernels that were automatically installed via regular system updates, open terminal and run:

sudo apt autoremove --purge

It will ask you to type in user password and then remove old kernels as well as other automatically installed packages that are no longer needed.

2. To enable automatic removing of old kernels:

Enable Kernel autoremoving may cause problems if your package management is broken, see this bug.

 

  • Run command to enable unattended upgrades. For Desktop Ubuntu 16.04, this is enabled by default.
    sudo dpkg-reconfigure unattended-upgrades
  • Edit the config file via command (first install gksu via sudo apt install gksu):
    gksudo gedit /etc/apt/apt.conf.d/50unattended-upgrades

 

When the file opens, uncomment the following line and change the value to true:

//Unattended-Upgrade::Remove-Unused-Dependencies "false";

So it looks like:

Remove Manually Installed Kernels:

If you install latest kernels from Kernel PPA, or build your own kernels with patches, a “purge-old-kernels” script is the best and the easiest way to remove old kernels.

1. The script is maintained in byobu package, so first install it via:

sudo apt install byobu

2. Then run the script regularly to remove old kernels:

sudo purge-old-kernels

Remove Old Kernels via DPKG

If your /boot partition has already full while doing an upgrade or package install, and apt (the script above uses apt) can’t remove packages due to broken dependency, here you can manually find out the old kernel packages and remove them via DPKG:

1. Run command to check out current kernel and DON’T REMOVE it:

uname -r

2. List all kernels excluding the current booted:

dpkg -l | tail -n +6 | grep -E 'linux-image-[0-9]+' | grep -Fv $(uname -r)

Example output:

rc  linux-image-4.4.0-15-generic               4.4.0-15.31                                         amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-18-generic               4.4.0-18.34                                         amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc  linux-image-4.6.0-040600rc3-generic        4.6.0-040600rc3.201604120934                        amd64        Linux kernel image for version 4.6.0 on 64 bit x86 SMP

There will be three status in the listed kernel images:

  • rc: means it has already been removed.
  • ii: means installed, eligible for removal.
  • iU: DON’T REMOVE. It means not installed, but queued for install in apt.

3. Remove old kernel images in status ii, it’s “linux-image-4.4.0-18-generic” in the example above:

sudo dpkg --purge linux-image-4.4.0-18-generic

If the command fails, remove the dependency packages that the output tells you via sudo dpkg --purge PACKAGE.

And also try to remove the respective header and common header packages (Don’t worry if the command fails):

sudo dpkg --purge linux-image-4.4.0-18-header linux-image-4.4.0-18

Finally you may fix the apt broken dependency via command:

sudo apt -f install

Source: http://ubuntuhandbook.org/index.php/2016/05/remove-old-kernels-ubuntu-16-04/
Advertisements

How To Install & Configure OTRS Help Desk Ticketing System On Linux (Centos 7, RedHat)

Every company maintains the ticketing system to track user request. Ticketing tool is one of the essential application in the IT industry.

You can find a lot of ticketing tools in the market and each one has their own unique features. Wide range of options are available to choose ticketing system, so you have to pick suitable one for you as per your requirement.

Every company (small level to top level) has manage ticketing systems as per their needs.

Are you looking for good ticketing systems with Free of cost? If yes, then otrs is the best choice for you.

Today we are going to discuss about otrs ticketing system which comes completely free of cost. Also you can find so many free ticketing tools in the market.

What Is OTRS?

OTRS stands for Open-source Ticket Request System is one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management.

OTRS Free package offers wide range of configuration (more than 1,000) possibilities, endless customization and integration possibilities which turning it into a powerful IT service management tool. It supports 38 languages.

Every ticket has the history which shows detailed information about the ticket. It supports multiple agents that allows user to work simultaneously on the tickets. There is no limitation for agents creation and agent can handle “N” of tickets per day.

It allow agent to manage incoming inquiries, complaints, support requests, defect reports, and other communications. Also user can able to merge more than one requests which generated for the same issue.

OTRS was written in Perl programming language and web interface is made more user-friendly by using JavaScript. The web interface itself uses its own templating mechanism called DTL (Dynamic Template Language) to facilitate the display of the systems output data.

Prerequisites for OTRS

Make sure your system should have LAMP setup. If no, don’t worry and refer the following tutorials to install it.

Suggested Read : Install LAMP Stack On CentOS 7 & RHEL 7

# yum install httpd httpd-devel gcc mariadb-server

Also enable EPEL Repository which will install some additional perl modules for OTRS.

# yum install epel-release

Update your system

It’s a good practice to make your system packages up to date. Run the following command as root user.

# yum update

Setup the database for OTRS

OTRS supports different database back-end like MySQL or MariaDB, PostgreSQL or Oracle. MariaDB is the most popular database to deploy OTRS that was suggested by OTRS team.

No need to create a database manually and we can create this later using OTRS web interface. Just configure the following settings.

Modify the following parameter in order to make it suitable for OTRS.

# vi /etc/my.cnf

[mysqld]
max_allowed_packet   = 64M
query_cache_size     = 32M
innodb_log_file_size = 256M

Restart MariaDB service to take this change effect.

# systemctl restart mariadb

Disable SELinux

SELinux stands for Security-Enhanced Linux is a Linux kernel security module which allows users and administrators more control over access control. It gives that extra layer of security to the resources in the system.

Check whether SELinux enabled or disabled using following command.

# sestatus
SELinux status:                 enabled

or

# getenforce
Enabled

If it’s enabled, edit /etc/sysconfig/selinux file and change SELINUX=enabled to SELINUX=disabled and save the file then exit.

# nano /etc/sysconfig/selinux

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enabled - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enabled.
#     enabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

Reboot the system for the changes to take effect.

# shutdown -r now

Download and Install OTRS

Download OTRS rpm file from the OTRS website and install it.

# yum -y install http://ftp.otrs.org/pub/otrs/RPMS/rhel/7/otrs-6.0.3-02.noarch.rpm

Restart Apache web server to load the configuration changes for OTRS.

# systemctl restart httpd

Configure firewall

By default CentOS/RHEL 7 will block all http and https traffic. We need to allow this traffic using following commands.

# firewall-cmd --add-service=http --permanent 
success

# firewall-cmd --add-service=https --permanent
success

# firewall-cmd --reload
success

# systemctl restart firewalld

Check and install additional Perl Modules

Since OTRS written in perl and you may need to install additonal perl modules manually. Run the following command to check what modules you are missing.

# /opt/otrs/bin/otrs.CheckModules.pl

Run the following YUM command to install missing perl modules.

# yum install -y "perl(Crypt::Eksblowfish::Bcrypt)" "perl(DBD::Pg)" "perl(Encode::HanExtra)" "perl(JSON::XS)" "perl(Mail::IMAPClient)" "perl(Authen::NTLM)" "perl(ModPerl::Util)" "perl(Text::CSV_XS)" "perl(YAML::XS)"  

Run the otrs.CheckModules.pl file once again to confirm all the perl modules installed successfully.

# /opt/otrs/bin/otrs.CheckModules.pl
  o Apache::DBI......................ok (v1.12)
  o Apache2::Reload..................ok (v0.13)
  o Archive::Tar.....................ok (v1.92)
  o Archive::Zip.....................ok (v1.30)
  o Crypt::Eksblowfish::Bcrypt.......ok (v0.009)
  o Crypt::SSLeay....................ok (v0.64)
  o Date::Format.....................ok (v2.24)
  o DateTime.........................ok (v1.04)
  o DBI..............................ok (v1.627)
  o DBD::mysql.......................ok (v4.023)
  o DBD::ODBC........................Not installed! (optional - Required to connect to a MS-SQL database.)
  o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.)
  o DBD::Pg..........................ok (v2.19.3)
  o Digest::SHA......................ok (v5.85)
  o Encode::HanExtra.................ok (v0.23)
  o IO::Socket::SSL..................ok (v1.94)
  o JSON::XS.........................ok (v3.01)
  o List::Util::XS...................ok (v1.27)
  o LWP::UserAgent...................ok (v6.26)
  o Mail::IMAPClient.................ok (v3.37)
    o IO::Socket::SSL................ok (v1.94)
    o Authen::SASL...................ok (v2.15)
    o Authen::NTLM...................ok (v1.09)
  o ModPerl::Util....................ok (v2.000010)
  o Net::DNS.........................ok (v0.72)
  o Net::LDAP........................ok (v0.56)
  o Template.........................ok (v2.24)
  o Template::Stash::XS..............ok (undef)
  o Text::CSV_XS.....................ok (v1.00)
  o Time::HiRes......................ok (v1.9725)
  o XML::LibXML......................ok (v2.0018)
  o XML::LibXSLT.....................ok (v1.80)
  o XML::Parser......................ok (v2.41)
  o YAML::XS.........................ok (v0.54)

Configure OTRS using the web installer

Navigate your browser to http://localhost/otrs/installer.pl to Configure OTRS using the web installer.

Follow the instruction and input the required information.

1) Welcome Page : This is welcome screen which will shows about the OTRS offices and click on Next to continue.
2) : Hit Accept License and Continue button to move forward to next step.

3) Database Selection : Choose the database that you want to use with OTRS. I’m going to choose MySQL which is advised by OTRS team. Then click the Next button to continue.

4) Validate Database Credentials : Input the Database Credentials and click Check Database settings to validate the given information. If it’s correct information then you should able to see the message stating that Database check successful otherwise you will get error message.

5) Configure Database : If you are able to connect your database in the above steps. Now, it’s time to create a database, database user and password then click on Next to continue.

6) Database Creation: When you click the Next button in the above steps. Instantly it will create a database and grant privileges then shows Database setup successful.

7) System Settings : Enter all the required information on this page and click on Next to continue.

8) Mail Configuration : Enter the Inbound, Outbound and mail server information on this page and click on Next to continue.

9) Setup Completed: Congratulations! you have completed the OTRS installation. It’s time to play on it.

10) Access OTRS : Navigate your browser to http://localhost/otrs/index.pl to access OTRS.

To login as OTRS administrator, use the root@localhost as username and the generated password by OTRS in the above step.

You can start configure the OTRS system to meet your needs.

11) Kick Start OTRS daemon and watchdog : Make sure you have to kick start OTRS daemon and watchdog by the otrs user.

# su - otrs
$ /opt/otrs/bin/otrs.Daemon.pl start

Manage the OTRS daemon process.

Daemon started

$ /opt/otrs/bin/Cron.sh start
(using /opt/otrs) done

After enabled OTRS daemon & watchdog, your output similar to below.

Source: https://www.2daygeek.com/how-to-install-and-configure-otrs-help-desk-ticketing-system-on-centos-rhel/

Monitoring tools (Free, commercial, Linux, Windows)

Alerting

Alerta

The alerta monitoring system is a tool used to consolidate and de-duplicate alerts from multiple sources for quick ‘at-a-glance’ visualisation. With just one system you can monitor alerts from many other monitoring tools on a single screen.

Cabot

Get alerted when services go down or metrics go crazy.

Monit

Monit is a small Open Source utility for managing and monitoring Unix systems. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations.


Performance Monitoring

Collectd

collectd is a daemon which collects system performance statistics periodically and provides mechanisms to store the values in a variety of ways, for example in RRD files.

Cacti

Cacti is a complete frontend to RRDTool, it stores all of the necessary information to create graphs and populate them with data in a MySQL database. The frontend is completely PHP driven. Along with being able to maintain Graphs, Data Sources, and Round Robin Archives in a database, cacti handles the data gathering. There is also SNMP support for those used to creating traffic graphs with MRTG.

Facette

Time series data visualization and graphing software.

Freeboard

Ridiculously simple dashboards for your devices.

Ganglia

Ganglia is a scalable distributed monitoring system for high-performance computing systems such as clusters and Grids.

Grafana

The leading graph and dashboard builder for visualizing time series metrics. Grafana provides a powerful and elegant way to create, explore, and share dashboards and data with your team and the world. Grafana is most commonly used for visualizing time series data for Internet infrastructure and application analytics but many use it in other domains including industrial sensors, home automation, weather, and process control.

LinuxDash

A simple, low-overhead web dashboard for Linux.

Observium

Observium is a low-maintenance auto-discovering network monitoring platform supporting a wide range of device types, platforms and operating systems including Cisco, Windows, Linux, HP, Juniper, Dell, FreeBSD, Brocade, Netscaler, NetApp and many more. Observium focuses on providing a beautiful and powerful yet simple and intuitive interface to the health and status of your network.

Riemann

Riemann aggregates events from your servers and applications with a powerful stream processing language. Send an email for every exception in your app. Track the latency distribution of your web app. See the top processes on any host, by memory and CPU. Combine statistics from every Riak node in your cluster and forward to Graphite. Track user activity from second to second.

 

Source: https://github.com/firehol/netdata/wiki/Other-monitoring-tools#alerting

How to stop Windows 10 auto updates. Windows 10 software updates install on your device automatically (whether you like it or not), but this guide can help you retake control and decide when to install them.

On Windows 10, you no longer have absolute control over software updates. They’re mandatory, and they download and install automatically to ensure your device stays up to date with the latest security patches and improvements. This approach is convenient for many users, but it’s not one that everyone wants.

If you’re running Windows 10 Pro or higher, it’s possible to retake control and prevent the OS from downloading and installing updates automatically using the Local Group Policy Editor or the Registry.

In this Windows 10 guide, we’ll walk you through the steps to prevent updates from automatically installing on your computer.

How to prevent automatic updates using the Local Group Policy Editor

If you run Windows 10 (Professional, Enterprise, or Education ), you can use the Local Group Policy Editor to quickly change the settings to prevent Windows 10 from automatically downloading and installing updates.

Here’s how to change the Local Group Policy Editor settings:

  1. Use the Windows key + R keyboard shortcut to open the Run command.
  2. Type gpedit.msc and click OK to open the Local Group Policy Editor.
  3. Browse the following path:Computer Configuration\Administrative Templates\Windows Components\Windows Update
  4. On the right side, double-click the Configure Automatic Updates policy.
  5. On the left side, check the Enabled option to enable the policy.
  6. Under Options, you’ll find a number of ways to configure automatic updates, including:
    • 2 – “Notify for download and notify for install.”
    • 3 – “Auto download and notify for install.”
    • 4 – “Auto download and schedule the install.”
    • 5 – “Allow local admin to choose setting.”

    You should select the update option you want to configure. If you select option 4, you can specify exactly when to install new updates. You can also choose to install updates during automatic maintenance, on a particular day and time, and you can even check the option to include other Microsoft product updates when updating the OS.

  7. Click Apply.
  8. Click OK to complete the task.

While you can pick from any of the available options, your best choice is probably 2 – Notify for download and notify for install. This option will not only prevent the OS from downloading updates automatically, which can save you data when using a metered internet connection, but you’ll get a notification when new updates are available.

When new updates are released, you’ll receive a notification in Action Center, but updates won’t download and install until you’re ready and do the following:

  1. Open Settings.
  2. Click on Update & security.
  3. Click on Windows Update.
  4. Click the Download button.
  5. Click the Restart button to complete the task.

How to prevent automatic updates using the Registry

Instead of using the Local Group Policy Editor, you can also change the Windows 10 updates using the Registry.

Important warning: Editing the registry is risky, and it can cause irreversible damage to your installation if you don’t do it correctly. It’s recommended that you make a full backup of your computer before proceeding.

  1. Use the Windows key + R keyboard shortcut to open the Run command.
  2. Type regedit, and click OK to open the Registry.
  3. Browse the following path:HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
  4. Right-click the Windows (folder) key, select New, and then click Key.
  5. Name the new key WindowsUpdate and press Enter.
  6. Right-click the newly created key, select new, and click Key.
  7. Name the new key AU and press Enter.
  8. Inside the newly created key, right-click on the right side, select New, and click on DWORD (32-bit) Value.
  9. Name the new key AUOptions and press Enter.
  10. Double-click the newly created key and change its value using one of the following options:
    • 2 – “Notify for download and notify for install.”
    • 3 – “Auto download and notify for install.”
    • 4 – “Auto download and schedule the install.”
    • 5 – “Allow local admin to choose settings.”

  11. Click OK.
  12. Close the Registry to complete the task.

Although you can use any of these available values, your best choice is to change the value to 2 to configure the “Notify for download and notify for install” option. Using this value prevents Windows 10 from downloading updates automatically, and you’ll get a notification when new updates are available.

After tweaking the Registry, when new updates become available, you’ll receive a notification in Action Center, but updates won’t download and install until you’re ready and do the following:

  1. Open Settings.
  2. Click on Update & security.
  3. Click on Windows Update.
  4. Click the Download button.
  5. Click the Restart button to complete the task.

Wrapping things up

The steps mentioned in this guide are meant to prevent regular updates that patch security vulnerabilities and improve the overall performance of Windows 10. If you’re looking to prevent the OS from installing feature updates, such as the Windows 10 Fall Creators Update, you need to use this guide to defer major updates.

We do not recommend using a computer without the latest updates, because they’re often key to keeping your Windows 10 PC running properly. However, there will be times when you may want to manually apply new updates, when you want to install them during a particular time, or because you want to wait until you’re sure the update will not cause issues.

If you only want to prevent your computer from restarting when you’re actively using it you can configure Active Hours in the Settings app.

More Windows 10 resources

For more help articles, coverage and common questions about Windows 10, check out the following resources:

OR

Stop The Windows Update Service

As central as it is to the core of Windows 10, Windows Update is actually just another Windows process so it can be stopped with these simple steps:

    1. Open the Run command (Win + R), in it type: services.msc and press enter
    2. From the Services list which appears find the Windows Update service and open it
  1. In ‘Startup Type’ (under the ‘General’ tab) change it to ‘Disabled’
  2. Restart

To re-enable Windows Update simply repeat these four steps, but change the Startup Type to ‘Automatic’

Source: https://www.windowscentral.com/how-stop-updates-installing-automatically-windows-10

Safest way to clean up boot partition – Ubuntu 14.04.5 LTS (Trusty Tahr), Ubuntu 16.04.4 LTS (Xenial Xerus) and 18.04 LTS (Bionic Beaver)

Command line method:

First check your kernel version, so you won’t delete the in-use kernel image, running:

uname -r

Now run this command for a list of installed kernels:

dpkg --list 'linux-image*' | grep ^ii

and delete the kernels you don’t want/need anymore by running this:

sudo apt-get remove linux-image-VERSION

Replace VERSION with the version of the kernel you want to remove.

When you’re done removing the older kernels, you can run this to remove ever packages you won’t need anymore:

sudo apt-get autoremove

And finally you can run this to update grub kernel list:

sudo update-grub

Pause/Resume ANY Task in Windows 10 and older

Resource Monitor is an highly useful tool built-in to Windows to monitor the various resource (CPU, Disk) usage of PC. It’s overshadowed by another similar and commonly known tool, Task Manager although some of its features are superior to the latter.

Here’s how you can pause/resume a running task in Windows –

  1. Open up Resource Monitor. You can search for it in the Start or call it by its pet name resmon through Run command (Windows+R) tool. 
  2. Now in the Overview or CPU tab, look for process you want to Pause in the list of running Processes. Image name may be different than the application name. To easily locate your application, look the Description column which will have the application name
  3. Once the process is located, right click on it and select Suspend Process and confirm the Suspension in the next dialog.

Now you have successfully suspended the process or in other words, paused it. It will remain in that state until you Resume it by Right click > Resume process. A process in paused state won’t run and will not use CPU. However, it does consume the same amount of memory as it was at the time of suspension. Paused application will be freezed and you can’t click or do anything with it until you resume it. This works for all applications.Note that this paused state is dynamic. It won’t be retained if the PC is shutdown. As an alternate, you can hibernate the PC in which case, everything will stay as it is.

This trick proves very useful for CPU intensive tasks like video encoding or any other applications which do not come with a Pause option. And before I forget, do not try this trick with any of the Windows processes which can potentially mess up your system.

Epilogue:

The other day, I was encoding a video in HandBrake. Fast-forward an hour, the CPU was so close to becoming nothing more than a roasted chip and there was nothing(almost) I could do about it other than changing the encoding priority (which didn’t help much). And Handbrake doesn’t have a pause button (so much for the popularity). The Stop button looked as if it was mocking at me because pressing it would mean all my hours of effort would go down the drain(if you ever encoded a video, you know what I’m talking about).I was pondering about a quick solution and there came the mighty Resource Monitor to rescue.

Update: HandBrake now finally has a Pause/Resume button(starting from version 1.0.0). If you don’t see it, update HandBrake to the latest version. You can stiil use the trick below though –

If you want to pause encoding task on Handbrake, suspend the process named HandbrakeCLI.exeNOT Handbrake.exeYou can then see the the progress bar stuck at the same level in HandBrake’s main window which will confirm your action. To resume encoding, just Resume the same process suspended earlier.

Source: https://windroidwiz.wordpress.com/2016/07/30/trickpauseresume-any-task-in-windows/

How to Manage Docker Containers using Portainer on Ubuntu 16.04 LTS

Portainer is an open-source management UI for Docker, including Docker Swarm environment. Portainer makes it easier for you to manage your Docker containers, it allows you to manage containers, images, networks, and volumes from the web-based Portainer dashboard.

In this tutorial, I will show you step-by-step how to install and configure Portainer on Ubuntu 16.04 LTS. We will install and configure Portainer, deploy the Apps Container, Manage Container, images, network, and volumes for our Docker environment.

Prerequisites

  • Ubuntu Server 16.04
  • Root privileges

What we will do

  1. Install Docker on Ubuntu 16.04
  2. Install and Configure Portainer
  3. Deploy Ghost Blog App Container
  4. Docker Environment Management

Step 1 – Install Docker on Ubuntu 16.04 LTS

Before installing docker packages, please update the repository on your system and upgrade packages.

sudo apt update
sudo apt upgrade

Now install docker using the apt command below.

sudo apt install docker.io -y

After the installation is complete, start docker service and enable it to launch everytime at system boot.

systemctl start docker
systemctl enable docker

Docker installed on ubuntu 16.04 server, check it using the command below.

docker version

And you will get the docker version 1.x installed on the system.

Install Docker on Ubuntu

Step 2 – Install and Configure Portainer

Portainer can be installed as a docker container and standalone without docker container.

In this tutorial, we will install Portainer as a Docker container. It’s really simple to install and run on any system because we just need to ensure the system support for Docker.

Before installing Portainer, download the Portainer image from the DockerHub using the docker pull command below.

docker pull portainer/portainer

Install Portainer

Now run Portainer using the simple docker command below.

docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer

Portainer is now running as a container, check it using the docker ps command.

docker ps

And you will get the result as below.

Docker ps result

Portainer is now running as a Docker container with the name ‘elatted_hopper’, and it’s running under port 9000.

Next, we will configure the Admin password for the Portainer.

Open your web browser and type the server IP address with port 9000.

http://192.168.33.10:9000/

You will get the page about the admin user and password configuration.

Portainer UI

Type your strong admin password and click the ‘Create user’ button.

Now we need to define which environment Portainer will connect. Portainer offers support for standalone Docker environment, Docker Swarm, and Swarm mode.

For this guide, we will configure Portainer to connect to the local Docker environment.

Connect Portainer to Docker

Choose the ‘Local’ environment and click ‘Connect’ button.

And now you will see the Portainer Admin Dashboard.

Portainer Admin dashboard

Portainer has been installed as a Docker Container on Ubuntu 16.04.

Step 3 – Deploy New App Container

After the Portianer installation, we will run the Application Container using Portainer.

Click the ‘App Template’ menu.

Now choose the application that you want to install. For this guide, we will install the ‘Ghost’ blog as a Docker Container.

Deploy app container

Click ‘Ghost’.

Type the container name ‘ghost-blog’ and click the ‘Show advanced options’. On the ‘Port mapping’ configuration, type port 80 on the ‘host’.

Create container for Ghost Blog

Now click ‘Deploy the container’ button.

And when it’s complete, you will get the container page as below.

Container details

Ghost is now installed as a Docker Container and it’s using port 80 on the host.

Open your web browser and type the server IP address.

http://192.168.33.10/

And you will get the ‘Ghost’ blog homepage as below.

Container deployed successfully

Step 4 – Manage Docker Environment Using Portainer

In this step, we will configure Docker Environments such as Docker images, Container, Volumes, and Networks.

Manage Containers

Portainer provides a simple and easy way to use management for Docker Containers.

Click the ‘Containers’ menu on the left and you will get the page as below.

Manage containers with Portainer

We can start, stop, restart, create a new container, access the shell of the container, see the container log, and stats of the container from this Portainer container management.

Shell of the Ghost container:

Access shell of the container

Ghost container logs:

Log files of the container

The container stats:

Statistics of the Docker container

Manage Docker Images

Click the ‘Images’ menu and you will get the page as below.

Manage Docker images

Now we can see the list of docker images on our system, and we can create manually a new docker image, or pull/download new images from the DockerHub repository.

Manage Networks

From this menu, we create new custom networks for our Docker environment. Click the ‘Networks’ menu.

Manage network settings for Docker Containers

Manage Volumes

This menu provides an easy way to create new custom volumes for our container.

We just need to create new custom volumes, and when we want to create new container the application, just attach it to the container through the ‘Advanced options’ menu.

Manage Docker Volumes

Installation and configuration of the Portainer Docker Management UI on Ubuntu 16.04 has been completed successfully.

Reference

Source: https://www.howtoforge.com/tutorial/ubuntu-docker-portainer/

Back to top