Category Archives: 伺服器 網站服務

GitLab – Requirements

Source : Hardware requirements CPU 1 core works supports up to 100 users but the application can be a bit slower due to having all workers and background jobs running on the same core 2 cores is the recommended number … Continue reading

Posted in Git | Leave a comment

Git Server 安裝 (New)

OS: Ubuntu 14.04 Server x64 安裝Gitlab + MySQL + Nginx 系統更新 apt-get update apt-get upgrade -y apt-get dist-upgrade 安裝基本需求 # 記得要先裝vim update-alternatives –set editor /usr/bin/vim.basic sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server redis-server … Continue reading

Posted in Git, Nginx, Ubuntu | Leave a comment

Nginx SSL Enable

環境: Ubuntu 14.04 x64 產生key root@Wordpress:/tmp# openssl genrsa -des3 -out site.key 2048 Generating RSA private key, 2048 bit long modulus ……………………..+++ ………………………………+++ e is 65537 (0x10001) Enter pass phrase for site.key: Verifying – Enter pass phrase for site.key: 2.產生 csr … Continue reading

Posted in Nginx, SSL, Ubuntu | Leave a comment

Apache SSL Enable

環境 CentOS 5.x i386 產生 key [root@Web test]# openssl genrsa -des3 -out site.key 2048 Generating RSA private key, 2048 bit long modulus …………+++ ………………+++ e is 65537 (0x10001) Enter pass phrase for site.key: Verifying – Enter pass phrase for site.key: … Continue reading

Posted in Apache, CentOS, SSL | Leave a comment

Gitlab改使用GMail SMTP

檢查 config/environments/production.rb 檔案,查看 config.action_mailer.delivery_method = :sendmail 的註解是否已增加,關閉Gitlab sendmail寄送服務 config.action_mailer.delivery_method = :sendmail [註] 使用這一篇 使用GMail SMTP寄信 (Ubuntu) 的方法應該也可以~但是目前會出現 “Mail failure – no recipient addresses” A message that you sent using the -t command line option contained no addresses that were not … Continue reading

Posted in Git, Ubuntu | Leave a comment

CentOS 快速安裝 Nginx with RTMP module

跟 之前裝在Ubuntu的那一篇 一樣 都是沒有設定stat的部分, 需要在另外修改 大致上跟Ubuntu的方式都相同 只是要注意的為 init script 可不可正常進行 測試的範例中是修改 nginx.conf 將 pid 那一行給取消註腳 pid logs/nginx.pid; #!/bin/sh yum groupinstall ‘Development Tools’ -y yum install pcre pcre-devel openssl-devel libxslt-devel -y cd /tmp wget http://nginx.org/download/nginx-1.7.3.tar.gz wget https://github.com/arut/nginx-rtmp-module/archive/master.zip tar -zxvf nginx-1.7.3.tar.gz yum … Continue reading

Posted in CentOS, Nginx, RTMP | Leave a comment

Cacti Debug : 圖出不來

檢查 Management => Graph Management => 找到出不來的圖 => Turn On Graph Debug Mode 看看rrdtool的log資訊為何

Posted in Cacti | Leave a comment

Cacti 自訂 Script php

記得php檔案最後return值格式 新增 Data Input Methods <== 呼叫script php方法 Input Type => Script – Script Server (PHP) Input String => /scripts/[php檔名] [php內使用的function名稱] <hostname> [參數值] Input Fields => hostname — Special Type Code ==> hostname Output Fields => 欄位名稱 新增Data Templates Data … Continue reading

Posted in Cacti | Leave a comment

OpenVPN 備援路由

先確認網路卡組態設定 第一張網卡 eth0 有設定 gateway 第二張網卡 eth1 沒有設定 gateway 這樣啟動時網路路由只有第一組的預設路由 接著編輯/etc/rc.locl 加入下面兩個設定 開機時自動加入第二組路由 route add default gw ..*.254 dev eth1 metric 10 調整備援路由切換時間,預設300 echo “10” > /proc/sys/net/ipv4/route/gc_timeout 最後可以檢查路由表 [root@twaren3-132 ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags … Continue reading

Posted in Linux, OpenVPN | Leave a comment

Nginx RTMP Module Stat

將 RTMP 模組檔案解壓縮後的 stat.xsl 複製到網頁目錄 wget https://github.com/arut/nginx-rtmp-module/archive/master.zip unzip master.zip cp nginx-rtmp-module-master/stat.xsl /usr/local/nginx/html/. 編輯 Nginx 設定檔,加入 stat 網頁設定 location /stat { rtmp_stat all; rtmp_stat_stylesheet stat.xsl; } location /stat.xsl { root html; } 重新讀取設定檔 連結網頁 http://[ip]/stat 參考 : https://github.com/arut/nginx-rtmp-module

Posted in Nginx, RTMP | Leave a comment