<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                #### MegaCLI ##### [感謝《天高任鳥飛》的整理](http://blog.chinaunix.net/uid-25135004-id-3139293.html "感謝《天高任鳥飛》") >個人理解:MegaCLI我一般用來查看和監控,如果真的涉及到硬盤操作,我會使用"MegaRaid_Server_Manager",有興趣的同學可以了解下,基本原理是在服務器安裝服務,啟動端口。在Windows上部署管理軟件,我處理過硬盤替換后沒有加入RAID的情況,需要手動清理RAID信息并加入。 ```shell #硬盤型號 /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL|grep 'Inquiry Data' # 硬盤錯誤 /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL|grep 'Count' # 硬盤狀態(在線,下線) /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL|grep 'Firmware state' ``` 監控腳本框架,發現后調用接口報警 ```shell #!/bin/bash #check raid disk status MEGACLI="/opt/MegaRAID/MegaCli/MegaCli64 " $MEGACLI -pdlist -aALL | grep "Firmware state" | awk -F : '{print $2}' | awk -F , '{print $1}' >/tmp/fireware.log $MEGACLI -pdlist -aALL | grep -E "Media Error|Other Error" | awk -F : '{print $2}' >/tmp/disk.log for i in `cat < /tmp/disk.log` do if [ $i -ne 0 ] then curl "http://xxxxxxB&state=ALARM&description=raid_disk_error" fi done for i in `cat < /tmp/fireware.log` do if [ $i != Online ] then curl "http://xxxxxxstate=ALARM&description=raid_disk_offline" fi done ``` #### CetnOS 6 部署gem ``` yum install libyaml-devel libyaml #需要gem 1.9版本,yum 一般只到1.8 cd /opt/ wget https://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p551.tar.gz tar xzf ruby-1.9.3-p551.tar.gz && cd ruby-1.9.3-p551 ./configure --enable-shared make && make install # 修改源 gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/ ``` #### FPM制作rpm包 ``` # 安裝fpm yum install ruby-devel rubygems-devel openssl-devel rpm-build # gem部署請查看上一章節 gem install fpm ``` 制作nginx包 ``` # 安裝依賴 yum install openssl-devel pcre-devel pcre gcc zlib -y ./configure --prefix=/usr/local/nginx --user=nobody --group=nobody --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-pcre --add-module=/opt/lnmp/nginx-http-concat-master --add-module=/opt/lnmp/echo-nginx-module-0.61 --add-module=/opt/lnmp/ngx_http_substitutions_filter_module-master --add-module=/opt/lnmp/nginx-plugin-master make ``` 這里要注意了,不要正常make install 這里需要安裝到一個打包目錄,fpm會根據編譯參數去安裝 ``` mkdir /opt/rpm_tmp/ make install DESTDIR=/opt/rpm_tmp/ ``` 準備腳本 ``` # 卸載腳本 # cat /tmp/remove_after.sh #!/bin/bash rm -rf /usr/local/nginx ``` #### Nodejs 12.14部署 ``` cd /opt/ wget https://nodejs.org/dist/v12.14.0/node-v12.14.0-linux-x64.tar.xz xz -d node-v12.14.0-linux-x64.tar.xz tar xf node-v12.14.0-linux-x64.tar mv node-v12.14.0-linux-x64 /usr/local/ ln -s node-v12.14.0-linux-x64 nodejs ln -s /usr/local/nodejs/bin/node /usr/bin/node ln -s /usr/local/nodejs/bin/npm /usr/bin/npm # 修改taobao源 npm config set registry https://registry.npm.taobao.org # 升級npm npm install -g npm # 安裝淘寶cnpm npm install -g cnpm --registry=https://registry.npm.taobao.org ln -s /usr/local/nodejs/bin/cnpm /usr/bin/cnpm ``` #### Centos7 puppeteer依賴 ``` # centos6比較折騰,放棄了 yum install pango.x86_64 libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXtst.x86_64 cups-libs.x86_64 libXScrnSaver.x86_64 libXrandr.x86_64 GConf2.x86_64 alsa-lib.x86_64 atk.x86_64 gtk3.x86_64 ipa-gothic-fonts xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc ``` #### Ruby 2.5.1部署 ``` wget https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.1.tar.gz tar xvf ruby-2.5.1.tar.gz cd ruby-2.5.1/ ./configure -prefix=/usr/local/ruby make make install cp /usr/local/ruby/bin/ruby /usr/local/bin/ cp /usr/local/ruby/bin/gem /usr/local/bin/ # 移除默認源 gem sources --remove https://rubygems.org/ gem sources -a https://mirrors.aliyun.com/rubygems/ ``` #### 安裝redis-dump(依賴Rube) ``` gem install redis-dump -V ``` #### 安裝VNC server > VNC Server主要用來安裝Oracle和Weblogic等需要圖形界面安裝的軟件(有隨時可以連接的需求) 當然,直接開啟Centos操作系統下的遠程桌面也可以,限制是用戶需要服務器登錄后才行(虛擬機下這樣玩) YUM安裝 ```shell yum install tigervnc-server ``` Centos 6 操作 ```shell # 配置VNC Server vim /etc/sysconfig/vncservers # 單用戶設置如下:(端口:5901) VNCSERVERS="1:root" VNCSERVERARGS[1]="-geometry 800x600 -nolisten tcp " # 多用戶設置如下 VNCSERVERS="1:root 2:oracle" VNCSERVERARGS[1]="-geometry 1024x768 -nolisten tcp " # VNC密碼設置 #root 用戶下,設置登錄vnc密碼** vncpasswd #oracle用戶下,切換到oracle用戶下,設置登錄vnc密碼 su – oracle vncpasswd # 啟動 service vncserver start service vncserver restart service vncserver stop ``` Centos 7 操作 ``` cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:1.service # 修改配置文件[service]段 (以root用戶為例, 把<USER>改為root) [Service] Type=forking # Clean any existing files in /tmp/.X11-unix environment ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill :1 > /dev/null 2>&1 || :' ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver :1 -geometry 1280x720 -depth 24" PIDFile=/root/.vnc/%H%i.pid (這里的%H%i 不用改,vnc用來生成PIDFile文件名,保證路徑存在就可以了) ExecStop=/bin/sh -c '/usr/bin/vncserver -kill :1 > /dev/null 2>&1 || :' # 更新systemctl systemctl daemon-reload # 設置vnc遠程連接密碼 vncpasswd #啟動vnc服務 (如報錯,根據提示查看狀態) systemctl start vncserver@:1.service # 設置為自動啟動 systemctl enable vncserver@:1.service ``` #### NTP服務部署 YUM安裝 ```shell yum install ntp ntpdate -y ``` 修改配置文件/etc/ntp.conf 刪除后添加以下內容 ```shell server 202.120.2.101 #當外部時間不可用時,使用本地時間。 server 127.127.1.0 iburst local clock #允許更新的IP地址段 restrict 192.168.0.1 mask 255.255.255.0 nomodify ``` 啟動ntp服務 **Centos 7 ** ```shell systemctl start ntpd systemctl enable ntpd.service ``` **Centos 6 ** ```shell /etc/init.d/ntpd chkconfig ntpd on ``` ```shell #### 驗證服務 ntpq -p ``` 增加crond ```shell 0 */2 * * * /usr/sbin/ntpdate 202.120.2.101 > /dev/null 2>&1 ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看