找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 98|回复: 14

收了一个ultravps.eu不知道咋玩大佬们进来指点一下

[复制链接]

8

主题

36

回帖

106

积分

注册会员

积分
106
发表于 2018-12-27 14:50:49 | 显示全部楼层 |阅读模式
小鸡装了lnmp显示10g硬盘  30g数据盘百度了好久还是挂不上去...好无语啊
回复

使用道具 举报

73

主题

1196

回帖

2657

积分

金牌会员

积分
2657
发表于 2018-12-27 14:53:13 | 显示全部楼层
你发下你操作的指令和过程,帮你参考下
回复

使用道具 举报

8

主题

714

回帖

1476

积分

金牌会员

积分
1476
发表于 2018-12-27 14:56:02 | 显示全部楼层
不是很懂啥叫挂不上
回复

使用道具 举报

75

主题

3206

回帖

6705

积分

论坛元老

积分
6705
发表于 2018-12-27 14:59:48 | 显示全部楼层
一键 lnmp ,简单得1b,官方都有脚本
回复

使用道具 举报

9

主题

136

回帖

365

积分

中级会员

积分
365
发表于 2018-12-27 15:02:48 | 显示全部楼层
data  软链接
回复

使用道具 举报

48

主题

2294

回帖

4802

积分

论坛元老

积分
4802
发表于 2018-12-27 15:12:07 | 显示全部楼层
没挂载数据盘把,装之前挂载下就行了,不会挂载就用oneinstack这个一件脚本吧
"
回复

使用道具 举报

147

主题

4585

回帖

9791

积分

论坛元老

积分
9791
发表于 2018-12-27 15:15:47 | 显示全部楼层



[ol]
  • #/bin/bash
  • #########################################
  • #Function:   auto fdisk
  • #Usage:      bash auto_fdisk.sh
  • #dbdir:     /home/wwwroot
  • #########################################
  • count=0
  • tmp1=/tmp/.tmp1
  • tmp2=/tmp/.tmp2
  • >$tmp1
  • >$tmp2
  • fstab_file=/etc/fstab
  • #check lock file ,one time only let the script run one time
  • LOCKfile=/tmp/.$(basename $0)
  • if [ -f "$LOCKfile" ]
  • then
  •   echo -e "\033[1;40;31mThe script is already exist,please next time to run this script.\033[0m"
  •   exit
  • else
  •   echo -e "\033[40;32mStep 1.No lock file,begin to create lock file and continue.\033[40;37m"
  •   touch $LOCKfile
  • fi
  • #check user
  • if [ $(id -u) != "0" ]
  • then
  •   echo -e "\033[1;40;31mError: You must be root to run this script, please use root to install this script.\033[0m"
  •   rm -rf $LOCKfile
  •   exit 1
  • fi
  • #check disk partition
  • check_disk()
  • {
  •   >$LOCKfile
  •   device_list=$(fdisk -l|grep "Disk"|grep "/dev"|awk '{print $2}'|awk -F: '{print $1}'|grep "xv")
  •   for i in `echo $device_list`
  •   do
  •     device_count=$(fdisk -l $i|grep "$i"|awk '{print $2}'|awk -F: '{print $1}'|wc -l)
  •     echo
  •     if [ $device_count -lt 2 ]
  •     then
  •       now_mount=$(df -h)
  •       if echo $now_mount|grep -w "$i" >/dev/null 2>&1
  •       then
  •         echo -e "\033[40;32mThe $i disk is mounted.\033[40;37m"
  •       else
  •         echo $i >>$LOCKfile
  •         echo "You have a free disk,Now will fdisk it and mount it."
  •       fi
  •     fi
  •   done
  •   disk_list=$(cat $LOCKfile)
  •   if [ "X$disk_list" == "X" ]
  •   then
  •     echo -e "\033[1;40;31mNo free disk need to be fdisk.Exit script.\033[0m"
  •     rm -rf $LOCKfile
  •     exit 0
  •   else
  •     echo -e "\033[40;32mThis system have free disk :\033[40;37m"
  •     for i in `echo $disk_list`
  •     do
  •       echo "$i"
  •       count=$((count+1))
  •     done
  •   fi
  • }
  • #fdisk ,formating and create the file system
  • fdisk_fun()
  • {
  • fdisk -S 56 $1 >$tmp1
  •       mkdir /home/wwwroot$j
  •     fi
  •   done
  • }
  • #config /etc/fstab and mount device
  • main()
  • {
  •   for i in `echo $disk_list`
  •   do
  •     echo -e "\033[40;32mStep 3.Begin to fdisk free disk.\033[40;37m"
  •     fdisk_fun $i
  •     echo "${i}1" >>$tmp2
  •   done
  •   make_dir
  •   >$LOCKfile
  •   paste $tmp2 $tmp1 >$LOCKfile
  •   echo -e "\033[40;32mStep 5.Begin to write configuration to /etc/fstab and mount device.\033[40;37m"
  •   while read a b
  •   do
  •     if grep -v ^# $fstab_file|grep ${a} >/dev/null
  •     then
  •       sed -i "s=${a}*=#&=" $fstab_file
  •     fi
  •     echo "${a}             $b                 ext3    defaults        0 0" >>$fstab_file
  •   done 复制代码
  • 回复

    使用道具 举报

    8

    主题

    36

    回帖

    106

    积分

    注册会员

    积分
    106
     楼主| 发表于 2018-12-27 15:24:05 | 显示全部楼层

    plyu007 发表于 2018-12-27 14:59

    一键 lnmp ,简单得1b,官方都有脚本

    是lnmp啊  就是不会挂载数据盘 就是那个30g的盘
    回复

    使用道具 举报

    75

    主题

    3206

    回帖

    6705

    积分

    论坛元老

    积分
    6705
    发表于 2018-12-27 14:59:00 | 显示全部楼层

    1874 发表于 2018-12-27 15:24

    是lnmp啊  就是不会挂载数据盘 就是那个30g的盘

    你是之前没挂把,看楼上的方法
    回复

    使用道具 举报

    0

    主题

    1

    回帖

    4

    积分

    新手上路

    积分
    4
    发表于 2018-12-27 15:27:36 | 显示全部楼层

    mikj521 发表于 2018-12-27 15:15

    这个怎么用大佬千万别被墙 被强就完蛋  我只说这么多
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    Archiver|手机版|小黑屋|Discuz! X

    GMT+8, 2025-4-22 00:40 , Processed in 0.022354 second(s), 4 queries , Gzip On, Redis On.

    Powered by Discuz! X3.5

    © 2001-2024 Discuz! Team.

    快速回复 返回顶部 返回列表