среда, 17 апреля 2013 г.

Комманды bach для установки Drupal (на примере ERPAL)

Я много раз устанавлиал Drupal... В некоторых сборках есть хорошие описания, есть даже отличный модуль..., скрипты... Пора написать свой простенький мануал по утановке..., чтобы не набирать комманды вручную и каждый раз проверять себя в справочнике. Но при установке вылетела ошибка, на устранение которой ушло два дня. Хроники поисков в комментариях, ответ в последнем комментарии, а здесь останоалюсь на алгоритме поиска. Устанавливал сборку ERPAL, порадовался, что вот, молодцы, напоминают о том, что надо закрыть для записи дефолные папки, котрые сначала нужно было открыть (chmod 777), закрыл... и тут же получил баг при установке - скрипт не может создать папку private... Создал private вручную с (chmod 777), после этого скрипт сбойнул при создании таблиц БД, в итоге получил ошибку http://drupal.org/node/1945412 .
Да, действительно, окошко выбора языка при установке было дефектным... Но теперь надо загружате dev версию разработчика и посторять весь процесс установки.
Таким было начало...

В erpal-last/.htaccess меняем с 60 на 180 параметр настройки mod_php.c
<IfModule mod_php.c>
php_value max_execution_time 180
</IfModule>
Потом догадался (посмотрел лог ошибок) обновить БД, что существенно ускорило работу
mysql_upgrade -u root -p1
........ и наконец самый последний баг:
Вставляем в /etc/my.cnf max_allowed_packet = 8M
Полезная комманда для быстрого отключения selinux, полагаю, что нужды в ней нет, но когда сдают нервы, помогает
[root@localhost ~]# getenforce
Enforcing
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive
1. В описании сборки на сайте Друпал.орг на чистом анлийском языке написано, что ресурсов надо много (256м оперативки), трудности могут возникнуть, и, соответсвтенно, нужно было это прочитать и увеличить резервирование памяти под PHP (что я уже проделал ранее для Tattler) и mySQL. В папках документов share/doc/mysql и /usr/share/mysql... Напмоним, что базы данных расположены в /var/lib/mysql , лог файлы с ошибками здесь /var/log/mysqld.log , есть примеры фалов, например, large-my.cnf Другие посты по теме

29 комментариев:

  1. Вот все комманды
    просмотрим архив
    [root@localhost Desktop]# tar -zvtf erpal-7.x-2.x-dev-core.tar.gz
    Распакуем (, если окно терминала открыто (root... su...) доступ будет только у суперпользователя
    [root@localhost Desktop]# tar -zxvf erpal-7.x-2.x-dev-core.tar.gz

    Перенесем папку в html
    [root@localhost Desktop]# cp -r erpal-7.x-2.x-dev /var/www/html/
    [root@localhost Desktop]# cd /var/www/html/
    Переименуем папку (адрес в строке браузера должен быть запоминаемым)
    [root@localhost html]# mv erpal-7.x-2.x-dev erpal-dev
    Теперь выполним требования Drupal (создадим папку files и файл settings.php)
    Сразу же создадим и папку files/private ( для ERPAL)
    [root@localhost default]# cd /var/www/html/erpal-dev/sites/default
    [root@localhost default]# mkdir -v files
    mkdir: created directory `files'
    [root@localhost default]# mkdir files/private
    И теперь дадим права для записи для всех:
    [root@localhost default]# chmod 777 files/private
    [root@localhost default]# cp default.settings.php settings.php
    [root@localhost default]# chmod 777 settings.php
    [root@localhost default]# chmod 777 files

    ОтветитьУдалить
  2. Эта ошибка выскакивала и раньше при первой неудачной установке, полагаю, что связана она с настройками в файле php.ini
    Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/erpal-dev/includes/module.inc on line 329

    После перезагрузки страницы ошибка исчезлв, появилась страница навстроек, на ней, среди прочего, я задал
    Server settings
    Default country none

    При первой установке выбрал Russia (что это за дефолтные установки сервера?)

    ОтветитьУдалить
  3. Теперь выскочило:
    An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows.
    Path: http://localhost/erpal-dev/install.php?profile=erpal&welcome=done&locale=en&id=2&op=do
    StatusText: parsererror ResponseText: Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/erpal-dev/includes/menu.inc on line 3557

    Ага, это снова ошибка времени ожидания, я с ней уже сталкивался...надо поискать старые записи...
    Опять перегрузил страницу, опять все заработало - пошел процесс
    Preparing site
    ...
    И снова эта ошибка, идем по ссылке Please continue to the error page
    http://localhost/erpal-dev/install.php?profile=erpal&welcome=done&locale=en&id=2&op=finished

    Просто уходим со страницы настроек сайта
    http://localhost/erpal-dev/install.php?profile=erpal&welcome=done&locale=en&op=start&id=2




    ОтветитьУдалить
  4. Снова поадаем на страницу настроек, но другую... Здесь при первой установке была ошибка - в поле Country выбрать было нечего. Поле было скукожено...
    На этот раз по умолчанию была Germany, я выбрал из того, что было
    Ireland
    Опять влкючился процесс
    Performing last installation tasks
    с синенькой панелью загрузки...
    ...
    Пока писал этот коммент, получил

    Content permissions have been rebuilt.

    Congratulations, you installed ERPAL!

    Visit your new site.
    Скорее на новый сайт!

    ОтветитьУдалить
  5. Нажал на ссылку и получил переход на страницу
    http://localhost/erpal-dev/install.php
    Почему?


    To start over, you must empty your existing database.
    To install to a different database, edit the appropriate settings.php file in the sites folder.
    To upgrade an existing installation, proceed to the update script.
    View your existing site.

    ОтветитьУдалить
    Ответы
    1. Вот файл index.php
      ?php

      /**
      * @file
      * The PHP page that serves all page requests on a Drupal installation.
      *
      * The routines here dispatch control to the appropriate handler, which then
      * prints the appropriate page.
      *
      * All Drupal code is released under the GNU General Public License.
      * See COPYRIGHT.txt and LICENSE.txt.
      */

      /**
      * Root directory of Drupal installation.
      */
      define('DRUPAL_ROOT', getcwd());

      require_once DRUPAL_ROOT . '/includes/bootstrap.inc';

      try {
      drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
      }

      catch (PDOException $e) {
      // A PDO exception might mean that we are running on an empty database. In
      // that case, just redirect the user to install.php.
      if (!db_table_exists('variable')) {
      include_once DRUPAL_ROOT . '/includes/install.inc';
      install_goto('install.php');
      }
      throw $e;
      }

      menu_execute_active_handler();

      Удалить
    2. Скопировал index.php в index_1.php
      и закомментировал
      /**
      catch (PDOException $e) {
      // A PDO exception might mean that we are running on an empty database. In
      // that case, just redirect the user to install.php.
      if (!db_table_exists('variable')) {
      */
      include_once DRUPAL_ROOT . '/includes/install.inc';
      install_goto('install.php');
      /** }
      throw $e;
      }
      */
      menu_execute_active_handler();

      Получил ошибку
      Parse error: syntax error, unexpected 'include_once' (T_INCLUDE_ONCE), expecting catch (T_CATCH) in /var/www/html/erpal-dev/index_1.php on line 30

      Удалить
  6. Итак, имеем две установки, ни одна не работает...
    Можно, конечно дальше разбираться, почему происходит редирект...
    Вот, например "Visiting index.php should redirect to install.php if settings.php already has database credentials but database is empty." http://drupal.org/node/728702
    Это, конечно, полезный практикум по PHP...

    Но, лучше сначала попробовать установиться третий раз без подвисаний и сбоев...

    ОтветитьУдалить
  7. Чтобы произвести установку без сбоев, гуглим и находим: http://drupalist.org.ru/FAQ/2.25.html

    Ваш PHP-скрипт выполняется более 30 секунд - установленного по умолчанию максимального времени выполнения PHP-скрипта. Отредактируйте php.ini, если у вас есть к нему доступ, в противном случае воспользуйтесь директивами в .htaccess, например:


    php_value max_execution_time 60


    а если это не работает - обратитесь к своему хостеру с просьбой увеличить время выполнения для PHP.

    ОтветитьУдалить
    Ответы
    1. Блоггер вычистил вот эти две строчки кодом:
      <IfModule mod_php.c>
      php_value max_execution_time 60
      </IfModule>

      Удалить
  8. Находим в /var/www/html/erpal файл .htaccess

    В нем уже есть
    # PHP 5, Apache 1 and 2.
    <IfModule mod_php5.c>
    php_flag magic_quotes_gpc off
    php_flag magic_quotes_sybase off
    php_flag register_globals off
    php_flag session.auto_start off
    php_value mbstring.http_input pass
    php_value mbstring.http_output pass
    php_flag mbstring.encoding_translation off
    </IfModule>
    Добавляем в начало
    php_value max_execution_time 180

    ОтветитьУдалить
  9. И тут меня посещает гениаьная идея selinux !!!
    Я же с ним уже мучился:
    http://win-lamp-altersego.blogspot.ru/2013/01/vsftpd.html

    Потому пробуем сразу отключить:
    [root@localhost ~]# getenforce
    Enforcing
    [root@localhost ~]# setenforce 0
    [root@localhost ~]# getenforce
    Permissive
    [root@localhost ~]# service httpd restart
    Stopping httpd: [ OK ]
    Starting httpd: [ OK ]
    [root@localhost ~]# service mysqld restart
    Stopping mysqld: [ OK ]
    Starting mysqld: [ OK ]
    [root@localhost ~]# service httpd restart
    Stopping httpd: [ OK ]
    Starting httpd: [ OK ]
    [root@localhost ~]#

    Но не помогает... Почему?

    ОтветитьУдалить
  10. Скопировал Index.php из commons в erpal с именем index_1.php
    ПОлучил ошибку
    Moving server - PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away:
    Вот варианты решения:
    http://drupal.org/node/1612442#comments

    osted by cweagans on June 5, 2012 at 6:08am
    Category: bug report » support request

    This is not a bug with Drupal and appears to be related to your MySQL configuration. I would suggest bumping the max_allowed_packet up to something like 32M or even 64M. Also of interest is your key_buffer_size: bumping that up may help as well.

    It's basically a matter of having too much going on in your Drupal site for your MySQL configuration. Give your DB more resources and the problem will go away.

    ОтветитьУдалить
  11. Гугление по запросу
    PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away:

    привело в конце концов к постам
    http://podrupalim.com/forum/37/kto-nibud-proboval-obnovitsya-do-715 (блог, где в комментариях я нашел ссылки внизу)
    http://drupal.org/node/259580 (Великолепная статья по настройке mysql "MySQL: "Warning: MySQL server has gone away")
    Чтение последней ссылки привлео меня в восторг, поскольку я нашел (повезло) ссылку в своем компьютере
    /usr/share/mysql
    со всеми вариантами my.cnf (huge, large, ....)

    ОтветитьУдалить
  12. Сегодня я выполнил комманду service mysql restart

    gedit /var/log/mysqld.log
    130418 8:58:53 [Note] /usr/libexec/mysqld: Normal shutdown

    130418 8:58:53 InnoDB: Starting shutdown...
    130418 8:58:55 InnoDB: Shutdown completed; log sequence number 709007723
    130418 8:58:55 [Note] /usr/libexec/mysqld: Shutdown complete

    130418 08:58:55 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
    130418 08:58:57 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    130418 8:58:57 [Note] Plugin 'FEDERATED' is disabled.
    /usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
    130418 8:58:57 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
    130418 8:58:57 InnoDB: The InnoDB memory heap is disabled
    130418 8:58:57 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    130418 8:58:57 InnoDB: Compressed tables use zlib 1.2.3
    130418 8:58:57 InnoDB: Using Linux native AIO
    130418 8:58:57 InnoDB: Initializing buffer pool, size = 128.0M
    130418 8:58:57 InnoDB: Completed initialization of buffer pool
    130418 8:58:57 InnoDB: highest supported file format is Barracuda.
    130418 8:58:58 InnoDB: Waiting for the background threads to start
    130418 8:58:59 InnoDB: 5.5.30 started; log sequence number 709007723
    130418 8:58:59 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    130418 8:58:59 [Note] - '0.0.0.0' resolves to '0.0.0.0';
    130418 8:58:59 [Note] Server socket created on IP: '0.0.0.0'.

    ОтветитьУдалить
    Ответы
    1. 130418 8:58:59 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
      130418 8:58:59 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
      130418 8:58:59 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
      130418 8:58:59 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50077, now running 50530. Please use mysql_upgrade to fix this error.
      130418 8:58:59 [ERROR] mysql.user has no `Event_priv` column at position 29
      130418 8:58:59 [ERROR] Cannot open mysql.event
      130418 8:58:59 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
      130418 8:58:59 [Note] /usr/libexec/mysqld: ready for connections.
      Version: '5.5.30' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Remi

      Удалить
  13. Ссылку на лог файл (выше) я нашел в файле etc/my.cnf

    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock

    # Disabling symbolic-links is recommended to prevent assorted security risks
    symbolic-links=0

    # Settings user and group are ignored when systemd is used (fedora >= 15).
    # If you need to run mysqld under a different user or group,
    # customize your systemd unit file for mysqld according to the
    # instructions in http://fedoraproject.org/wiki/Systemd
    user=mysql

    # Semisynchronous Replication
    # http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html
    # uncomment next line on MASTER
    ;plugin-load=rpl_semi_sync_master=semisync_master.so
    # uncomment next line on SLAVE
    ;plugin-load=rpl_semi_sync_slave=semisync_slave.so

    # Others options for Semisynchronous Replication
    ;rpl_semi_sync_master_enabled=1
    ;rpl_semi_sync_master_timeout=10
    ;rpl_semi_sync_slave_enabled=1

    # http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html
    ;performance_schema


    [mysqld_safe]
    log-error=/var/log/mysqld.log
    pid-file=/var/run/mysqld/mysqld.pid


    ОтветитьУдалить
  14. Вспомнил про книгу, беглый просмотр главы 28 "Администрирование..." книги MySQL 5 (М.Кузнецов...)
    привел в замешательство, такое количество настроек и параметров, думаю, даже разработчики не знают...
    Потому решил воспользоваться стандартными настройками

    Возьмем /usr/share/doc/mysql-server-5.5.30/my-large.cnf (эти файлы есть еще и в /usr/share/mysql/...),
    и скопируем его в etc/my.cnf (что, собственно, и рекомендуется сделать... http://drupal.org/node/259580 Великолепная статья по настройке mysql "MySQL: "Warning: MySQL server has gone away")

    ОтветитьУдалить
  15. gedit /usr/share/doc/mysql-server-5.5.30/my-large.cnf

    # Example MySQL config file for large systems.
    #
    # This is for a large system with memory = 512M where the system runs mainly
    # MySQL.
    #
    # MySQL programs look for option files in a set of
    # locations which depend on the deployment platform.
    # You can copy this option file to one of those
    # locations. For information about these locations, see:
    # http://dev.mysql.com/doc/mysql/en/option-files.html
    #
    # In this file, you can use all long options that a program supports.
    # If you want to know which options a program supports, run the program
    # with the "--help" option.

    # The following options will be passed to all MySQL clients
    [client]
    #password = your_password
    port = 3306
    socket = /var/lib/mysql/mysql.sock

    # Here follows entries for some specific programs

    # The MySQL server
    [mysqld]
    port = 3306
    socket = /var/lib/mysql/mysql.sock
    skip-external-locking
    key_buffer_size = 256M
    max_allowed_packet = 1M
    table_open_cache = 256
    sort_buffer_size = 1M
    read_buffer_size = 1M
    read_rnd_buffer_size = 4M
    myisam_sort_buffer_size = 64M
    thread_cache_size = 8
    query_cache_size= 16M
    # Try number of CPU's*2 for thread_concurrency
    thread_concurrency = 8

    # Don't listen on a TCP/IP port at all. This can be a security enhancement,
    # if all processes that need to connect to mysqld run on the same host.
    # All interaction with mysqld must be made via Unix sockets or named pipes.
    # Note that using this option without enabling named pipes on Windows
    # (via the "enable-named-pipe" option) will render mysqld useless!
    #
    #skip-networking

    # Replication Master Server (default)
    # binary logging is required for replication
    log-bin=mysql-bin

    # binary logging format - mixed recommended
    binlog_format=mixed

    ОтветитьУдалить
    Ответы
    1. # required unique id between 1 and 2^32 - 1
      # defaults to 1 if master-host is not set
      # but will not function as a master if omitted
      server-id = 1

      # Replication Slave (comment out master section to use this)
      #
      # To configure this host as a replication slave, you can choose between
      # two methods :
      #
      # 1) Use the CHANGE MASTER TO command (fully described in our manual) -
      # the syntax is:
      #
      # CHANGE MASTER TO MASTER_HOST=, MASTER_PORT=,
      # MASTER_USER=, MASTER_PASSWORD= ;
      #
      # where you replace , , by quoted strings and
      # by the master's port number (3306 by default).
      #
      # Example:
      #
      # CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
      # MASTER_USER='joe', MASTER_PASSWORD='secret';
      #
      # OR
      #
      # 2) Set the variables below. However, in case you choose this method, then
      # start replication for the first time (even unsuccessfully, for example
      # if you mistyped the password in master-password and the slave fails to
      # connect), the slave will create a master.info file, and any later
      # change in this file to the variables' values below will be ignored and
      # overridden by the content of the master.info file, unless you shutdown
      # the slave server, delete master.info and restart the slaver server.
      # For that reason, you may want to leave the lines below untouched
      # (commented) and instead use CHANGE MASTER TO (see above)
      #
      # required unique id between 2 and 2^32 - 1
      # (and different from the master)
      # defaults to 2 if master-host is set
      # but will not function as a slave if omitted
      #server-id = 2
      #
      # The replication master for this slave - required
      #master-host =
      #
      # The username the slave will use for authentication when connecting
      # to the master - required
      #master-user =
      #
      # The password the slave will authenticate with when connecting to
      # the master - required
      #master-password =
      #
      # The port the master is listening on.
      # optional - defaults to 3306
      #master-port =
      #
      # binary logging - not required for slaves, but recommended
      #log-bin=mysql-bin

      # Uncomment the following if you are using InnoDB tables
      #innodb_data_home_dir = /var/lib/mysql
      #innodb_data_file_path = ibdata1:10M:autoextend
      #innodb_log_group_home_dir = /var/lib/mysql
      # You can set .._buffer_pool_size up to 50 - 80 %
      # of RAM but beware of setting memory usage too high
      #innodb_buffer_pool_size = 256M
      #innodb_additional_mem_pool_size = 20M
      # Set .._log_file_size to 25 % of buffer pool size
      #innodb_log_file_size = 64M
      #innodb_log_buffer_size = 8M
      #innodb_flush_log_at_trx_commit = 1
      #innodb_lock_wait_timeout = 50

      [mysqldump]
      quick
      max_allowed_packet = 16M

      [mysql]
      no-auto-rehash
      # Remove the next comment character if you are not familiar with SQL
      #safe-updates

      [myisamchk]
      key_buffer_size = 128M
      sort_buffer_size = 128M
      read_buffer = 2M
      write_buffer = 2M

      [mysqlhotcopy]
      interactive-timeout

      Удалить
  16. Ошибки при загрузке mysqld не давали покоя, решил научиться обновлять систему, как советовалв система... см выше старый файл /var/log/mysqld.log
    там ошибки и рекомендации...

    Вот как надо было запускать утилиту (с пользователем и паролем)
    [root@localhost /]# mysql_upgrade -u root -p1
    Вот что получилось при рестарте mysqld
    [root@localhost log]# cat mysqld.log | grep 16 (16 - это фильтр по времени перезагрузки, как раз пробило 16-00)
    130418 16:00:06 [Note] /usr/libexec/mysqld: Normal shutdown
    130418 16:00:08 [Warning] /usr/libexec/mysqld: Forcing close of thread 10 user: 'root'
    130418 16:00:08 InnoDB: Starting shutdown...
    130418 16:00:10 InnoDB: Shutdown completed; log sequence number 725528439
    130418 16:00:10 [Note] /usr/libexec/mysqld: Shutdown complete
    130418 16:00:10 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
    130418 16:00:13 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    130418 16:00:13 [Note] Plugin 'FEDERATED' is disabled.
    130418 16:00:13 InnoDB: The InnoDB memory heap is disabled
    130418 16:00:13 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    130418 16:00:13 InnoDB: Compressed tables use zlib 1.2.3
    130418 16:00:13 InnoDB: Using Linux native AIO
    130418 16:00:13 InnoDB: Initializing buffer pool, size = 128.0M
    130418 16:00:13 InnoDB: Completed initialization of buffer pool
    130418 16:00:13 InnoDB: highest supported file format is Barracuda.
    130418 16:00:13 InnoDB: Waiting for the background threads to start
    130418 16:00:14 InnoDB: 5.5.30 started; log sequence number 725528439
    130418 16:00:14 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
    130418 16:00:14 [Note] - '0.0.0.0' resolves to '0.0.0.0';
    130418 16:00:14 [Note] Server socket created on IP: '0.0.0.0'.
    130418 16:00:14 [Note] Event Scheduler: Loaded 0 events
    130418 16:00:14 [Note] /usr/libexec/mysqld: ready for connections.

    ОтветитьУдалить
    Ответы
    1. Руклводство How to use mysql_upgrade script
      http://nilinfobin.com/2011/08/how-to-use-mysql_upgrade-script/
      хорошо написано, отсюда я и взял
      [root@localhost /]# mysql_upgrade -u root -p1
      (см. выше)

      Удалить
  17. После апгрейда скорость загрузки страниц (всех) заметно возросла, так что эту операцию надо бы прменять регулярно.
    Но вчерашняяя последняя установка erpal опять вывела на ту же ошибку (Друпал уже установлен).
    После этого разобрал код index.php, понял, что там стоит перехватчик ошибок, который выдает
    PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away:
    и еще уйму текста внизу...
    Поытался полезть вглубь авторсккого PHP, но понял, что утону...

    ОтветитьУдалить
  18. Сегодня решил, что раз ошибка mysql, то, наварное дело в том, что
    1) сначала установка не производилась нормально из-за малого времени ожидания (я его менял в .htaccess на 180)

    Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/erpal-new/modules/field/field.info.inc on line 345

    2) Что я после этого сделал? Среди прочего затер в myphpadmin старую БД erpal и тут же создал новую пустую с этим же именем (!!!)

    ОтветитьУдалить
  19. Почему так много этапов при создании сайта реботает три скрипта, как минимум
    Welcome(done)
    Choose language(done)
    Verify requirements(done)
    Set up database(done)
    Install profile(done)
    Configure site(active)
    Preparing site
    Contact information
    Finished

    ОтветитьУдалить
    Ответы
    1. В процессе Configure site(active) выскакивает сообщение:

      Content permissions have been rebuilt.
      A PHP code text format has been created.
      A Display Suite code text format has been created.
      Content permissions have been rebuilt.

      Warning message
      All necessary changes to sites/default and sites/default/settings.php have been made, so you should remove write permissions to them now in order to avoid security risks. If you are unsure how to do so, consult the online handbook.

      Я поменял
      [root@localhost default]# chmod 755 settings.php

      и отключил selinux (!!!)
      [root@localhost default]# getenforce
      Enforcing
      [root@localhost default]# setenforce 0
      [root@localhost default]# getenforce
      Permissive

      Удалить
    2. На всякий случай еще и страну по умолчанию не выбрал ...
      Пошел опяиять работать скрипт...

      29%
      Completed 4 of 14.
      Created project taxonomies

      Completed 8 of 14.
      Created relation types
      ////
      Что это за 14 задач?

      Удалить
    3. Теперь заполняю страничку Contact information

      Страна по умолчанию Country Germany
      (если в предыдущем экране выбрать Россию, то это поле вообще пустое...)

      Ну и наконец (в очередной раз) получаю сообщение, что все хорошо:
      Content permissions have been rebuilt.

      Congratulations, you installed ERPAL!

      Visit your new site.

      И опять попвадаю на http://localhost/erpal-last/install.php

      Удалить
  20. Далее от отчаяния (нет идей) пробуем обновится по ссылке на ненавистной http://localhost/erpal-last/install.php
    и снова натыкаемся на ошибку

    PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

    вставляем в /etc/my.cnf

    max_allowed_packet = 8M
    ...
    перегружаем
    service mysqld restart
    и все заработало
    Старею...

    ОтветитьУдалить