歡迎你

各類文章如有侵犯智慧財產權請來信告知--------607@dlps.tp.edu.tw

分类: linux预览模式: 普通 | 列表

ubuntu svn

1,安裝 SVN
sudo apt-get install apache2  apache2-common apache2-utils apache2-doc libapache-svn subversion2,
2,SVN Repository

sudo mkdir
sudo svnadmin create
sudo chown -R www-data:www-data

3,修apache2
sudo gedit /etc/apache2/mods-available/dav_svn.conf

4 SVN 使用者
sudo htpasswd -c /etc/subversion/passwd
sudo htpasswd    /etc/subversion/passwd

查看更多...

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 3672

Coppermine

Coppermine安裝環境
centos5.3
apache2.2.3+php5.1.6+mysql5.0.45

下載Coppermine
官方網址:http://coppermine-gallery.net/

1.在mysql,新增資料庫XXX
2.安裝Image Magick
  yum install imagemagick*
3.將下載的檔案放在伺服器內,資料夾名稱cpg123,修改 albums 和 include 檔案夾的權限為777
4.執行http://localhost/cpg123/install.php  按提示操作

查看更多...

Tags: Coppermine

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 3992

nagios

Apache套件    yum install httpd
Gcc編譯器       yum install gcc
Glibc函式庫    yum install glibc glibc-common
GD函式庫                         yum install gd gd-devel

yum install nagios nagios-plugins-all nrpe

下載Nagios及其Plugins,目前最新穩定版本分別為3.0.6與1.4.13
為了讓Nagios伺服器可以監看遠端Linux主機,需要額外安裝NRPE套件

測試設定檔無誤    
            
nagios -v /etc/nagios/nagios.cfg

啟動 nagios            

service nagios start

查看狀態

nagiostats

Web 界面

vi /etc/httpd/conf.d/nagios.conf

ScriptAlias /nagios/cgi-bin "/usr/lib/nagios/cgi"

<Directory "/usr/lib/nagios/cgi">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   order allow,deny
   Allow from all
#  order deny,allow
#  Deny from all
   Allow from 127.0.0.1 192.168.1.0/24
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /etc/nagios/htpasswd
   Require valid-user
</Directory>

Alias /nagios "/usr/share/nagios"

<Directory "/usr/share/nagios&...

查看更多...

Tags: nagios安裝

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 26848

big5------>utf-8

httpd.conf

#AddDefaultCharset Big5
    LanguagePriority zh-TW tw en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN

查看更多...

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2669

ostube---->fiv

cd /usr/local/src
wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2
tar jxvf all-20071007.tar.bz2
mkdir -p /usr/local/lib/codecs
cd all-20071007
cp -f *.* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/
ls -l /usr/local/lib/codecs/
ln -sf /usr/local/lib/codecs /usr/lib/codecs
ln -sf /usr/local/lib/codecs /usr/local/lib/win32
ln -sf /usr/local/lib/codecs /usr/lib/win32

  

cd /usr/local/src
ldconfig
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd mplayer
make clean && make distclean
./configure --prefix=/usr --codecsdir=/usr/local/lib/codecs/
make && make install

查看更多...

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2729

yum使用

更新:yum update
安裝:yum install xxx
移除:yum remove xxx
清除已經安裝過的檔案(/var/cache/yum/):yum clean all
搜尋:yum search xxx
列出所有檔案:yum list
查詢檔案訊息:yum info xxx

yum grouplist
yum groupinstall "Web Server"

yum check-update;yum -y update;yum clean all

另外,我們在安裝一些要用到的一些工具時,或許它並不存在於 CentOS yum 的官方資料庫中。所以我們還要另外定義非官方資料庫文件,讓一些實用的工具也能透過 yum 來安裝。

    # vi /etc/yum.repos.d/dag.repo

    [dag]
    name=Dag RPM Repository for Red Hat Enterprise Linux
    baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
    gpgcheck=1
    enabled=1
    http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
    匯入非官方資料庫的GPG
    # rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt


一、強化yum功能

yum install yum-fastestmirror(加快yum下載速度)
yum install yum-priorities

vi /etc/yum/pluginconf.d/priorities.conf
在 [main]下新增enabled=1 (預設已寫上)
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
vim /etc/yum.repos.d/CentOS-Base.repo
在[base], [addons], [updates], [extras]項目下新增 priority=1
在[centosplus],[contrib]項目下新增 priority=2
/etc/init.d/yum-updatesd restart
二、下載相關套件並安裝(請自行對應)

i386 wget http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
x86_64 wget http://apt.sw.be/redhat/el5/en/x86_64/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
安裝金鑰
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt (備份檔案)
rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i38...

查看更多...

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 4577

ostube

1安裝環境
yum install httpd mysql php php-mysql php-gd php-mbstring  gd libjpeg-devel gcc

yum -y install subversion

yum install ruby ruby-libs


FLVTool2
wget  http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz
tar zxvf flvtool2-1.0.6.tgz
cd flvtool2-1.0.6
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install

Mplayer Source Code
# wget ftp://ftp4.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2
# tar xvjf MPlayer-1.0rc2.tar.bz2
# cd MPlayer-1.0rc2
# ./configure --prefix=/usr
# make;make install

2修改參數
memory_limit > post_max_size > upload_max_filesize
php.ini
upload_max_filesiz=100M
post_max_size:110M

/ostube/cgi-bin/uu_default_config.pm
max_upload => 509715200----->1073741824

# cd ostube
# chmod -R 777 templates_c
# chmod -R 777 media
# chmod -R 777 ostube.log
# chmod -R 777 conversion.log
# chmod -R 777 includes/config.php
# cd cgi-bin
# chmod +x *
# cp * /var/www/cgi-bin

3下載ostube

安裝完刪除 /var/www/html/osTube/install 目錄






查看更多...

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 4403

LAMP

yum install httpd mysql-server php php-devel php-mysql

yum 修改

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://ftp2.tnc.edu.tw/pub1/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://ftp2.tnc.edu.tw/pub1/centos/RPM-GPG-KEY-CentOS-5


#released updates
[update]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://ftp2.tnc.edu.tw/pub1/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://ftp2.tnc.edu.tw/pub1/centos/RPM-GPG-KEY-CentOS-5


#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://ftp2.tnc.edu.tw/pub1/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://ftp2.tnc.edu.tw/pub1/centos/RPM-GPG-KEY-CentOS-5


#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://ftp2.tnc.edu.tw/pub1/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://ftp2.tnc.edu.tw/pub1/centos/RPM-GPG-KEY-CentOS-5
分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2533

主機規劃

fd4

xoops
Joomla

moodle
ostube

Coppermine
gallery

查看更多...

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2931

設定snmpd.conf

# Here is a commented out example configuration that allows less
# restrictive access.

# YOU SHOULD CHANGE THE "COMMUNITY" TOKEN BELOW TO A NEW KEYWORD ONLY
# KNOWN AT YOUR SITE.  YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO
# SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE.

##       sec.name  source          community
com2sec local     localhost        public

com2sec mynetwork 192.168.100.0/24      public
# 註﹕請將 192.168.100.0/24 改為您機器目前所在的 network 範圍。

##     group.name sec.model  sec.name
group MyRWGroup  v1        local
group MyROGroup  v2c        mynetwork
#
#group MyRWGroup  any        otherv3user
#...

##           incl/excl subtree                          mask
view all    included  .1                               80

## -or just the mib2 tree-

#view mib2   included  .iso.org.dod.internet.mgmt.mib-2 fc

##                context sec.model sec.level prefix read   write  notif
access MyROGroup ""      any       noauth    exact      all    none   none
access MyRWGroup ""      any       noauth    exact      all    all    none

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 8105

cacti install centos5.2

1.先安裝以下套件
httpd-2.2.3-11、php-5.1.6-15、mysql-5.0.22-2.2

cacti-0.8.7b-2、net-snmp-5.3.1-19、rrdtool-1.2.23-1

rpm -ivh cacti-0.8.7b-2.el5.rf.noarch.rpm

rpm -ivh cacti-docs-0.8.7b-2.el5.rf.noarch.rpm

以上套件用rpm或yum安裝

2.安裝與設定 Cacti
mysqladmin -u root -p create cacti
mysql -u root -p -A cacti < /var/www/html/cacti/cacti.sql

編輯 cacti 設定檔


vi /var/www/cacti/include/config.php

修改以下四行


$database_default = "cacti"; //資料庫名稱
$database_hostname = "localhost"; //資料庫位置
$database_username = "cactiuser"; //資料庫使用者名稱
$database_password = "cactiuser"; //資料庫使用者密碼

設定資料庫
mysql> grant all privileges on cacti.* to cactiuser@localhost identified by ‘cactiuser’;
mysql> flush privileges;
mysql> exit


設定apache
vi /etc/httpd/conf.d/cacti.conf
vi /etc/httpd/conf/http.conf
Alias /cacti/ /var/www/cacti/
<Directory /var/www/cacti/>
    DirectoryIndex index.php
    Options -Indexes
    AllowOverride all
    order deny,allow
    deny from all
    allow from 127.0.0.1
    allow from 192.168 <= 追加
    AddType application/x-httpd-php .php
    php_flag magic_quotes_gpc on
    php_flag track_vars on
</Directory>

cacti定期執行
/etc/cron.d/cacti
*/5 * * * *    cacti    php    /var/www/cacti/poller.ph...

查看更多...

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 10826

錯誤訊息

Compiling ntop resulted in error for me:

1.
checking for pcap_lookupdev in -lpcap... no
             *** FATAL ERROR ***
It looks that you don't have the libpcap distribution installed.
Download, compile and, optionally, install it.
When finished please re-run this program.
You can download the latest source tarball at http://www.tcpdump.org/
configure: error: The LBL Packet Capture Library, libpcap, was not found!
error: Bad exit status from /var/tmp/rpm-tmp.85176 (%build)

ntop安裝用rpm較為簡單,或用YUM
rrdtool

查看更多...

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 3181

ntop

1. yum install cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-deve libpcap-devel

2.install  RRDtool
http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.3.5.tar.gz

3.Install Ntop
cd /usr/local/src/
tar -zxvf ntop-3.3.9.tar.gz
cd ntop-3.3.9
./autogen.sh --prefix=/usr/local/ntop-3.3.9
make
make installuseradd -M -s /sbin/nologin -r ntop
chown -R ntop.ntop /usr/local/ntop-3.3.9/share/ntop
cd /usr/local/
ln -s ntop-3.3.9 ntop

 4.Start Ntop 

簡易版本

查看更多...

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 3689

samba

[global]
        dos charset = cp950
        unix charset = utf8
        display charset = utf8
        workgroup = CC1
        server string = Samba  %v
        passdb backend = tdbsam
        log file = /var/log/samba/%m.log
        max log size = 50
        cups options = raw

[homes]
        comment = Home Directories
        valid users = %S
        read only = No
        create mask = 0664
        directory mask = 0775
        browseable = No

[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        browseable = No

[public]
        comment = Public Stuff
        path = /home/public
        valid users = @users
        read only = No
        guest ok = Yes
 

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 6089

建構複雜的命令

分类:電腦教學 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 2587

~/.bashrc

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific aliases and functions
PATH="/bin:/sbin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
PATH="$PATH":/usr/X11R6/bin:/home/dmtsai/bin
LANG=zh_TW.big5
LC_TIME=C
export PATH LC_TIME LANG
umask 022

alias   rm='rm -i'
alias   cp='cp -i'
alias   mv='mv -i'
 

分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 3211

每日監控作業

df磁碟空間
du磁碟使用狀況
top
data
timecpu使用率
uptime
netstat
traceroute
分类:linux | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 11087