ارتقا CentOS 6 به CentOS 7
این آموزش نحوه ارتقا CentOS 6 به CentOS 7 به صورت انلاین است و تست شده می باشد.
در تست ما از centos 6.5 به همراه پنل دایرکت ادمین استفاده شده، برای این کار ابتدا مخرن centos ویرایش می کنید:
1
|
nano /etc/yum.repos.d/upgrade.repo
|
سپس کد ها زیر داخل ان قرار می دهید
1
2
3
4
5
|
[upgrade]
name=upgrade
baseurl=http://dev.centos.org/centos/6/upg/x86_64/
enabled=1
gpgcheck=0
|
نصب بسته های مورد نیاز با yum جهت ارتقا :
1
|
yum –y install preupgrade–assistant–contents redhat–upgrade–tool preupgrade–assistant
|
حال دستور زیر اجرا و خروجی ببینید:
1
|
preupg
|
خروجی باید چیزی شبیه به این باشد:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
Preupg tool doesn‘t do the actual upgrade.
Please ensure you have backed up your system and/or data in the event of a failed upgrade that would require a full re-install of the system from installation media.
Do you want to continue? y/n
y
Gathering logs used by preupgrade assistant:
All installed packages : 01/11 …finished (time 00:02s)
All changed files : 02/11 …finished (time 22:04s)
Changed config files : 03/11 …finished (time 00:00s)
All users : 04/11 …finished (time 00:00s)
All groups : 05/11 …finished (time 00:00s)
Service statuses : 06/11 …finished (time 00:00s)
All installed files : 07/11 …finished (time 00:02s)
All local files : 08/11 …finished (time 05:08s)
All executable files : 09/11 …finished (time 00:02s)
RedHat signed packages : 10/11 …finished (time 00:00s)
CentOS signed packages : 11/11 …finished (time 00:00s)
Assessment of the system, running checks / SCE scripts:
001/095 …done (Configuration Files to Review)
–[CUT]– List of all packages and services –[/CUT]–
095/095 …done (NIS server config file back-up)
Assessment finished (time 11:55s)
Result table with checks and their results for main contents:
———————————————————————————-
|Bacula Backup Software |notapplicable |
|PostgreSQL upgrade content |notapplicable |
| –[CUT]– Lot’s of not applicable packages —[/CUT]— |
|several kernel networking drivers not available in CentOS 7 |pass |
|several kernel storage drivers not available in CentOS 7 |pass |
|MySQL configuration |informational |
|Migration of the MySQL data stack |informational |
|Compatibility Between iptables and ip6tables |informational |
|Net–SNMP check |informational |
|VCS repositories |informational |
|Added options in DNSMASQ configuration |informational |
|Removed options in coreutils binaries |informational |
|Removed options in gawk binaries |informational |
|Removed options in netstat binary |informational |
|GMP library incompatibilities |informational |
|CVS Package Split |informational |
|NTP configuration |informational |
|Information on time–sync.target |informational |
|File Systems, Partitions and Mounts Configuration Review |informational |
|SonameKept Reusable Dynamic Libraries |informational |
|Content for enabling and disabling services (...) |informational |
|YUM |informational |
|Reusable Configuration Files |fixed |
|Replaced rpms |fixed |
|package downgrades |fixed |
|OpenSSH sysconfig migration content |fixed |
|State of LVM2 services. |fixed |
|Configuration Files to Review |needs_inspection |
|File Lists for Manual Migration |needs_inspection |
|Obsoleted rpms |needs_inspection |
|Binary rebuilds |needs_inspection |
|Foreign Perl modules |needs_inspection |
|Check for usage of dangerous range of UID/GIDs |needs_inspection |
|Packages not signed by CentOS |needs_action |
|Removed rpms |needs_action |
|General |needs_action |
|Sonamebumped libs |needs_action |
|Removed .so libs |needs_action |
|User modification in /etc/rc.local and /etc/rc.d/rc.local |needs_action |
—————————————————————————————————————————
Tarball with results is stored here /root/preupgrade–results/preupg_results–140801172528.tar.gz .
The latest assessment is stored in directory /root/preupgrade .
Summary information:
We found some potential in–place upgrade risks.
Read the file /root/preupgrade/result.html for more details.
Upload results to UI by command:
e.g. preupg –u http://127.0.0.1:8099/submit/ -r /root/preupgrade-results/preupg_results-*.tar.gz .
|
در centos 7 یک اتفاق جالب افتاده و mariadb جایگزین MySql کرده، systemD جایگزین Upstart – udev و grub2 جایگزین grub شده است.
CentOS7 GPG key با دستور زیر اضافه کنید
1
|
rpm —import http://centos.mirror.transip.nl/7/os/x86_64/RPM-GPG-KEY-CentOS-7
|
در انتها دستور زیر بزنید.
1
|
/usr/bin/redhat–upgrade–tool–cli —network 7 —instrepo=http://centos.mirror.transip.nl/7/os/x86_64
|
برنامه هایی مانند NginX, fail2ban, jexec باید حذف و مجدد نصب و کانفیگ شود.