Created
April 21, 2016 16:49
-
-
Save Khanashima/d68ccb88a0fa79913048418d4ac12eae to your computer and use it in GitHub Desktop.
vagrant(CentOS6.7)でApache2.4+PHP7+MySQL5.7のインストール方法 ref: http://qiita.com/kiimiiis/items/1a38a13c00bf3ea71405
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.vm.provider "virtualbox" do |vb| | |
# # Display the VirtualBox GUI when booting the machine | |
# vb.gui = true | |
# | |
# # Customize the amount of memory on the VM: | |
vb.memory = "2048" | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@vagrant-centos67 ~]# yum -y update | |
[root@vagrant-centos67 ~]# yum -y install wget | |
[root@vagrant-centos67 ~]# yum -y install gcc apr-devel apr-util-devel pcre-devel libxml2-devel bzip2-devel libcurl-devel openssl-devel gd-devel gdbm-devel libdbi-devel libc-client-devel libicu-devel gcc-c++ libmcrypt-devel freetds-devel postgresql94-devel | |
[root@vagrant-centos67 ~]# wget http://ftp.riken.jp/net/apache//apr/apr-1.5.2.tar.gz | |
[root@vagrant-centos67 ~]# tar xzvf apr-1.5.2.tar.gz | |
[root@vagrant-centos67 ~]# cd apr-1.5.2 | |
[root@vagrant-centos67 apr-1.5.2]# ./configure | |
[root@vagrant-centos67 apr-1.5.2]# make | |
[root@vagrant-centos67 apr-1.5.2]# make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@vagrant-centos67 apr-1.5.2]# cd .. | |
[root@vagrant-centos67 ~]# wget http://ftp.riken.jp/net/apache//apr/apr-util-1.5.4.tar.gz | |
[root@vagrant-centos67 ~]# tar xzvf apr-util-1.5.4.tar.gz | |
[root@vagrant-centos67 ~]# cd apr-util-1.5.4 | |
[root@vagrant-centos67 ~]# ./configure --prefix=/usr/local/apr-util-1.5.4 --with-apr=/usr/local/apr | |
[root@vagrant-centos67 apr-util-1.5.4]# make | |
[root@vagrant-centos67 apr-util-1.5.4]# make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@vagrant-centos67 apr-util-1.5.4]# cd .. | |
[root@vagrant-centos67 ~]# wget http://ftp.tsukuba.wide.ad.jp/software/apache//httpd/httpd-2.4.20.tar.gz | |
[root@vagrant-centos67 ~]# tar xzvf httpd-2.4.20.tar.gz | |
[root@vagrant-centos67 ~]# cd httpd-2.4.20 | |
[root@vagrant-centos67 httpd-2.4.20]# ./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util-1.5.4 --enable-module=all --enable-module=so | |
[root@vagrant-centos67 httpd-2.4.20]# make | |
[root@vagrant-centos67 httpd-2.4.20]# make install | |
[root@vagrant-centos67 httpd-2.4.20]# /usr/local/apache2/bin/apachectl start | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@vagrant-centos67 httpd-2.4.20]# cd .. | |
[root@vagrant-centos67 ~]# wget http://jp2.php.net/distributions/php-7.0.5.tar.gz | |
[root@vagrant-centos67 ~]# tar xzvf php-7.0.5.tar.gz | |
[root@vagrant-centos67 ~]# cd php-7.0.5 | |
[root@vagrant-centos67 php-7.0.5]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs --libdir=/usr/lib64 --with-libdir=lib64 --with-curl --disable-debug --with-pic --disable-rpath --without-pear --with-bz2 --with-freetype-dir --with-png-dir --with-xpm-dir --enable-gd-native-ttf --without-gdbm --with-gettext --with-iconv --with-jpeg-dir --with-openssl --with-pcre-regex --with-zlib --enable-exif --enable-ftp --enable-sockets --enable-calendar --with-libxml-dir --enable-xml --with-mhash --enable-mbstring --enable-mbregex --with-gd --enable-bcmath --with-xmlrpc --with-mysqli --with-curl --with-pdo-mysql --enable-json --enable-zip --without-readline --with-mcrypt | |
[root@vagrant-centos67 php-7.0.5]# make | |
[root@vagrant-centos67 php-7.0.5]# make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule php7_module> | |
AddType application/x-httpd-php .php | |
AddType application/x-httpd-php-source .phps | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@vagrant-centos67 htdocs]# /usr/local/apache2/bin/apachectl restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
phpinfo(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@vagrant-centos67 php-7.0.5]# cd .. | |
[root@vagrant-centos67 ~]# wget http://repo.mysql.com//mysql57-community-release-el6-8.noarch.rpm | |
[root@vagrant-centos67 ~]# yum localinstall mysql57-community-release-el6-8.noarch.rpm | |
[root@vagrant-centos67 ~]# yum install mysql mysql-devel mysql-server | |
[root@vagrant-centos67 ~]# service mysqld start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment