helloworld

目前分類:系統管理 (418)

瀏覽方式: 標題列表 簡短摘要

vi app/config/app.php

'debug' => false,
改成
'debug' => true,

即可

undefined
PHP學習手冊

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

更新ports-tree
portsnap fetch extract
portsnap fetch update

安裝 Apache 2.4
cd /usr/ports/www/apache24
make install
選擇event 模式
(x) MPM_EVENT          MPM worker variant with the goal of consuming threx
(x) MPM_SHARED         all MPMs as loadable module

安裝php7.0
cd /usr/ports/lang/php70
make install
[x] ZTS      Force Zend Thread Safety (ZTS) build

安裝需要的php extensions
cd /usr/ports/lang/php70-extensions
make install

設定apache 支援php
/usr/local/etc/apache24/Includes/php-fpm.conf
<FilesMatch "\.php$">
    SetHandler "proxy:unix:/tmp/php-fpm.sock|fcgi://localhost"
</FilesMatch>

編輯 /etc/rc.conf
php_fpm_enable="YES"
apache24_enable="YES"

啟動 apache && php-fpm
/usr/local/etc/rc.d/php-fpm start
/usr/local/etc/rc.d/apache24 start

測試網頁是否正常
<?php
    phpinfo();
?>


undefined
PHP學習手冊

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

download source and

./config --prefix=xxxx no-ssl2 no-ssl3 no-weak-ssl-ciphers
make 
make install

undefined
HTTPS權威指南:在服務器和Web應用上部署SSL/TLS和PKI

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

測試環境: CentOS 6.x
假設我們想要不需輸入密碼就可以從 user@server-a 遠端登入 userb@server-b 

首先使用 usera 登入 server-a
1. ssh-keygen
2. ssh-copy-id userb@server-b
3. 測試
ssh userb@server-b hostname

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

1. 登入防火牆web 管理介面
2. System -> Dashboard -> Status -> System Information -> System Configuration -> Backup
3. 選擇要儲存的地方
可以選擇 Local PC 或是 USB Disk 
另外也可以選擇是否要加密壓縮
forti

undefined
UTM Security With Fortinet: Mastering FortiOs

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

vmware esx/esxi 的 crontab

路徑
/var/spool/cron/crontabs/root

#min hour day mon dow command
1    1    *   *   *   /sbin/tmpwatch.py
1    *    *   *   *   /sbin/auto-backup.sh
0    *    *   *   *   /usr/lib/vmware/vmksummary/log-heartbeat.py
*/5  *    *   *   *   /sbin/hostd-probe ++group=host/vim/vmvisor/hostd-probe

重啟crontab
kill `cat /var/run/crond.pid`
/usr/lib/vmware/busybox/bin/busybox crond
 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

至vmware 官網下載vmware vcenter converter standalone 這套免費的工具
簡單介紹幾個方便的功能

點選 "converter machine" 後會出現以下畫面

1472803604460.jpg

如果要做P2V (Physical to Virtual ,實體轉換至虛擬)
可以選擇 powered on
接下來選擇
Remote Windows machine
Remote Linux machine
This local machine

選擇完後,輸入來源端的ip及 足夠權限的帳號密碼進行下一步
此時程式會嘗試登入來源端機器收集一些資訊

下個畫面輸入目的端vm host的資訊,接著下一步

輸入guestos 名稱,預設是來源主機的hostname

選擇要放在哪個resource pool , datastore 以及 virtual machine version

接下來確認guestos 的配置,需要注意的是 Helper VM network
後續轉換過程中需要用到,如果你的環境中有 dhcp server 的話,就用預設自動抓取即可
如果沒有的話就給他一個暫時的ip,沒錯,暫時的,轉換完成後就不需要了

最後就開開心心的放下去跑,泡個咖啡,大個便再回來看看結果囉


如果要做虛擬機之間的複製或轉換(V2V)可以選擇 powered off
有以下幾個host 來源可以選擇
VMware Infrastructure virtual machine
VMware Workstation or other VMware virtual machine
Hyper-V Server

這個就方便多了,只要是選擇來源的host機和目的端的host
之後也是一樣開開心心的開始轉換了

undefined
實戰VMware vSphere 6.x企業私有雲建置:異地備援x軟體定義儲存x高可用性

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

vpn server : vpn.mybox.tw
username: user001
password: p@ssw0rd

1. yum -y install pptp

2. edit /etc/ppp/chap-secrets
user001 PPTP p@ssw0rd *

3. vi /etc/ppp/peers/vpn.mybox.tw
pty "pptp vpn.mybox.tw --nolaunchpppd"
name user001
remotename PPTP
require-mppe-128
file /etc/ppp/options.pptp
ipparam vpn.myserver.org

4. modprobe ppp_mppe

5. review /etc/ppp/options.pptp
lock
noauth
refuse-pap
refuse-eap
refuse-chap
nobsdcomp
nodeflate
require-mppe-128

6. connect to vpn server
pppd call vpn.mybox.tw

7. check logs , /var/log/messages

8. check ifconfig and route

9. disconnect
killall pppd
 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

首先至theta360 官網下載即時串流應用程式
找到適合的應用程式並下載安裝

https://theta360.com/ct/support/download/

文章標籤

helloworld 發表在 痞客邦 留言(2) 人氣()

RTMP 是 Real Time Messaging Protocol 的縮寫
該協定是Adobe Systems公司為Flash播放機和伺服器之間音訊、視頻和資料傳輸 開發的開放協定

本次測試環境主要分為三大部分
1. rtmp server: 安裝nginx-rtmp
2. push to rtmp: Adobe Flash Media Live Encoder 或是 ffmpeg
3. rtmp player: jwplayer

[安裝server]
nginx 是戰鬥民族出品的強大web server,我們必須要再加裝nginx-rtmp 模組才可以支援rtmp 串流

以CentOS 為例
wget https://copr.fedorainfracloud.org/coprs/lkiesow/nginx-rtmp/repo/epel-6/lkiesow-nginx-rtmp-epel-6.repo
yum install nginx-rtmp

以FreeBSD 為例
cd /usr/ports/www/nginx (勾選rtmp)
make install

設定檔範例
vi nginx.conf

#user  nobody;
worker_processes  1;

error_log  /var/log/rtmp_error.log debug;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

rtmp {
        server {
                listen 1935;
                chunk_size 8192;

                application rtmp {
#### 設定 access control
                        allow publish 192.168.2.13;
                        allow publish 10.0.0.0/24;

                        allow play all;

                        deny all;
                        live on;

#### 如果要複製一份影像到其他 rtmp server 
                        meta copy;      
                        push rtmp://rtmp02-server/rtmp/live;
                        push rtmp://rtmp03-server/rtmp/live;
                }
        }
}


[push to rtmp]
Adobe Flash Media Live Encoder 好處是跨平台、免費、GUI、方便外接攝影機訊號
ffmpeg 好處是方便在文字介面下透過指令推送
範例
ffmpeg -i video-file.mp4 -vcodec h264 -acodec aac -strict -2 -r 60.0 -s 1280x720 -b:a 100k -f flv rtmp://rtmp01-server/rtmp/live

[rmpt player]
至官網下載jwplayer
https://www.jwplayer.com/products/jwplayer/

範例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>stream playing~~</title>
    <script src="jwplayer.js"></script>
    <script>jwplayer.key = "Your Key ~~";</script>
</head>
<body>
<div id="player"></div>

<script>
    jwplayer("player").setup({
        sources: [{
            file: "rtmp://rtmp01-server/rtmp/live"
        }],
        height: 360,
        width: 640
    });
</script>

</body>
</html>

undefined
一手掌握短小精悍的Nginx

作者: 高群凱  
出版社:佳魁資訊  
出版日期:2016/11/25
語言:繁體中文
定價:490元

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

首頁 » 管理 » 使用者 » 檢視使用者個人資訊 » 註冊使用者打勾 » 存檔

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

安裝 logintoboggan 模組並啟用
https://www.drupal.org/project/logintoboggan

設定 logintoboggan

Allow users to login using their e-mail address
選擇啟用並存檔

接下來打開登入頁面
即可看到提示訊息變成
使用者名稱或電子郵件地址 *
You may login with either your assigned username or your e-mail address.
 

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

啟用 drupal core 的 tracker 模組後
即可在個人頁看到多一個追蹤的選單
底下即是個人張貼過文章

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

安裝 apache + php + mysql 就不再多說了
首先安裝 drush , drush 是文字模式下一個好用的工具
cd /usr/ports/www/drush
make install

接下來透過drush 安裝drupal 核心程式
先切換到 apache 的 DocumentRoot 或是其他可以access 到網頁的路徑
cd /home/www
drush dl drupal

Project drupal (7.43) downloaded to /home/web/www2/drupal-7.43.                                                                                              [success]
Project drupal contains:                                                                                                                                     [success]
 - 3 profiles: minimal, standard, testing
 - 4 themes: bartik, seven, garland, stark
 - 47 modules: drupal_system_listing_incompatible_test, drupal_system_listing_compatible_test, book, php, translation, shortcut, contact, image, profile,
field_ui, dashboard, blog, dblog, search, help, file, forum, locale, block, syslog, node, update, statistics, contextual, overlay, system, field_sql_storage,
text, list, number, options, field, rdf, path, user, toolbar, menu, color, poll, comment, aggregator, taxonomy, filter, openid, tracker, simpletest, trigger

這時候drupal 已經幫你在當下的目錄下載好目前最新release 的D drupal 7.x

 

下載正體中文語系
https://localize.drupal.org/download
找到Chinese, Traditional , 7.x
複製連結網址
回到drupal 目錄
cd profiles/standard/translations/
wget http://ftp.drupal.org/files/translations/7.x/drupal/drupal-7.43.zh-hant.po


開啟網頁
http://server/

Choose profile -> Standard > save and continue
Choose language -> Chinese, Traditional (繁體中文) -> save and continue
檢查系統需求 -> 依照指示完成系統需求
cd sites/default
mkdir files && chown www:www files
cp default.settings.php settings.php && chown www:www settings.php


設定資料庫 -> 安裝設定檔 -> 設定翻譯語言 -> 設定網站 -> 介面翻譯完成 -> 已完成

helloworld 發表在 痞客邦 留言(0) 人氣()

以下網路上看到的文章,改天找機會試試
service unsupported-transceiver
no errdisable detect cause gbic-invalid
speed nonegotiate
end
插上 光纖模組

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

硬體: dell R320
作業系統: CentOS release 6.7
重開機按F2 進入BIOS
找到CPU power managments 的地方
修改成 OS DBPM存檔後重開機即可

90e3c397-93db-4f9a-bd84-31abbcd02b86.jpg

helloworld 發表在 痞客邦 留言(0) 人氣()

查看目前spare硬碟有以下幾種方式
aggr status -s
vol status -s
sysconfig -A

將spare硬碟做zero處理
disk zero spares

查看目前硬碟是否真的有在狂跑
sysstat -x 1
CPU NFS CIFS HTTP Total Net kB/s Disk kB/s Tape kB/s Cache Cache CP CP Disk DAFS FCP iSCSI FCP kB/s
in out read write read write age hit time ty util in out
10% 0 0 0 0 0 0 21418 21418 0 0 >60 100% 0% - 100% 0 0 0 0 0
7% 0 0 0 0 1 0 14052 14231 0 0 >60 99% 42% T 39% 0 0 0 0 0
9% 0 0 0 0 0 0 19968 19456 0 0 >60 100% 0% - 100% 0 0 0 0 0
10% 0 0 0 0 0 0 21248 21248 0 0 >60 100% 0% - 56% 0 0 0 0 0
10% 0 0 0 0 1 0 20358 20612 0 0 >60 100% 0% - 100% 0 0 0 0 0
10% 0 0 0 0 0 0 20736 20736 0 0 >60 100% 0% - 55% 0 0 0 0 0
10% 0 0 0 0 1 0 20846 20592 0 0 >60 100% 0% - 100% 0 0 0 0 0

等等等,最後會出現這樣的訊息

Wed Sep 9 16:16:19 CST [raid.disk.zero.done:notice]: Disk 8b.15 Shelf 0 Bay 11 [NETAPP X261_MTOMC250P05 R5VV] S/N [XXXXXXXX] : disk zeroing complete
Wed Sep 9 16:16:41 CST [raid.disk.zero.done:notice]: Disk 8b.8 Shelf 0 Bay 4 [NETAPP X261_MTOMC250P05 R5VV] S/N [XXXXXXXX] : disk zeroing complete
Wed Sep 9 16:16:52 CST [raid.disk.zero.done:notice]: Disk 6a.15 Shelf 0 Bay 11 [NETAPP X261_MTOMC250P05 R5VV] S/N [XXXXXXXX] : disk zeroing complete
Wed Sep 9 16:16:54 CST [raid.disk.zero.done:notice]: Disk 6a.14 Shelf 0 Bay 10 [NETAPP X261_MTOMC250P05 R5VV] S/N [XXXXXXXX] : disk zeroing complete
Wed Sep 9 16:16:59 CST [raid.disk.zero.done:notice]: Disk 8b.10 Shelf 0 Bay 6 [NETAPP X261_MTOMC250P05 R5VV] S/N [XXXXXXXX] : disk zeroing complete
Wed Sep 9 16:17:21 CST [raid.disk.zero.done:notice]: Disk 6a.2 Shelf 0 Bay 2 [NETAPP X261_MTOMC250P05 R5VV] S/N [XXXXXXXX] : disk zeroing complete

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

在網址列輸入 about:config 叫出偏好設定
找到以下的設定
dom.ipc.plugins.flash.disable-protected-mode
從原來的 false 改成 true 就可以了

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

安裝完 phpmyadmin 後,出現 "您應升級到 MySQL 5.5.0 或更新版本。" 的錯誤訊息
如果不想更新mysql版本的話,可以到一下網址找適合的版本安裝
https://www.phpmyadmin.net/downloads/
如 phpMyAdmin 4.0.10.10

undefined
MySQL完全攻略:資料庫開發與效能調校

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

針對要檢視的介面做以下的設定

Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int s0/0/0
Router(config-if)#ip accounting
Router(config-if)#end

便可以用sh ip accounting檢視目前來源和目的位置

Router#sh ip accounting
Source Destination Packets Bytes
192.168.50.123 10.30.10.3 14 836
192.168.50.124 10.30.10.4 40 2480
....
....

但是無法按照數字做排序,須自己人工貼到自己熟悉的工具做排序

undefined

文章標籤

helloworld 發表在 痞客邦 留言(0) 人氣()

Close

您尚未登入,將以訪客身份留言。亦可以上方服務帳號登入留言

請輸入暱稱 ( 最多顯示 6 個中文字元 )

請輸入標題 ( 最多顯示 9 個中文字元 )

請輸入內容 ( 最多 140 個中文字元 )

reload

請輸入左方認證碼:

看不懂,換張圖

請輸入驗證碼