Wiki installation and deployment

Source: Internet
Author: User
Tags rsync

Directory

1. Introduction... 4

1.1.Purpose... 4

1.2.Background... 4

1.3.Conventions... 4

2. Prepare the MySQL database... 5

2.1. Install mysql. 5

2.2.Create a database... 5

3. Download and install... 6

3.1.Download... 6

3.2.Install Confluence. 6

3.2.1.Set executable permissions... 6

3.2.2.Install configurations... 6

3.2.3. WebPage Configuration... 9

3.2.4.Add Chinese font... 13

3.2.5.Install the Chinese Language Pack plug-in... 16

 

 

 

 

 

 

 

1. Introduction

1.1.Purpose

Share more and more excellent resource articles and materials in the hands of every colleague of the company and centralize management to improve work efficiency.

 

 

1.2.Background

To better share and manage company information.

 

1.3.Conventions

Install the machine IP Address: 192.168.111.190

Backup Machine IP Address: 192.168.211.227

MySQL: 192.168.111.190

MySQL database version: 5.1.41

Confluence version: 4.1 (the Chinese Language Pack plug-in is loaded after installation)

2. Prepare the MySQL database

2. 1. Install MySQL

# Useradd-D/data/MySQL-S/sbin/nologin-c "MySQL Server"-U 27 MySQL

# Groupadd MySQL

# Cd/etc

# Mv MySQL Bak. MySQL

# Cd/usr/local

# Gunzip & lt;/data/postmall/Steve/mysql-5.1.41-linux-i686-glibc23.tar.gz | tar xvf-

# Music mysql-5.1.41-linux-i686-glibc23/MySQL

# Cd MySQL

# Chown-r mysql. MySQL.

# Mkdir/data/MySQL

# Chown-r mysql. MySQL/data/MySQL

# Scripts/mysql_install_db -- user = MySQL -- datadir =/data/MySQL

# Chown-r root.

# Cp support-files/MySQL. Server/etc/init. d/mysqld

# Vi/etc/init. d/mysqld

Modify: datadir =/data/MySQL

# Cp/usr/local/MySQL/support-files/my-huge.cnf/etc/My. CNF

# Ln-S/usr/local/MySQL/bin/MySQL/usr/bin/MySQL

2.2.Create a database

> Create Database 'confluence '/*! 40100 default Character Set utf8 */;
> Grant all on confluence. * to [email protected] 'localhost' identified by 'ulewiki2 ';
> Grant all on confluence. * to [email protected] '192. 168.111.190 'identified by 'ulewiki2 ';

 

 

Note]

IfThe name of the Space listed in the global space in the lower-left corner of the home page contains a Chinese Question Mark ??? Or garbled characters are probably because the character set of the database (table) is not set to utf8. The following two commands are executed on the mysql client:

Mysql> show variables like 'collation _ % '; mysql> show variables like 'character _ SET _ % ';

Possible garbled location: [this figure is finished]

3. Download and install

3.1.Download

Download the installer in Linux to the/OPT directory (CD/OPT and run wget ):

Wget-C

Http://wpc.29c4.edgecastcdn.net/8029C4/downloads/software/confluence/downloads/atlassian-confluence-4.1-x32.bin

 

3.2.Install Confluence

3.2.1.Set executable permissions

Because the download is a binary file, it can be executed directly, provided that the X permission is granted,

 

 

3.2.2.Install configurations

After granting the executable x permission, press enter to start installation,

 

Press O and press enter:

 

Three options are displayed: 1. Quick default installation; 2. Custom installation; 3. Upgrade Installation

Here we select 2nd custom installation items, and then press enter, and the next step is as follows:

[Select the installation directory./opt/Atlassian/Confluence is the default installation directory. But here we define another directory, type/data/postmall/confluence_data, and press Enter]

Next step, such:

[Define the data storage directory. Press enter, which is the path listed in brackets by default, but here we define/data/confluence_data.] Then press enter:

[The default http port on the Web page is 8090, and the default port on the console is 8000.] before selecting the default port, first> netstat-anp | grep 8090> netstat-anp | grep 8000 confirm that the two ports have not been occupied. Select1Then press enter to go to the next step,

 

[Whether to install confluence as a system service. If it is enabled, it can be started on its own.] Here we chooseYPress enter:

 

[This indicates that the installation process has started. Please wait ...]

[Installation successful, and then access address: http: // 192.168.111.190: 8090]

 

Submit Wake up]ConfluenceStart and Stop

Red boxStarts and stops services for confluence]

 

Data backup]

Because Remote Data Backup requires remote connection to 192.168.211.227, You need to first set its security trust relationship for 192.168.111.190, that is, login without a password. The specific setting method is as follows:

On the machine 192.168.111.190, the root user executes the ssh-keygen command to generate a certificate that establishes a security trust relationship,

[[Email protected] # ssh-keygen-B 1024-T RSA
Generating public/private RSA key pair.
Enter file in which to save the key (/root/. Ssh/id_rsa ):
Enter passphrase (empty for no passphrase): <-- press ENTER
Enter same passphrase again: <-- press ENTER
Your identification has been saved in/root/. Ssh/id_rsa.
Your public key has been saved in/root/. Ssh/id_rsa.pub.
The key fingerprint is:
49: 9C: 8A: 8f: BC: 19: 5E: 8c: C0: 10: D3: 15: 60: A3: 32: 1C [email protected]

The above command generates the Private Key Certificate id_rsa and Public Key Certificate id_rsa.pub, which are stored in the. Ssh subdirectory of the user's home directory,

Log on to 192.168.211.227 and create a hidden file named. SSH in the root directory. Then, go to 192.168.111.190,

Copy the Public Key Certificate id_rsa.pub to the. Ssh subdirectory in the root directory of 192.168.211.227, and change the file name to authorized_keys.
[[Email protected] # SCP-P. Ssh/id_rsa.pub [email protected]:/root/. Ssh/authorized_keys
[Email protected]'s password: <-- enter the root password of the machine 192.168.211.227
Id_rsa.pub 100% | *************************** | 218

OK. Write and schedule the data backup script;

 

Regularly back up/data/MySQL [Database Data Directory],/data/postmall/confluence_data [wiki data directory], and/usr/local/confluence [wiki installation directory] and synchronize them backup Machine 192.168.211.227, in addition, only the backup files in the last seven days can be retained on the backup machine. As follows:

# Vi/data/postmall/Shell/confluence_wiki_bk.sh

++ ++

#! /Bin/bash

# About backup confluence data to remote by hjq 2012/01/04

Path =/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin :~ /Bin

Export path

CD/Data

Tar zcf/data/mysql_data_bk _ 'date + % Y % m % d '. tgz MySQL & rsync-Av/data/mysql_data_bk *. tgz [email protected]:/data/wiki_bk/mysql_bk/& Rm-F/data/mysql_data_bk *. tgz

CD/data/postmall

Tar zcf/data/postmall/confluence_data_bk _ 'date + % Y % m % d '. tgz confluence_data & rsync-Av/data/postmall/confluence_data_bk *. tgz [email protected]:/data/wiki_bk/confluence_data_bk/& Rm-F/data/postmall/confluence_data_bk *. tgz

CD/usr/local

Tar zcf/usr/local/confluence_install_bk _ 'date + % Y % m % d '. tgz confluence & rsync-Av/usr/local/confluence_install_bk *. tgz [email protected]:/data/wiki_bk/confluence_install_bk/& Rm-F/usr/local/confluence_install_bk *. tgz

++ ++

The above script is retained at 192.168.111.190 and written to crontab:

[[Email protected] shell] # crontab-e

0 2 ***/bin/bash/data/postmall/Shell/confluence_wiki_bk.sh>/dev/null 2> & 1 &

 

Then, log on to 192.168.211.227 and regularly delete the files backed up seven days ago. The script is as follows:

[[Email protected] wiki_bk] # Cat rm_7days_ago.sh

++ ++

#! /Bin/bash

# About Delete backup file by hjq 2012/01/04

Path =/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin :~ /Bin

Export path

Bak_dir =/data/wiki_bk

Find $ bak_dir-type F! -Name "rm_7days_ago.sh"-mtime + 7 | xargs Rm-F

++ ++

The above script is retained at 192.168.211.227 and written to crontab:

[[Email protected] wiki_bk] # crontab-e

0 2 ** 6/bin/bash/data/wiki_bk/rm_7days_ago.sh>/dev/null 2> & 1 &

 

3.2.3.WebPage Configuration

Enter http: // 192.168.111.190: 8090 in the address bar of the browser.

 

Then, obtain the license key based on the serverid,

 

[Contact the confluence administrator for the license key]

Next,

 

[Select (red box) product installation]

Next, configure the database and select MySQL database,

 

[Select the external database connection type. in the lower right corner, selectMySQL], Such:

 

 

Next, select the database connection method. Here, selectJDBC,

 

Next, configure the MySQL connection,

[Change localhost to MySQL machine IP Address: 192.168.111.190 or directly add the & amp; useunicode = true & amp; characterencoding = utf8 parameter to the end of localhost ],

Enter the common user name and password of the existing database, and then clickNext,

 

 

[Select the type with the instance page to install], click it, and prompt to enter the confluence administrator username and password (for example, the username and password are both admin ),

Then proceed to the next step:

ClickRed boxButton]

Select"Manage users and groups within Confluence", Enter the administrator user name and password, full name, and email address, for example:

 

 

Finally, click"Next"The installation is successful, and clickStart using confluence now.Start to use, such:

 

3.2.4.Add Chinese font

To add a Chinese font, you must first modify the size of the attachments Uploaded By confluence by default. The modification method is as follows:

Click Browse in the upper-left corner of the http: // 192.168.111.182: 8090 homepage, and then clickRed box]

The management page is displayed, for example:

 

[Password form input: Admin and then click confirm to enter management]

On the Management page, move the cursor to the left column, as shown in the following figure:

 

ClickRed boxIn the left column ,:

[This is to scroll to the bottom of the right bar page, and then click the edit button] to enter, such:

[Main changesRed boxChange the form value to 20971520, save, and clickPDF export Language SupportGo to the attachment import page to import Chinese fonts, such:

ClickBrowse Select the locally prepared Chinese font file, and thenInstallCongratulations! The installation and configuration are complete.

Note.Chinese font file. Contact the administrator.

Visit: http: // 192.168.111.190: 8090 to view the wiki page.

3.2.5.Install the Chinese Language Pack plug-in

Compatible with the 4.1 Chinese Language Pack:

Http://www.confluence.cn/download/attachments/15926757/languages-zh_CN.jar

 

Then, click the upper-right corner of the pageBrowseSelect confluence admin in the drop-down box to enter the control management interface, as shown in the following figure:

 

 

Use the User Name Admin and password admin entered during the above installation process to enter the management interface, and then clickPlugins,

Select plugins. Then, you can see the right column, for example:

 

Click Install in the red box to see the upload Plugin in the second red box. Click]

Then, it appears as follows:

 

[Select Browse to specify the path of the Chinese plug-in package, and then upload]. Press Ctrl + F5 to refresh the page to see the Chinese interface.

 

OK,Congratulate.]

This article is from the "Zhanghe" blog, please be sure to keep this source http://9206668.blog.51cto.com/9196668/1535913

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.