Khác biệt giữa các bản “Ghi chú VPS Centos and Plesk”

Từ ChipFC Wiki
Bước tới: chuyển hướng, tìm kiếm
(yum remove package)
 
(Không hiển thị 16 phiên bản của cùng người dùng ở giữa)
Dòng 4: Dòng 4:
 
https://support.plesk.com/hc/en-us/articles/115000438614-How-to-upgrade-OS-vendor-PHP-on-CentOS-7-
 
https://support.plesk.com/hc/en-us/articles/115000438614-How-to-upgrade-OS-vendor-PHP-on-CentOS-7-
  
#1. Connect to the server using SSH.
+
# Connect to the server using SSH.
#2. Enable EPEL repository:
+
# Enable EPEL repository:
 +
#:<syntaxhighlight># yum install epel-release</syntaxhighlight>
 +
# Download Remi repository package:
 +
#:<syntaxhighlight># wget https://rpms.remirepo.net/enterprise/remi-release-7.rpm</syntaxhighlight>
 +
# Enable Remi PHP repo:
 +
#:<syntaxhighlight># rpm -ivh remi-release-7.rpm</syntaxhighlight>
 +
# Make sure yum-utils package is installed and enable appropriate Remi repository. As an example to upgrade OS vendor PHP to version 7 enable the following repository:
 +
#:<syntaxhighlight># yum-config-manager --enable remi-php70</syntaxhighlight>
 +
# Update php package:
 +
#:<syntaxhighlight># yum update php</syntaxhighlight>
  
<code># yum install epel-release</code>
+
== Upgrade git on CentOS 7 ==
 +
*https://gist.github.com/mualucky/bf4c1826094a082273c096988a28bc45
 +
*http://stackoverflow.com/questions/21820715/how-to-install-latest-version-of-git-on-centos-6-x-7-x
  
3. Download Remi repository package:
+
#
 +
#:<syntaxhighlight>yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm</syntaxhighlight>
 +
#
 +
#:<syntaxhighlight>yum update git</syntaxhighlight>
  
<code># wget https://rpms.remirepo.net/enterprise/remi-release-7.rpm</code>
+
== Upgrade MariaDB on CentOS 7 ==
 +
*https://support.plesk.com/hc/en-us/articles/213403429-How-to-upgrade-MySQL-5-5-to-5-6-5-7-or-MariaDB-5-5-to-10-0-10-1-10-2-on-Linux#centos7
 +
*https://www.youtube.com/watch?v=ZTQZ7iAd3ps
 +
CentOS 7 is shipped with MariaDB. MariaDB 10.x version is a drop-in replacement for MySQL 5.5-5.7.
  
4. Enable Remi PHP repo:
+
#Create a backup of all databases with the following command:
 +
#:<syntaxhighlight>MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin --all-databases --routines --triggers > /tmp/all-databases.sql</syntaxhighlight>
 +
#Stop the MariaDB service:
 +
#:<syntaxhighlight>service mariadb stop</syntaxhighlight>
 +
#Remove additional packages like mariadb-bench:
 +
#:<syntaxhighlight>rpm -e mariadb-bench</syntaxhighlight>
 +
#Copy a databases directory in a separate folder like this (for backup purposes also):
 +
#:<syntaxhighlight>cp -a /var/lib/mysql/ /var/lib/mysql_backup</syntaxhighlight>
 +
#Configure MariaDB repository: open the Setting MariaDB repositories page, select OS distro, release and MariaDB version to see the configuration that should be added to /etc/yum.repos.d/MariaDB.repo file. Example for MariaDB10.1:
 +
#:<syntaxhighlight>[mariadb]
 +
name = MariaDB
 +
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
 +
gpgkey = https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
 +
gpgcheck = 1</syntaxhighlight>
 +
#Perform an upgrade with:
 +
#:<syntaxhighlight>yum install mariadb</syntaxhighlight>
 +
#Start the MariaDB service:
 +
#:<syntaxhighlight>service mariadb start</syntaxhighlight>
 +
#Execute this command to update the package version inside Plesk:
 +
#:<syntaxhighlight>plesk sbin packagemng -sdf</syntaxhighlight>
 +
#Note: After an upgrade to 10.1 version, there may appear 'mysql' init script. It can be removed:
 +
#:<syntaxhighlight>rm /etc/init.d/mysql</syntaxhighlight>
 +
#:<syntaxhighlight>systemctl daemon-reload</syntaxhighlight>
  
<code># rpm -ivh remi-release-7.rpm</code>
+
== Install ionCube Loader on a CentOS 7==
 +
https://www.rosehosting.com/blog/install-ioncube-loader-on-centos-7/
  
5. Make sure yum-utils package is installed and enable appropriate Remi repository. As an example to upgrade OS vendor PHP to version 7 enable the following repository:
+
== Install pngquant ==
 +
https://centos.pkgs.org/7/epel-x86_64/pngquant-2.7.2-1.el7.x86_64.rpm.html
  
<code># yum-config-manager --enable remi-php70</code>
+
== Install ffmpeg==
 +
https://www.vultr.com/docs/how-to-install-ffmpeg-on-centos
  
6. Update php package:
+
== yum change version ==
 
+
* Remove Old version
<code># yum update php</code>
+
<syntaxhighlight>yum remove packagename</syntaxhighlight>
 +
* Remove yum repos
 +
<syntaxhighlight>rm etc/yum.repos.d/nodesource-el7.repo</syntaxhighlight>
 +
* Install new version
 +
https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora

Bản hiện tại lúc 13:15, ngày 6 tháng 5 năm 2018


Upgrade OS vendor PHP on CentOS 7

https://support.plesk.com/hc/en-us/articles/115000438614-How-to-upgrade-OS-vendor-PHP-on-CentOS-7-

  1. Connect to the server using SSH.
  2. Enable EPEL repository:
    # yum install epel-release
  3. Download Remi repository package:
    # wget https://rpms.remirepo.net/enterprise/remi-release-7.rpm
  4. Enable Remi PHP repo:
    # rpm -ivh remi-release-7.rpm
  5. Make sure yum-utils package is installed and enable appropriate Remi repository. As an example to upgrade OS vendor PHP to version 7 enable the following repository:
    # yum-config-manager --enable remi-php70
  6. Update php package:
    # yum update php

Upgrade git on CentOS 7

  1. yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm
  2. yum update git

Upgrade MariaDB on CentOS 7

CentOS 7 is shipped with MariaDB. MariaDB 10.x version is a drop-in replacement for MySQL 5.5-5.7.

  1. Create a backup of all databases with the following command:
    MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin --all-databases --routines --triggers > /tmp/all-databases.sql
  2. Stop the MariaDB service:
    service mariadb stop
  3. Remove additional packages like mariadb-bench:
    rpm -e mariadb-bench
  4. Copy a databases directory in a separate folder like this (for backup purposes also):
    cp -a /var/lib/mysql/ /var/lib/mysql_backup
  5. Configure MariaDB repository: open the Setting MariaDB repositories page, select OS distro, release and MariaDB version to see the configuration that should be added to /etc/yum.repos.d/MariaDB.repo file. Example for MariaDB10.1:
    [mariadb]
    name = MariaDB
    baseurl = http://yum.mariadb.org/10.1/centos7-amd64
    gpgkey = https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
    gpgcheck = 1
  6. Perform an upgrade with:
    yum install mariadb
  7. Start the MariaDB service:
    service mariadb start
  8. Execute this command to update the package version inside Plesk:
    plesk sbin packagemng -sdf
  9. Note: After an upgrade to 10.1 version, there may appear 'mysql' init script. It can be removed:
    rm /etc/init.d/mysql
    systemctl daemon-reload

Install ionCube Loader on a CentOS 7

https://www.rosehosting.com/blog/install-ioncube-loader-on-centos-7/

Install pngquant

https://centos.pkgs.org/7/epel-x86_64/pngquant-2.7.2-1.el7.x86_64.rpm.html

Install ffmpeg

https://www.vultr.com/docs/how-to-install-ffmpeg-on-centos

yum change version

  • Remove Old version
yum remove packagename
  • Remove yum repos
rm etc/yum.repos.d/nodesource-el7.repo
  • Install new version

https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora