月別アーカイブ: 2016年7月

Ubuntu16 で、漢字入力を設定する

Ubuntu16 で、漢字入力を設定する

システム設定>言語サポート
を選択する

必要な言語パッケージがインストールされる

インストールされたた、

システム設定>テキスト入力
から、

日本語を選択し

ボタンで、削除する

ボタンで、追加を指定し
日本語(Mozc)(IBus)
を選択し、追加する
切り替えにカーソルを移動し、半角/全角
ボタンで、変換ボタンを指定する

矢印で、
日本語(Mozc)(IBus)
を、一番上にする

入力する場所で、変換ボタンを押して
入力が切り替えるのを見る(右上)
日本語変換になった時に
切り替えの表示を
クリックし、入力モードをひらがなにする

Ubuntu16 に、Chromeをインスツール

Ubuntu16 に、Chromeをインスツールします

https://www.google.co.jp/chrome/browser/desktop/

から、パッケージをダウンロードする

gdebiをダウンロードする

sudo apt -y install gdebi

ダウンロードしたフォルダーから

google-chrome-stable_current_amd64.deb
を、右クリックで、gdebiを選択して
インストールを行う

完了したら、左上のコンピュータ検索から
chrome
で検索する

ドラッグして、メニューに追加する

検索で表示されない場合には
端末から

google-chrome

で、一度、起動する

左上のコンピュータ検索から
chrome
で検索する

ドラッグして、メニューに追加する

CentOS 6.7にWordPressとレスポンシブルWebデザインテーマbizvektorを組み込んでみる

CentOS 6.7にWordPressとレスポンシブルWebデザインテーマbizvektorを組み込んでみる

CentOs に WordPressをインストールする

root権限になっていなければ、rootになる

$su
パスワード:
#

各種パッケージ
httpd mysql-server php php-mysql wget
をインストールする

yum -y install httpd mysql-server php php-mysql wget

apacheがインストールされたか確認

/etc/init.d/httpd status
httpd は停止しています

apacheを起動する

/etc/init.d/httpd start
httpd を起動中: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
                                                           [  OK  ]

localhostにアクセスする

curl 'http://localhost/'

firefoxで、アクセスしてみる

firefox localhost/

タイムゾーンの設定
PHPの設定ファイル(/etc/php.ini)を編集する。


vim /etc/php.ini

date.timezone =を検索(”/”は検索)

/date.timezone =

iで、挿入モードにして
#date.timezone =
date.timezone = “Asia/Tokyo”
に変更

; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
#date.timezone =
date.timezone = "Asia/Tokyo"

esc+:wq
で、上書き終了

apacheを再起動

/etc/init.d/httpd restart

httpd を停止中:                                            [  OK  ]
httpd を起動中: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
                                                           [  OK  ]

Webが起動し、PHPが走っているか確認する

cat <<EOF > /var/www/html/phpinfo.php
<?php
phpinfo();
?>
EOF

curl 'http://localhost/phpinfo.php'

firefoxで、アクセスしてみる

firefox localhost/phpinfo.php

mysqlがインストールされたか確認

/etc/init.d/mysqld status

mysqld は停止しています

mysqlを起動する

/etc/init.d/mysqld start

   :
mysqld を起動中:                                           [  OK  ]

パスワードを設定(rootにパスワードcentosと設定してみた)

mysql -u root

update mysql.user set password=password('centos') where user = 'root';
flush privileges;
exit;

設定したパスワードでログインできるかを確認します。

# mysql -u root -p
Enter password: 

exit;

データベース(wordpress)を作成
wordpressというユーザを作成し、パスワードをwordpress2016とする

# mysql -u root -p
Enter password: 
create database wordpress;
grant all privileges on wordpress.* to wordpress@localhost identified by 'wordpress2016';

WordPressをインストール
WordPressをダウンロードし
ファイルを解凍し、
Apacheが読み込めるようにする。

cd /tmp
wget http://ja.wordpress.org/wordpress-3.8.1-ja.tar.gz
tar zxvf wordpress-3.8.1-ja.tar.gz 
cp -r wordpress /var/www/
chown -R apache.apache /var/www/wordpress

apacheの設定を行う

vim /etc/httpd/conf/httpd.conf

DocumentRoot “/var/www/html
DocumentRoot “/var/www/wordpress”
に変更

DocumentRoot “/var/www/htmlを検索

/DocumentRoot "/var/www/html

DocumentRoot “/var/www/wordpress”
に変更

iで、挿入モードに入る

#DocumentRoot "/var/www/html"
DocumentRoot  "/var/www/wordpress "

次に、

<Directory "/var/www/html">

<Directory "/var/www/wordpress">

に変更
一度、ESCで、コマンドモードに戻り

/<Directory "/var/www/html">

で、検索
挿入モードiで、

#<Directory "/var/www/html">
<Directory "/var/www/wordpress">

に、修正
次に、

<Directory "/var/www/wordpress">

の中の

    AllowOverride None

を、

    AllowOverride All

に変更

#   AllowOverride None
    AllowOverride All

に変更

esc+:wq

を指定

apacheを再起動

/etc/init.d/httpd restart

httpd を停止中:                                            [  OK  ]
httpd を起動中: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
                                                           [  OK  ]

fierfoxで、アクセスする

firefox localhost/

データベース名:wordpress
ユーザ名:wordpress
パスワード:wordpress2016
データベースのホスト名:localhost
テーブル接頭辞:wp_

「インストール続行」
サイトのタイトル:タイトル
ユーザー名:admin
パスワード:admin_password
パスワード:admin_password
メールアドレス:xxx@yyy.zz
「WordPressをインストール」

成功しました !

「ログイン」

にて、開始画面へ

WordPress 4.5.3 が利用可能です ! 更新してください。

とのメッセージがあるため、
WordPress 4.5.3に更新する

WordPress の新しいバージョンがあります。
「今すぐ更新」
を押下

更新の後、ログイン画面に戻るので、
ログイン後、
プラグインを「今すぐ更新」を押下

次に、レスポンシブルWebデザインテーマbizvektorを組み込んでみる

BizVektor

HOME


のダウンロードページ

ダウンロード


から、
Download BizVektor ver 1.8.23
を、ダウンロード

外観>テーマ>新規追加
「データのアップロード」
により
先ほど、ダウンロードしたファイルを「参照」で
指定し、
「今すぐインストール」
を、押下

外観>テーマ
選択し、
ダウンロードしたテーマ「BizVektor」
を、有効にしてください。

BizVektor クイックスタート


に従い、
「プラグイン」→「新規追加」画面より、『お気に入り』画面を表示。
「wordpress.orgユーザー名」のフォームに「bizvektor」と入力して、必要なプラグインをインストール。

インストールした、プラグインを有効化します

プラグインを追加する
プラグインが、有効にならない場合、
必要なライブラィーを追加する

お使いの WP Multibyte Patch を有効化するには PHP の mbstring 関数が必要です。

yum -y install php-mbstring

apacheを再起動

/etc/init.d/httpd restart

httpd を停止中:                                            [  OK  ]
httpd を起動中: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
                                                           [  OK  ]

BizVektor クイックスタート


コンテンツデータのダウンロード・インポート
に従い、コンテンツデータを、インポートする

「ツール」→「インポート」→「WordPress」でダウンロードしたxmlファイルを選択し、「ファイルをアップロードしてインポート」

インストール時のエラーが分からないので、
エラー表示を有効にする

vim /etc/php.ini

display_errors = Off
変更前
display_errors = On
変更後

display_errors =を検索し

/display_errors = 

i挿入モードで

;display_errors = Off
display_errors = On

に変更
esc+:wqで上書き終了

apacheを再起動

/etc/init.d/httpd restart

httpd を停止中:                                            [  OK  ]
httpd を起動中: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
                                                           [  OK  ]

WordPress インポートできない時の対処方法
Fatal error: Class ‘DOMDocument’ not found

yum -y install php-xml

再度、apacheを再起動

/etc/init.d/httpd restart

httpd を停止中:                                            [  OK  ]
httpd を起動中: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
                                                           [  OK  ]

サンプルデータが表示できた・・・

apacheとmysqlを自動起動に設定する

現状の確認
apacheは

chkconfig --list | grep httpd

offになっている

httpd          	0:off	1:off	2:off	3:off	4:off	5:off	6:off

自動起動(on)に設定

chkconfig httpd on

onになった

chkconfig --list | grep httpd
httpd          	0:off	1:off	2:on	3:on	4:on	5:on	6:off

mysqlの設定も

chkconfig --list | grep mysqld

offになっている

mysqld          	0:off	1:off	2:off	3:off	4:off	5:off	6:off

onにする

chkconfig mysqld on
chkconfig --list | grep mysqld
mysqld          	0:off	1:off	2:on	3:on	4:on	5:on	6:off

一応chromeもインストールしておく

wget http://chrome.richardlloyd.org.uk/install_chrome.sh
bash ./install_chrome.sh

テーマ、記事などを、修正削除していて、
うまく行かなくなり、削除し、再インストーツする場合。

wordpressが残っている確認する

cd /tmp
ls wordpress

もし、なければ、再度、ダウンロード

cd /tmp
wget http://ja.wordpress.org/wordpress-3.8.1-ja.tar.gz
tar zxvf wordpress-3.8.1-ja.tar.gz 

コンテンツ側(/var/www/wordpress)を削除し、
再度、複写する

rm -rf /var/www/wordpress
cp -r wordpress /var/www/
chown -R apache.apache /var/www/wordpress

Webより、再度設定する

firefox localhost/

データベーステーブルの接頭辞は、
一応、wp1_に変えておく

エラー対策まとめ、

■プラグイン有効時(WP Multibyte Patch)でのエラー
[/html]
yum -y install php-mbstring
/etc/init.d/httpd restart
[/html]

■サンプルデータのインポート時に無反応

vim /etc/php.ini
にて、
display_errors = On
/etc/init.d/httpd restart

■サンプルデータのインポート時のエラー

yum -y install php-xml
/etc/init.d/httpd restart

■サンプルデータ読み込み時の、infoエラー

をインポートできませんでした。投稿タイプ info が有効ではありません。

テーマが、「BizVektor」に切り替わっていない
外観>テーマで、
「BizVektor」を有効化