湖濱散記部落格的樹心幽徑[login][主頁]
307:20141103安裝moodle

(1)
[root@localhost webadm]# wget https://download.moodle.org/download.php/direct/stable27/moodle-latest-27.tgz
--2014-10-29 07:52:50--  https://download.moodle.org/download.php/direct/stable27/moodle-latest-27.tgz
正在查找主機 download.moodle.org (download.moodle.org)... 141.101.113.179, 141.101.112.179, 2400:cb00:2048:1::8d65:70b3, ...
正在連接 download.moodle.org (download.moodle.org)|141.101.113.179|:443... 連上了。
已送出 HTTP 要求,正在等候回應... 200 OK
長度: 34880610 (33M) [application/x-forcedownload]
Saving to: ‘moodle-latest-27.tgz.1’

100%[======================================>] 34,880,610  4.91MB/s   in 6.2s

2014-10-29 07:52:56 (5.40 MB/s) - ‘moodle-latest-27.tgz.1’ saved [34880610/34880610]

[root@localhost webadm]# mv moodle-latest-27.tgz.1 moodle-latest-27.tgz
mv:是否覆寫 ‘moodle-latest-27.tgz’? y
[root@localhost webadm]#

(2)
[root@localhost webadm]# tar xvzf moodle-latest-27.tgz

(3)

[root@localhost webadm]# mv moodle /usr/local/apache2/htdocs/
[root@localhost webadm]#
(4)
http://163.25.20.92/moodle/install.php

選擇一種語言:zw-th

(5)環境檢查失敗!

cURL PHP擴展
    必須安裝並啟用
Zip PHP擴展
    必須安裝並啟用

(6)
[root@localhost webadm]# yum install curl
Loaded plugins: langpacks, refresh-packagekit
Package curl-7.29.0-23.fc19.i686 already installed and latest version
Nothing to do
[root@localhost webadm]#

(7)rebuild php
[root@localhost webadm]# cd php-5.4.34
[root@localhost php-5.4.34]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql --with-jpeg-dir=/home/webadm/jpeg-6b --with-gd --with-curl
:

checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/
[root@localhost php-5.4.34]#

[root@localhost php-5.4.34]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql --with-jpeg-dir=/home/webadm/jpeg-6b --with-gd --with-curlwrappers



(8)
[root@localhost php-5.4.34]# make
:

Don't forget to run 'make test'.

[root@localhost php-5.4.34]# make test

[root@localhost php-5.4.34]# make install

[root@localhost php-5.4.34]# libtool --finish /home/webadm/php-5.4.34/libs

[root@localhost php-5.4.34]# /usr/local/apache2/bin/apachectl stop
httpd (no pid file) not running
[root@localhost php-5.4.34]# /usr/local/apache2/bin/apachectl start
[root@localhost php-5.4.34]#


[root@localhost php-5.4.34]# curl -V
curl 7.29.0 (i686-redhat-linux-gnu) libcurl/7.29.0 NSS/3.16.2 Basic ECC zlib/1.2.7 libidn/1.26 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz
[root@localhost php-5.4.34]# locate curl
[root@localhost php-5.4.34]# locate  curl-devel
[root@localhost php-5.4.34]# yum install  curl-devel
:

Installed:
  libcurl-devel.i686 0:7.29.0-23.fc19
Complete!
[root@localhost php-5.4.34]#

(9)
[root@localhost php-5.4.34]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql --with-jpeg-dir=/home/webadm/jpeg-6b --with-gd --with-curl
[root@localhost php-5.4.34]# make
:
Don't forget to run 'make test'.
[root@localhost php-5.4.34]# make test
Do you want to send this report now? [Yns]: n
[root@localhost php-5.4.34]# make install
[root@localhost php-5.4.34]# libtool --finish /home/webadm/php-5.4.34/libs

(10)
[root@localhost php-5.4.34]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql --with-jpeg-dir=/home/webadm/jpeg-6b --with-gd --with-curl  --enable-zip


[root@localhost php-5.4.34]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql --with-jpeg-dir=/home/webadm/jpeg-6b --with-gd --with-curl  --enable-zip --with-zlib
:
PEAR package PHP_Archive not insta
lled: generated phar will require PHP's phar extension be enabled.

[root@localhost php-5.4.34]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql --with-jpeg-dir=/home/webadm/jpeg-6b --with-gd --with-curl  --enable-zip --with-zlib --enable-mbstring

(11)
[root@localhost php-5.4.34]#  wget http://pear.php.net/go-pear.phar
--2014-10-30 07:55:33--  http://pear.php.net/go-pear.phar
:
2014-10-30 07:55:38 (789 KB/s) - ‘go-pear.phar’ saved [3673193/3673193]


[root@localhost php-5.4.34]# whereis php
php: /usr/bin/php /usr/lib/php /etc/php.ini /etc/php.d /usr/local/bin/php /usr/local/lib/php.ini /usr/local/lib/php /usr/local/php /usr/share/php /usr/share/man/man1/php.1.gz
[root@localhost php-5.4.34]# /usr/bin/php ./go-pear.phar

Below is a suggested file layout for your new PEAR installation.  To
change individual locations, type the number in front of the
directory.  Type 'all' to change all of them or simply press Enter to
accept these locations.

 1. Installation base ($prefix)                   : /usr
 2. Temporary directory for processing            : /tmp/pear/install
 3. Temporary directory for downloads             : /tmp/pear/install
 4. Binaries directory                            : /usr/bin
 5. PHP code directory ($php_dir)                 : /usr/share/pear
 6. Documentation directory                       : /usr/docs
 7. Data directory                                : /usr/data
 8. User-modifiable configuration files directory : /usr/cfg
 9. Public Web Files directory                    : /usr/www
10. Tests directory                               : /usr/tests
11. Name of configuration file                    : /etc/pear.conf

1-11, 'all' or Enter to continue:
Beginning install...
Configuration written to /etc/pear.conf...
Initialized registry...
Preparing to install...
installing phar:///home/webadm/php-5.4.34/go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar-1.3.12.tar...
installing phar:///home/webadm/php-5.4.34/go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt-1.3.1.tar...
installing phar:///home/webadm/php-5.4.34/go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.9.5.tar...
installing phar:///home/webadm/php-5.4.34/go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.0.4.tar...
installing phar:///home/webadm/php-5.4.34/go-pear.phar/PEAR/go-pear-tarballs/XML_Util-1.2.3.tar...
PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in phar:///home/webadm/php-5.4.34/go-pear.phar/PEAR/Registry.php on line 1012
PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in phar:///home/webadm/php-5.4.34/go-pear.phar/PEAR/Registry.php on line 1012
PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in phar:///home/webadm/php-5.4.34/go-pear.phar/PEAR/Registry.php on line 1012
PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in phar:///home/webadm/php-5.4.34/go-pear.phar/PEAR/Registry.php on line 1012
install ok: channel://pear.php.net/Archive_Tar-1.3.12
install ok: channel://pear.php.net/Console_Getopt-1.3.1
install ok: channel://pear.php.net/Structures_Graph-1.0.4
install ok: channel://pear.php.net/XML_Util-1.2.3
install ok: channel://pear.php.net/PEAR-1.9.5
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
PEAR: To install optional features use "pear install pear/PEAR#featurename"

** WARNING! Backed up old pear to /usr/local/bin/pear_old

The 'pear' command is now at your service at /usr/bin/pear
[root@localhost php-5.4.34]#



(12)
[root@localhost php-5.4.34]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql --with-jpeg-dir=/home/webadm/jpeg-6b --with-gd --with-curl  --enable-zip --with-zlib --enable-mbstring
[root@localhost php-5.4.34]# make
:
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.


[root@localhost php-5.4.34]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql --with-jpeg-dir=/home/webadm/jpeg-6b --with-gd --with-curl  --enable-zip --with-zlib --enable-mbstring --without-pear
[root@localhost php-5.4.34]# make
:
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
[root@localhost php-5.4.34]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql --with-jpeg-dir=/home/webadm/jpeg-6b --with-gd --with-curl  --enable-zip --with-zlib --enable-mbstring --enable-pear
[root@localhost php-5.4.34]# make
[root@localhost php-5.4.34]# make test
[root@localhost php-5.4.34]# make install
[root@localhost php-5.4.34]# libtool --finish /home/webadm/php-5.4.34/libs

(13)確認路徑
網站位址: http://163.25.20.92/moodle
Moodle目錄: /usr/local/apache2/htdocs/moodle
資料目錄:  /usr/local/apache2/moodledata

(14)
[root@localhost ~]# cd /usr/local/apache2/
[root@localhost apache2]# mkdir /usr/local/apache2/moodledata
[root@localhost apache2]# chmod 777 /usr/local/apache2/moodledata

(15)
選擇資料庫裝置:native/mysqli
資料庫主機:local
資料庫名稱:moodle
資料庫用戶名稱:root
資料庫密碼:
資料表名稱的前置字元:mdl_
資料庫端:
Unix socket:

PHP的MySQLi延伸套件沒有適當設置

(16)
[root@localhost php-5.4.34]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql --with-jpeg-dir=/home/webadm/jpeg-6b --with-gd --with-curl  --enable-zip --with-zlib --enable-mbstring --with-pear --with-mysqli
[root@localhost php-5.4.34]# make
[root@localhost php-5.4.34]# make test
[root@localhost php-5.4.34]# make install
[root@localhost php-5.4.34]# libtool --finish /home/webadm/php-5.4.34/libs

(17)
設定完成:
Moodle會嘗試將設定資料儲存在您的Moodle根目錄中。這個安裝程式無法自動將您所選擇的設定建立成config.php檔,這可能是因為Moodle目錄無法寫入。您可以手動複製下面的程式碼到Moodle的根目錄下,建立名為config.php的檔案中。
[root@localhost php-5.4.34]# vi /usr/local/apache2/htdocs/moodle/config.php
[root@localhost php-5.4.34]# cat /usr/local/apache2/htdocs/moodle/config.php
<?php  // Moodle configuration file

unset($CFG);
global $CFG;
$CFG = new stdClass();

$CFG->dbtype    = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost    = 'localhost';
$CFG->dbname    = 'moodle';
$CFG->dbuser    = 'root';
$CFG->dbpass    = '??????';
$CFG->prefix    = 'mdl_';
$CFG->dboptions = array (
  'dbpersist' => 0,
  'dbport' => '',
  'dbsocket' => '',
);

$CFG->wwwroot   = 'http://163.25.20.92/moodle';
$CFG->dataroot  = '/usr/local/apache2/moodledata';
$CFG->admin     = 'admin';

$CFG->directorypermissions = 0777;

require_once(dirname(__FILE__) . '/lib/setup.php');

// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!
[root@localhost php-5.4.34]#


(18)
安裝Moodle - Modular Object-Oriented Dynamic Learning Environment
版權聲明
(19)
伺服器檢查
名稱     資訊     報表     外掛程式     狀態
database     mysql (5.0.27-log)     需求版本為5.5.31,而您目前版本為 5.0.27         檢查
php_extension     openssl     為了最佳效果,應該安裝並啟用

強烈建議您安裝 OpenSSL 函式庫,這樣才能夠使用 Moodle Networking功能
        檢查
php_extension     xmlrpc     為了最佳效果,應該安裝並啟用

xmlrpc延伸套件對於hub伺服器通訊是必須要的,而且Web Service網站服務和Moodle Networking功能也會用到。
        檢查
php_extension     soap     為了最佳效果,應該安裝並啟用

安裝選擇性的soap擴展,對於web services和某些外掛是有用的。
        檢查
php_extension     intl     為了最佳效果,應該安裝並啟用

intl延伸套件可以增強國際化支持,例如符合區域習慣的排序。
        檢查
php_setting     opcache.enable     PHP設定應該修改。

PHP的opcode快取可以改進效率並降低記憶體的需求,本系統建議使用,並完全支援OPCache擴展,
        檢查
unicode         必須安裝並啟用         好
php         需求版本為5.4.4,而您目前版本為 5.4.34         好
pcreunicode         為了最佳效果,應該安裝並啟用         好
php_extension     iconv     必須安裝並啟用         好
php_extension     mbstring     為了最佳效果,應該安裝並啟用         好
php_extension     curl     必須安裝並啟用         好
php_extension     tokenizer     為了最佳效果,應該安裝並啟用         好
php_extension     ctype     必須安裝並啟用         好
php_extension     zip     必須安裝並啟用         好
php_extension     zlib     必須安裝並啟用         好
php_extension     gd     必須安裝並啟用         好
php_extension     simplexml     必須安裝並啟用         好
php_extension     spl     必須安裝並啟用         好
php_extension     pcre     必須安裝並啟用         好
php_extension     dom     必須安裝並啟用         好
php_extension     xml     必須安裝並啟用         好
php_extension     json     必須安裝並啟用         好
php_extension     hash     必須安裝並啟用         好
php_setting     memory_limit     檢測到建議設定         好
php_setting     file_uploads     檢測到建議設定         好
在開始安裝這個 Moodle 版本前,您必須修正上述所有環境問題(錯誤)!

(20)
[root@localhost php-5.4.34]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql --with-jpeg-dir=/home/webadm/jpeg-6b --with-gd --with-curl  --enable-zip --with-zlib --enable-mbstring --with-pear --with-mysqli --with-xmlrpc --with-openssl --with-libxml-dir

:
configure: error: Cannot find OpenSSL's <evp.h>

[root@localhost php-5.4.34]# yum install openssl
Updated:
  openssl.i686 1:1.0.1e-40.fc19

Dependency Updated:
  openssl-libs.i686 1:1.0.1e-40.fc19

Complete!

(21)
[root@localhost php-5.4.34]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql --with-jpeg-dir=/home/webadm/jpeg-6b --with-gd --with-curl  --enable-zip --with-zlib --enable-mbstring --with-pear --with-mysqli --with-xmlrpc

It's solve problem for php_extension     xmlrpc     為了最佳效果,應該安裝並啟用



(22)
[root@localhost php-5.4.34]# yum install php-opcache
:
Installed:
  php-opcache.i686 0:5.5.18-1.fc19

Dependency Updated:
  php-cli.i686 0:5.5.18-1.fc19              php-common.i686 0:5.5.18-1.fc19          php-gd.i686 0:5.5.18-1.fc19
  php-process.i686 0:5.5.18-1.fc19          php-xml.i686 0:5.5.18-1.fc19

Complete!


(23)
[root@localhost php-5.4.34]# vi /usr/local/lib/php.ini

[root@localhost webadm]# vi /usr/local/lib/php.ini
[root@localhost webadm]# cat /usr/local/lib/php.ini|grep opcache
[opcache]
opcache.enable=1
opcache.enable_cli=0
opcache.memory_consumption=64
opcache.interned_strings_buffer=4
opcache.max_accelerated_files=2000
opcache.max_wasted_percentage=5
opcache.use_cwd=1
opcache.validate_timestamps=1
opcache.revalidate_freq=2
opcache.revalidate_path=0
opcache.save_comments=1
opcache.load_comments=1
opcache.fast_shutdown=0
opcache.enable_file_override=0
opcache.optimization_level=0xffffffff
opcache.inherited_hack=1
opcache.dups_fix=0
opcache.blacklist_filename=
opcache.max_file_size=0
opcache.consistency_checks=0
opcache.force_restart_timeout=180
opcache.error_log=
opcache.log_verbosity_level=1
opcache.preferred_memory_model=
opcache.protect_memory=0
[root@localhost webadm]# /usr/local/apache2/bin/apachectl stop
[root@localhost webadm]# /usr/local/apache2/bin/apachectl stop
httpd (no pid file) not running
[root@localhost webadm]# /usr/local/apache2/bin/apachectl start
[root@localhost webadm]#

(24)

[root@localhost webadm]#  yum install php-intl
:                                                                    1/1

Installed:
  php-intl.i686 0:5.5.18-1.fc19

Complete!
[root@localhost webadm]#

(25)--enable-intl
[root@localhost webadm]# cd php-5.4.34/
[root@localhost php-5.4.34]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql --with-jpeg-dir=/home/webadm/jpeg-6b --with-gd --with-curl  --enable-zip --with-zlib --enable-mbstring --with-pear --with-mysqli --with-xmlrpc --enable-intl

checking for location of ICU headers and libraries... not found
configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.

(26)

[root@localhost php-5.4.34]# yum install libicu-devel
:                                                                     1/1

Installed:
  libicu-devel.i686 0:50.1.2-9.fc19

Complete!
[root@localhost php-5.4.34]#

(27)

[root@localhost php-5.4.34]# yum install php-soap
:
Installed:
  php-soap.i686 0:5.5.18-1.fc19

Complete!
[root@localhost php-5.4.34]#

(28) --enable-soap

[root@localhost php-5.4.34]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql --with-jpeg-dir=/home/webadm/jpeg-6b --with-gd --with-curl  --enable-zip --with-zlib --enable-mbstring --with-pear --with-mysqli --with-xmlrpc --enable-intl  --enable-soap
[root@localhost php-5.4.34]# make
[root@localhost php-5.4.34]# make test
[root@localhost php-5.4.34]# make install


(29)--with-openssl

[root@localhost php-5.4.34]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql --with-jpeg-dir=/home/webadm/jpeg-6b --with-gd --with-curl  --enable-zip --with-zlib --enable-mbstring --with-pear --with-mysqli --with-xmlrpc --enable-intl  --enable-soap --with-openssl
err

(30)

[root@localhost php-5.4.34]# yum install openssl-devel

:
Installed:
  openssl-devel.i686 1:1.0.1e-40.fc19

Dependency Installed:
  keyutils-libs-devel.i686 0:1.5.9-1.fc19   krb5-devel.i686 0:1.11.3-25.fc19     libcom_err-devel.i686 0:1.42.7-2.fc19
  libselinux-devel.i686 0:2.1.13-15.fc19    libsepol-devel.i686 0:2.1.9-1.fc19   libverto-devel.i686 0:0.2.5-2.fc19

Complete!
[root@localhost php-5.4.34]#

(31)--with-openssl
[root@localhost php-5.4.34]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs  --with-mysql --with-jpeg-dir=/home/webadm/jpeg-6b --with-gd --with-curl  --enable-zip --with-zlib --enable-mbstring --with-pear --with-mysqli --with-xmlrpc --enable-intl  --enable-soap --with-openssl
[root@localhost php-5.4.34]# make
[root@localhost php-5.4.34]# make test
[root@localhost php-5.4.34]# make install

(32)

ftp> mget mysql*
mget mysql-5.5.40.tar.gz? y
227 Entering Passive Mode (163,25,20,2,247,185).
150 Opening BINARY mode data connection for mysql-5.5.40.tar.gz (21727672 bytes).
226 Transfer complete.
21727672 bytes received in 1.92 secs (11293.82 Kbytes/sec)
ftp> quit
221 Goodbye.
[root@localhost php-5.4.34]#
[root@localhost webadm]# ls
apr-1.5.1.tar.gz       httpd-2.4.10.tar.gz         moodle-latest-27.tgz  php-5.4.34         公共  模板
apr-1.5.1.tar.gz.1     ImageMagick-6.8.9-8         mysql-5.0.27          php-5.4.34.tar.gz  圖片  音樂
apr-util-1.5.3.tar.gz  ImageMagick-6.8.9-8.tar.gz  mysql-5.0.27.tar.gz   php-5.6.0          影片
apr-util-1.5.4.tar.gz  jpeg-6b                     mysql-5.5.40.tar.gz   php-5.6.0.tar.gz   文件
httpd-2.4.10           jpegsrc.v6b.tar.gz          pcre-8.35.tar.bz2     下載               桌面
[root@localhost webadm]# tar xvzf mysql-5.5.40.tar.gz


[root@localhost mysql-5.5.40]# cat INSTALL-SOURCE |more
(33)
[root@localhost webadm]# yum install mysql mysql-server
:
Installed:
  mariadb.i686 1:5.5.39-1.fc19                              mariadb-server.i686 1:5.5.39-1.fc19

Dependency Installed:
  mariadb-libs.i686 1:5.5.39-1.fc19                            perl-AnyEvent.i686 0:7.04-2.fc19
  perl-AnyEvent-AIO.noarch 0:1.1-11.fc19                       perl-AnyEvent-BDB.noarch 0:1.1-10.fc19
  perl-BDB.i686 0:1.90-4.fc19                                  perl-Compress-Raw-Bzip2.i686 0:2.060-2.fc19
  perl-Compress-Raw-Zlib.i686 0:2.060-2.fc19                   perl-Coro.i686 0:6.23-2.fc19
  perl-DBD-MySQL.i686 0:4.023-2.fc19                           perl-DBI.i686 0:1.623-2.fc19
  perl-EV.i686 0:4.11-2.fc19                                   perl-Event.i686 0:1.21-2.fc19
  perl-Guard.i686 0:1.022-4.fc19                               perl-IO-AIO.i686 0:4.15-4.fc19
  perl-IO-Compress.noarch 0:2.060-2.fc19                       perl-IO-Socket-IP.noarch 0:0.30-2.fc19
  perl-IO-Socket-SSL.noarch 0:1.88-2.fc19                      perl-Net-Daemon.noarch 0:0.48-5.fc19
  perl-Net-HTTP.noarch 0:6.06-1.fc19                           perl-Net-LibIDN.i686 0:0.12-14.fc19
  perl-Net-SSLeay.i686 0:1.54-1.fc19                           perl-PlRPC.noarch 0:0.2020-13.fc19
  perl-Task-Weaken.noarch 0:1.04-6.fc19                        perl-common-sense.noarch 0:3.6-4.fc19

Complete!

(34)
[root@localhost webadm]# ps ax|grep mysql
  631 ?        S      0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe
21863 ?        Sl     0:04 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --user=mysql --pid-file=/usr/local/mysql/var/localhost.localdomain.pid --skip-external-locking --port=3306 --socket=/tmp/mysql.sock
23230 pts/0    S+     0:00 grep --color=auto mysql
[root@localhost webadm]# kill -9 631 21863

[root@localhost webadm]# systemctl enable mysqld.service
ln -s '/usr/lib/systemd/system/mysqld.service' '/etc/systemd/system/multi-user.target.wants/mysqld.service'
[root@localhost webadm]# systemctl start mysqld.service
Job for mysqld.service failed. See 'systemctl status mysqld.service' and 'journalctl -xn' for details.
[root@localhost webadm]# systemctl status mysqld.service
mysqld.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled)
   Active: failed (Result: exit-code) since 一 2014-11-03 16:45:38 CST; 33s ago
  Process: 23244 ExecStartPre=/usr/libexec/mysqld-prepare-db-dir %n (code=exited, status=1/FAILURE)

11月 03 16:45:38 localhost.localdomain mysqld-prepare-db-dir[23244]: https://mariadb.com/kb/en/installing-system-table..._db
11月 03 16:45:38 localhost.localdomain mysqld-prepare-db-dir[23244]: MariaDB is hosted on launchpad; You can find the ...and
11月 03 16:45:38 localhost.localdomain mysqld-prepare-db-dir[23244]: email lists at http://launchpad.net/maria
11月 03 16:45:38 localhost.localdomain mysqld-prepare-db-dir[23244]: Please check all of the above before submitting a...ort
11月 03 16:45:38 localhost.localdomain mysqld-prepare-db-dir[23244]: at http://mariadb.org/jira
11月 03 16:45:38 localhost.localdomain mysqld-prepare-db-dir[23244]: Initialization of MySQL database failed.
11月 03 16:45:38 localhost.localdomain mysqld-prepare-db-dir[23244]: Perhaps /etc/my.cnf is misconfigured.
11月 03 16:45:38 localhost.localdomain systemd[1]: mysqld.service: control process exited, code=exited status=1
11月 03 16:45:38 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
11月 03 16:45:38 localhost.localdomain systemd[1]: Unit mysqld.service entered failed state.
[root@localhost webadm]#

[root@localhost webadm]# /usr/bin/mysql_secure_installation
/usr/bin/mysql_secure_installation: line 379: find_mysql_client:命令找不到

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Enter current password for root (enter for none):
Aborting!

Cleaning up...
[root@localhost webadm]#
(35)


[root@localhost ~]# stat /etc/my.cnf
  File: ‘/etc/my.cnf’
  Size: 4912            Blocks: 16         IO Block: 4096   普通檔案
Device: fd01h/64769d    Inode: 1714267     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2014-11-03 08:26:17.594556069 +0800
Modify: 2014-10-14 17:12:37.151382519 +0800
Change: 2014-10-14 17:12:37.151382519 +0800
 Birth: -
[root@localhost ~]# cp /etc/my.cnf /etc/my.cnf_20141103
[root@localhost ~]#

(36)

[root@localhost moodle]# mv config.php config.php.1118
[root@localhost moodle]#

(37)選擇一種語言:ZW-TH
(38)確認路徑:
網站位址
Moodle目錄
資料目錄/usr/local/apache2/moodledata
(39)選擇資料庫裝置:mYSQL
(40)config.php
[root@localhost moodle]# vi config.php
[root@localhost moodle]# chmod 777 config.php
[root@localhost moodle]# cat config.php
<?php  // Moodle configuration file

unset($CFG);
global $CFG;
$CFG = new stdClass();

$CFG->dbtype    = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost    = 'localhost';
$CFG->dbname    = 'kmvs_moodle';
$CFG->dbuser    = 'root';
$CFG->dbpass    = 'xxx??x';
$CFG->prefix    = 'mdl_';
$CFG->dboptions = array (
  'dbpersist' => 0,
  'dbport' => '',
  'dbsocket' => '',
);

$CFG->wwwroot   = 'http://163.25.20.92/moodle';
$CFG->dataroot  = '/usr/local/apache2/moodledata';
$CFG->admin     = 'admin';

$CFG->directorypermissions = 0777;

require_once(dirname(__FILE__) . '/lib/setup.php');

// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!
[root@localhost moodle]#

(41)版權聲明....完成


select id,article_id,topic,text from lt_articles_text where article_id =307; ok. update lt_articles set num_reads=num_reads +1 where id=307; ok.