月度归档:九月 2020

docker本地安装tiny tiny rss记录

01# 启动mariadb 10.0.38
02docker run --name mariadb -p 3306:3306 \
03-e MYSQL_ROOT_PASSWORD='password' \
04-d mariadb:10.0.38
05 
06# 安装docker php 5.6
07docker run -p 9000:9000 --name php \
08-v /opt/codefine.site/:/opt/codefine.site/ \
09-v /opt/codefine:/opt/codefine \
10-v /media/c2/php//conf:/usr/local/etc/php \
11-v /media/c2/php/logs:/phplogs \
12-v /opt/phpmyadmin:/opt/phpmyadmin  \
13-d php6:latest
14 
15# 安装php插件。借助于内部家里的内部梯子。懒得设置debian镜像。
16export http_proxy=http://22.22.22.14:10080
17apt update
18apt install libxml2-dev
19apt install libxml2
20apt install libcurl3
21apt install libcurl4-gnutls-dev
22ln -s x86_64-linux-gnu/curl curl
23apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev
24 
25docker-php-ext-configure gd --with-freetype --with-jpeg
26docker-php-ext-install -j$(nproc) gd
27docker-php-ext-install mysql
28docker-php-ext-install mysqli
29docker-php-ext-install intl
30docker-php-ext-install pdo
31docker-php-ext-install pdo_mysql
32docker-php-ext-install fileinfo
33docker-php-ext-install xml
34docker-php-ext-install mbstring
35docker-php-ext-install json
36docker-php-ext-install opcache
37 
38docker-php-ext-enable intl
39docker-php-ext-enable pdo
40docker-php-ext-enable pdo_mysql
41docker-php-ext-enable fileinfo
42docker-php-ext-enable xml
43docker-php-ext-enable mbstring
44docker-php-ext-enable json
45docker-php-ext-enable opcache
46docker-php-ext-enable mysql
47docker-php-ext-enable mysqli
48docker-php-ext-enable gd
49 
50# 生成新的镜像。
51docker save -o php.tar php
52docker load -i php.tar
53# 重新run一个新的container。
54 
55# nginx
56cat /etc/nginx/sites-enabled/ttrss
57server {
58    listen 12345 ssl;
59    root /opt/codefine.site/;
60    index index.php index.html index.htm;
61    server_name photo.codefine.site;
62    ssl_certificate     /path/of/server/file.pem;
63    ssl_certificate_key /path/of/server/key/file.pem;
64    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
65 
66    location / {
67        try_files $uri $uri/ =404;
68    }
69 
70    location ~ \.php$ {
71        include snippets/fastcgi-php.conf;
72        fastcgi_pass   127.0.0.1:9000;
73    }
74}
| 1 分2 分3 分4 分5 分 (5.00- 1票) Loading ... Loading ... | 归档目录:移动互联, 软件应用, 软件技术 | 标签: , , , |