Youtube channel !

Be sure to visit my youtube channel

Saturday, December 03, 2016

How to install the newest kernel on Ubuntu

Being with the latest stable kernel usually brings lots of benefits resulting in:

- having the latest supported drivers for your hardware
- fixing commonly reported bugs
- increase in overall system performance
- various speed and stability related, software-oriented optimizations
Reference: Practical Ubuntu Linux Server for beginners

Here is a video of the update process:



In order to do a simple kernel upgrade, so to be sure to have the latest one installed.
First visit: https://www.kernel.org/
Then choose from stable or unstable(mainline) kernel branch you would like to have your kernel installed. Just look up the numbers. Note: r.c. has the meaning of release candidate, so the kernel is still in development.
Then go to http://kernel.ubuntu.com/~kernel-ppa/mainline/
You'll find a huge directory with supported kernels tailored for Ubuntu distributions.
Scroll down, to pick the chosen one and enter its directory. Then open up a terminal and write:

cd /tmp
This way we will enter the temporary folder, which will be erased automatically when we reboot our machine.
We have to download the proper kernel version. To check if we have 32 or 64-bit system installed  type:
uname -m
which if shows i686 then your kernel should be 32 bit, and if shows x86_64 then you have to download the 64-bit kernel packages.
Next point at the right kernel with the right mouse click, copy the link location from 3 files: one with a name ending on: _all, and two _generic .deb packages
  linux-headers-4.15.2-041502_4.15.2-041502.201802072230_all.deb
  linux-headers-4.15.2-041502-generic_4.15.2-041502.201802072230_amd64.deb
  linux-headers-4.15.2-041502-lowlatency_4.15.2-041502.201802072230_amd64.deb
  linux-image-4.15.2-041502-generic_4.15.2-041502.201802072230_amd64.deb
  linux-image-4.15.2-041502-lowlatency_4.15.2-041502.201802072230_amd64.deb

from those we need to download everything, except the 2 lowlatency packages.
In terminal just enter wget then paste the link location. Here follows an example of the first package:
wget linux-headers-4.15.2-041502_4.15.2-041502.201802072230_all.deb
The last step is to install the downloaded packages using sudo privileges:
sudo dpkg -i linux*
Reboot the computer in order to load the new kernel:
sudo reboot

If you have problems with the newly installed kernel, just press several times on restart the 'ESC' key and choose from Advanced options the previous working stable kernel version.
After some time you may notice that kernels begin to pile up, thus reducing your disk space. I advise you to remove the redundant ones with: sudo apt remove linux- and then list the not used: modules, image and headers packages.
Congratulations and happy learning!

Wednesday, November 30, 2016

Install Laravel on Ubuntu

Here is briefly how to do a basic install of Laravel on Ubuntu. First, get the PHP language interpreter. And here is updated video on how to do the installation on Ubuntu 19.04 / 19.10, also, please enjoy the Ubuntu admin course



sudo apt-get install php
Then install and run composer which will take care of packages dependencies:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
copy composer binary file into /sbin directory to be able to run composer from everywhere.
sudo mv composer.phar /usr/local/sbin/composer
or update the local path to be able to access composer vendor binaries and later be able to run laravel: export PATH = "$HOME/.config/composer/vendor/bin:$PATH" . If you would like the path change to be persistent just add the line into the .bashrc file.

install the two minimal PHP libraries required for laravel:
sudo apt-get install php-mbstring
sudo apt-get install php-xml
use composer to create a new project called learning-laravel from a package named laravel/laravel. The new directory which package would get installed will be called learning-laravel:
composer create-project laravel/laravel learning-laravel
enter into the new directory
cd learning-laravel
and start a local listening PHP server on port 8888 and address localhost(127.0.0.1). This will also make PHP interpret all the files within the subdirectory /public:
php -S localhost:8888 -t public
Open a browser on localhost:8888 Congratulations! You have installed a running Laravel project!

Subscribe To My Channel for updates

Modernizing old php project with the help of AI

0. Keep docker running in separate outside of VSCODE terminal 1. The importance of GIT for version control - create modernization branch 2. ...