options {
directory "/var/named";
};
zone "zxl.com" {
type master;
file "zxl.com.zone";
};
zone区域文件
vim /var/named/chroot/var/named/zxl.com.zone
$TTL 86400
@ IN SOA zxl.com. admin (
20121130
3H
15M
1W
1D
)
@ IN NS www.zxl.com.
v1 IN A 192.168.1.200
v2 IN A 192.168.1.200
v3 IN A 192.168.1.200
重启named服务和httpd服务
[root@localhost ~]# service named restart
停止 named:. [确定]
启动 named: [确定]
[root@localhost ~]# service httpd restart
停止 httpd: [确定]
启动 httpd: [确定]
[root@localhost ~]#
测试一下域名解析
[root@localhost ~]# nslookup
> v1.zxl.com
Server: 192.168.1.200
Address: 192.168.1.200#53
Name: v1.zxl.com
Address: 192.168.1.200
> v2.zxl.com
Server: 192.168.1.200
Address: 192.168.1.200#53
Name: v2.zxl.com
Address: 192.168.1.200
> v2.zxl.com
Server: 192.168.1.200
Address: 192.168.1.200#53
Name: v2.zxl.com
Address: 192.168.1.200
启动mysql服务,第一次启动过程是初始化mysql数据库
[root@localhost ~]# /etc/init.d/mysqld start
初始化 MySQL 数据库: Installing MySQL system tables...
121130 22:22:12 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
121130 22:22:12 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
OK
Filling help tables...
121130 22:22:13 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
121130 22:22:13 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
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'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
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
[确定]
启动 MySQL: [确定]
创建mysql数据库,v1 v2 v3,创建数据库用户并赋予权限
mysql> create database v1;
Query OK, 1 row affected (0.02 sec)
mysql> create database v2;
Query OK, 1 row affected (0.00 sec)
mysql> create database v3;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON v1.* TO 'v1'@'%' identified by '123';
mysql> GRANT ALL PRIVILEGES ON v2.* TO 'v2'@'%' identified by '123';
mysql> GRANT ALL PRIVILEGES ON v3.* TO 'v3'@'%' identified by '123';
安装Discuz论坛