Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

2023-10-04

How To Upgrade To Debian 12 Bookworm From Debian 11 Bullseye

Recenly I wanted to upgrade one of my virtual machines from Debian 11.1 (bullseye) to Debian 12 (bookworm). But how to do that when it is not Ubuntu, which I use quite often?

Well, I have found a very informative tutorial, step by step - with almost guaranteed success ratio ;-)

See more:
https://ostechnix.com/upgrade-to-debian-12-from-debian-11/

2023-01-16

How to find files modified last month

Very interesting use of Linux date program, especially parameters to calculate start of last month. It's clever and it works!
find . -type f -name '*.php' -newermt "$(date -d "$(date +%y-%m-1) - 1 month" +%y-%m-%d)"

2022-09-21

Install Google Chrome on Ubuntu 20.04

New virtual machine and new Kubuntu installation. Good days ahead again!

I just found out that old ways of using apt-key program are replaced in new Ubuntu Linux releases by Apt directory /etc/apt/trusted.gpg.d/. It is similar to another Apt directory /etc/apt/sources.list.d/ with files describing software repositories.
Good opportunity to learn something new :)

To install official Google Chrome including automatic updates, I used following tutorial:

Install Google Chrome on Ubuntu 20.04

2018-06-11

Safely Remove Unused Kernels In RHEL/CentOS/Fedora

There are three main ways to do it:

  1. Use package-cleanup command from yum-utils
  2. Use Fedora's dnf remove combined with dnf repoquery
  3. Set maximum number of installed kernels in /etc/yum.conf file
First:
# yum install yum-utils
# package-cleanup --oldkernels --count=2
Second:
# dnf remove $(dnf repoquery --installonly --latest-limit 2 -q)
Third:
# vim /etc/yum.conf
installonly_limit=3  #set kernel count

See also:

2016-01-04

Configure vhosts for XAMPP in Ubuntu

After installing XAMPP for Linux I wanted to use my old trick of configuring virtual hosts for Apache.
There is a one-time configuration, and two steps for each virtual host.

One-time configuration is needed to actually use virtual hosts, and to restore access to original XAMPP documents. So here it goes:

1. Open terminal and edit httpd.conf file:
$ sudo nano /opt/lampp/etc/httpd.conf
2. Now find the following line and uncomment it by removing the hash symbol (#) at the beginning:
Include etc/extra/httpd-vhosts.conf
3. Edit httpd-vhosts.conf file:
$ sudo nano /opt/lampp/etc/extra/httpd-vhosts.conf
4. Replace definitions for dummy-host.example.com and dummy-host2.example.com with following:
# Use name-based virtual hosting.
NameVirtualHost *:80

<VirtualHost *:80>  ## Restore access to localhost resources
    DocumentRoot    "/opt/lampp/htdocs/"
    ServerName      localhost
</VirtualHost>

<VirtualHost *:80>  ## Restore access to 127.0.0.1 resources
    DocumentRoot    "/opt/lampp/htdocs/"
    ServerName      127.0.0.1
</VirtualHost>
5. Restart Apache or reload its configuration. Then check if you can still access XAMPP Dashboard at:
http://localhost and http://127.0.0.1
6. Prepare directory for future virtual hosts, and give your user's group write access to it:
$ sudo mkdir /opt/lampp/vhosts
$ sudo chgrp $(id -n -g) /opt/lampp/vhosts
$ sudo chmod g+rwx /opt/lampp/vhosts

For each virtual host, name resolver needs to be informed about new local domain.
Then virtual host definition has to be added, and directory for host's files created.
Finally after Apache restart all should work.

7. Edit local name resolver hosts file:
$ sudo nano /etc/hosts
8. Add local/development domain, for example "helloapp":
127.0.0.1    helloapp
9. Edit httpd-vhosts.conf file:
$ sudo nano /opt/lampp/etc/extra/httpd-vhosts.conf
10. Add virtual host, setting correctly paths and names:
<VirtualHost *:80>
    DocumentRoot "/opt/lampp/vhosts/helloapp"
    ServerName   helloapp
    ErrorLog     "logs/helloapp-error.log"
    CustomLog    "logs/helloapp-access.log" combined

    # The same settings as for <Directory "/opt/lampp/htdocs"> in conf/httpd.conf
    <Directory "/opt/lampp/vhosts/helloapp">
        # Possible values for the Options directive are "None", "All",
        # or any combination of:
        #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
        Options Indexes FollowSymLinks ExecCGI Includes
        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be "All", "None", or any combination of the keywords:
        #   Options FileInfo AuthConfig Limit
        AllowOverride All
        # Controls who can get stuff from this server.
        Require all granted
    </Directory>
</VirtualHost>
11. Prepare directory for virtual host, remember about correct path:
(this works only if step 6. has been done, otherwise permission errors can occur)
$ mkdir /opt/lampp/vhosts/helloapp
12. Restart Apache or reload its configuration. Then check if you can access new virtual host at:
http://helloapp

See also:

2014-09-30

Install Google Chrome in Debian Wheezy XFCE

In order to install chrome, you will need to do the following.

1) Download the Google Chrome Installer ( I am using the 32 bit .deb)

Alternatively, download DEB file directly.
For 32-bit systems:
wget -c https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
For 64-bit systems:
wget -c wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

2) As a root install three packages that are required in order to install Chrome:
apt-get install libxss1 libcurl3 
libappindicator1

3) Now change the directory to wherever you downloaded Chrome, in my case it went to the default /home/$USER/Downloads folder, and run the following command:
dpkg -i google-chrome-stable_current_i386.deb

4) If you happen to receive errors about missing packages, you can fix it by running:
apt-get -f install

You should now see chrome under the applications menu under Internet Applications. 

http://levlaz.blogspot.com/2013/11/install-google-chrome-in-debian-wheezy.html
http://www.itworld.com/software/358509/install-google-chrome-browser-debian-7
http://gamblisfx.com/how-to-install-google-chrome-on-debian-wheezy-7-5-64-bit-edition/

2011-11-27

GNOME Shell Ubuntu 11.10 - First Impressions

8 Things I did After Installing GNOME Shell in Brand New Ubuntu 11.10

15 Things I Did After Installing New Ubuntu 11.10 Oneiric Ocelot

2010-04-25

A minty experience leaves a pleasant taste

Relation from transitioning a "typical user" from Windows to Linux. Interesting and funny one, too.

Knowing what sort of computer user type this person is I decided to make sure I chose the right distribution for them. After careful thought and a bit of google trolling (in the searching sense of the word) I decided to give Linux Mint a go. So I backed up their computer and settled down to install Mint.

Naturally the install went without a hitch. [...] Note the only changes I made were upgrading wine and installing amsn. Everything else I left as is.

I called them over and spent a couple of minutes showing them where their data is and left them to it. After a while I checked in to see if there were any problems. There were none so I let them be. Suddenly they stormed out and shouted "This G.D. computer is so user friendly!!" [...]

Every now and then other exclamations burst forth such as "This is great!", "It's like a new computer" and more. Each time the old liquid pump almost burst under the pressure of pride at a new assimilation.

I did not have to do any training. I did not have to do any hand holding although, I fully expected to have to. This person found exactly what they needed and could do everything they could do before. The things they are most happy about? They are free of windows virus's, their computer runs fast again and is easy to use. So I am very happy with my choice of Mint for them as are they. The Mint developers have made a very good distribution and it has suited this person to the T. It is the first time I used Mint and I have to admit, I was impressed.

That's truly opposite to one of the previous entries, Linux is for smart people. It's almost as good as one of the Helios writings ;-) Which brings us to the point that people are not necessarily stupid when they use Windows - but they are rather afraid of change or don't want to invest enough time to understand and assimilate the differences.

http://it.toolbox.com/blogs/locutus/a-minty-experience-leaves-a-pleasant-taste-38151