Abstract :Docker Compared with the traditional virtual machine, the wide application of virtual machine improves the utilization of resources , After promotion docker The impact of the crisis cannot be ignored , At startup speed 、 Hard disk 、 Memory 、 Operating density 、 performance 、 Isolation and migration have been greatly improved . This training we are in centos7 Use different containers to build lamp Environment after deployment of open source CMS. In two separate containers yum download httpd、mysql, And in httpd Internal installation PHP7.1 edition . test apache Download after passing CMS Mirror and deploy .

key word :Docker  Lamp  CMS

requirement :

1. Have a good command of centos7 Under the version docker Installation 、 Delete , start-up 、 stop it ,docker Installation of image 、 Delete .

2. Master the mapping methods of container ports , And the operation method of container interconnection .

3. Master different containers lamp Build .

4.Lamp Build it in a container and master it CMS Image preservation 、 to grant authorization 、 Deploy .

One 、  The process :

1.--docker Container creation , start-up , stop it , And query docker Container state .

command :yum install docker   # download docker

2.docker Installation of image 、 Delete 、 state .

3. adopt docker exec  -it 2db /bin/bash Command to enter the container , install httpd、php7.1. And test the apache The success of .

The order is as follows :

docker pull docker.io/centos/mysql-57-centos7   # download mysql Mirror image

docker run -d --name=mysql -e MYSQL_ROOT_PASSWORD=123456 docker.io/centos/mysql-57-centos7   # establish mysql Container creation user root password 123456

docker run --name=httpd -d -u root -P --link mysql centos/httpd  # establish httpd Container and connect to the database

docker exec -it httpd /bin/bash  # Get into httpd Containers

[root@2db3229c1b25 /]# yum install -y epel-release

[root@2db3229c1b25/]#rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

[root@2db3229c1b25 /]# yum update -y

[root@2db3229c1b25 /]# yum install -y gcc make openssl openssl-devel

[root@2db3229c1b25 /]# yum install -y --enablerepo=remi --enablerepo=remi-php71 php php-devel php-mbstring php-mcrypt php-mysqlnd php-pdo php-gd

[root@2db3229c1b25 /]# yum clean all

[root@2db3229c1b25 /]# rm -rf /var/cache/yum

[root@2db3229c1b25 /]# cd /var/www/html/

[root@2db3229c1b25 html]# vi index.php

stay index.php In the input :

<?php

phpinfo();

?>

The above page indicates successful installation .

4.   Install... In a container MySQL, And authorize CMS, Account is “root”, password :“123456”.

command :Grant all on *.* to "root"@"%" identified by "123456";

The screenshot is as follows :

5. Download dream weaving CMS Mirror image , Find the official website and download it UTF8 edition .

6.  Will weave a dream CMS Mirror copy to docker Inside

password :Docker cp DedeCMS-V5.7 –UTF8-SP2.tar.gz httpd:/

6.1: Change to httpd.conf File and authorize the directory

password :vi /etc/httpd/conf/httpd.conf

6.2  Authorization password : chmod 777 dede

7. install DedeCMS, And connect to the database

Two : Results display :

3、 ... and : matters needing attention :

  1. During the experiment centos7 There are strict format requirements for the command line in the system , Whether there are spaces and the accuracy of the command need to be noted .
  2. docker install httpd After installation php Version mismatch cannot be recognized, resulting in page failure , Need to install PHP7.1 edition
  3. Before installation, you need to enter docker change /etc/httpd/conf/htttpd.conf File and authorization directory, otherwise it cannot be recognized

Docker Next dream weaving CMS More articles on deployment of

  1. imagine Docker Deploy KVM

    imagine Docker Deploy KVM One . install $ yum -y install kvm # kvm base , must $ yum -y install libvirt -y # libvirtd ...

  2. stay Docker Deploy Nginx

    stay Docker Deploy Nginx stay Docker Deploy Nginx, Include : Deploy one of the simplest Nginx, Can pass 80 Port to access the default website Set the path to record access and error logs Set the path of the static website adopt proxy_p ...

  3. docker In the environment solrcloud+zookeeper Cluster deployment tutorial

    Preface : Two months ago 16 year 11 Configuration completed in June , The use of solr6.1 and zookeeper3.4, Just written blog, There may be minor changes in the current version . The result of this example is : stay docker Deploy... In the environment solrcloud colony ...

  4. DedeCms (DEDE)CMS V5.3 Covering arbitrary variables results in a remote Inclusion Vulnerability

    Vulnerability version : DedeCms (DEDE)CMS V5.3 Vulnerability description : Zhimeng content management system , The most powerful Chinese open source CMS Website management project , Use PHP+MySQL framework . In the file include/common.inc.php in : f ...

  5. docker Deploy spring boot

    The first 5 Chapter Docker + Spring Boot: Fast build and deploy Java Web application 0. You need : JDK 1.8 : java -version Maven 3.0+ : mvn -v Git ...

  6. from Docker To Jenkins To Ansible My deployment experience

    from Docker To Jenkins To Ansible My deployment experience In the work , In addition to developing functions , Also responsible for the deployment of the system . I learned from frequent deployment work , Gradually found some ways to be lazy . From traditional Java -jar Command startup service , To pass ...

  7. Docker introduction The sixth part : Deploy app

    Catalog Docker introduction The sixth part : Deploy app precondition Introduce Select an option Docker CE(Cloud provider) Enterprise(Cloud provider) No introduction here En ...

  8. Docker Under the Spring Cloud One of the trilogy : Fast experience

    Copyright notice : Welcome to reprint , Please indicate the source , thank you . http://blog.csdn.net/boling_cavalry/article/details/79177930   Catalog (?)[+]   Start with this chapter , ...

  9. Abroad 10 individual ASP.Net C# Open source under CMS

    Abroad 10 individual ASP.Net C# Open source under CMS https://blog.csdn.net/peng_hai_lin/article/details/8612895   1.Ludico Ludico yes ...

  10. Dream the future Windows Drive programming The first 03 course Driver programming specifications

    Recently, I learned from the driving tutorial of dream weaving future forum Windows Driver programming under , Make a note . This is the first 03 course < Driver programming specifications >. The driver part includes the basic driver unloading function . Driver open close read write operation the simplest distribution routine ...

Random recommendation

  1. css Multiple variable quantity submit buttons are displayed in the center , pure css solve

    A few days ago in the company to modify a css Multiple button centering problem , In fact, many front-end programmers have encountered such problems , Let's give you an example : There are three buttons or two buttons in a row ... The number is uncertain , And then the spacing is fixed : And then a lot of people put all the buttons in one div in , ...

  2. Linux Learning notes 19-ssh Remote management

    Remote management The server usually runs in IDC In the machine room , Generally, the server process is controlled by remote management . Common remote management tools : RDP(remote desktop protocol) agreement ,window Remote Desktop Management Tel ...

  3. Use MSCOMM Send any file , There are also some considerations

    First step : Send a file FILE* pSENDFILE = _wfopen(m_edit_chosefile, _T("rb"));// Open the file pointer of the file to be sent in binary fseek(p ...

  4. springMVC Project introduction jstl Summary of some problems of tag library

    At noon, , I don't know where the project is , I used it well on the contact list page jstl The tag library suddenly reported an error :<%@taglib prefix="c" uri="http://java ...

  5. Centos 7 python upgrade (2.7.5-》2.7.11)

    1. Install upgrade GCC yum install gcc* openssl openssl-devel ncurses-devel.x86_64  bzip2-devel sqlite-devel pyth ...

  6. How to program with Notepad , And generate exe

    1 Create a new one txt file , Rename it to 1.c 2 Programming 3 open VS2015 Developer command prompt 4 find 1.c The location of the file , And then in VS2015 Developer command prompt , Input cd Space Location , enter cd C:\Use ...

  7. Android GreenDao Use the tutorial

    1. stay build.gradle Add related dependencies to apply plugin: 'org.greenrobot.greendao' buildscript { repositories { mavenCen ...

  8. url The problem of encoding and decoding (urlencode/quote)

    import urllib.parse params = { "wd":"hello Artificial intelligence " } # Encode in dictionary form query_str = urlli ...

  9. java_ Field declaration

    Multi field inheritance , To avoid confusion ,simple name And qualified name Use package java20180129_1; interface Frob { float v=2.0f; } c ...

  10. NOIP 2018 day1 Answer key

    This year, noip It's definitely a little bit worse than last year , But if you play well, even the average level can 350 Score above . t1: Obviously it's a simple dp that will do . #include<iostream> #include&l ...