酒店50台无盘服务器配置单,你对宾馆、网吧无盘系统了解多少?

原标题:你对宾馆、网吧无盘系统了解多少?

如今越来越多的网吧、宾馆基本都已经使用无盘系统模式了,为什么无盘系统这么受宾馆、网吧亲睐?主要还是从经济、管理、安全上面无盘比有盘更加合适。

不仅网吧、宾馆都使用无盘系统,很多学校也开始都使用无盘系统了。无盘系统对于公开场合的局域网电脑使用来说,安全性更高些。

ba62807ed6602b7804343a4cec05e95f.png

下面来说说无盘跟有盘模式有何区别。

第一:无盘跟有盘最大的区别就是有没有硬盘,无盘系统的电脑是没有安装硬盘的,而有盘是安装了硬盘的电脑。不过无盘系统必须要通过服务器才能够进入系统,因为系统都是通过服务器上面的系统启动进入的。因此,在经济上面,无盘系统的电脑可以省下硬盘的钱,一般硬盘价格在300左右,如果一百台机子,那么就可以省下3万块RMB。

第二:无盘系统是通过网卡启动进入系统的,而有盘是通过硬盘启动的,因此,有盘可以单独进入系统,而无盘必须要通过服务器,所以,有盘可以适用于所有使用的电脑,而无盘只适用于服务器的情况下。

第三:无盘系统的电脑只有在服务器设置超级用户或者管理员用户的时候才能对客户端的系统和文件进行更改,一般情况下无盘下的电脑不管你安装了什么程序在重启后都不能保存的。

第四:无盘对于客户端系统文件或者程序修改比较方便,只需要将无盘系统的其中一台设置超级用户进行修改或者安装程序后就所以其他电脑都更改了,不需要一台一台的进行设置修改。

第五:无盘系统由于没有硬盘,因此也不需要承担硬盘损坏的风险。

第六:无盘系统只要出现网线、网卡、交换机、服务器等问题时都是不能进入系统的,因此,一旦其中一台电脑不能进入系统,那么需要,检查网卡,以及从电脑主机到服务器之间的网络是否有问题。

无盘系统只要你搞懂了其实非常简单,对于无盘系统,我们首先需要一个软件,比如免费的很多都用锐起无盘,收费的一般用易游、网众、信佑、网维等,在服务器安装服务端,然后通过插入硬盘在客户端安装客户端软件,在客户端开超级做好母盘后将系统上传到服务器,再拔掉硬盘,从网卡启动就OK。不过服务器需要一些设置,不懂的可以参考下各种无盘软件服务端设置的资料。出现的问题也大多数都是网卡启动项设置没设好,网卡坏了,网线没插,交换机坏了,服务器问题等。返回搜狐,查看更多

责任编辑:

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这里提供一个简的JavaWeb酒店管理系统的无框架代码: 1. 首先创建数据库hotel,创建以下表结构: ``` CREATE TABLE `room` ( `id` int(11) NOT NULL AUTO_INCREMENT, `roomNo` varchar(10) DEFAULT NULL COMMENT '房间号', `roomType` varchar(20) DEFAULT NULL COMMENT '房间类型', `price` decimal(10,2) DEFAULT NULL COMMENT '价格', `status` varchar(10) DEFAULT NULL COMMENT '状态', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='房间表'; CREATE TABLE `customer` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(20) DEFAULT NULL COMMENT '姓名', `sex` varchar(10) DEFAULT NULL COMMENT '性别', `idCard` varchar(18) DEFAULT NULL COMMENT '身份证号', `phone` varchar(20) DEFAULT NULL COMMENT '联系电话', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='客户表'; CREATE TABLE `order` ( `id` int(11) NOT NULL AUTO_INCREMENT, `roomNo` varchar(10) DEFAULT NULL COMMENT '房间号', `customerName` varchar(20) DEFAULT NULL COMMENT '客户姓名', `checkInDate` datetime DEFAULT NULL COMMENT '入住时间', `checkOutDate` datetime DEFAULT NULL COMMENT '退房时间', `totalPrice` decimal(10,2) DEFAULT NULL COMMENT '订总价', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='订表'; ``` 2. 在Eclipse中创建一个动态Web项目,添加以下JavaBean类: Room.java ``` public class Room { private int id; private String roomNo; private String roomType; private double price; private String status; // 省略getter和setter方法 } ``` Customer.java ``` public class Customer { private int id; private String name; private String sex; private String idCard; private String phone; // 省略getter和setter方法 } ``` Order.java ``` public class Order { private int id; private String roomNo; private String customerName; private Date checkInDate; private Date checkOutDate; private double totalPrice; // 省略getter和setter方法 } ``` 3. 创建DAO类,用于对数据库进行增删改查操作: RoomDAO.java ``` public class RoomDAO { public List<Room> findAll() { List<Room> list = new ArrayList<>(); Connection conn = null; PreparedStatement stmt = null; ResultSet rs = null; try { conn = JDBCUtils.getConnection(); stmt = conn.prepareStatement("SELECT * FROM room"); rs = stmt.executeQuery(); while (rs.next()) { Room room = new Room(); room.setId(rs.getInt("id")); room.setRoomNo(rs.getString("roomNo")); room.setRoomType(rs.getString("roomType")); room.setPrice(rs.getDouble("price")); room.setStatus(rs.getString("status")); list.add(room); } } catch (Exception e) { e.printStackTrace(); } finally { JDBCUtils.close(rs, stmt, conn); } return list; } public Room findById(int id) { Room room = null; Connection conn = null; PreparedStatement stmt = null; ResultSet rs = null; try { conn = JDBCUtils.getConnection(); stmt = conn.prepareStatement("SELECT * FROM room WHERE id = ?"); stmt.setInt(1, id); rs = stmt.executeQuery(); if (rs.next()) { room = new Room(); room.setId(rs.getInt("id")); room.setRoomNo(rs.getString("roomNo")); room.setRoomType(rs.getString("roomType")); room.setPrice(rs.getDouble("price")); room.setStatus(rs.getString("status")); } } catch (Exception e) { e.printStackTrace(); } finally { JDBCUtils.close(rs, stmt, conn); } return room; } public void add(Room room) { Connection conn = null; PreparedStatement stmt = null; try { conn = JDBCUtils.getConnection(); stmt = conn.prepareStatement("INSERT INTO room(roomNo, roomType, price, status) VALUES(?, ?, ?, ?)"); stmt.setString(1, room.getRoomNo()); stmt.setString(2, room.getRoomType()); stmt.setDouble(3, room.getPrice()); stmt.setString(4, room.getStatus()); stmt.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { JDBCUtils.close(stmt, conn); } } public void update(Room room) { Connection conn = null; PreparedStatement stmt = null; try { conn = JDBCUtils.getConnection(); stmt = conn.prepareStatement("UPDATE room SET roomNo = ?, roomType = ?, price = ?, status = ? WHERE id = ?"); stmt.setString(1, room.getRoomNo()); stmt.setString(2, room.getRoomType()); stmt.setDouble(3, room.getPrice()); stmt.setString(4, room.getStatus()); stmt.setInt(5, room.getId()); stmt.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { JDBCUtils.close(stmt, conn); } } public void delete(int id) { Connection conn = null; PreparedStatement stmt = null; try { conn = JDBCUtils.getConnection(); stmt = conn.prepareStatement("DELETE FROM room WHERE id = ?"); stmt.setInt(1, id); stmt.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { JDBCUtils.close(stmt, conn); } } } ``` CustomerDAO.java ``` public class CustomerDAO { public List<Customer> findAll() { List<Customer> list = new ArrayList<>(); Connection conn = null; PreparedStatement stmt = null; ResultSet rs = null; try { conn = JDBCUtils.getConnection(); stmt = conn.prepareStatement("SELECT * FROM customer"); rs = stmt.executeQuery(); while (rs.next()) { Customer customer = new Customer(); customer.setId(rs.getInt("id")); customer.setName(rs.getString("name")); customer.setSex(rs.getString("sex")); customer.setIdCard(rs.getString("idCard")); customer.setPhone(rs.getString("phone")); list.add(customer); } } catch (Exception e) { e.printStackTrace(); } finally { JDBCUtils.close(rs, stmt, conn); } return list; } public Customer findById(int id) { Customer customer = null; Connection conn = null; PreparedStatement stmt = null; ResultSet rs = null; try { conn = JDBCUtils.getConnection(); stmt = conn.prepareStatement("SELECT * FROM customer WHERE id = ?"); stmt.setInt(1, id); rs = stmt.executeQuery(); if (rs.next()) { customer = new Customer(); customer.setId(rs.getInt("id")); customer.setName(rs.getString("name")); customer.setSex(rs.getString("sex")); customer.setIdCard(rs.getString("idCard")); customer.setPhone(rs.getString("phone")); } } catch (Exception e) { e.printStackTrace(); } finally { JDBCUtils.close(rs, stmt, conn); } return customer; } public void add(Customer customer) { Connection conn = null; PreparedStatement stmt = null; try { conn = JDBCUtils.getConnection(); stmt = conn.prepareStatement("INSERT INTO customer(name, sex, idCard, phone) VALUES(?, ?, ?, ?)"); stmt.setString(1, customer.getName()); stmt.setString(2, customer.getSex()); stmt.setString(3, customer.getIdCard()); stmt.setString(4, customer.getPhone()); stmt.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { JDBCUtils.close(stmt, conn); } } public void update(Customer customer) { Connection conn = null; PreparedStatement stmt = null; try { conn = JDBCUtils.getConnection(); stmt = conn.prepareStatement("UPDATE customer SET name = ?, sex = ?, idCard = ?, phone = ? WHERE id = ?"); stmt.setString(1, customer.getName()); stmt.setString(2, customer.getSex()); stmt.setString(3, customer.getIdCard()); stmt.setString(4, customer.getPhone()); stmt.setInt(5, customer.getId()); stmt.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { JDBCUtils.close(stmt, conn); } } public void delete(int id) { Connection conn = null; PreparedStatement stmt = null; try { conn = JDBCUtils.getConnection(); stmt = conn.prepareStatement("DELETE FROM customer WHERE id = ?"); stmt.setInt(1, id); stmt.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { JDBCUtils.close(stmt, conn); } } } ``` OrderDAO.java ``` public class OrderDAO { public List<Order> findAll() { List<Order> list = new ArrayList<>(); Connection conn = null; PreparedStatement stmt = null; ResultSet rs = null; try { conn = JDBCUtils.getConnection(); stmt = conn.prepareStatement("SELECT * FROM `order`"); rs = stmt.executeQuery(); while (rs.next()) { Order order = new Order(); order.setId(rs.getInt("id")); order.setRoomNo(rs.getString("roomNo")); order.setCustomerName(rs.getString("customerName")); order.setCheckInDate(rs.getTimestamp("checkInDate")); order.setCheckOutDate(rs.getTimestamp("checkOutDate")); order.setTotalPrice(rs.getDouble("totalPrice")); list.add(order); } } catch (Exception e) { e.printStackTrace(); } finally { JDBCUtils.close(rs, stmt, conn); } return list; } public Order findById(int id) { Order order = null; Connection conn = null; PreparedStatement stmt = null; ResultSet rs = null; try { conn = JDBCUtils.getConnection(); stmt = conn.prepareStatement("SELECT * FROM `order` WHERE id = ?"); stmt.setInt(1, id); rs = stmt.executeQuery(); if (rs.next()) { order = new Order(); order.setId(rs.getInt("id")); order.setRoomNo(rs.getString("roomNo")); order.setCustomerName(rs.getString("customerName")); order.setCheckInDate(rs.getTimestamp("checkInDate")); order.setCheckOutDate(rs.getTimestamp("checkOutDate")); order.setTotalPrice(rs.getDouble("totalPrice")); } } catch (Exception e) { e.printStackTrace(); } finally { JDBCUtils.close(rs, stmt, conn); } return order; } public void add(Order order) { Connection conn = null; PreparedStatement stmt = null; try { conn = JDBCUtils.getConnection(); stmt = conn.prepareStatement("INSERT INTO `order`(roomNo, customerName, checkInDate, checkOutDate, totalPrice) VALUES(?, ?, ?, ?, ?)"); stmt.setString(1, order.getRoomNo()); stmt.setString(2, order.getCustomerName()); stmt.setTimestamp(3, new Timestamp(order.getCheckInDate().getTime())); stmt.setTimestamp(4, new Timestamp(order.getCheckOutDate().getTime())); stmt.setDouble(5, order.getTotalPrice()); stmt.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { JDBCUtils.close(stmt, conn); } } public void update(Order order) { Connection conn = null; PreparedStatement stmt = null; try { conn = JDBCUtils.getConnection(); stmt = conn.prepareStatement("UPDATE `order` SET roomNo = ?, customerName = ?, checkInDate = ?, checkOutDate = ?, totalPrice = ? WHERE id = ?"); stmt.setString(1, order.getRoomNo()); stmt.setString(2, order.getCustomerName()); stmt.setTimestamp(3, new Timestamp(order.getCheckInDate().getTime())); stmt.setTimestamp(4, new Timestamp(order.getCheckOutDate().getTime())); stmt.setDouble(5, order.getTotalPrice()); stmt.setInt(6, order.getId()); stmt.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { JDBCUtils.close(stmt, conn); } } public void delete(int id) { Connection conn = null; PreparedStatement stmt = null; try { conn = JDBCUtils.getConnection(); stmt = conn.prepareStatement("DELETE FROM `order` WHERE id = ?"); stmt.setInt(1, id); stmt.executeUpdate(); } catch (Exception e) { e.printStackTrace(); } finally { JDBCUtils.close(stmt, conn); } } } ``` 4. 创建工具类JDBCUtils.java,用于获取数据库连接: ``` public class JDBCUtils { private static String url = "jdbc:mysql://localhost:3306/hotel?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8"; private static String username = "root"; private static String password = "123456"; public static Connection getConnection() throws Exception { Class.forName("com.mysql.cj.jdbc.Driver"); Connection conn = DriverManager.getConnection(url, username, password); return conn; } public static void close(ResultSet rs, PreparedStatement stmt, Connection conn) { if (rs != null) { try { rs.close(); } catch (SQLException e) { e.printStackTrace(); } } if (stmt != null) { try { stmt.close(); } catch (SQLException e) { e.printStackTrace(); } } if (conn != null) { try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } public static void close(PreparedStatement stmt, Connection conn) { if (stmt != null) { try { stmt.close(); } catch (SQLException e) { e.printStackTrace(); } } if (conn != null) { try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } } ``` 5. 创建Servlet类,用于处理客户端请求: RoomServlet.java ``` public class RoomServlet extends HttpServlet { private RoomDAO roomDAO = new RoomDAO(); protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String action = request.getParameter("action"); if ("list".equals(action)) { List<Room> list = roomDAO.findAll(); request.setAttribute("roomList", list); request.getRequestDispatcher("roomList.jsp").forward(request, response); } else if ("add".equals(action)) { String roomNo = request.getParameter("roomNo"); String roomType = request.getParameter("roomType"); double price = Double.parseDouble(request.getParameter("price")); String status = request

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值