SnipeIT – Phần Mềm Quản Lý Tài Sản Trên Win Server 2016

Các công cụ cần download trước khi cài đặt:
  1. Notepad++
  2. PHP download
  3. C++ 2015
  4. C++ 2012
  5. URL Rewrite Module
  6. PHP Manager
  7. MariaDB/MySQL
  8. Snipe-it
  9. Composer
Kính hoạt tính năng Web Server
  • Mở Server Manager -> Dashboard -> Add roles and features
  • Nhấn Next
blank
  • Chọn Role-based or feature-based installation. Nhấn Next
blank
  • Chọn Select a server from the server pool, chọn tên server bạn muốn cài đặt. Nhấn Next
blank
  • Chọn Web Server -> Add Feauter. Nhấn Next
blank
  • Nhấn Next, Chọn Application Development -> Chọn CGI. Nhấn Next
blank
  • Chọn Restart the destination server automatically if required. Nhấn Install
blank
  • Thành công
blank
  • Để tắt bảo mật trình duyệt web, Vào Server Manager -> Local Server -> IE Enhanced Security Configuration, nhấn vào On, Tick vào 2 dòng Off. Nhấn OK
blank
  • Truy cập link: http://localhost/, nếu hiện ra giao diện web, bạn đã bật thành công Web Server
Cài đặt Notepab++
  • Mở danh sách phần mềm dowload ban đầu, cài đặt notepad++
blank

Cài đặt PHP

  • Copy thư mục “php-7.4.7-nts-Win32-vc15-x64” đã Dowload, phần mềm dowload số 2. Dán vào ổ đĩa C. Đổi tên thư mục thành PHP
blank

Cài đặt Visual C++2015

blank

Cài đặt Visual C++2012

blank

Cài đặt URL Rewrite

blank

Cài đặt PHP Manager

blank
  • Vào Server Manager -> IIS -> Click phải vào tên Server của bạn -> Internet Information Services IIS Manager
  • Click phải vào Icon dưới thanh Taskbar, chọn Pin to taskbar, để dễ thao tác về sau
blank
  • Chọn server, nhấn vào PHP Manager
blank
  • Tại mục PHP Manager -> Register new PHP version, tìm đến đường dẫn C://PHP, chọn file “php-cgi”, nhấn Open. Nhấn OK
blank
  • Kết quả
blank
  • Cũng trong PHP Manager -> PHP Extensions, nhấn Enable or disable an extension
blank
  • Enable các tính năng giống như hình dưới
blank
  • PHP Manager -> PHP Settings, nhấn Manage all settings
blank
  • Nhấn Add bên góc phải, đặt tên theo hình. Nhấn OK
blank
  • Truy cập đường dẫn: C:\inetpub\wwwroot
  • Tạo 1 file notepad tên “phpinfo.php” với nội dung “<?php phpinfo(); ?>”, bạn có thể tạo trên Desktop và copy dán file vào đường dẫn trên
blank
  • Mở Internet Information Services (IIS) Manager đã Pin dưới Taskbard. Nhấn Restart bên góc phải
blank
blank

Cài đặt MariaDB

  • Tạo password cho user root. Tick chọn Enable access from remote machines. Nhấn Next
blank
  • Chọn hết. Nhấn Next.
blank
  • Next tiếp, Install
blank

Cấu hình MySQL Database và User

  • Trên Desktop, mở phần mềm tên “HeidiSQL”
  • Nhấn New , nhập Password vừa tạo ở bước trên. Nhấn Open
blank
  • Click phải vào khoảng trống bên trái, Create New -> Database
blank
  • Đặt tên cho database. Collation chọn: utf8mb4_unicode_ci. Nhấn OK
blank
  • Chọn database Snipeit, Tools -> User manager
blank
  • Nhấn Add, đặt tên User, password. Nhấn Add object, chọn snipeit. Nhấn OK
blank
  • Tick chọn tất cả. Nhấn Save
blank

Cài đặt Snipe IT

  • Copy phần mềm đã dowload tên “snipe-it-4.9.2” dán vào đường dẫn C:\inetpub\wwwroot. Đổi tên thư mục thành “snipe-it”
  • Truy cập đường dẫn: C:\inetpub\wwwroot\snipe-it. Mở file “.env.example” bằng notepab. Save As file notepad rename thành “.env” có định dang đuôi .all lưu ở Desktop. Copy file .env dán lại vào C:\inetpub\wwwroot\snipe-it
  • Mở file .env lên sửa nội dung: APP_URL: địa chỉ IP tĩnh của Windows Server. Cách chỉnh địa chỉ IP tĩnh bên dưới
  • Điền tên, user name, password truy cập database, được tạo ở bước trên DB_DUMP_PATH: dán đường dẫn: C:\Program Files\MariaDB 10.1\bin
  • Save file
blank

Cách chỉnh địa chỉ IP tĩnh cho Windows Server

  • Mở đường dẫn: Control Panel -> Network and Internet -> Network Connections
  • Click phải Ethernet -> Propertiesblank
  • Mở Ipv4
blank
  • Gán địa chỉ IP tĩnh -> OK -> OK
blank

Cài đặt Composer

  • Copy file “9. Composer-Setup” trong Folder dowload ban đầu dán vào đường dẫn: C:\inetpub\wwwroot\snipe-it
  • Mở file “Composer-Setup” để cài đặt
blank
  • Tại thư mục trong đường dẫn: C:\inetpub\wwwroot\snipe-it. Nhấn File -> Open Windows PowerShell -> Open Windows PowerShell as administrator
blank
  • Chạy lệnh: ping 8.8.8.8 , để kiểm tra có kết nối Internet Chạy lệnh: composer install, chờ dowload tầm 5 phút Chạy lệnh: php artisan key:generate, nhấn Yes
blank
  • Copy Key trên dán vào C:\inetpub\wwwroot\snipe-it.env tại mục APP_KEY. Save lại
blank

Tạo và mở Port truy cập website

  • Mở Internet Information Server dưới Taskbard. Click phải Sites chọn Add Website
blank
  • Đặt tên, chọn đường dẫn C:\inetpub\wwwroot\snipe-it\public Gán Port tùy ý: ở đây mình để Port 3456.
  • Nhấn OK
blank
  • Chọn Snipe IT -> Handler Mappings
blank
  • Php-7.4.7 -> Request Restrictions
blank
  • Nhập theo hình dưới, nhấn OK
blank
  • Truy cập: C:\inetpub\wwwroot\snipe-it\public. Click phải vào Folder Upload -> Properties -> Security -> Editblank
  • Gõ tên User Windows Server bạn đang dùng -> Check Names -> OK. Chọn User, Tick vào Full Controll.
  • Nhấn OK
blank
blank
  • Truy cập C:\inetpub\wwwroot\snipe-it\bootstrap, Click phải Folder “cache”. Phân quyền Full Controll tương tự như trên
  • Truy cập: C:\inetpub\wwwroot\snipe-it, Click phải Folder “Storage”. Phân quyền Full Controll tương tự như trên
  • Truy cập: C:\Windows, Click phải Folder “Temp”. Phân quyền Full Controll tương tự như trên
  • Restart lại Web Server
blank
blank
  • Truy cập http://localhost:3456 , điền các thông tin theo yêu cầu. Và bạn đã có thành quả.
blank
  • Để truy cập từ bên ngoài Windows Server. Bạn hãy NAT port trên Google Cloud Platform.
  • Nat Port
  • Sau đó truy cập: http://12.34.56.78:3456, trong đó 12.34.56.78 là IPWAN của Windows Server
  • Cách lấy IPWAN: Trên giao diện Google Cloud Platform nhấn Menu -> VPC netword -> External IP addresses, copy địa chỉ External IP addresses dán vào ô Site URL bên trên.blank

Vậy là xong


Nguồn : ITForVn

Lên đầu trang