Koozali.org: home of the SME Server
Obsolete Releases => SME 8.x Contribs => Topic started by: mealogav 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
-
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 (http://aubrac-medical.fr/releases/8/smecontribs/), you need to choose your achitecture
-
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
-
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
-
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
-
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
-
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 (http://wiki.contribs.org/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
-
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
-
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
-
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
-
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
-
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.
-
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..
-
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
-
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...
-
Ok - I take your point. I made a new download of sme8 yesterday which I used to install on this server from scratch. I assumed that this would be an "up to date" starting point - but obviously not. I notice the current sme 8 download has a date of 25 May 2012 - so ages ago.
My problem is that the "production" server that I need to install mcrypt and phpMyAdmin to was installed in Feb 2013 from a fresh sme8 download, so it will be equally in need of updating. BUT it is in a location that does not have any internet access and is only used on that local network.
I've now tested the installation on my home server with internet access and I'm still puzzled why even though the yum command includes the "localinstall " option, it still goes off to the mirror sites to look for updates??
As far as I can tell the installation has worked - the mcrypt library certainly shows up in a phpinfo listing. Although I think phpMyAdmin has installed I can't work out how to access it?? I expected:
http://hostname/phpMyAdmin (or https://hostname/phpMyAdmin ) to work, but it doesn't. Any clues?
You have been a great help - I now know that to get these modules installed I'll somehow need to get temporary internet access! (I can't even physically move the server as it's running on a VM server with 11 other servers!!)
Thanks anyway. Gavin
-
A new install of SME8 needs a "yum update" to bring it up to date, currently that sits at approx 250mb plus and approx 160 plus packages, even with those updates ongoing upstream updates are a regular event as well as just SME specific changes.
See HERE (http://bugs.contribs.org/show_bug.cgi?id=7675) for bug requesting a new iso and HERE (http://lists.contribs.org/pipermail/discussion/2013-June/000991.html) for list discussion on same.
Even with a brand new iso incorporating all updates as at today, there will still be updates coming down the pipe from upstream as well as SME specific within a very short time.
Added later: Just noticed THIS (http://forums.contribs.org/index.php/topic,50028.0.html) post re new iso
-
Wow! - Just started an update - 245 Mb to download. They are right in the bug request "this doesn't create a good impression for new installers"!
Maybe this is why phpMyAdmin isn't working on my system? Maybe it needs an update - we'll see ...
I think this just focuses my attention on just how difficult it is to install a couple of Contribs on a server that has no internet access! Thanks again for your help. Gavin
-
mealogav
Neither Life or SME server work magically.
You need to use a Windows etc workstation that is connected to the Internet, download all the required contrib packages & dependency packages, copy them to USB, then move the files to a folder or ibay on your SME server
Mount the USB stick like you would mount any other drive (refer Howtos) & copy the files to the folder or ibay
Then run the command
yum localinstall packagename
It should find all the dependencies in the same folder.
If anything is missing it will let you know.
Repeat the above process if necessary, making sure to get any dependencies you originally missed.
....And yes, part of this procedure to install recently upgraded contribs, is to keep your sme server up to date also, using similar techniques as above.
It may be easier to setup a test SME server at home where you have Internet access, & use that to download & install contribs, in the process you will learn which rpms & dependency rpms to manually download using the wget command. Then transfer all the files from the test server to VM server using USB etc.
There is no other magic answer.
-
Wow! - Just started an update - 245 Mb to download. They are right in the bug request "this doesn't create a good impression for new installers"!
Maybe this is why phpMyAdmin isn't working on my system? Maybe it needs an update - we'll see ...
I think this just focuses my attention on just how difficult it is to install a couple of Contribs on a server that has no internet access! Thanks again for your help. Gavin
please re-read carefully this post:
http://forums.contribs.org/index.php/topic,49707.msg248693.html#msg248693
you should really point to the "local yum repository" link
you already had all the answers..
-
Hi Janet - thanks for persevering with me ...
It may be easier to setup a test SME server at home where you have Internet access, & use that to download & install contribs
That's exactly what I was trying to do this weekend and follow your instructions from 18th March 2013 http://forums.contribs.org/index.php/topic,49707.msg248691.html#msg248691 (http://forums.contribs.org/index.php/topic,49707.msg248691.html#msg248691)
However - what I've discovered over the weekend is that a new sme8 iso image download requires over 300 packages and 245 Mb to bring it up to date. Some of those are necessary to satisfy dependancies during the phpMyAdmin and mcrypt contribs install.
I downloaded the packages that I thought were needed, as advised by stephdl on 17 March, copied them to an iBay and installed from there.
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 - as the production server (and initially my home server), had never been updated from the 25 May 2012 version that is still the iso available for download, what this flagged up is that there are loads of other updates needed. Even though I did a localinstall, I Iassume the packages available locally were used, and yum tried to find other not available locally from the mirror sites.
I know there is no "magic" - and I am learning alot through this exercise (just not enough!).
I gave up on the local install on my home server and plugged the internet connection back in and let it update and install the contribs.
mcrypt seems to have installed ok (it shows in a phpinfo listing), but although it apparently installed ok phpMyAdmin isn't working yet. I can see evidence of it in apache config files - but I have to look into this a bit more.
So thanks for your help. I think some of the more sophisticated answers (that I don't yet understand) are the real answer for my situation - like creating a local repository ... see next post in answer to Stephano.
Gavin
-
Hi Stefano
please re-read carefully this post:
http://forums.contribs.org/index.php/topic,49707.msg248693.html#msg248693
Reading carefully is not the problem - trust me I've read all the posts Very carefully. Understanding them is the problem.
For example :
Setup a virtual copy of your SME server
What does this mean? Does it just mean a different copy of sme server on a computer with internet access? Or is there something significant in the "virtual" description? If it means set up a virtual server (eg VMWare) and create a new sme server virtual machine, well sorry but your average sme home user doesn't have that kind of facility available! However I think this could be just a server with internet access - right?
Setup a yum local repository
If I understand this "How To" correctly, this is going to create a copy of the sme repository? ie it's going to download all packages to a local directory on the local server Right?
Then if I copy this to my server with no internet access and issue cd to the root directory of this repository (the ibay directory), when I issue yum localinstall commands it should find all the local packages - right?
I assume that I could expand this principle and if I omitt the appropriate "exclude" options from the rsync command used to create the repository then contribs will be downloaded and can be installed from this local repos - right?
Thanks - I do really appreciate the help. Gavin
-
I now have a "test" sme server that I can disconnect from the internet to develop this technique further.
I've follow the suggestion mmccarn made in forum post :
http://forums.contribs.org/index.php/topic,49707.msg248693.html#msg248693 (http://forums.contribs.org/index.php/topic,49707.msg248693.html#msg248693)
to set up a local yum repository and install from there.
I've followed the instructions at http://wiki.contribs.org/Yum_local_repository (http://wiki.contribs.org/Yum_local_repository)
and I have the local repos in a repos ibay on my normal hoem server sme machine. That all seems to have worked well and I can browse to it at http://192.168.11.2/repos/ and follow the links to
http://192.168.11.2/repos/releases/8/smeupdates/i386/repoview/ and see a html page of packages.
(Because after it has updated I want to install phpMyAdmin on my server that has no internet access,
I removed some of the exclusions from the rsync command so I actually have
repos/releases/8/smeupdates
repos/releases/8/smeaddons
repos/releases/8/smeextras
repos/releases/8/contribs
about 1.5GB)
So far so good ...
So on my separate sme server (without internet access), I do a fresh sme8 install from the iso, then follow the instructions for the "client"
[root@dell files]# /sbin/e-smith/db yum_repositories setprop smeupdates status disabled
ok
I modified the repository set command to suit sme8 (the example is for 7 and seems to have a spurious smeserver directory that doesn't exist on the sme8 mirror that I downloaded from - http://distro.ibiblio.org/ )
from BaseURL 'http://<yourServersIP or FQDN>/repos/smeserver/releases/7/smeupdates/$basearch' \
to BaseURL 'http://192.168.11.2/repos/releases/8/smeupdates/$basearch' \
[root@dell files]# /sbin/e-smith/db yum_repositories set smeupdates-local repository \
> Name 'SME Server - updates (local)' \
> BaseURL 'http://192.168.11.2/repos/releases/8/smeupdates/$basearch' \
> EnableGroups yes \
> GPGCheck yes \
> Visible yes \
> status enabled
[root@dell files]# signal-event yum-modify
ok so far ... BUT
when I try the
yum clean all command I get the following message that repeats every 2 seconds ...:
Loaded plugins: fastestmirror, protect-packages, smeserver
Existing lock /var/run/yum.pid: another copy is running as pid 3700.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 13 M RSS ( 22 MB VSZ)
Started: Wed Jul 10 10:08:35 2013 - 01:06 ago
State : Sleeping, pid: 3700
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 13 M RSS ( 22 MB VSZ)
Started: Wed Jul 10 10:08:35 2013 - 01:08 ago
State : Sleeping, pid: 3700
I assume this is yum re-configuring?? If you wait (about 20 mins) and repeat the command it seems to work ...
[root@dell files]# yum clean all
Loaded plugins: fastestmirror, protect-packages, smeserver
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@dell files]#
I assume that in server-manager when I go to the "Software Installer" page the updates should now be located from the repos on the
192.168.11.2 server? Is that correct?
What I get is the normal message saying that "Updates are available" but when I click to install them in the scroll list that would normally show packages to be updated is the message:
Could not - retrieve
[Errno 4] - IO Error:
I've tried to check the setting of the $basearch variable by using "echo". It appears to be empty?? Is this a concern? I'm only guessing, but I expected this to contain the cpu architecture eg "i386"
[root@dell files]# echo $basearch
[root@dell files]#
I'm sorry to be such a pain about this but I feel I'm very close now and just need a final nudge in the right direction.
Thanks for any further help. Gavin
-
Even though there was just an error showing instead of packages, I tried clicking "Install" to see what messages I got ...
Loaded plugins: fastestmirror, protect-packages, smeserver
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was
[Errno 4] IOError:
Error: Cannot find a valid baseurl for repo: base
yum update Could failed: 256
The system needs to be reconfigured after adding or removing software, or applying updates.
I think this suggests that it's not trying to use the local repos on the other (local to my house at least) machine? Any clues why?
As an alternative, now that I have a local copy of all the rpm files etc in the repository, if I simply copied them to, for example, an ibay on the sme server that doesn't have internet access, what command would I issue to get the server to update all of sme from those files?
I know that for contribs I would copy the necessary rpms to a directory, cd to that ddirectory and issue something like :
"yum localinstall smeserver-phpmyadmin3"
"signal-event post-upgrade;signal-event reboot"
But what would the yum command be to get it to update all of sme server?
Thanks.
-
Issue this from a command line
db yum_repositories show
It will list all your repos and where they are pointing to
-
Thanks Terry - but my question is given that I now have a copy of the repository(s) on another machine accessible on my local network at
http://192.168.11.2/repos/releases/8/smeupdates/
http://192.168.11.2/repos/releases/8/smeupdates/i386
http://192.168.11.2/repos/releases/8/smeupdates/x86_64 etc etc
what do the yum db repository entries need to be set to in order that sme will do a software update
from the server-manager "Software Update" page?
All the setting that seem obvious to me haven't worked yet - so there's obviously something (many things!) I don't yet understand.
Thanks.
-
You are right in your assumption about 'signal-event yum-modify' - it kicks off yum in the background in order to obtain the latest package information for display in server-manager.
db_yumrepositories show
* would tell us how your repos are currently configured.
* would tell us if there were any unexpected errors during creation of the new repos (copy & paste may have resulted in $basearch being replaced by the null string you are seeing in bash, for example)
* would allow us to comment on which repos are enabled and which are disabled
...etc.
Note that if you have internet access from ANY computer that the SME can get to, you could configure yum to use a proxy (http://wiki.contribs.org/SME_Server:Documentation:FAQ:Section01#Yum_.28system_updates.29) and just run updates from the web. Of course, it might take quite a bit of jiggery-pokery to get a proxy server running on your network somewhere...
Another option - get a mobile hotspot and turn that on when you want to do updates and install software ;-)
-
Thanks chaps - one of the last things I did before giving up was look at the
db yum_repositories show
output - but then I had to go to work. I'll post it here later.
Thanks Gavin
-
Ok - here's the db yum_repositories show output.
A couple of comments.
The how to at http://wiki.contribs.org/Yum_local_repository (http://wiki.contribs.org/Yum_local_repository) sets a new repos called "smeupdates-local". I'm just wondering now how can this possibly change the behaviour of the "normal" updating operation? (ie what you get when using server-manager Software Installer page). Wouldn't you have to change the existing "smeupdates" repos (and maybe some others?), I mean what's the mechanism that will mean that yum includes a new repository in it's search path - without including it in /etc/yum.repos.d/ ?
I've messed about with the original database entry for the smeupdates repos (smeupdates=repository) in an attempt to get it working. So this might not be exactly as the original db entry.
[root@dell ~]# /sbin/e-smith/db yum_repositories show
addons=repository
EnableGroups=no
GPGCheck=yes
MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
Name=CentOS - addons
Visible=no
status=disabled
base=repository
EnableGroups=no
Exclude=initscripts,libgsf
GPGCheck=yes
MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
Name=CentOS - os
Visible=yes
status=enabled
centosplus=repository
EnableGroups=no
GPGCheck=yes
MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
Name=CentOS - centosplus
Visible=no
status=disabled
contrib=repository
EnableGroups=no
GPGCheck=yes
MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
Name=CentOS - contrib
Visible=no
status=disabled
extras=repository
EnableGroups=no
GPGCheck=yes
MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
Name=CentOS - extras
Visible=no
status=disabled
smeaddons=repository
EnableGroups=yes
GPGCheck=yes
MirrorList=http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smeaddons-8
Name=SME Server - addons
Visible=yes
status=enabled
smecontribs=repository
EnableGroups=yes
GPGCheck=yes
MirrorList=http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smecontribs-8
Name=SME Server - contribs
Visible=no
status=disabled
smedev=repository
EnableGroups=yes
GPGCheck=yes
MirrorList=http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smedev-8
Name=SME Server - dev
Visible=no
status=disabled
smeextras=repository
EnableGroups=yes
GPGCheck=yes
MirrorList=http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smeextras-8
Name=SME Server - extras
Visible=yes
status=enabled
smeos=repository
EnableGroups=yes
GPGCheck=yes
MirrorList=http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smeos-8
Name=SME Server - os
Visible=yes
status=enabled
smetest=repository
EnableGroups=yes
GPGCheck=yes
MirrorList=http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smetest-8
Name=SME Server - test
Visible=no
status=disabled
smeupdates=repository
EnableGroups=yes
GPGCheck=yes
MirrorList=http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smeupdates-8
Name=SME Server - updates
Visible=yes
status=disabled
smeupdates-local=repository
BaseURL=http://192.168.11.2/repos/releases/8/smeupdates/$basearch
EnableGroups=yes
GPGCheck=yes
Name=SME Server - updates (local)
Visible=yes
status=enabled
smeupdates-testing=repository
EnableGroups=yes
GPGCheck=yes
MirrorList=http://distro.ibiblio.org/pub/linux/distributions/smeserver/mirrorlist/smeupdates-testing-8
Name=SME Server - updates testing
Visible=yes
status=disabled
updates=repository
EnableGroups=no
Exclude=initscripts,libgsf
GPGCheck=yes
MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
Name=CentOS - updates
Visible=yes
status=enabled
[root@dell ~]#
I can't see how it can possibly work without pointing the BaseURL of all the sme repositories to my local repos on the local network
http://192.168.11.2/repos/releases/8/.... and disabling the other entries to repositories on the internet that will otherwise just cause a long time out? I might give this a try ...
-
Ok :-)
I've used "/sbin/e-smith/db yum_repositories" commands to change my repositories as follows. Essentially smexxx repos have a BaseURL pointing to my local copy of that repository. All others are disabled (just to speed it up otherwise you seem to get a long timeout for each repos that can't be reached via the MirrorList).
Not forgeting "signal-event yum-modify" (which of course I did forget first time!)
And it's worked - sort off. It has certainly updated loads of packages (250MB ). But at the weekend I updated a new install from the current iso and I think there was something like 340MB of updates.
I think that for a complete update of a "standard" install with no contribs or extras, both the base and addons repositories are required - but hey I'm no expert.
db yum_repositories show now outputs this .... (and I don't think the update has changed it back to the defaults - but this is yet to be checked properly). After checking properly I notice the post update process has reintroduced the MirrorList properties. These should be removed before trying another update or contrib install. See later posts for more info.
[root@dell ~]# /sbin/e-smith/db yum_repositories show
addons=repository
EnableGroups=no
GPGCheck=yes
MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
Name=CentOS - addons
Visible=no
status=disabled
base=repository
EnableGroups=no
Exclude=initscripts,libgsf
GPGCheck=yes
MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
Name=CentOS - os
Visible=yes
status=disabled
centosplus=repository
EnableGroups=no
GPGCheck=yes
MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
Name=CentOS - centosplus
Visible=no
status=disabled
contrib=repository
EnableGroups=no
GPGCheck=yes
MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
Name=CentOS - contrib
Visible=no
status=disabled
extras=repository
EnableGroups=no
GPGCheck=yes
MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
Name=CentOS - extras
Visible=no
status=disabled
smeaddons=repository
BaseURL=http://192.168.11.2/repos/releases/8/smeaddons/i386
EnableGroups=yes
GPGCheck=yes
MirrorList=http://mirrorlist.contribs.org/mirrorlist/smeaddons-8
Name=SME Server - addons
Visible=yes
status=enabled
smecontribs=repository
BaseURL=http://192.168.11.2/repos/releases/8/smecontribs/i386
EnableGroups=yes
GPGCheck=yes
MirrorList=http://mirrorlist.contribs.org/mirrorlist/smecontribs-8
Name=SME Server - contribs
Visible=yes
status=enabled
smedev=repository
EnableGroups=yes
GPGCheck=yes
MirrorList=http://mirrorlist.contribs.org/mirrorlist/smedev-8
Name=SME Server - dev
Visible=no
status=disabled
smeextras=repository
BaseURL=http://192.168.11.2/repos/releases/8/smeextras/i386
EnableGroups=yes
GPGCheck=yes
MirrorList=http://mirrorlist.contribs.org/mirrorlist/smeextras-8
Name=SME Server - extras
Visible=yes
status=enabled
smeos=repository
BaseURL=http://192.168.11.2/repos/releases/8/smeos/i386
EnableGroups=yes
GPGCheck=yes
MirrorList=http://mirrorlist.contribs.org/mirrorlist/smeos-8
Name=SME Server - os
Visible=yes
status=enabled
smetest=repository
EnableGroups=yes
GPGCheck=yes
MirrorList=http://mirrorlist.contribs.org/mirrorlist/smetest-8
Name=SME Server - test
Visible=no
status=disabled
smeupdates=repository
BaseURL=http://192.168.11.2/repos/releases/8/smeupdates/i386
EnableGroups=yes
GPGCheck=yes
MirrorList=http://mirrorlist.contribs.org/mirrorlist/smeupdates-8
Name=SME Server - updates
Visible=yes
status=enabled
smeupdates-local=repository
BaseURL=http://192.168.11.2/repos/releases/8/smeupdates/$basearch
EnableGroups=yes
GPGCheck=yes
Name=SME Server - updates (local)
Visible=yes
status=disabled
smeupdates-testing=repository
EnableGroups=yes
GPGCheck=yes
MirrorList=http://mirrorlist.contribs.org/mirrorlist/smeupdates-testing-8
Name=SME Server - updates testing
Visible=yes
status=disabled
updates=repository
EnableGroups=no
Exclude=initscripts,libgsf
GPGCheck=yes
MirrorList=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
Name=CentOS - updates
Visible=yes
status=disabled
[root@dell ~]#
-
A cursory look, the expression stands out a dogs ba@#s comes to mind..review how you changed the repos and the commands you used.
eg If I wanted to a repo to a particular URL it would be:
db yum_repositories set smeaddons repository \
Name 'SME Server - addons' \
BaseURL 'http://mirror.contribs.org/smeserver/releases/8/smeaddons/$basearch' \
GPGCheck yes \
Visible yes \
status enabled
signal-event yum-modify
yum clean all
or as per DAG wiki
/sbin/e-smith/db yum_repositories set dag repository \
Name 'Dag - EL5' \
BaseURL 'http://apt.sw.be/redhat/el5/en/$basearch/dag' \
EnableGroups no \
GPGCheck yes \
GPGKey http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt \
Visible no \
Exclude freetype,htop,iptraf,rsync,syslinux \
status disabled
Not sure about mixing a "BaseURL" and a "MirrorList"
-
Yes - it's all becoming clearer now - messy but clearer ...!
You're right you can't mix the MirrorList and BaseURL. As the MirrorList is not accessible you get the Error 4 I/O Error.
When I performed the update there was only the BaseURL present. BUT when I said
and I don't think the update has changed it back to the defaults - but this is yet to be checked properly
I was a bit premature!! During the post install process the repos db seems to get rebuilt. The mechanism is at
/etc/e-smith/db/yum_repositories/
The template scripts are in the "migrate" directory and the default setting for each repos are in the "defaults" directory. I guess on a server that is never going to have internet access I could just delete the MirrorList files in each repos default directory?
On the plus side I have now taken a fresh installed test system (that has never had any internet access) and updated it from my local repos which is in a repos/html ibay on another sme server (that obviously has internet access and a cron rsync job that runs every night to keep it up to date).
I have also installed the phpmyadmin contrib and the php mcrypt library on the system from the same local repository. :-) :-)
I don't think it's a totally complete update as I think I need to include both the base and addons repositories.
This is mentioned in how to http://wiki.contribs.org/Yum_offline_updating (http://wiki.contribs.org/Yum_offline_updating). (Which describes the other possibility of just copying the repos rpmsto a directory on the machine).
But hey - it's a massive leap forward from a few hours ago.
Thanks for all your help ....
-
mealogav
db yum_repositories show now outputs this .... (and I don't think the update has changed it back to the defaults - but this is yet to be checked properly).
Doing a package upgrade should not change the repos default values, only a major version upgrade (ie 7 to 8 ) or a manual reset of the yum_repositories database will do that.
AFAIK the MirrorList setting overrides the BaseURL setting, but I suppose if one was not available then the system searched the other, as you say you had success.
Ah I see your newer post that says you only had the BaseURL entry, so that would explain why you had success.
Once you set the db values, they should stay unchanged except under the conditions mentioned above.
Was this a "local" upgrade from sme7.6 to 8 ?
-
mealogav
It would be a really good thing for you to have a think and write down what you have now done to accomplish your aim.
Put it in a form that can be placed in the wiki as a How To, I am sure, absolutely sure, that somone else in the short future will benefit from your experiences..
If you want to get involved in "our thing" :-) writing stuff for the docs is an easy way to get into it. Just login to the wiki and add your contribution to the discussion page, somone with the necessary permissions will review and add as appropriate to the docs. If you really want to get involved then keep at it, look at bug processing and all that goes with that, your name will then live forever on the SME server wall of fame hahahaha
Seriously if you have a will, there is more than enough for all to do..jump in the waters fine..
-
Hi Terry / Janet - thanks a lot for your help. I was about to give up, but your messages over the last few days prompted me to dig deeper and persist with it - so thanks a lot. And yes Terry I do fully intend to write this down (I'll need to as I have to repeat it on the "production" server that's locked down in an environment with no internet access and by the time I can get to it I'll have forgotten most of what I've done!!
It really helped to manage to pickup a test server on ebay which arrived 2 days ago and which I used to test this out on (bargain twin xeon 3GHz dual core, 4GB RAm and 2 73GB SCSI Dell server for £57!).
Janet in answer to your question, this was a fresh sme8 install from the current iso burned to a CD. The update was then to apply all the updates which is necessary to be able to install contribs without having lots of package dependancy problems. There's other forum posts warning thaat the current iso download (dated May 2012) is now very out of date. Once installed there are 250 to 340 MB of package updates to apply.
Also
Doing a package upgrade should not change the repos default values, only a major version upgrade
Sadly this is not what I'm finding. To make it work I make a yum db repos entry that has a BaseURL (to my local repos), with no MirrList entry. However as soon as you perform an update, during the "signal-event post-upgrade" process the default MirrorList is added back (the BaseURL remains but there is also the default MirrorList entry). This causes problems with the next update unless you remember to remove the MirrorList entries.
Take a look in "/etc/e-smith/db/yum_repositories/"
Like I said in my last post
The template scripts are in the "migrate" directory and the default setting for each repos are in the "defaults" directory. I guess on a server that is never going to have internet access I could just delete the MirrorList files in each repos default directory?
If the server never has internet access it will never need the Mirror sites anyway. I'm not sure what level update would restore them - I guess a major sme8 to 9 update probably would?? But this server is never likely to see that.
Remember the whole point of my quest was simply to be able to install phpmyadmin and mcrypt to a server without internet access.
I will keep working away at it - As I've said I think there is still some repositories that technically should be included in my local repos to get a full update - it looks to me like the article at http://wiki.contribs.org/Yum_local_repository (http://wiki.contribs.org/Yum_local_repository) is great as far as it goes - but just the smeupdates repos is not enough for a full update. Perhaps I should add some notes to the "Discussion" tab of that How To?
Maybe this is because the current iso is so out of date?
So thanks again - watch this space (Terry I have applied and been accepted into the wiki group!)
PS - Getting the Raid discs of the Dell server working with sme8 gave me enough material for another How To! It is sufficiently old to have a Raid controller that other posts say is no longer supported by the megaraid driver now in Centos. But I got it working (with the i386 distro, won't work with the x86_64 distro - you wouldn't think there should be a difference would you?)
Gavin
-
As I've said I think there is still some repositories that technically should be included in my local repos to get a full update
I deduce this because I have done a fresh install of sme8 from the current i386 iso burnt to CD on a server with internet access. It then needed 340MB of updates.
Also I have done a fresh install of sme8 from the same CD on a server with NO internet access. Then modified yum to update from my local repos with local rsync'd copies of the following repositories iso (don't think iso is necessary), smeaddons, smecontribs, smeextras, smeos, smeupdates. It updated only 250MB of updates.
According to the how to http://wiki.contribs.org/Yum_offline_updating (http://wiki.contribs.org/Yum_offline_updating) I might need to add both the base and addons repositories. Anyone know for sure?
-
If I do this:
cd /etc/e-smith/db/yum_repositories/defaults
grep -ril enabled *
I get these results, which I think definitively indicates which repos are enabled by default:
base/status
smeaddons/status
smeextras/status
smeos/status
smeupdates/status
updates/status
There are in my experience lots of updates in base and updates to components used in the SME server that are not re-hosted in the smeos and smeaddons repos.
The how to at http://wiki.contribs.org/Yum_local_repository sets a new repos called "smeupdates-local". I'm just wondering now how can this possibly change the behaviour of the "normal" updating operation?
If you create duplicate "-local" versions for your local repos with status=enabled, then set "status=disabled" on all of the originals, you should get normal updates using the -local repos and avoid the problems with the automatically reappearing MirrorList entries.
-
Thanks. I was just basing my thoughts on the How To at http://wiki.contribs.org/Yum_offline_updating (http://wiki.contribs.org/Yum_offline_updating) , that suggests the base and addons repos as well as the smeos, smeaddons and smeupdates repos.
Yeah - I see now how the db of repositories work - I initially was assuming that yum would only use the repos names originally configured, but in fact I now understand that it uses whatever repositories are defined (and enabled) in the db.
So creating "-local" named ones sounds like the best idea and then you can switch between them by enabling / disabling as you suggest.
Just one thing though, won't the "signal-event post-upgrade" process re-enable the disabled MirrorList sites as per the default settings? I'll check this out myself tonight.
Update
The code in "/etc/e-smith/db/yum_repositories/migrate" used to rebuild the repos db entries doesn't change the enabled / disabled status. So this is obviously the right way to setup local yum repositories and be able to easily switch between local repos and remote repos (from MirrorLists) updating.
Thanks mmccarn.
Gavin