无标题文档
wdCP系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用教程) wdCDN系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用手册)
wdOS系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用教程) wdDNS系统 (介绍,功能特性,运行环境,安装说明,演示,常见问题,使用手册)
注册 发贴 提问 回复-必看必看 wddns免费智能 DNS 开通 本地或虚拟机使 用wdcp 一键包在mysql编 译时"卡住"
AI导航网AI应用网站大全 wdcp官方技术支持/服务 阿里云8折优惠券 无敌云 腾讯云优惠中,现注册更有260代金额券赠送
返回列表 发帖
提问三步曲: 提问先看教程/FAQ索引(wdcp,wdcp_v3,一键包)及搜索,会让你更快解决问题
1 提供详细,如系统版本,wdcp版本,软件版本等及错误的详细信息,贴上论坛或截图发论坛
2 做过哪些操作或改动设置等

温馨提示:信息不详,很可能会没人理你!论坛有教程说明的,也可能没人理!因为,你懂的

[求助] 怎么把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

小工具代码应该怎么改?请大虾们帮忙看看谢谢...
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
qweqweq

没有大虾知道怎么弄么?
qweqweq

TOP

返回列表