E
E
Eugene2019-03-04 08:35:36
linux
Eugene, 2019-03-04 08:35:36

How to roll back Linux terminal commands?

Good afternoon. I decided to study os linux, because for reasons I do not understand, knowledge of this axis is often required in offices.
I decided to install MySQL + Php + Phpmyadmin + Apache
I followed these instructions

This is the step I used
sudo apt-get update
sudo apt-get install apache2
sudo apt-get install mysql-server
sudo mysql_secure_installation
Added password
sudo apt-get install php libapache2-mod-php php-mysql
Install phpMyadmin
sudo apt install phpmyadmin php-mbstring php-gettext
everything was installed. But could not login as root.

Here at this step sudo mysql_secure_installation refused to set the password. It's just that characters were not entered from the keyboard. Well, I thought that the stock password is worth it. Went on
and on the last command
sudo apt install phpmyadmin php-mbstring php-gettext
when entering the password from MySQL, there was an error.
Now when you re-enter this command, the console writes:
[email protected]:~$ sudo apt install phpmyadmin php-mbstring php-gettext
E: Не удалось получить доступ к файлу блокировки /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

Is it possible to rollback these commands to try installing from scratch?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2019-03-04
@feanor7

There are several ways A) restore from a backup copy B) look at the commands that you entered, if there is install, then there is a reverse
https://ubuntu.fliplinux.com/apt-get-purge-apt-get...
By the way, why did you decide that is something wrong? You just need to set a password. gahcep.github.io/blog/2013/03/11/linux-mysql-setup

C
CityCat4, 2019-03-04
@CityCat4

The command cannot be rolled back - this is not an editor :) I
recommend rearranging linux - this will bring some kind of exp, and perhaps even benefit :)

D
DesktopWarrior, 2019-03-04
@DesktopWarrior

There is a rollback option, but you didn’t use it ... it’s done through aptitude tags, this is for debian and its derivatives, incl. ubuntu. Regarding the non-display of the password of the root database when you enter it, this is so that the attacker lurking behind your shoulder or in the closet does not even know the length of the password ... in general, this is for security. For redhat derivatives, the yum package manager has a transaction command, so you can immediately rollback through it.
s.arboreus.com/2009/09/aptitude-tag-packages-to-re...
https://access.redhat.com/documentation/en-us/red_...
restart mysql_secure_installation and select that there is no password...then you will be asked to enter a new one....delete the test database, delete the database root login remotely...choose everywhere and everything is ok. And do not try nonsense .... you don’t need to rearrange anything ... everything can be removed by hand and do not listen to such advice.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question