Difference between revisions of "Cluster shared storage"
m (→RedHat/Centos WEB servers) |
m (→RedHat/Centos WEB servers) |
||
Line 23: | Line 23: | ||
*#Make a mountppoint | *#Make a mountppoint | ||
*#Mount the Logical Volume (GFS Filesystem) | *#Mount the Logical Volume (GFS Filesystem) | ||
+ | = Installing a copy of mediawiki and restoring a backup = | ||
+ | == MYSQL == | ||
+ | Create and populate the database from a backup. | ||
+ | <pre> | ||
+ | [root@localhost ~]# chkconfig --level 345 mysqld on | ||
+ | [root@localhost ~]# service mysqld start | ||
+ | Initialiserer MySQL-database: Installing MySQL system tables... | ||
+ | OK | ||
+ | Filling help tables... | ||
+ | OK | ||
+ | </pre> | ||
+ | To start mysqld at boot time you have to copy | ||
+ | support-files/mysql.server to the right place for your system | ||
+ | |||
+ | PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! | ||
+ | To do so, start the server, then issue the following commands: | ||
+ | /usr/bin/mysqladmin -u root password 'new-password' | ||
+ | /usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password' | ||
+ | See the manual for more instructions. | ||
+ | You can start the MySQL daemon with: | ||
+ | cd /usr ; /usr/bin/mysqld_safe & | ||
+ | |||
+ | You can test the MySQL daemon with mysql-test-run.pl | ||
+ | cd mysql-test ; perl mysql-test-run.pl | ||
+ | |||
+ | Please report any problems with the /usr/bin/mysqlbug script! | ||
+ | |||
+ | The latest information about MySQL is available on the web at | ||
+ | http://www.mysql.com | ||
+ | Support MySQL by buying support/licenses at http://shop.mysql.com | ||
+ | [ O.k. ] | ||
+ | Starter MySQL: [ O.k. ] | ||
+ | [root@localhost ~]# mysqladmin -u root create wikidb | ||
+ | [root@localhost ~]# mysql -u root wikidb < /tmp/wikidbbackup12032009-1508.dump | ||
+ | </pre> | ||
+ | == Mediawiki files and apache == | ||
+ | Copy the mediawikifiles to apache root directory. | ||
+ | <pre> | ||
+ | [root@localhost ~]# chkconfig --level 345 httpd on | ||
+ | [root@localhost ~]# service httpd start | ||
+ | Starter httpd: [ O.k. ] | ||
+ | [root@localhost ~]# cd /var/www/html |
Revision as of 14:32, 1 April 2009
Contents
RedHat/Centos shared storage example
Consider the drawing below. The WEB-servers run Centos 5.2 and share the redundant data from the shared storage.
- Each WEB server has access to the same data from the shared storage calles NAS - Network Attached Storage.
- The WEB-servers has Read/Write access to the NAS.
- Locking of files open for writing is necessary.
The shared Storage
Two servers with each two drives are installed with FreeNAS The drives are exported as iSCSI targets.
RedHat/Centos WEB servers
The WEB servers all run Centos 5.2 and use the the FreeNAS servers for application data.
- Make a cluster with membernodes.
- On one system do the following
- Install iSCSI initiator software on the WEB-servers, if not present.
- Attach the logical drives to the system
- Create a Volume Group with mirror
- Create a logical Volume
- Create a GFS filesystem
- Install iSCSI initiator software on the WEB-servers, if not present.
- On all the Clusternodes
- Install iSCSI initiator software on the WEB-servers, if not present.
- Attach the logical drives to the system
- Make a mountppoint
- Mount the Logical Volume (GFS Filesystem)
- Install iSCSI initiator software on the WEB-servers, if not present.
Installing a copy of mediawiki and restoring a backup
MYSQL
Create and populate the database from a backup.
[root@localhost ~]# chkconfig --level 345 mysqld on [root@localhost ~]# service mysqld start Initialiserer MySQL-database: Installing MySQL system tables... OK Filling help tables... OK
To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password' See the manual for more instructions. You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl cd mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at http://shop.mysql.com
[ O.k. ]
Starter MySQL: [ O.k. ] [root@localhost ~]# mysqladmin -u root create wikidb [root@localhost ~]# mysql -u root wikidb < /tmp/wikidbbackup12032009-1508.dump </pre>
Mediawiki files and apache
Copy the mediawikifiles to apache root directory.
[root@localhost ~]# chkconfig --level 345 httpd on [root@localhost ~]# service httpd start Starter httpd: [ O.k. ] [root@localhost ~]# cd /var/www/html