Archive for June, 2018



   Posted by: admin    in Mẹo vặt của hiếu râu

Installing PHP

Install PHP using yum.

yum install lighttpd-fastcgi php-fpm

Configure PHP-FPM user settings.

vi /etc/php-fpm.d/www.conf

We must add the following lines to the either the top or bottom of the configuration:

user = lighttpd

group = lighttpd

Make PHP-FPM start on boot.

php-fpm on

Start PHP-FPM.

service php-fpm start

Configure php.ini.

vi /etc/php.ini

Remove the commenting on the following line.


Tell Lighttpd that PHP exists on this server.

vi /etc/lighttpd/modules.conf

Add the following line.

include “conf.d/fastcgi.conf”

Now we must tell PHP to listen on port 9000 (Lighttpd will send PHP requests there). Using your favorite text editor, edit the fastcgi configuration.

vi /etc/lighttpd/conf.d/fastcgi.conf

At the top of the configuration, add the following lines of code.

fastcgi.server += ( “.php” =>


“host” => “″,

“port” => “9000″,

“broken-scriptfilename” => “enable”



Restart PHP-FPM and Lighttpd for our changes to take effect.

service php-fpm restart

service lighttpd restart



   Posted by: admin    in Mẹo vặt của hiếu râu

#yum install epel-release
#yum install docker-io
#docker search centos
#docker pull centos
#docker images
# docker run -tid –name centos centos
# docker ps -all
#docker exec -ti centos bash

#mkdir /netconf; cd /netconf
#vi Dockerfile

FROM centos

ENV http_proxy

ENV https_proxy

RUN yum -y update

RUN yum -y install httpd mc telnet net-tools less

RUN yum -y install epel-release

RUN rpm -ivh

RUN yum-config-manager –enable remi-php70

RUN yum -y install php php-pdo php-dom php-devel


CMD /usr/sbin/apachectl -DFOREGROUND

#docker build -t netconf .

# docker run -tid -v /netconf/html:/var/www/html -p 80:80 –cap-add SYS_ADMIN –name netconf netconf

#docker exec -ti netconf bash
#docker stop netconf
#docker rm netconf
#docker rmi netconf

#docker export -o /path/to/file containername

#cat /path/to/file | docker import - imagename