Jump to content

Maxim Orlov

Forum Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Maxim Orlov

  1. В 16.06.2017 в 22:41, TheBB сказал:

    lighttpd+php7+sqlite+ssl=owncloud-10.0.2

    ставим пакеты

    
    opkg install ca-certificates curl lighttpd lighttpd-mod-cgi lighttpd-mod-fastcgi openssl-util \
    php7-cli php7-fastcgi php7-mod-ctype php7-mod-curl php7-mod-dom php7-mod-fileinfo php7-mod-gd \
    php7-mod-hash php7-mod-json php7-mod-mbstring php7-mod-pdo-sqlite php7-mod-session php7-mod-simplexml \
    php7-mod-sqlite3 php7-mod-xml php7-mod-xmlreader php7-mod-xmlwriter php7-mod-zip tar
    

    забираем архив

    
    curl https://download.owncloud.org/community/owncloud-10.0.2.tar.bz2 --output oc.tar.bz2

    распаковываем

    
    tar xjvf oc.tar.bz2 -C /opt/share/www/

    правим php.ini

      Показать содержимое

     

    
    
    [PHP]
    zend.ze1_compatibility_mode = Off
    
    ; Language Options
    
    engine = On
    ;short_open_tag = Off
    precision    =  12
    y2k_compliance = On
    output_buffering = Off
    ;output_handler =
    zlib.output_compression = Off
    ;zlib.output_compression_level = -1
    ;zlib.output_handler =
    implicit_flush = Off
    unserialize_callback_func =
    serialize_precision = 100
    
    ;open_basedir =
    disable_functions =
    disable_classes =
    
    ; Colors for Syntax Highlighting mode.  Anything that's acceptable in
    ; <span style="color: ???????"> would work.
    ;highlight.string  = #DD0000
    ;highlight.comment = #FF9900
    ;highlight.keyword = #007700
    ;highlight.bg      = #FFFFFF
    ;highlight.default = #0000BB
    ;highlight.html    = #000000
    
    ;ignore_user_abort = On
    ;realpath_cache_size = 16k
    ;realpath_cache_ttl = 120
    
    ; Miscellaneous
    
    expose_php = On
    
    ; Resource Limits
    
    max_execution_time = 30	; Maximum execution time of each script, in seconds.
    max_input_time = 60	; Maximum amount of time each script may spend parsing request data.
    ;max_input_nesting_level = 64
    memory_limit = 32M
    
    ; Error handling and logging
    
    ; Error Level Constants:
    ; E_ALL             - All errors and warnings (includes E_STRICT as of PHP 6.0.0)
    ; E_ERROR           - fatal run-time errors
    ; E_RECOVERABLE_ERROR  - almost fatal run-time errors
    ; E_WARNING         - run-time warnings (non-fatal errors)
    ; E_PARSE           - compile-time parse errors
    ; E_NOTICE          - run-time notices (these are warnings which often result
    ;                     from a bug in your code, but it's possible that it was
    ;                     intentional (e.g., using an uninitialized variable and
    ;                     relying on the fact it's automatically initialized to an
    ;                     empty string)
    ; E_STRICT			- run-time notices, enable to have PHP suggest changes
    ;                     to your code which will ensure the best interoperability
    ;                     and forward compatibility of your code
    ; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
    ; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
    ;                     initial startup
    ; E_COMPILE_ERROR   - fatal compile-time errors
    ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
    ; E_USER_ERROR      - user-generated error message
    ; E_USER_WARNING    - user-generated warning message
    ; E_USER_NOTICE     - user-generated notice message
    ; E_DEPRECATED      - warn about code that will not work in future versions
    ;                     of PHP
    ; E_USER_DEPRECATED - user-generated deprecation warnings
    ;
    ; Common Values:
    ;   E_ALL & ~E_NOTICE  (Show all errors, except for notices and coding standards warnings.)
    ;   E_ALL & ~E_NOTICE | E_STRICT  (Show all errors, except for notices)
    ;   E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR  (Show only errors)
    ;   E_ALL | E_STRICT  (Show all errors, warnings and notices including coding standards.)
    ; Default Value: E_ALL & ~E_NOTICE
    error_reporting  =  E_ALL & ~E_NOTICE & ~E_STRICT
    
    display_errors = On
    display_startup_errors = Off
    log_errors = Off
    log_errors_max_len = 1024
    ignore_repeated_errors = Off
    ignore_repeated_source = Off
    report_memleaks = On
    ;report_zend_debug = 0
    track_errors = Off
    ;html_errors = Off
    ;docref_root = "/phpmanual/"
    ;docref_ext = .html
    ;error_prepend_string = "<font color=#ff0000>"
    ;error_append_string = "</font>"
    ; Log errors to specified file.
    ;error_log = /opt/var/log/php_errors.log
    ; Log errors to syslog.
    ;error_log = syslog
    
    ; Data Handling
    
    ;arg_separator.output = "&amp;"
    ;arg_separator.input = ";&"
    variables_order = "EGPCS"
    request_order = "GP"
    register_globals = Off
    register_long_arrays = Off
    register_argc_argv = On
    auto_globals_jit = On
    post_max_size = 512M
    ;magic_quotes_gpc = Off
    magic_quotes_runtime = Off
    magic_quotes_sybase = Off
    auto_prepend_file =
    auto_append_file =
    default_mimetype = "text/html"
    ;default_charset = "iso-8859-1"
    ;always_populate_raw_post_data = On
    
    ; Paths and Directories
    
    ; UNIX: "/path1:/path2"
    ;include_path = ".:/php/includes"
    doc_root = "/opt/share/www"
    user_dir =
    extension_dir = "/opt/lib/php"
    enable_dl = On
    ;cgi.force_redirect = 1
    ;cgi.nph = 1
    ;cgi.redirect_status_env = ;
    cgi.fix_pathinfo=1
    ;fastcgi.impersonate = 1;
    ;fastcgi.logging = 0
    ;cgi.rfc2616_headers = 0
    
    ; File Uploads
    
    file_uploads = On
    upload_tmp_dir = "/opt/tmp"
    upload_max_filesize = 512M
    max_file_uploads = 20
    
    ; Fopen wrappers
    
    allow_url_fopen = On
    allow_url_include = Off
    ;from="john@doe.com"
    ;user_agent="PHP"
    default_socket_timeout = 60
    ;auto_detect_line_endings = Off
    

     

    правим lighttpd.conf

      Скрыть содержимое

     

    
    
    server.document-root        = "/opt/share/www"
    server.upload-dirs          = ( "/tmp" )
    server.errorlog             = "/opt/var/log/lighttpd/error.log"
    server.pid-file             = "/opt/var/run/lighttpd.pid"
    #server.username             = "http"
    #server.groupname            = "www-data"
    
    index-file.names            = ( "index.php", "index.html",
                                    "index.htm", "default.htm",
                                  )
    
    static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
    
    ### Options that are useful but not always necessary:
    #server.chroot               = "/"
    server.port                 = 81
    #server.bind                 = "localhost"
    #server.tag                  = "lighttpd"
    #server.errorlog-use-syslog  = "enable"
    server.network-backend      = "writev"
    
    ### Use IPv6 if available
    #include_shell "/opt/share/lighttpd/use-ipv6.pl"
    
    #dir-listing.encoding        = "utf-8"
    #server.dir-listing          = "enable"
    
    include "/opt/etc/lighttpd/mime.conf"
    include "/opt/etc/lighttpd/conf.d/*.conf"
    
    $HTTP["url"] =~ "^/owncloud/data/" {
    url.access-deny = ("")
    }
    $HTTP["url"] =~ "^/owncloud($|/)" {
    dir-listing.activate = "disable"
    }
    
    #ssl
    $SERVER["socket"] == ":443" {
        ssl.engine = "enable"
        ssl.pemfile = "/opt/etc/lighttpd/certs/lighttpd.pem"
    
        # enforce strong cypher
        ssl.use-sslv2 = "disable"
        ssl.cipher-list = "TLSv1+HIGH !SSLv2 RC4+MEDIUM !aNULL !eNULL !3DES @STRENGTH"
    }

     

    правим 30-fastcgi.conf

      Показать содержимое

     

    
    
    #######################################################################
    ##
    ##  FastCGI Module 
    ## --------------- 
    ##
    ## See http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModFastCGI
    ##
    server.modules += ( "mod_fastcgi" )
    
    ##
    ## PHP Example
    ## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini.
    ##
    ## The number of php processes you will get can be easily calculated:
    ##
    ## num-procs = max-procs * ( 1 + PHP_FCGI_CHILDREN )
    ##
    ## for the php-num-procs example it means you will get 17*5 = 85 php
    ## processes. you always should need this high number for your very
    ## busy sites. And if you have a lot of RAM. :)
    ##
    fastcgi.server = ( ".php" =>
                       ( "php-local" =>
                         (
                           "socket" => "/opt/tmp/php-fastcgi-1.socket",
                           "bin-path" => "/opt/bin/php-fcgi",
                           "max-procs" => 1,
                           "broken-scriptfilename" => "enable",
                         )
                       ),
    #                   ( "php-tcp" =>
    #                     (
    #                       "host" => "127.0.0.1",
    #                       "port" => 9999,
    #                       "check-local" => "disable",
    #                       "broken-scriptfilename" => "enable",
    #                     )
    #                   ),
    #
    #                   ( "php-num-procs" =>
    #                     (
    #                       "socket" => socket_dir + "/php-fastcgi-2.socket",
    #                       "bin-path" => server_root + "/cgi-bin/php5",
    #                       "bin-environment" => (
    #                         "PHP_FCGI_CHILDREN" => "16",
    #                         "PHP_FCGI_MAX_REQUESTS" => "10000",
    #                       ),
    #                       "max-procs" => 5,
    #                       "broken-scriptfilename" => "enable",
    #                     )
    #                   ),
                    )
    
    ##
    ## Ruby on Rails Example
    ##
    ## Normally you only run one Rails application on one vhost.
    ##
    #$HTTP["host"] == "rails1.example.com" {
    #  server.document-root  = server_root + "/rails/someapp/public"
    #  server.error-handler-404 = "/dispatch.fcgi"
    #  fastcgi.server = ( ".fcgi" =>
    #    ("someapp" =>
    #      ( "socket" => socket_dir + "/someapp-fcgi.socket",
    #        "bin-path" => server_root + "/rails/someapp/public/dispatch.fcgi",
    #        "bin-environment" => (
    #              "RAILS_ENV" => "production",
    #              "TMP" => home_dir + "/rails/someapp",
    #        ),
    #      )
    #    )
    #  )
    #}
    
    ##
    ## Another example with multiple rails applications on one vhost.
    ##
    ## http://blog.lighttpd.net/articles/2005/11/23/lighttpd-1-4-8-and-multiple-rails-apps
    ##
    #$HTTP["host"] == "rails2.example.com" {
    #  $HTTP["url"] =~ "^/someapp1" {
    #    server.document-root  = server_root + "/rails/someapp1/public"
    #    server.error-handler-404 = "/dispatch.fcgi"
    #    fastcgi.server = ( ".fcgi" =>
    #      ("someapp1" =>
    #        ( "socket" => socket_dir + "/someapp1-fcgi.socket",
    #          "bin-path" => server_root + "/rails/someapp1/public/dispatch.fcgi",
    #          "bin-environment" => (
    #                "RAILS_ENV" => "production",
    #                "TMP" => home_dir + "/rails/someapp1",
    #          ),
    #          "strip-request-uri" => "/someapp1/"
    #        )
    #      )
    #    )
    #  }
    #
    #  $HTTP["url"] =~ "^/someapp2" {
    #    server.document-root  = server_root + "/rails/someapp2/public"
    #    server.error-handler-404 = "/dispatch.fcgi"
    #    fastcgi.server = ( ".fcgi" =>
    #      ("someapp2" =>
    #        ( "socket" => socket_dir + "/someapp2-fcgi.socket",
    #          "bin-path" => server_root + "/rails/someapp2/public/dispatch.fcgi",
    #          "bin-environment" => (
    #                "RAILS_ENV" => "production",
    #                "TMP" => home_dir + "/rails/someapp2",
    #          ),
    #          "strip-request-uri" => "/someapp2/"
    #        )
    #      )
    #    )
    #  }
    #}
    
    ## chrooted webserver + external PHP
    ##
    ## $ spawn-fcgi -f /usr/bin/php-cgi -p 2000 -a 127.0.0.1 -C 8
    ##
    ## webserver chrooted to /srv/www/
    ## php running outside the chroot
    #
    #fastcgi.server = ( 
    #  ".php" => (( 
    #    "host" => "127.0.0.1",
    #    "port" => "2000",
    #    "docroot" => "/srv/www/servers/www.example.org/htdocs/"
    #  )))
    #
    #server.chroot = "/srv/www"
    #server.document-root = "/servers/wwww.example.org/htdocs/"
    #
    
    ##
    #######################################################################
    

     

    создаём папку

    
    mkdir -p ../etc/lighttpd/certs

    переходим в неё, создаём pem-файл и задаём ему права

    
    cd /opt/etc/lighttpd/certs/
    openssl req -new -x509 -keyout lighttpd.pem -out lighttpd.pem -days 1095 -nodes
    chmod 400 lighttpd.pem

    проверяем корректность конфига

    
    lighttpd -t -f /opt/etc/lighttpd/lighttpd.conf

    запускаем сервер (или рестартим запущенный)

    
    /opt/etc/init.d/S80lighttpd start

    идём по адресу (своего устройства) и вводим данные (свои) и жмём "Завершить установку"

    screen_186.png

    на выходе имеем

    screen_187.png

    "закручиваем гайки" и настраиваем под себя...

    При переходе по адресу http://мой_IP/owncloud выдаёт ошибку: ERR_SSL_UNRECOGNIZED_NAME_ALERT

  2. Подскажи как подправить память на keenetic extra 2

    ~ # mysql_install_db --datadir=/opt/var --basedir=/opt --force
    Warning: World-writable config file '/opt/etc/mysql/my.cnf' is ignored
    Installing MariaDB/MySQL system tables in '/opt/var' ...
    Warning: World-writable config file '/opt/etc/mysql/my.cnf' is ignored
    2018-07-30 21:39:11 2009090640 [Note] /opt/bin/mysqld (mysqld 10.1.33-MariaDB) starting as process 600 ...
    2018-07-30 21:39:11 2009090640 [ERROR] mysqld: Out of memory (Needed 130760704 bytes)
    2018-07-30 21:39:11 2009090640 [ERROR] mysqld: Out of memory (Needed 98058240 bytes)
    2018-07-30 21:39:11 2009090640 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.

    2018-07-30 21:39:11 2009090640 [Note] InnoDB: Using mutexes to ref count buffer pool pages
    2018-07-30 21:39:11 2009090640 [Note] InnoDB: The InnoDB memory heap is disabled
    2018-07-30 21:39:11 2009090640 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2018-07-30 21:39:11 2009090640 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    2018-07-30 21:39:11 2009090640 [Note] InnoDB: Compressed tables use zlib 1.2.11
    2018-07-30 21:39:11 2009090640 [Note] InnoDB: Using generic crc32 instructions
    2018-07-30 21:39:11 2009090640 [Note] InnoDB: Initializing buffer pool, size = 128.0M
    InnoDB: mmap(138543104 bytes) failed; errno 12
    2018-07-30 21:39:11 2009090640 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
    2018-07-30 21:39:11 2009090640 [ERROR] Plugin 'InnoDB' init function returned error.
    2018-07-30 21:39:11 2009090640 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    2018-07-30 21:39:11 2009090640 [ERROR] Unknown/unsupported storage engine: InnoDB
    2018-07-30 21:39:11 2009090640 [ERROR] Aborting

     

×
×
  • Create New...