2020年4月29日 星期三

Alibaba Cloud 阿里雲 Ecs主機 安裝LookingGlass 網路工具

阿里雲Ecs主機安裝LookingGlass 網路工具
安裝相關套件:
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum install -y mod_php71w.x86_64
yum install httpd






進入路徑/var/www/html然後下載相關套件
cd /var/www/html
wget https://github.com/ILLKX/LookingGlass/archive/master.zip 
#LookingGlass下載
yum install -y unzip #如未安裝解壓縮,請先安裝
unzip master.zip #解壓縮master.zip
將LookingGlass-master內的檔案全部複製到/var/www/html


cp -r /var/www/html/LookingGlass-master/* /var/www/html


再執行configure.sh  
$bash /var/www/html/LookingGlass/configure.sh


重啟httpd
systemctl restart httpd
打上自己主機IP,就可看到下列畫面。測試一下PING/mtr/ping/tracerout
測試沒問就完成了。


本次LookingGlass會用到的指令說明
參考指令Linux RPM 是 Redhat 的軟件管理系統, 是 Redhat Package Manager,
Redhat, Fedora 及 CentOS 可以透過 RPM 安裝, 移除及更新套件。


RPM參數:
-ivh:安装显示安裝進度--install--verbose--hash
-Uvh:升級軟件包--Update
-qpl:列出RPM軟件包内的文件信息[Query Package list];
-qpi:列出RPM軟件包的描述信息[Query Package install package(s)];
-qf:查找指定文件属于哪个RPM软件包[Query File];
-Va:校验所有的RPM软件包,查找丢失的文件[View Lost];
-e:删除


yum install
#安裝套件,install後面接要安裝的套件名稱,如yum install PHP。
若把所有相關一次安裝的話可在最後加上「*」。如yum install PHP*


Yum instal -y
yum 指令 -y 參數用於用 yes 回答指令運行時問題,比如 yum -y install PHP,
這樣在安裝軟體的時候就不用輸入yes了


systemctl命令是管理器指令,將 service 和 chkconfig 兩個命令組合。


讓某服務自動啟動#systemctl enable httpd.service
使某服務不自動啟動#systemctl disable httpd.service
顯示所有已啟動的服務#systemctl list-units --type=service
啟動某服務#systemctl start httpd.service
停止某服務#systemctl stop httpd.service
重啟某服務#systemctl restart httpd.service
檢查服務狀態#systemctl is-active httpd.service (緊顯示是否 Active)
service httpd status




# vim /etc/httpd/conf/httpd.conf (查看Apache配置httpd設定)
#進入編輯模式 可利用 :set nu  設定資料的行號
以下為 httpd.conf 設定檔內容


ServerRoot "/etc/httpd" # Apache 配置、錯誤、日誌的根目錄
PidFile run/httpd.pid   # 記啟動時之 pid (process identification number)
Timeout 120             # 回應訪問的最長秒數
KeepAlive Off           # 不准一次連結使用多種請求
MaxKeepAliveRequests 100# 最大連結數目,0代表無限
KeepAliveTimeout 15     # 一次連結中等同一位客戶下一個請求的秒數
Listen 80               # 聽那一個 IP 那一個 port ,此句是聽所有 IP 80 port
User apache             # OS中的帳號
Group apache            # OS中的群組

ServerAdmin root@localhost# 伺服器管理員的 Email

沒有留言:

張貼留言

搜尋此網誌