INSTALL.Centos.txt 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. #!/bin/cat
  2. # $Id: INSTALL.Centos.txt,v 1.32 2022/05/17 14:32:47 gilles Exp gilles $
  3. This documentation is also located online at
  4. https://imapsync.lamiral.info/INSTALL.d/
  5. https://imapsync.lamiral.info/INSTALL.d/INSTALL.Centos.txt
  6. =======================================================================
  7. Installing imapsync on CentOS
  8. =======================================================================
  9. There is one section for AlmaLinux and Centos 8,
  10. one for Centos 7,
  11. and one for Centos 6.
  12. =======================================================================
  13. AlmaLinux and Centos 8
  14. =======================================================================
  15. How to install imapsync on AlmaLinux and Centos 8:
  16. dnf install --enablerepo=powertools imapsync
  17. imapsync --testslive
  18. For Centos 8 End Of Life fix:
  19. https://www.centos.org/centos-linux-eol/
  20. If you encounter the error
  21. "Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist"
  22. Do this:
  23. sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
  24. sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*
  25. dnf update
  26. To upgrade to CentOS stream:
  27. dnf install centos-release-stream
  28. dnf swap centos-{linux,stream}-repos
  29. dnf distro-sync
  30. Taken from
  31. https://stackoverflow.com/questions/70926799/centos-through-vm-no-urls-in-mirrorlist
  32. and tested successfuly on one of my hosts, an ex-Centos8/CentOS-stream now.
  33. =======================================================================
  34. AlmaLinux and Centos 8 and latest imapsync
  35. =======================================================================
  36. At the time of this writing (December 2021), the powertools repository
  37. contains imapsync release 1.977, which is not the latest available
  38. imapsync release. (1.977 date is 2019/12/23 while 2.174 is 2021/12/14)
  39. In order to install the latest imapsync I suggest the following process:
  40. Install the powertools imapsync 1.977 release via dnf like mentioned above.
  41. It will install the needed packages, Perl itself and Perl modules
  42. for release 1.977.
  43. The imapsync 2.206 and next ones needs the Perl module:
  44. dnf install perl-Proc-ProcessTable
  45. wget -N https://imapsync.lamiral.info/imapsync
  46. chmod +x imapsync
  47. ./imapsync --testslive
  48. ./imapsync --tests
  49. You may get an even more recent imapsync release this way.
  50. =======================================================================
  51. Centos 7
  52. =======================================================================
  53. First install access to the Epel repository via yum:
  54. yum install epel-release
  55. Then install imapsync and its dependencies:
  56. yum install imapsync
  57. After installing imapsync, it should be able to work on your system.
  58. A good test that shows also the basic example:
  59. imapsync
  60. A live test:
  61. imapsync --testslive --tls1 --ssl2
  62. Unit tests:
  63. imapsync --tests
  64. =======================================================================
  65. Centos 7 and latest imapsync
  66. =======================================================================
  67. At the time of this writing (March 2020), the epel7 repository still
  68. contains imapsync release 1.727, which is not the latest available
  69. imapsync release. (1.727 date is 2016/08/19 while 2.174 is 2021/12/14)
  70. In order to install the latest imapsync I suggest the following process:
  71. Install the epel imapsync 1.727 release via yum like mentioned above.
  72. It will install many needed packages, Perl itself and Perl modules
  73. for release 1.727. The latest imapsync needs more Perl modules.
  74. Then:
  75. yum install perl-App-cpanminus \
  76. perl-Dist-CheckConflicts \
  77. perl-HTML-Parser \
  78. perl-libwww-perl \
  79. perl-Module-Implementation \
  80. perl-Module-ScanDeps \
  81. perl-Package-Stash \
  82. perl-Package-Stash-XS \
  83. perl-PAR-Packer \
  84. perl-Regexp-Common \
  85. perl-Sys-MemInfo \
  86. perl-Test-Fatal \
  87. perl-Test-Mock-Guard \
  88. perl-Test-Requires \
  89. perl-Test-Deep \
  90. perl-File-Tail \
  91. perl-Unicode-String \
  92. perl-Test-NoWarnings \
  93. perl-Test-Simple \
  94. perl-Test-Warn \
  95. perl-Sub-Uplevel \
  96. perl-Proc-ProcessTable \
  97. ca-certificates
  98. Also, run the following commands:
  99. cpanm Encode::IMAPUTF7
  100. wget -N https://imapsync.lamiral.info/imapsync
  101. chmod +x imapsync
  102. ./imapsync --testslive
  103. Now you should have the latest imapsync locally working on Centos 7.
  104. If you want to install it and replace the old one:
  105. mv /usr/bin/imapsync /usr/bin/imapsync_old
  106. cp ./imapsync /usr/bin/imapsync
  107. imapsync --version
  108. should give the latest release number instead of 1.727
  109. (It is 1.979 at the time of this writing)
  110. If you want to install an online imapsync service
  111. like /X then you also need a recent decent CGI.pm,
  112. add it with cpanm:
  113. cpanm CGI
  114. =======================================================================
  115. Centos 6
  116. =======================================================================
  117. This section has been tested with imapsync release 1.670
  118. First, install access to the Epel repository
  119. wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
  120. rpm -Uvh epel-release-6-8.noarch.rpm
  121. Then install imapsync and its dependencies:
  122. yum install imapsync
  123. After installing imapsync, it should be able to work on your system.
  124. A good test that shows also the basic example:
  125. imapsync
  126. A live test:
  127. imapsync --testslive
  128. Unit tests:
  129. imapsync --tests
  130. =======================================================================
  131. Centos 6 and latest imapsync
  132. =======================================================================
  133. Install the epel imapsync 1.670 release via yum like mentioned above.
  134. It will install many needed packages, Perl itself and Perl modules
  135. for release 1.670. The latest imapsync needs more Perl modules.
  136. Then:
  137. yum install perl-App-cpanminus \
  138. perl-Dist-CheckConflicts \
  139. perl-HTML-Parser \
  140. perl-libwww-perl \
  141. perl-Module-Implementation \
  142. perl-Module-ScanDeps \
  143. perl-Package-Stash \
  144. perl-Package-Stash-XS \
  145. perl-PAR-Packer \
  146. perl-Regexp-Common \
  147. perl-Sys-MemInfo \
  148. perl-Test-Fatal \
  149. perl-Test-Mock-Guard \
  150. perl-Test-Requires \
  151. perl-Test-Deep \
  152. perl-File-Tail \
  153. perl-Unicode-String \
  154. install perl-Proc-ProcessTable
  155. wget https://imapsync.lamiral.info/imapsync
  156. chmod +x imapsync
  157. ./imapsync --testslive
  158. Now you have the latest imapsync on Centos 6,
  159. do you?
  160. =======================================================================
  161. =======================================================================