URLOS实战入门—制作LAP网站环境

Posted joshuabriter

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了URLOS实战入门—制作LAP网站环境相关的知识,希望对你有一定的参考价值。

1、制作LAP镜像

1.1.使用ssh登录宿主机器,创建Dockerfiel文件并填充以下内容

FROM php:7.2.16-apache-stretch
ENV TIME_ZONE Asiz/Shanghai
RUN sed -i ‘s~//.*.debian.org~//mirrors.aliyun.com~‘ /etc/apt/sources.list && apt-get update && apt-get install -y libxml2-dev libicu-dev libzip-dev \\ 
&& docker-php-ext-install zip bcmath intl mbstring mysqli pdo_mysql exif sockets # 安装gd扩展
&& apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev\\ 
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && docker-php-ext-install gd ##
# 安装redis扩展
&& cd /var/www/html && curl -O https://pecl.php.net/get/redis-4.3.0.tgz && tar xf redis-4.3.0.tgz && cd redis-4.3.0 && phpize && ./configure && make && make install && rm -rf /var/www/html/* ##
# 安装memcached扩展 
&& cd /var/www/html && curl -O https://pecl.php.net/get/memcached-3.1.3.tgz && apt-get install -y libmemcached-dev && tar xf memcached-3.1.3.tgz && cd memcached-3.1.3 && phpize && ./configure && make && make install && rm -rf /var/www/html/* ## 
&& cd /var/www/html/ && php -r "copy(‘https://install.phpcomposer.com/installer‘, ‘composer-setup.php‘);" \\ 
&& php composer-setup.php && php -r "unlink(‘composer-setup.php‘);" && mv composer.phar /usr/bin/composer && apt-get autoremove -y g++ make && rm -rf /var/lib/apt/*

  



1.2.执行以下命令,生成镜像

docker build -t urlos4/php:7.2.16-apache-stretch .

  

1.3.运行镜像并进入容器

docker run -itd --name apache001 -p 8080:80 urlos4/php:7.2.16-apache-stretch
docker exec -it apache001 bash

  

1.4.在/var/www/html目录下,创建index.php文件

echo "<?php phpinfo()" > /var/www/html/index.php

  

1.5.打开浏览器访问 http://ip:8080/,如图:
技术图片

 

 

1,6.确认无误后,将镜像上传docker云端

docker push urlos4/php:7.2.16-apache-stretch

  


**2、基于URLOS创建LAP应用**
2.1.登录URLOS, https://ip:9966/。未安装URLOS的,请使用以下命令执行安装

curl -LO www.urlos.com/iu && sh iu

  

2.2.添加镜像,如图:
技术图片

技术图片

技术图片

点击提交,保存到URLOS。

 

2.3.使用复制应用的方式快速创建LAP应用,如图:
技术图片

技术图片

技术图片

技术图片

技术图片

技术图片

技术图片

点击提交,保存应用数据。


3、加LAP应用的模板
3.1.进入LNP应用管理模板页面。如图:
技术图片

 


php.ini配置内容如下:

[PHP]
engine = On
short_open_tag = w:short_open_tag:w
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = -1
disable_functions =
disable_classes =
zend.enable_gc = On
expose_php = On
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
html_errors = On
variables_order = "GPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = w:PHP_memory_limit:w
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
default_charset = "UTF-8"
doc_root =
user_dir =
enable_dl = Off
file_uploads = On
upload_max_filesize = w:upload_max_filesize:w
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
extension=gd.so
extension=memcached.so
extension=redis.so
extension=sockets.so
extension=mysqli.so
extension=pdo_mysql.so
extension=bcmath.so
extension=zip.so
[CLI Server]
cli_server.color = On
[Date]
[filter]
[iconv]
[imap]
[intl]
[sqlite3]
[Pcre]
[Pdo]
[Pdo_mysql]
pdo_mysql.default_socket=
[Phar]
[mail function]
SMTP = localhost
smtp_port = 25
mail.add_x_header = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[Interbase]
ibase.allow_persistent = 1
ibase.max_persistent = -1
ibase.max_links = -1
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
ibase.dateformat = "%Y-%m-%d"
ibase.timeformat = "%H:%M:%S"
[MySQLi]
mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
[mysqlnd]
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = Off
[OCI8]
[PostgreSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[bcmath]
bcmath.scale = 0
[browscap]
[Session]
session.save_handler = files
session.use_strict_mode = 0
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.cookie_samesite =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.referer_check =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.sid_length = 26
session.trans_sid_tags = "a=href,area=href,frame=src,form="
session.sid_bits_per_character = 5
[Assertion]
zend.assertions = -1
[COM]
[mbstring]
[gd]
[exif]
[Tidy]
tidy.clean_output = Off
[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
soap.wsdl_cache_limit = 5
[sysvshm]
[ldap]
ldap.max_links = -1
[dba]
[opcache]
[curl]
[openssl] 

点击提交,保存模板数据。

 

4、添加LAP应用的扩展变量
进入应用的管理扩展变量列表,如图:
技术图片

技术图片

 

5、安装LAP应用并测试
技术图片

技术图片

技术图片

点击提交,保存数据。URLOS会自动部署。

 

部署完成后,打开浏览器访问,如图:
技术图片

技术图片

 

以上是关于URLOS实战入门—制作LAP网站环境的主要内容,如果未能解决你的问题,请参考以下文章

也许是最好的PHP扩展解决方案——URLOS发布了可选PHP扩展的网站环境

Docker管理面板-URLOS(易用高效强大)

web前端入门到实战:制作一个百度首页

QGIS入门实战精品教程8.1:QGIS制作地图案例教程

QGIS入门实战精品教程8.1:QGIS制作地图案例教程

Bootstrap4项目开发实战