X

Centos7でphp7・nginx・memcached・MariaDBをyumでインストール

タイトル通り
Centos7でphp7・nginx・memcached・MariaDBをyumで一気にインストール
を行います。

環境はさくらのクラウドです。

まずは、リポジトリの準備

# vi /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
#baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=1

# vim /etc/yum.repos.d/mariadb.repo
# MariaDB 10.0 CentOS repository list – created 2015-06-22 01:26 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

# vim /etc/yum.repos.d/remi-php70.repo
[remi-php70]
name=Remi’s PHP 7.0 RPM repository for Enterprise Linux 7 – $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php70/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/7/php70/mirror
#enabled=0
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
priority=1 ←追加

しかしこのままだと以下のエラーが出るので

Transaction check error:
file /usr/share/mysql/charsets/Index.xml conflicts between attempted installs of mysql-community-common-5.6.29-2.el7.x86_64 and MariaDB-common-10.0.24-1.el7.centos.x86_64
file /usr/share/mysql/charsets/armscii8.xml conflicts between attempted installs of mysql-community-common-5.6.29-2.el7.x86_64 and MariaDB-common-10.0.24-1.el7.centos.x86_64
file /usr/share/mysql/charsets/ascii.xml conflicts between attempted installs of mysql-community-common-5.6.29-2.el7.x86_64 and MariaDB-common-10.0.24-1.el7.centos.x86_64
file /usr/share/mysql/charsets/cp1250.xml conflicts between attempted installs of mysql-community-common-5.6.29-2.el7.x86_64 and MariaDB-common-10.0.24-1.el7.centos.x86_64
file /usr/share/mysql/charsets/cp1256.xml conflicts between attempted installs of mysql-community-common-5.6.29-2.el7.x86_64 and MariaDB-common-10.0.24-1.el7.centos.x86_64
file /usr/share/mysql/charsets/cp1257.xml conflicts between attempted installs of mysql-community-common-5.6.29-2.el7.x86_64 and MariaDB-common-10.0.24-1.el7.centos.x86_64

邪魔なパッケージを削除

# yum remove mysql-community-release

準備が出来たらこんな感じで一気にyumでinstall

# yum install nginx php70 php-fpm nginx php70-php-mcrypt php70-php-mbstring php70-php-fpm php70-php-gd php-pecl-memcached memcached memcached-devel php-mysql php-fpm MariaDB-devel MariaDB-client MariaDB-server

Categories: linux nginx
Tags: centos7
higherhope:

View Comments (1)

  • 初めましてこんにちは。

    この環境に、ownCloud 9.0.1 を入れることは可能でしょうか?
    似たような環境にてチャレンジしてみているのですが、なかなかスムースに行きません。
    もしよろしければ、検証してみてはいただけないでしょうか?
    よろしくお願いいたします。