Koozali.org: home of the SME Server

Installing Contribs in sme without internet access

Offline mealogav

  • *
  • 27
  • +0/-0
Installing Contribs in sme without internet access
« on: March 17, 2013, 10:32:42 PM »
I have a SME 8 server (server only mode) on a local network.  Security is very high on this network so there is no public internet access.  I am using SME for a PHP and mySQL application and I would like to install phpMyAdmin to make administering mySQL databases easier and the MCrypt module to PHP (used to encrypt a sensitive comment field in a mySQL blob field.

Is it possible to download the necessary packages, copy them to the server and install manually?

I'm not an SME expert but I can get by at the Linux command line.

Thanks  Gavin

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: Installing Contribs in sme without internet access
« Reply #1 on: March 17, 2013, 10:42:29 PM »
yum localinstall <package-name>

at least you need to download all this package and install it manualy

=========================================================================================================================================================================================
 Package                                           Arch                                Version                                            Repository                                Size
=========================================================================================================================================================================================
Installing:
 smeserver-phpmyadmin                              noarch                              3.5.2.2-2.el5.sme                                  smecontribs                              8.8 k
Installing for dependencies:
 libmcrypt                                         x86_64                              2.5.8-4.el5.centos                                 smecontribs                              105 k
 php53-mcrypt                                      x86_64                              5.3.3-1.el5                                        smecontribs                               17 k
 php53-php-gettext                                 noarch                              1.0.11-3.el5                                       smecontribs                               20 k
 phpMyAdmin3                                       noarch                              3.5.4-1.el5                                        smecontribs                              6.0 M

Transaction Summary
=========================================================================================================================================================================================
Install       5 Package(s)
Upgrade       0 Package(s)

they are in smecontrib for sme8, you need to choose your achitecture
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline mealogav

  • *
  • 27
  • +0/-0
Re: Installing Contribs in sme without internet access
« Reply #2 on: March 17, 2013, 11:06:19 PM »
Thanks for such a prompt reply - fantastic.

Can you be a little more precise?  (How did you get that listing?  It is obviously very useful in giving all the dependancy packages!)

I think I can find the packages on my local UK mirror site and can download them.  Where do I copy them on my SME server, and then how do I install them?  Can yum be used?

Sorry if these are simple or stupid questions as far as you are concerned ...

Thanks for your help - Gavin

Offline johnp

  • ****
  • 312
  • +0/-0
Re: Installing Contribs in sme without internet access
« Reply #3 on: March 18, 2013, 04:28:47 AM »
You could create an ibay called something like mycontribs and copy the files to the files directory and install the from there /home/e-smith/files/ibays/mycontribs/files.

That way when you do a backup the are included.

He likely tried to do a yum install, but modified the command for your purpose. If you do a yum localinstall and don't have all the dependencies, it will let you know.

In his example, <package-name> would be smeserver-phpmyadmin

Offline mealogav

  • *
  • 27
  • +0/-0
Re: Installing Contribs in sme without internet access
« Reply #4 on: March 18, 2013, 08:50:45 AM »
Hi - thanks.  Saving in an iBay is a good idea.

But how do you actually perform the installation?  Do I use yum but somehow point it at the iBay location to find the packages, or do I have to use more "manual" commands?

Thanks - Gavin

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Installing Contribs in sme without internet access
« Reply #5 on: March 18, 2013, 10:06:18 AM »
mealogav

You have to save the files to a folder on your sme server.
As suggested an ibay is a good idea because you can access that from a workstation and copy the rpm files to there (including the main package you want as well as all dependency rpms).

Then you need to login to the sme server console (the command prompt), either at the server or using Putty remote ssh access program from a workstation.

Create the ibay and copy the required files there into the files subfolder

You then login, change to that folder and run the install commands
ie
Login as root or a suitably privileged user then do

cd /home/e-smith/files/ibays/mycontribs/files

to see a list of files there do
ls -al

then do the install
yum localinstall smeserver-phpmyadmin

usually you need to do
signal-event post-upgrade;signal-event reboot
but follow any instructions at the end of the yum install
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline mmccarn

  • *
  • 2,627
  • +10/-0
Re: Installing Contribs in sme without internet access
« Reply #6 on: March 18, 2013, 02:46:39 PM »
You may want to do this:
- Setup a virtual copy of your SME server on a laptop or another computer (with internet access)
- Setup a yum local repository
- Use the virtual SME to identify and download updates and packages you need
- Copy the packages from the virtual SME to the physical SME and install them.

Or, if your network admins provide a proxy, you can configure yum to use it:
http://wiki.contribs.org/SME_Server:Documentation:FAQ:Section01#Yum_.28system_updates.29

Or, if your network admins allow you to create ssh connections from your SME server to system that does have internet access, you may be able to use tsocks to do updates (specific documentation lacking):
http://wiki.contribs.org/SME_Server:Documentation:FAQ:Section01#ssh.2C_ftp.2C_telnet


Offline mealogav

  • *
  • 27
  • +0/-0
Re: Installing Contribs in sme without internet access
« Reply #7 on: March 18, 2013, 05:31:45 PM »
Hi Folks,

That's great.  Mary that was exactly what I was looking for - the simple step by step guide.

The http proxy is interesting - it's possible that I might be able to make that work - but the external proxy is also a http filter - and it does block a lot (the server is in a school).

Thanks everyone for your help.  Gavin

Offline mealogav

  • *
  • 27
  • +0/-0
Re: Installing Contribs in sme without internet access
« Reply #8 on: June 30, 2013, 11:33:47 AM »
Hi again.  At last I've got round to upgrading my home sme server to sme8 (quite a trial in itself findng out the correct bios settings needed to get 2 SATA drives to software raid correctly!!).  Now I'm trying out the local install of phpMyAdmin and mcrypt that I was asking about back in March.
(Sorry Janet for calling you Mary - I've no idea why I thought you were called Mary!)

I've run into another problem - help would be appreciated ....

I've downloaded all the packages that I think I need and copied them to an iBay on the sme server.
smeserver-phpmyadmin-3.5.2.2-6.el5.sme.noarch.rpm
phpMyAdmin3-3.5.8.1-1.el5.noarch.rpm
php53-php-gettext-1.0.11-3.el5.noarch.rpm
php53-mcrypt-5.3.3-1.el5.i386.rpm
libmcrypt-2.5.8-4.el5.centos.i386.rpm

BUT when I do the "yum localinstall"  I get dependancy errors ("depsolving problems").  It seems to me that
phpMyAdmin3-3.5.2.2  is being requested / expected, BUT the only version I can download from the Contribs site is
phpMyAdmin3-3.5.8.1-1.el5.noarch.rpm  (which I assume is the latest version?)

Any suggestions as to how I get round this problem? - please ...

Here is the output that I get ....

[root@databox2 files]# yum localinstall smeserver-phpmyadmin-3.5.2.2-6.el5.sme.noarch.rpm
Loaded plugins: fastestmirror, protect-packages, smeserver
Setting up Local Package Process
Examining smeserver-phpmyadmin-3.5.2.2-6.el5.sme.noarch.rpm: smeserver-phpmyadmin-3.5.2.2-6.el5.sme.noarch
Marking smeserver-phpmyadmin-3.5.2.2-6.el5.sme.noarch.rpm to be installed
Loading mirror speeds from cached hostfile
 * base: anorien.csc.warwick.ac.uk
 * smeaddons: mirror.canada.pialasse.com
 * smeextras: mirror.canada.pialasse.com
 * smeos: mirror.canada.pialasse.com
 * smeupdates: mirror.canada.pialasse.com
 * updates: anorien.csc.warwick.ac.uk
Excluding Packages from CentOS - os
Finished
Excluding Packages from CentOS - updates
Finished
Resolving Dependencies
--> Running transaction check
---> Package smeserver-phpmyadmin.noarch 0:3.5.2.2-6.el5.sme set to be updated
--> Processing Dependency: phpMyAdmin3 >= 3.5.2.2 for package: smeserver-phpmyadmin
--> Finished Dependency Resolution
smeserver-phpmyadmin-3.5.2.2-6.el5.sme.noarch from /smeserver-phpmyadmin-3.5.2.2-6.el5.sme.noarch has depsolving problems
  --> Missing Dependency: phpMyAdmin3 >= 3.5.2.2 is needed by package smeserver-phpmyadmin-3.5.2.2-6.el5.sme.noarch (/smeserver-phpmyadmin-3.5.2.2-6.el5.sme.noarch)
Error: Missing Dependency: phpMyAdmin3 >= 3.5.2.2 is needed by package smeserver-phpmyadmin-3.5.2.2-6.el5.sme.noarch (/smeserver-phpmyadmin-3.5.2.2-6.el5.sme.noarch)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.



I get a similar thing when trying to install mcrypt ....
The command ...

yum localinstall php53-mcrypt-5.3.3-1.el5.i386.rpm

gives the error ...

php53-mcrypt-5.3.3-1.el5.i386 from /php53-mcrypt-5.3.3-1.el5.i386 has depsolving problems
  --> Missing Dependency: libmcrypt.so.4 is needed by package php53-mcrypt-5.3.3-1.el5.i386 (/php53-mcrypt-5.3.3-1.el5.i386)
Error: Missing Dependency: libmcrypt.so.4 is needed by package php53-mcrypt-5.3.3-1.el5.i386 (/php53-mcrypt-5.3.3-1.el5.i386)

The libmcrypt  files that's available is  "libmcrypt-2.5.8-4.el5.centos.i386.rpm"

Thanks for any help ...   maybe local installation is just too difficult for anyone other than an sme expert - this experience is just frustrating for an amateur!

Gavin

Offline TerryF

  • grumpy old man
  • *
  • 1,826
  • +6/-0
Re: Installing Contribs in sme without internet access
« Reply #9 on: June 30, 2013, 01:04:42 PM »
Dpendency check on smeserver-phpmyadmin

[root@sme8vmcontribs32 ~]# rpm -qp --requires smeserver-phpmyadmin-3.5.2.2-6.el5.sme.noarch.rpm                                                                 
e-smith-base
phpMyAdmin3 >= 3.5.2.2
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(VersionedDependencies) <= 3.0.3-1

--
qui scribit bis legit

Offline TerryF

  • grumpy old man
  • *
  • 1,826
  • +6/-0
Re: Installing Contribs in sme without internet access
« Reply #10 on: June 30, 2013, 01:11:16 PM »
This what you get with a normal instal of phpmyadmin

[root@sme8vmcontribs32 ~]# yum --enablerepo=smecontribs install smeserver-phpmyadmin
Loaded plugins: fastestmirror, protect-packages, smeserver
Loading mirror speeds from cached hostfile
 * base: mirror.mel.bkb.net.au
 * smeaddons: mirror.canada.pialasse.com
 * smecontribs: mirror.canada.pialasse.com
 * smeextras: mirror.canada.pialasse.com
 * smeos: mirror.canada.pialasse.com
 * smeupdates: mirror.canada.pialasse.com
 * updates: mirror.mel.bkb.net.au
smecontribs                                              | 2.5 kB     00:00
Excluding Packages from CentOS - os
Finished
Excluding Packages from CentOS - updates
Finished
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package smeserver-phpmyadmin.noarch 0:3.5.2.2-6.el5.sme set to be updated
--> Processing Dependency: phpMyAdmin3 >= 3.5.2.2 for package: smeserver-phpmyadmin
--> Running transaction check
---> Package phpMyAdmin3.noarch 0:3.5.8.1-1.el5 set to be updated
--> Processing Dependency: php53-php-gettext for package: phpMyAdmin3
--> Processing Dependency: php53-mcrypt for package: phpMyAdmin3
--> Running transaction check
---> Package php53-mcrypt.i386 0:5.3.3-1.el5 set to be updated
--> Processing Dependency: libmcrypt.so.4 for package: php53-mcrypt
---> Package php53-php-gettext.noarch 0:1.0.11-3.el5 set to be updated
--> Running transaction check
---> Package libmcrypt.i386 0:2.5.8-4.el5.centos set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                 Arch      Version                 Repository      Size
================================================================================
Installing:
 smeserver-phpmyadmin    noarch    3.5.2.2-6.el5.sme       smecontribs     11 k
Installing for dependencies:
 libmcrypt               i386      2.5.8-4.el5.centos      smecontribs    116 k
 php53-mcrypt            i386      5.3.3-1.el5             smecontribs     16 k
 php53-php-gettext       noarch    1.0.11-3.el5            smecontribs     20 k
 phpMyAdmin3             noarch    3.5.8.1-1.el5           smecontribs    6.1 M

Transaction Summary
================================================================================
Install       5 Package(s)
Upgrade       0 Package(s)

Total download size: 6.3 M
--
qui scribit bis legit

Offline mealogav

  • *
  • 27
  • +0/-0
Re: Installing Contribs in sme without internet access
« Reply #11 on: June 30, 2013, 01:40:19 PM »
Thanks Terry.
So from your "normal" install output it would appear that I have all the right packages.  I can't work out if it a version problem (ie I have a newer version of the phpMyAdmin3 than is expected) or what the problem is.

Is my command correct?
yum localinstall smeserver-phpmyadmin-3.5.2.2-6.el5.sme.noarch.rpm

Or should there be an "install" in the command - like your version?
yum localinstall install smeserver-phpmyadmin-3.5.2.2-6.el5.sme.noarch.rpm

When I tried it I have to put the full file name.  When I tried
yum localinstall smeserver-phpmyadmin
It reported that it couldn't find smeserver-phpmyadmin

Thanks for your help.

Offline TerryF

  • grumpy old man
  • *
  • 1,826
  • +6/-0
Re: Installing Contribs in sme without internet access
« Reply #12 on: June 30, 2013, 02:05:15 PM »
Hi, download and do a localinstall of each of the dependencies:

So wget the following

 libmcrypt
 php53-php-gettext
 php53-mcrypt       
 phpMyAdmin3       

Then..

yum localinstall libmcrypt-2.5.8-4.el5.centos.i386.rpm
yum localinstall php53-php-gettext-1.0.11-3.el5.noarch.rpm
yum localinstall php53-mcrypt-5.3.3-1.el5.i386.rpm
yum localinstall phpMyAdmin3-3.5.8.1-1.el5.noarch.rpm

Then the final
yum localinstall  smeserver-phpmyadmin-3.5.2.2-6.el5.sme.noarch.rpm

There may be another way, but I just did that and it worked no problems..
--
qui scribit bis legit

Offline mealogav

  • *
  • 27
  • +0/-0
Re: Installing Contribs in sme without internet access
« Reply #13 on: June 30, 2013, 05:57:33 PM »
Hmmmm.
So does the order that the packages are installed matter?  I thought the whole point of checking dependancies would be so that the dependant packages would be installed automatically?

I've tried your approach.  I have the packages that you list in a local folder on the sme server.
 yum localinstall libmcrypt-2.5.8-4.el5.centos.i386.rpm    installed ok,  BUT
 yum localinstall php53-php-gettext-1.0.11-3.el5.noarch.rpm  doesn't work ...
because it needs to upgrade 11 other packages that I don't have locally, because they were not listed as being needed in my original investigations.
Remember the whole point of what I'm trying to do is to install on a sme server that does NOT have internet access.
I can only assume that your test server had internet access and went off to satisfy references to packages that were not local from the mirror sites.

My system is now trying to download each package from a mirror site (it seems to try each package at 4 different mirror sites) and of course times out (as there is no internet access).

Total size: 6.6 M
Total download size: 6.5 M
Is this ok [y/N]: y
Downloading Packages:
http://mirror.canada.pialasse.com/releases/8/smeupdates/i386/RPMS/php-ldap-5.3.3-13.el5.sme.1.i386.rpm: [Errno 12] Timeout: <urlopen error timed out>
Trying other mirror.
http://mirror.chiropratique.org/releases/8/smeupdates/i386/RPMS/php-ldap-5.3.3-13.el5.sme.1.i386.rpm: [Errno 12] Timeout: <urlopen error timed out>
Trying other mirror.
http://mirror.pialasse.com/releases/8/smeupdates/i386/RPMS/php-ldap-5.3.3-13.el5.sme.1.i386.rpm: [Errno 12] Timeout: <urlopen error timed out>
Trying other mirror.


So I suppose I now have to go and find each of these packages and download local copies?  This is very tedious!

But thanks for your help ...

Gavin

Offline TerryF

  • grumpy old man
  • *
  • 1,826
  • +6/-0
Re: Installing Contribs in sme without internet access
« Reply #14 on: June 30, 2013, 06:17:31 PM »
I've tried your approach.  I have the packages that you list in a local folder on the sme server.
 yum localinstall libmcrypt-2.5.8-4.el5.centos.i386.rpm    installed ok,  BUT
 yum localinstall php53-php-gettext-1.0.11-3.el5.noarch.rpm  doesn't work ...
because it needs to upgrade 11 other packages that I don't have locally, because they were not listed as being needed in my original investigations.
Remember the whole point of what I'm trying to do is to install on a sme server that does NOT have internet access.
I can only assume that your test server had internet access and went off to satisfy references to packages that were not local from the mirror sites.

No my system is an up to date SME8 to start with, yours is NOT, hence the need for the 11 other packages..

Sorry I couldn't help you...
--
qui scribit bis legit