Unable to uninstall the old installer

Keywords: Liferay - Google Cloud Platform - How to - Upgrade
Description:
I am new to Bitnami, just joined you guys. I would appreciate that If someone could guide me through, on how to find the serviceinstall.bat, in the last 7.1 Bitnamin Liferay Stack. I am upgrading the Bitnami Liferay from version 7.1 to version 7.1.1, and installed a the version 7.1.1 as an installer on Google Cloud. The operation system is Debian. After installing the 7.1.1 Liferay, I would remove the old installer which is version 7.1, but I was unable to find the serviceinstall.bat that was said for doing the uninstalling. Neither did I find it in the/opt/bitnami/apache2 directory, nor I found it in the /opt/bitnami directory. I also tried to use command line to to find any file in the /opt/bitnami directory, including its sub-directories no got no result.

Any help would be highly appreciated

Daniel

Hello @xiao3307,

Note that .bat files are only used in Windows systems. In order to uninstall any Unix stack, you should run sudo installdir/uninstall. For example, if your stack is placed in /opt/bitnami, you should run:

sudo /opt/bitnami/uninstall

Note that this uninstall tools only exist if you install it using any of our installers. In case you launched a machine, this tool will not exist, and you should run the commands below:

sudo /opt/bitnami/ctlscript.sh stop
sudo rm -rf /opt/bitnami/

Note that those commands will stop the services and remove all the files. In case you would prefer to keep them, you could move the installation instead:

sudo /opt/bitnami/ctlscript.sh stop
sudo mv /opt/bitnami/ /opt/bitnami.bak

I hope it helps

Thank you David, happy new year to you.

My concern is the if I remove the directory of /opt/bitnami, would all commends paths that are associated with it could be gone as well? I noted that matter which directory i am in, the mysql commands path have been always pointed to /opt/bitnami, not sure whether some other commands also have the similar issues

Daniel

Hi @xiao3307,

Could you explain to us how did you install Liferay 7.1.1? What installdir did you use?

Note that, if you installed it as a new stack, its folder should contain all the necessary files to make it run. You could move your /opt/bitnami/ directory and check if everything is ok. In case you want to restore it, just run:

sudo mv /opt/bitnami.bak /opt/bitnami

Thank you David, I did as you suggested to restore the database:

1 sudo mv /opt/bitnami /opt/bitnami.bak
2 mysql -u username -p password <backup.mysql

But the system says: -bash: mysql: command not found

Any suggestions would be highly predicated

Daniel

when doing mysql command lines, before changing /opt/bitnami to /opt/bitnami.bak, the system says the right mysql command location was /opt/bitnami. bit after it was changed to /opt/bitnami.bak, the system said -bash: mysql: command not found. The location where I did mysql command is /opt/newinstaller

Hi @xiao3307,

The system is trying to find MySQL binary under /opt/bitnami/mysql/bin/, and it was just moved. You could run:

sudo /opt/bitnami.bak/mysql/bin/mysql -u username -p password < backup.mysql

Or doing before moving:

sudo mv /opt/bitnami.bak /opt/bitnami
sudo /opt/bitnami/mysql/bin/mysql -u username -p password < backup.mysql
sudo mv /opt/bitnami.bak /opt/bitnami

Regards

Thank you David

My new installer’s home directory is /opt/liferay-7.1.1-1. Is there anyway to change the MySql Binary path to the new installer one:/opt/liferay-7.1.1-1/mysql/bin, so that I can use the mysql command? I do not want to keep the /opt/bitnami.bak directory.

Assuming that /opt/bitnami/ has been removed, is there an another way to enable the Mysql command line, in the new installer home directory?

Regards

Daniel

Hi @xiao3307,

Note that Bitnami stacks are completely self-contained and will not interfere with other software on your system. That’s why we don’t overwrite the system environment variables.

To load the installation you should run /opt/liferay-7.1.1-1/use_liferay. After that, you should be able to run mysql without specifying the whole path.

In case you wanted to run it without loading it, you should update your PATH variable. To do it permanently you need to add it to your ~/.profile or ~/.bashrc file.

export PATH="$PATH:/opt/liferay-7.1.1-1/mysql/bin"

And the load this.

source ~/.profile 

or

source ~/.bashrc

Regards

Hi David, I tried your first option, using /opt/liferay-7.1.1-1/use_liferay command…But there were still problems even if after I made a mysql.sock file in the /opt/liferay-7.1.1-1/mysql/tmp/ directory:

bash-4.4# touch mysql.sock
bash-4.4# chown mysql:mysql mysql.sock
bash-4.4# mysql -root -p
Enter password:
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/opt/liferay-7.1.1-1
/mysql/tmp/mysql.sock’ (111)

Regards

Hi @xiao3307,

What problems are you facing? I’m not really sure why you are creating manually the mysql.sock file. Is MySQL running? You could check it by running

sudo /opt/liferay-7.1.1-1/ctlscript.sh status mysql

In case it is stopped, you should start it:

sudo /opt/liferay-7.1.1-1/ctlscript.sh start mysql

Could you please download and execute our bnsupport tool on the /opt/liferay-7.1.1-1/ installation by following the steps described in the guide below?

How to Run the Bitnami Support Tool

Please note that you need to paste the code outputted by the tool in your reply.

Thank you Daivd. I followed your tip above and it looked like getting through. But it looks like that the new installer has its own database, haven’t it? I can not access the new database by using old mysql root password. My system accepted the command of mysql -root -p command but it saying:

ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)

Regards

Daniel

Hi @xiao3307,

Yes, the installation of this new stack created a new DB.

MySQL root password should be the same you chose during liferay-7.1.1-1 installation. First, you need to double check what MySQL you are running (it should be /opt/liferay-7.1.1-1/mysql/bin/mysql). To check it, run:

which mysql

You also could run the command with the whole path as below:

/opt/liferay-7.1.1-1/mysql/bin/mysql -root -p

In case you have forgotten your MySQL root password, you could reset it by following this guide.

Regards

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.