Public Repository

Last pushed: 5 months ago
Short Description
centos6.9 update-httpd-mysql(pass:123456)-php-phpmyadmin-AllowOverride-DisableSendFile
Full Description

FROM centos:6.9
MAINTAINER nguyen.trong.hung

RUN yum -y update; yum -y clean all
RUN yum -y install wget; yum -y clean all

#httpd
RUN yum -y install httpd; yum -y clean all

#mysql
RUN yum -y localinstall https://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm
RUN yum -y install mysql-community-server; yum -y clean all
RUN /etc/init.d/mysqld start && /etc/init.d/mysqld stop
RUN /etc/init.d/mysqld start --skip-grant-tables && echo "use mysql; update user set authentication_string=PASSWORD('123456') where User='root';flush privileges;" | mysql -u root && /etc/init.d/mysqld stop
RUN echo -e "[client]\npassword=123456" > /var/db.temp
RUN /etc/init.d/mysqld start && mysql --defaults-file=/var/db.temp -e "SET PASSWORD = PASSWORD('Aloxoxxx@123');uninstall plugin validate_password;SET PASSWORD = PASSWORD('123456');" --connect-expired-password && /etc/init.d/mysqld stop
RUN rm -f /var/db.temp; yum -y clean all

#php
RUN yum -y install epel-release; yum -y clean all
RUN wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
RUN wget https://centos6.iuscommunity.org/ius-release.rpm
RUN rpm -Uvh ius-release*.rpm
RUN yum -y update; yum -y clean all
RUN yum -y install php56u php56u-opcache php56u-xml php56u-mcrypt php56u-gd php56u-devel php56u-mysql php56u-intl php56u-mbstring php56u-bcmath php56u-memcached; yum -y clean all
RUN yum -y install memcached; yum -y clean all

#phpmyadmin
RUN yum -y install phpMyAdmin; yum -y clean all

#config
RUN chown -R apache:apache /usr/share/phpMyAdmin
RUN sed -i -e"s/Allow from 127.0.0.1/Allow from all/g" /etc/httpd/conf.d/phpMyAdmin.conf
RUN sed -i -e"s/Require ip 127.0.0.1/Require all granted/g" /etc/httpd/conf.d/phpMyAdmin.conf
RUN sed -i -e"s/DirectoryIndex index.html/DirectoryIndex index.html index.php/g" /etc/httpd/conf/httpd.conf; yum -y clean all
RUN sed -i -e"338s/AllowOverride None/AllowOverride All/g" /etc/httpd/conf/httpd.conf
RUN sed -i -e"475s/#EnableSendfile off/EnableSendfile off/g" /etc/httpd/conf/httpd.conf
RUN sed -i -e"663s/8M/200M/g" /etc/php.ini
RUN sed -i -e"811s/2M/200M/g" /etc/php.ini
RUN sed -i -e"814s/20/50/g" /etc/php.ini

Docker Pull Command
Owner
hungnthero