歡迎你
各類文章如有侵犯智慧財產權請來信告知--------607@dlps.tp.edu.tw
一聲長聲之主機板故障?
作者:tseng 日期:2009-09-23
大龍國小統計
作者:tseng 日期:2009-06-02
<a href="http://www2.clustrmaps.com/counter/maps.php?url=http://www.dlps.tp.edu.tw" id="clustrMapsLink"><img src="http://www2.clustrmaps.com/counter/index2.php?url=http://www.dlps.tp.edu.tw" style="border:0px;" alt="Locations of visitors to this page" title="Locations of visitors to this page" id="clustrMapsImg" onerror="this.onerror=null; this.src='http://clustrmaps.com/images/clustrmaps-back-soon.jpg'; document.getElementById('clustrMapsLink').href='http://clustrmaps.com';" />
</a>
Coppermine
作者:tseng 日期:2009-05-26
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
OpenNMS安裝----freebsd7.3
作者:tseng 日期:2009-05-20
環境
install Tomcat6
cd /usr/ports
make search key='tomcat'
找到install位置安裝
install PostgreSQL
參考資料庫安裝
下載OpenNMS
http://www.geeklan.co.uk/files/opennms/opennms-165-freebsd-port.tgz
解壓縮
tar -zxvf opennms-164-freebsd-port.tgz -C /usr/ports/net-mgmt/
要更新ports树,否则你安装会遇到很多麻烦
install opennms
cd /usr/ports/net-mgmt/opennms
make install
安装jdk
安装过程需要准备几个文件,缺的文件,系统会提示你去哪里下载,安装上面的提示下载就是了,比较麻烦。下载了以后把它们放到/usr/ports/distfiles/里面
安裝後的訊息!請跟著步驟作!
Once everything has been built & installed the following message will be shown on your screen:
1st run
${OPENNMSHOME}/bin/runjava -s------------->/usr/local/opennms/bin/runjava -s
Then create
${OPENNMSHOME}/etc/opennms.conf
& add
START_TIMEOUT=0 to it
then run
${OPENNMSHOME}/bin/install -dis
to initialise the DB
edit /etc/rc.conf & add
opennms_enable="YES"
& run
%%PREFIX%%/etc/rc.d/opennms start--------->/usr/local/etc/rc.d/opennms start
you should now be able to login to opennms by pointing your browser to
http://localhost:8980------------------>後來發現應http://localhost:8980/opennms/
u: admin
p: admin
Please make sure the hostname that your system is configured with is either resolvable via dns or locally via /etc/hosts
otherwise you will have issues trying to start OpenNMS.
Tags: OpenNMS
資料庫
作者:tseng 日期:2009-05-19
cd /usr/ports/databases/mysql50-server
make WITH_CHARSET=big5 WITH_XCHARSET=all install clean
cd /usr/ports/databases/php5-mysql
make install clean
vi /etc/rc.conf
mysql_enable="yes"
/usr/local/etc/rc.d/mysql-server start
設定sql
/usr/local/bin/mysql mysql
Update user SET password=password('XXXXXXXXXX') where user='root';
FLUSH PRIVILEGES;
二、PostgreSQL
cd /usr/ports/databases/postgresql82-server
make install clean
cd /usr/ports/databases/php5-pgsql
make install clean
vi /etc/rc.conf
postgresql_enable="YES"
...
Tags: 資料庫
apache2/httpd.conf初步設定
作者:tseng 日期:2009-05-14
freebsd7.0軟體安裝
作者:tseng 日期:2009-05-08
沒有的話使用 /stand/sysinstall 來安裝 ports 的目錄
以 root 執行 /stand/sysinstall
選擇 Configure 後按 Enter
選擇 Distributions 後按 Enter
選擇 ports 後按空白鍵
選擇 Exit 後按 Enter
選擇你要從 CDROM 或 FTP 安裝等
跟著選單照做,最後離開 sysinstall
2、cd /usr/ports/net/cvsup-without-gui
make install clean
cp /usr/share/examples/cvsup/ports-supfile /root/
cvsup -g -L 2 /root/ports-supfile
nagios
作者:tseng 日期:2009-05-01
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安裝
big5------>utf-8
作者:tseng 日期:2009-05-01
ostube---->fiv
作者:tseng 日期:2009-04-28
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
yum使用
作者:tseng 日期:2009-04-26
安裝: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...
ostube
作者:tseng 日期:2009-04-26
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 目錄
LAMP
作者:tseng 日期:2009-04-24
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
apache-php-mysql
作者:tseng 日期:2009-04-23
修改環境
作者:tseng 日期:2009-04-23
cd /usr/ports/misc/gnuls
make install
修改root環境
vi /root/.cshrc
alias ls 'gnuls -ah --color --show-control-chars'
alias ping 'ping -t 4'
kbdcontrol -r fast
set prompt = "`hostname -s`# "-------->set prompt = "%B%n@%m [%/] # "
修改user環境
vi /etc/csh.cshrc
setenv LC_CTYPE en_US.ISO_8859-1
alias ls 'gnuls -ah --color --show-control-chars'
set prompt = "%B%n@%m [%/] $ "
set autolist