#Licensed to the Apache Software Foundation (ASF) under one #or more contributor license agreements. See the NOTICE file #distributed with this work for additional information #regarding copyright ownership. The ASF licenses this file #to you under the Apache License, Version 2.0 (the #"License"); you may not use this file except in compliance #with the License. You may obtain a copy of the License at #http://www.apache.org/licenses/LICENSE-2.0 #Unless required by applicable law or agreed to in writing, #software distributed under the License is distributed on an #"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY #KIND, either express or implied. See the License for the #specific language governing permissions and limitations #under the License. # # Translators: # Isaac Chiang , 2013. msgid "" msgstr "" "Project-Id-Version: Apache CloudStack Docs\n" "POT-Creation-Date: 2013-04-12T11:19:39\n" "PO-Revision-Date: 2013-04-10 08:56+0000\n" "Last-Translator: isaac.chiang \n" "Language-Team: None\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: zh_TW\n" "Plural-Forms: nplurals=1; plural=0;\n" #. Tag: title #, no-c-format msgid "Database Replication (Optional)" msgstr "複製資料庫(選擇性)" #. Tag: para #, no-c-format msgid "" "&PRODUCT; supports database replication from one MySQL node to another. This" " is achieved using standard MySQL replication. You may want to do this as " "insurance against MySQL server or storage loss. MySQL replication is " "implemented using a master/slave model. The master is the node that the " "Management Servers are configured to use. The slave is a standby node that " "receives all write operations from the master and applies them to a local, " "redundant copy of the database. The following steps are a guide to " "implementing MySQL replication." msgstr "&PRODUCT; 支援複製資料庫到另一個MySQL節點,使用standard MySQL replicatio來複製,您或許會想備份MySQL伺服器或避免儲存資料遺失,MySQL replication使用master/slave model。master是使用管理伺服器的節點;slave是待機節點負責接收master的寫入指令及應用到本地、其餘的資料庫備份,以下為複製的步驟" #. Tag: para #, no-c-format msgid "" "Creating a replica is not a backup solution. You should develop a backup " "procedure for the MySQL data that is distinct from replication." msgstr "建立複製品不等於備份,您需要發展一套與複製不同的備份步驟" #. Tag: para #, no-c-format msgid "Ensure that this is a fresh install with no data in the master." msgstr "確保master沒有任何資料" #. Tag: para #, no-c-format msgid "" "Edit my.cnf on the master and add the following in the [mysqld] section " "below datadir." msgstr "編輯master的my.cnf,加入以下行數在datadir下方的[mysqld]區域" #. Tag: programlisting #, no-c-format msgid "" "\n" "log_bin=mysql-bin\n" "server_id=1\n" " " msgstr "\nlog_bin=mysql-bin\nserver_id=1\n " #. Tag: para #, no-c-format msgid "" "The server_id must be unique with respect to other servers. The recommended " "way to achieve this is to give the master an ID of 1 and each slave a " "sequential number greater than 1, so that the servers are numbered 1, 2, 3, " "etc." msgstr "server_id必須是獨一無二的,建議是給master ID為1,其他slave則是大於1的連續數字,如此伺服器就會依照1,2,3...排列" #. Tag: para #, no-c-format msgid "Restart the MySQL service:" msgstr "重新啟動 MySQL " #. Tag: programlisting #, no-c-format msgid "" "\n" "# service mysqld restart\n" " " msgstr "\n# service mysqld restart\n " #. Tag: para #, no-c-format msgid "" "Create a replication account on the master and give it privileges. We will " "use the \"cloud-repl\" user with the password \"password\". This assumes " "that master and slave run on the 172.16.1.0/24 network." msgstr "在master新增複製帳戶,並給予優先權。使用\"cloud-repl\"為使用者名稱,\"password\"為密碼,在此假設master及slave是在172.16.1.0/24網路中" #. Tag: programlisting #, no-c-format msgid "" "\n" "# mysql -u root\n" "mysql> create user 'cloud-repl'@'172.16.1.%' identified by 'password';\n" "mysql> grant replication slave on *.* TO 'cloud-repl'@'172.16.1.%';\n" "mysql> flush privileges;\n" "mysql> flush tables with read lock;\n" " " msgstr "\n# mysql -u root\nmysql> create user 'cloud-repl'@'172.16.1.%' identified by 'password';\nmysql> grant replication slave on *.* TO 'cloud-repl'@'172.16.1.%';\nmysql> flush privileges;\nmysql> flush tables with read lock;\n " #. Tag: para #, no-c-format msgid "Leave the current MySQL session running." msgstr "離開現在的MySQL工作" #. Tag: para #, no-c-format msgid "In a new shell start a second MySQL session." msgstr "在另一個shell開啟第二個MySQL 工作" #. Tag: para #, no-c-format msgid "Retrieve the current position of the database." msgstr "取得目前資料庫的位置" #. Tag: programlisting #, no-c-format msgid "" "\n" "# mysql -u root\n" "mysql> show master status;\n" "+------------------+----------+--------------+------------------+\n" "| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |\n" "+------------------+----------+--------------+------------------+\n" "| mysql-bin.000001 | 412 | | |\n" "+------------------+----------+--------------+------------------+\n" " " msgstr "\n# mysql -u root\nmysql> show master status;\n+------------------+----------+--------------+------------------+\n| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |\n+------------------+----------+--------------+------------------+\n| mysql-bin.000001 | 412 | | |\n+------------------+----------+--------------+------------------+\n " #. Tag: para #, no-c-format msgid "Note the file and the position that are returned by your instance." msgstr "記下檔案及位置" #. Tag: para #, no-c-format msgid "Exit from this session." msgstr "離開此工作" #. Tag: para #, no-c-format msgid "" "Complete the master setup. Returning to your first session on the master, " "release the locks and exit MySQL." msgstr "完成master設定,回到第一個工作,解鎖並離開MySQL" #. Tag: programlisting #, no-c-format msgid "" "\n" "mysql> unlock tables;\n" " " msgstr "\nmysql> unlock tables;\n " #. Tag: para #, no-c-format msgid "" "Install and configure the slave. On the slave server, run the following " "commands." msgstr "安裝及設定slave。在slave伺服器,執行以下指令" #. Tag: programlisting #, no-c-format msgid "" "\n" "# yum install mysql-server\n" "# chkconfig mysqld on\n" " " msgstr "\n# yum install mysql-server\n# chkconfig mysqld on\n " #. Tag: para #, no-c-format msgid "" "Edit my.cnf and add the following lines in the [mysqld] section below " "datadir." msgstr "編輯my.cnf,加入以下行數在datadir下方的[mysqld]區域" #. Tag: programlisting #, no-c-format msgid "" "\n" "server_id=2\n" "innodb_rollback_on_timeout=1\n" "innodb_lock_wait_timeout=600\n" " " msgstr "\nserver_id=2\ninnodb_rollback_on_timeout=1\ninnodb_lock_wait_timeout=600\n " #. Tag: para #, no-c-format msgid "Restart MySQL." msgstr "重新啟動 MySQL " #. Tag: para #, no-c-format msgid "" "Instruct the slave to connect to and replicate from the master. Replace the " "IP address, password, log file, and position with the values you have used " "in the previous steps." msgstr "將slave連結到master,並從master複製,用之前步驟取得的數值取代IP位址、密碼、登入紀錄檔及位置" #. Tag: programlisting #, no-c-format msgid "" "\n" "mysql> change master to\n" " -> master_host='172.16.1.217',\n" " -> master_user='cloud-repl',\n" " -> master_password='password',\n" " -> master_log_file='mysql-bin.000001',\n" " -> master_log_pos=412;\n" " " msgstr "\nmysql> change master to\n -> master_host='172.16.1.217',\n -> master_user='cloud-repl',\n -> master_password='password',\n -> master_log_file='mysql-bin.000001',\n -> master_log_pos=412;\n " #. Tag: para #, no-c-format msgid "Then start replication on the slave." msgstr "在slave啟動此複製" #. Tag: programlisting #, no-c-format msgid "" "\n" "mysql> start slave;\n" " " msgstr "\nmysql> start slave;\n " #. Tag: para #, no-c-format msgid "" "Optionally, open port 3306 on the slave as was done on the master earlier." msgstr "選擇性,開啟slave的3306通訊埠,如同之前在master開啟的" #. Tag: para #, no-c-format msgid "" "This is not required for replication to work. But if you choose not to do " "this, you will need to do it when failover to the replica occurs." msgstr "此步驟非必要,如果您現在不設定,當複製品出現錯誤時,您就需要設定" #. Tag: title #, no-c-format msgid "Failover" msgstr "Failover" #. Tag: para #, no-c-format msgid "" "This will provide for a replicated database that can be used to implement " "manual failover for the Management Servers. &PRODUCT; failover from one " "MySQL instance to another is performed by the administrator. In the event of" " a database failure you should:" msgstr "此會提供複製資料庫,用來實施管理伺服器手動故障轉移,&PRODUCT;使用管理者轉移故障,當資料庫故障轉移時,您需要:" #. Tag: para #, no-c-format msgid "Stop the Management Servers (via service cloud-management stop)." msgstr "停止管理伺服器(經由 service cloud-management停止)" #. Tag: para #, no-c-format msgid "Change the replica's configuration to be a master and restart it." msgstr "改變複製品的設定為master,然後重新啟動" #. Tag: para #, no-c-format msgid "Ensure that the replica's port 3306 is open to the Management Servers." msgstr "確保3306通訊埠有開啟" #. Tag: para #, no-c-format msgid "" "Make a change so that the Management Server uses the new database. The " "simplest process here is to put the IP address of the new database server " "into each Management Server's /etc/cloud/management/db.properties." msgstr "做些改變讓管理伺服器使用新的資料庫,最簡單的方法是將新伺服器的IP位址放到每個管理伺服器的/etc/cloud/management/db.properties" #. Tag: para #, no-c-format msgid "Restart the Management Servers:" msgstr "重新啟動管理伺服器:" #. Tag: programlisting #, no-c-format msgid "" "\n" "# service cloud-management start\n" " " msgstr "\n# service cloud-management start\n "