四虎影视在线影院在线观看,小s货再浪些再咬紧点h,国产精品水嫩水嫩,97精产国品一二三产区

Board logo

標(biāo)題: [求助] 怎么把home掛載改成www目錄 [打印本頁]

作者: qq2517328    時間: 2015-12-18 18:49     標(biāo)題: 怎么把home掛載改成www目錄

傲游截圖20151218183852.png
傲游截圖20151218183943.png 請問怎么把home改成/www目錄?
我是菜鳥不會弄這個!用sh /www/wdlinux/tools/wdcp_disk_xvdb.sh小工具也不行,
#!/bin/sh

disk='/dev/xvdb'
dir='/www'

chk_fstab_1=`grep ${dir} /etc/fstab | wc -l`
chk_fstab_2=`grep ${disk}1 /etc/fstab | wc -l`

if [ $chk_fstab_1 -ne 0 ]; then
        exit
fi
if [ $chk_fstab_2 -ne 0 ]; then
        exit
fi

fdisk_exit=`fdisk -l | grep ${disk} | wc -l`
fdisk_done=`fdisk -l | grep ${disk}1 | wc -l | tr -d " "`

if [ $fdisk_exit -ne 0 ]; then
        if [ $fdisk_done -ne 1 ]; then
                echo -e "\n\nfdisk $disk ..."
                fdisk $disk <<EOF
n
p
1


w
EOF
                partprobe
        fi
        else
        exit
fi

sleep 10

has_format=`tune2fs -l ${disk}1 2>1 | grep "Filesystem UUID"|wc -l`
if [ $has_format -eq 0 ]; then
        echo -e "\n\nmkfs.ext3 $disk ..."
        mkfs.ext3 ${disk}1
fi

I_N=0
if [ ! -d ${dir} ]; then
        mkdir $dir
else

service wdapache stop

service pureftpd stop

service httpd stop

service mysqld stop

service nginxd stop

mv /www /wwwo

mkdir /www

I_N=1
fi
echo -e "\n\nmount $disk ..."
mount ${disk}1 $dir &> /dev/null
if [ $I_N -eq 1 ];then

mv /wwwo/* /www/

service wdapache start

service pureftpd start

service httpd start

service mysqld start

service nginxd start
fi

chk_mount=`mount  | grep /dev/xvdb2 | wc -l`
if [ $chk_mount -eq 1 ];then
        echo "${disk}1          $dir            ext3    defaults         0 0" >> /etc/fstab
fi
echo
echo "All Is OK"
echo

小工具代碼應(yīng)該怎么改?請大蝦們幫忙看看謝謝...
Disk /dev/xvdb: 95.6 GB, 95563022336 bytes
255 heads, 63 sectors/track, 11618 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0006cde7

    Device Boot      Start         End      Blocks   Id  System
/dev/xvdb1               1       11618    93321553+  83  Linux

Disk /dev/xvda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000858c5

    Device Boot      Start         End      Blocks   Id  System
/dev/xvda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/xvda2              64        1306     9972736   8e  Linux LVM

Disk /dev/mapper/vg_have-lv_root: 9168 MB, 9168748544 bytes
255 heads, 63 sectors/track, 1114 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_have-lv_swap: 1040 MB, 1040187392 bytes
255 heads, 63 sectors/track, 126 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/Xvdbgroup-xvdb1: 95.5 GB, 95458164736 bytes
255 heads, 63 sectors/track, 11605 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

圖片附件: 傲游截圖20151218183852.png (2015-12-18 18:39, 16.3 KB) / 下載次數(shù) 7000
http://cd-genova.com/bbs/attachment.php?aid=5719&k=01ae24e3ac98e747d776a4caabfbb2c3&t=1744894268&sid=5rg16z



圖片附件: 傲游截圖20151218183943.png (2015-12-18 18:39, 19.98 KB) / 下載次數(shù) 7083
http://cd-genova.com/bbs/attachment.php?aid=5720&k=22db2f48614affad0d16a979376c023a&t=1744894268&sid=5rg16z


作者: qq2517328    時間: 2015-12-22 17:15

沒有大蝦知道怎么弄么?




歡迎光臨 WDlinux官方論壇 (http://cd-genova.com/bbs/) Powered by Discuz! 7.2