Koozali.org: home of the SME Server

Reinstall SME 7.4 using ssh

Offline jusis707

  • 4
  • +0/-0
Reinstall SME 7.4 using ssh
« on: August 22, 2009, 08:53:15 PM »
Hello friends!

I lost somehow a lot of important things on my sme 7.4 server after unsucessfull reseting of mysql password, so i realy need this server to be accessed by public, so my question is is there any way to reinstall sme 7.4 (which is working)  using putty, i mean reinstall all server software (mysql,apashce, e-smith specific stuff), i tried to do it manually, but there is a lot of things that can`t be done (for example if i want to uninstall dovecot - then i must unninstall 42 e-smith applications). Is possibile somehow to copy just configuration (ip adress etc) and make a fresh install using ssh (i can download smeserver-7.4-i386.iso and mount it), it`s all because i cant access it physically and make fresh install using cd-rom. Is it possible? If not, any suggestions.

Thank you in advance!

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Reinstall SME 7.4 using ssh
« Reply #1 on: August 22, 2009, 08:58:04 PM »
Quote
I lost somehow a lot of important things on my sme 7.4 server after unsucessfull reseting of mysql password,

please, tell us what did you do and what isn't working properly

Stefano

Offline jusis707

  • 4
  • +0/-0
Re: Reinstall SME 7.4 using ssh
« Reply #2 on: August 22, 2009, 09:08:50 PM »
i did restore of mysql password (from contribs.org wiki page) and after that i cant run mysql - ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I try to uninstall mysql and install again but no luck. I had  mysql-server 5.0.54-1.el4.centos and  php 5.1.6-3.el4s1.8 with all their depencies. So my opinion is, that its better to reinstall somehow everything and install like a fresh install of 7.4 using putty (at least i have ssh server running on sme 7.4 ), it could not be a problem if i can access this server phisically and install a fresh sme 7.4 from cd-rom, but it is not my server, and it`s far away from me. And after that i could load a backup to server  (i have a mysql database dump which was made 2 hours ago).
« Last Edit: August 22, 2009, 09:17:27 PM by jusis707 »

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Reinstall SME 7.4 using ssh
« Reply #3 on: August 23, 2009, 04:40:34 AM »
jusis707

It sounds like you have enabled additional repositories, which has been advised NOT TO DO so many times in these forums etc. Otherwise it certainly sounds like you have at least upgraded mysl and php, which has also been said will break your system upon upgrade.

My guess of your best approach is to firstly disable any additional repos,
then run yum update
Refer to
http://wiki.contribs.org/SME_Server:Documentation:FAQ#Which_repositories_should_be_enabled

I think you will still have newer and inappropriate package versions installed.
Compare all installed package versions with a known good sme 7.4 install.

Remove the wrong rpms one by one, so as not to totally break your server, using
rpm -e packagename

Then reinstall the current package versions (after resetting your repos to standard) using

yum install packagename
or more simply update everything with
yum update
followed of course by
signal-event post-upgrade
signal-event reboot

yum update will not replace newer packages with older packages, so you must forcibly remove them first.

You can selectivey uninstall packages with
rpm -e packagename
eg
rpm -e php mysql

Only if necessary use
rpm -e -force packagename

You may break something in the process though, and ultimately need to get local access anyway. Proceed with care and think first on the result of your action. If unsure, or you want to prove the theory first, it would be good to try it on a test server first, that has been configured similarly to the live server you are trying to downgrade.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline jusis707

  • 4
  • +0/-0
Re: Reinstall SME 7.4 using ssh
« Reply #4 on: August 23, 2009, 08:23:42 AM »
Thanks Mary, i uninstall almost everything, and try to install back the software and for now i have a problem with some packages, almost all applications need them, but i cant find where to get them (libssl, libcrypto etc.):


--> Running transaction check
--> Processing Dependency: libcrypto.so.4 for package: mysql
--> Processing Dependency: libreadline.so.4 for package: lvm2
--> Processing Dependency: libcrypto.so.4 for package: mysql-libs
--> Processing Dependency: libcrypto.so.4 for package: mysqlclient14
--> Processing Dependency: libcrypto.so.4 for package: mysql-server
--> Processing Dependency: libssl.so.4 for package: mysql
--> Processing Dependency: libssl.so.4 for package: mysqlclient14
--> Processing Dependency: libssl.so.4 for package: mysql-libs
--> Processing Dependency: libssl.so.4 for package: mysql-server
--> Finished Dependency Resolution
Error: Missing Dependency: libssl.so.4 is needed by package mysql-libs
Error: Missing Dependency: libssl.so.4 is needed by package mysql-server
Error: Missing Dependency: libcrypto.so.4 is needed by package mysqlclient14
Error: Missing Dependency: libcrypto.so.4 is needed by package mysql-server
Error: Missing Dependency: libreadline.so.4 is needed by package lvm2
Error: Missing Dependency: libssl.so.4 is needed by package mysql
Error: Missing Dependency: libcrypto.so.4 is needed by package mysql
Error: Missing Dependency: libcrypto.so.4 is needed by package mysql-libs
Error: Missing Dependency: libssl.so.4 is needed by package mysqlclient14

Maybe i need to install package which includes them, but where to get that package?

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Reinstall SME 7.4 using ssh
« Reply #5 on: August 23, 2009, 11:39:54 AM »
jusis707

Quote
...i uninstall almost everything....

Maybe not as many as you needed to.

Based on the dependency requirements you show, I'm guessing that you have left some newer versions of packages installed, so you should also remove them before running yum update

ie do something like
rpm -e mysql mysql-libs mysql-server mysqlclient14 lvm2

then with standard repos ONLY enabled do
yum update
followed by the signal event commands
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.