zone "anyisalin.com" IN { type master; file "anyisalin.com.zone";};
配置区域解析库文件为如下
vim /var/named/anyisalin.com.zone$TTL 600$ORIGIN anyisalin.com.@ IN SOA ns.anyisalin.com amdin.anyisalin.com ( 20160328 1D 5M 7D 1D) IN NS nsns IN A 192.168.2.2www IN A 192.168.2.3www IN A 192.168.2.4storage IN A 192.168.2.5
[root@localhost ~]# mkdir /mydata[root@localhost ~]# mount -t nfs 192.168.2.5:/var/mydata /mydata
[root@localhost ~]# cd /usr/src/[root@localhost src]# lsdebug kernels mariadb-5.5.32-linux-x86_64.tar.gz[root@localhost src]# tar xf mariadb-5.5.32-linux-x86_64.tar.gz [root@localhost src]# cd mariadb-5.5.32-linux-x86_64[root@localhost mariadb-5.5.32-linux-x86_64]# lsbin COPYING COPYING.LESSER data docs include INSTALL-BINARY lib man mysql-test README scripts share sql-bench support-files[root@localhost mariadb-5.5.32-linux-x86_64]# groupadd -r -g 3306 mysql groupadd: group 'mysql' already exists[root@localhost mariadb-5.5.32-linux-x86_64]# useradd -r -g mysql -s /sbin/nologin mysqluseradd: user 'mysql' already exists[root@localhost mariadb-5.5.32-linux-x86_64]# ./scripts/mysql_install_db --datadir=/mydata --user=mysql #初始化数据库Installing MariaDB/MySQL system tables in '/mydata' ...OKFilling help tables...OK#内容省略[root@localhost mariadb-5.5.32-linux-x86_64]# ls /mydata/ #查看生成的数据库aria_log.00000001 aria_log_control mysql performance_schema test[root@localhost src]# ln -sv /usr/src/mariadb-5.5.32-linux-x86_64 /usr/local/mysql`/usr/local/mysql' -> `/usr/src/mariadb-5.5.32-linux-x86_64'[root@localhost mysql]# cp support-files/mysql.server /etc/rc.d/init.d/mysqld [root@localhost mysql]# cp support-files/my-large.cnf /etc/my.cnf[root@localhost mysql]# vim /etc/my.cnf #添加以下三行datadir = /mydataskip_name_resolve = oninnodb_file_per_table = on[root@localhost mysql]# export PATH=/usr/local/mysql/bin/:$PATH[root@localhost mysql]# service mysqld start #测试MySQL是否能正常启动Starting MySQL... SUCCESS! [root@localhost mysql]# mysqlWelcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 1Server version: 5.5.32-MariaDB-log MariaDB ServerCopyright (c) 2000, 2013, Oracle, Monty Program Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> GRANT ALL ON wp.* TO 'wpuser'@'%' IDENTIFIED BY 'passwd';Query OK, 0 rows affected (0.04 sec)mysql> CREATE DATABASE wp;Query OK, 1 row affected (0.02 sec)mysql> FLUSH PRIVILEGES;Query OK, 0 rows affected (0.01 sec)
[root@localhost ~]# vim /etc/httpd/conf.d/virt.confNameVirtualHost 192.168.2.4:80<VirtualHost 192.168.2.4:80> ServerName www.anyisalin.com DocumentRoot /webroot/wordpress</VirtualHost>[root@localhost ~]# service rpcbind startStarting rpcbind: [ OK ][root@localhost ~]# mkdir /webroot[root@localhost ~]# mount -t nfs 192.168.2.5:/var/webroot /webroot/[root@localhost ~]# service httpd startStarting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using www.anyisalin.com for ServerName [ OK ][root@localhost ~]#