docker本地安装tiny tiny rss记录

新浪微博 QQ空间

# 启动mariadb 10.0.38
docker run --name mariadb -p 3306:3306 \
-e MYSQL_ROOT_PASSWORD='password' \
-d mariadb:10.0.38

# 安装docker php 5.6
docker run -p 9000:9000 --name php \
-v /opt/codefine.site/:/opt/codefine.site/ \
-v /opt/codefine:/opt/codefine \
-v /media/c2/php//conf:/usr/local/etc/php \
-v /media/c2/php/logs:/phplogs \
-v /opt/phpmyadmin:/opt/phpmyadmin  \
-d php6:latest

# 安装php插件。借助于内部家里的内部梯子。懒得设置debian镜像。
export http_proxy=http://22.22.22.14:10080
apt update
apt install libxml2-dev
apt install libxml2
apt install libcurl3
apt install libcurl4-gnutls-dev
ln -s x86_64-linux-gnu/curl curl
apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev

docker-php-ext-configure gd --with-freetype --with-jpeg
docker-php-ext-install -j$(nproc) gd
docker-php-ext-install mysql
docker-php-ext-install mysqli
docker-php-ext-install intl
docker-php-ext-install pdo
docker-php-ext-install pdo_mysql
docker-php-ext-install fileinfo
docker-php-ext-install xml
docker-php-ext-install mbstring
docker-php-ext-install json
docker-php-ext-install opcache

docker-php-ext-enable intl
docker-php-ext-enable pdo
docker-php-ext-enable pdo_mysql
docker-php-ext-enable fileinfo
docker-php-ext-enable xml
docker-php-ext-enable mbstring
docker-php-ext-enable json
docker-php-ext-enable opcache
docker-php-ext-enable mysql
docker-php-ext-enable mysqli
docker-php-ext-enable gd

# 生成新的镜像。
docker save -o php.tar php
docker load -i php.tar
# 重新run一个新的container。

# nginx
cat /etc/nginx/sites-enabled/ttrss
server {
	listen 12345 ssl;
	root /opt/codefine.site/;
	index index.php index.html index.htm;
	server_name photo.codefine.site;
	ssl_certificate     /path/of/server/file.pem;
	ssl_certificate_key /path/of/server/key/file.pem;
	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

	location / {
		try_files $uri $uri/ =404;
	}

	location ~ \.php$ {
		include snippets/fastcgi-php.conf;
		fastcgi_pass   127.0.0.1:9000;
	}
}

新浪微博 QQ空间

| 1 分2 分3 分4 分5 分 (5.00- 1票) Loading ... Loading ... | 这篇文章归档在:移动互联, 软件应用, 软件技术 | 标签: , , , . | 永久链接:链接 | 评论(0) |

评论

邮箱地址不会被泄露, 标记为 * 的项目必填。

8 - 2 = *



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <img alt="" src="" class=""> <pre class=""> <q cite=""> <s> <strike> <strong>

返回顶部