ke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
2011296 inodes, 4018250 blocks
200912 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4118806528
123 block groups
32768 blocks per group, 32768 fragments per group
16352 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
This filesystem will be automatically checked every 22 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@beryl ~]# mkdir mydata //在根目录下创建mydata目录 [root@beryl ~]# mount /dev/sdb5 mydata/ //挂载sdb5到mydata目录上 [root@beryl ~]# ls mydata/ //查看挂载是否成功,lost found表明挂载成功 lost found [root@beryl ~]# useradd -r -M mysql //添加mysql用户,-r表示为系统用户
[root@beryl ~]# id mysql //查看mysql属主属组 uid=27(mysql) gid=27(mysql) groups=27(mysql)
[root@beryl ~]# cd mydata/ [root@beryl mydata]# mkdir data //在mydata下创建data目录用于专门来安装mysql [root@beryl mydata]# chown -R mysql:mysql .
//指定mydata属主属组及其子目录属主属组为mysql
[root@beryl mydata]# ll total 20
drwxr-xr-x 2 mysql mysql 4096 Nov 3 21:45 data
drwx------ 2 mysql mysql 16384 Nov 3 21:43 lost found
[root@beryl ~]# cd [root@beryl ~]# tar -zxvf Desktop/mysql-5.5.17-linux2.6-i686.tar.gz -C /usr/local/
//解压mysql并使用-C指定直接解压到/usr/local [root@beryl ~]# cd /usr/local [root@beryl local]# ls bin games lib mysql-5.5.17-linux2.6-i686 share
etc include libexec sbin src
[root@beryl local]# ln -sv mysql-5.5.17-linux2.6-i686/ mysql
//把解压的mysql创建链接到mysql create symbolic link `mysql'' to `mysql-5.5.17-linux2.6-i686/''
[root@beryl local]# ll -h total 76K
drwxr-xr-x 2 root root 4.0K Aug 8 2008 bin
drwxr-xr-x 2 root root 4.0K Aug 8 2008 etc
drwxr-xr-x 2 root root 4.0K Aug 8 2008 games
drwxr-xr-x 2 root root 4.0K Aug 8 2008 include
drwxr-xr-x 2 root root 4.0K Aug 8 2008 lib
drwxr-xr-x 2 root root 4.0K Aug 8 2008 libexec lrwxrwxrwx 1 root root 27 Nov 3 21:48 mysql -> mysql-5.5.17-linux2.6-i686/ drwxr-xr-x 13 root root 4.0K Nov 3 21:46 mysql-5.5.17-linux2.6-i686
drwxr-xr-x 2 root root 4.0K Aug 8 2008 sbin
drwxr-xr-x 4 root root 4.0K Apr 12 2011 share
drwxr-xr-x 2 root root 4.0K Aug 8 2008 src
[root@beryl local]# cd mysql [root@beryl mysql]# ll total 76
drwxr-xr-x 2 root root 4096 Nov 3 21:46 bin
-rw-r--r-- 1 7161 wheel 17987 Oct 12 04:10 COPYING
drwxr-xr-x 4 root root 4096 Nov 3 21:46 data
drwxr-xr-x 2 root root 4096 Nov 3 21:46 docs
drwxr-xr-x 3 root root 4096 Nov 3 21:46 include
-rw-r--r-- 1 7161 wheel 7604 Oct 12 04:10 INSTALL-BINA