8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

さくらVPSでCentOS7・PHP・MariaDB・HTTPDをインストール

Last updated at Posted at 2015-02-12

1.custom os image を選択
2.インストール先のHDD選択、Rootパスワード入力と一般ユーザーアカウント作成
3.サーバ起動
4.utility インストールする

$ sudo yum install yum-utils deltarpm -y
$ sudo yum install vim bash-completion wget curl lsof -y

5.拡張Yum Repository インストール

$ sudo yum install epel-release -y
$ sudo rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

6.HTTPD & PHP

$ sudo yum --enablerepo=remi,remi-php56 install php php-mysqlnd php-gd php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-soap php-tidy

7.MySQL
https://downloads.mariadb.org/mariadb/repositories/#mirror=yamagata-university&distro=CentOS&distro_release=centos7-amd64--centos7&version=10.0

$ vim /etc/yum.repos.d/mariadb.repo
# MariaDB 10.0 CentOS repository list - created 2015-02-05 09:11 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

$ sudo yum install MariaDB-server MariaDB-client # server & client
$ sudo yum install MariaDB-client # client only
$ sudo mysql_upgrade
$ sudo mysql_secure_installation
$  vim /etc/my.cnf.d/server.cnf
[mysqld]
character-set-server=utf8

8.Firewall設定

$ sudo firewall-cmd --permanent --zone=trusted --add-source=<client ip>/32
$ sudo firewall-cmd --permanent --zone=trusted --add-port=3306/tcp
$ sudo firewall-cmd --reload
8
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?