LoginSignup
1
1

More than 5 years have passed since last update.

【個人メモ】CentOS 環境構築時にやること

Last updated at Posted at 2017-07-30

目的

vagrant box から php, mysqlが利用できる環境を作る

  • Q. mariaDBじゃないの?
  • A. 事情がありMysql

手順

2017.07.30 仮想環境構築を行ったときの手順

vagrant box は bentoのCentOS 6.8を利用

Vagrantfile
config.vm.box = "bento/centos-6.8"

command

作業に必要なコマンドなど

yum -y install vim htop curl yum-utils

リポジトリを追加

yum -y install epel-release
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uh ./remi-release-6.rpm
curl -s https://repos.fedorapeople.org/repos/jkaluza/httpd24/{epel-httpd24.repo} -o /etc/yum.repos.d/#1
yum-config-manager --enable epel remi epel-httpd24

インストール

yum -y install httpd24
yum -y install php71
yum -y install mysql-server mysql-client # 5.5以上が入るはず

ln -s /opt/rh/httpd24/root/etc/httpd /etc/httpd
mkdir -p /var/www/
ln -s /opt/rh/httpd24/root/var/www/html /var/www/html

cat /usr/share/mysql/my-small.cnf | egrep -v "^#.*$" > /usr/share/mysql/my.cnf

service mysqld start
mysql_secure_installation


chkconfig httpd24-httpd on
chkconfig mysqld on
chkconfig iptables off
chkconfig ip6tables off

参考

1
1
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
1
1