mount -t cifs //${SAMBA_SERVER}/${SHARE_FOLDER} ${MOUNT_POINT} -o guest
2012年7月31日 星期二
2012年7月26日 星期四
加入ssh login速度
只要把UseDNS關掉,登入速度就可以馬上變快!
sed -i 's/#UseDNS yes/UseDNS no/g' /etc/ssh/sshd_config service sshd restartReference: UNIX&LINUX
2012年7月8日 星期日
[Solved] CentOS 5.5做yum install ant遇到Missing Dependency: /usr/bin/rebuild-security-providers is needed by package java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64
做yum install ant的時候遇到以下的錯誤:
--> Finished Dependency Resolution
java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64 from installed has depsolving problems
--> Missing Dependency: /usr/bin/rebuild-security-providers is needed by package java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64 (installed)
Error: Missing Dependency: /usr/bin/rebuild-security-providers is needed by package java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64 (installed)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.
解決方法是這樣的,把缺乏的jpackage-utils-compat-el5安裝進去即可:
rpm -Uvh http://plone.lucidsolutions.co.nz/linux/centos/images/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm或者是
rpm -Uvh https://github.com/downloads/pallet/pallet/jpackage-utils-compat-el5-0.0.1-1.noarch.rpmReference: plone
標籤:
ant,
centos,
install,
installation,
yum
2012年1月15日 星期日
CentOS修改Jenkins傾聽的port
Jenkins預設傾聽的port是8080,會跟Tomcat衝到,
因此可以透過下列方式對Jenkins作修改,
打開/etc/sysconfig/jenkins
JENKINS_PORT="8080" # 改為您想要的portReference: Banym
2011年11月14日 星期一
SAMBA tuned configuration
每次都要進去改SAMBA的設定檔(/etc/smb/smb.conf),有點小麻煩,做個記錄。
[global] workgroup = MYGROUP server string = Samba Server log file = /var/log/samba/%m.log max log size = 50 dns proxy = no security = share unix charset = utf8 display charset = utf8 dos charset = cp950 socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65535 SO_SNDBUF=65535 syslog = 1 syslog only = yes strict sync = no sync always = no log level = 1 read raw = yes write raw = yes oplocks = yes max xmit = 65535 dead time = 15 getwd cache = yes lpq = 30 large readwrite = no [123] path = /mnt/123 public = yes writable = yesReference: 技術沒有難度,有難度的是態度
標籤:
centos,
configuration,
samba,
tuning
2011年11月8日 星期二
[Fixed] 啟動httpd出現"bad user name"
當你啟動 httpd 時出現 "bad user name ${APACHE_USR}"時,
不妨試著關掉 iptables 再啟動 httpd 吧,
如果這樣就解決問題的話,
可以再進去 iptables中設定規則,這樣的話就不必把防火牆全部關閉。
/etc/init.d/iptables stop /etc/init.d/httpd start
2011年11月2日 星期三
格式化儲存裝置為ext3,並掛載使用
mkfs.ext3 -b 4096 /dev/hda mkdir -P /mnt/mount_here mount /dev/hda /mnt/mount_here
2011年10月31日 星期一
Fixed: VMware Workstation在CentOS 5.5中執行出現'Could not open /dev/vmmon: No such file or directory'錯誤
CentOS 5.5跑VMware Workstation,在虛擬機器啟動過程中出現以下錯誤:
Could not open /dev/vmmon: No such file or directory解決方法是安裝VMware所需要的module,執行以下指令:
sudo vmware-modconfig --console --install-allReference: Opensuse Forum
2011年9月5日 星期一
CentOS 5.5安裝RabbitMQ 2.6.0
# 移除RabbitMQ 2.5.1 rpm -e rabbitmq-server-2.5.1-1 # 下載並安裝RabbitMQ 2.6.0 wget http://www.rabbitmq.com/releases/rabbitmq-server/v2.6.0/rabbitmq-server-2.6.0-1.noarch.rpm rpm -Uvh rabbitmq-server-2.6.0-1.noarch.rpm # 安裝Plugins cd /usr/lib/rabbitmq/lib/rabbitmq_server-2.6.0/plugins/ wget http://www.rabbitmq.com/releases/plugins/v2.6.0/rabbitmq_mochiweb-2.6.0.ez wget http://www.rabbitmq.com/releases/plugins/v2.6.0/mochiweb-1.3-rmq2.6.0-git9a53dbd.ez wget http://www.rabbitmq.com/releases/plugins/v2.6.0/webmachine-1.7.0-rmq2.6.0-hg0c4b60a.ez wget http://www.rabbitmq.com/releases/plugins/v2.6.0/amqp_client-2.6.0.ez wget http://www.rabbitmq.com/releases/plugins/v2.6.0/rabbitmq_management-2.6.0.ez wget http://www.rabbitmq.com/releases/plugins/v2.6.0/rabbitmq_management_agent-2.6.0.ezReference: rabbitmq
2011年8月23日 星期二
在CentOS 5.5上安裝Jenkins
安裝Jenkins
安裝後小小設定
Log檔案位置
Reference: jenkins-ci.org
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key yum install jenkins
安裝後小小設定
chkconfig jenkins on # listen port 8080 service jenkins start
Log檔案位置
/var/log/jenkins/jenkins.log
Reference: jenkins-ci.org
2011年7月6日 星期三
CentOS 5.5 安裝 RabbitMQ Server
# erase old rabbitmq-server rpm -e rabbitmq-server-2.4.1-1 # install newer rabbitmq-server wget http://www.rabbitmq.com/releases/rabbitmq-server/v2.5.1/rabbitmq-server-2.5.1-1.noarch.rpm rpm -Uvh rabbitmq-server-2.5.1-1.noarch.rpm # download rabbitmq management plugins into plugin folder cd /usr/lib/rabbitmq/lib/rabbitmq_server-2.5.1/plugins wget http://www.rabbitmq.com/releases/plugins/v2.5.1/mochiweb-1.3-rmq2.5.1-git9a53dbd.ez wget http://www.rabbitmq.com/releases/plugins/v2.5.1/webmachine-1.7.0-rmq2.5.1-hg0c4b60a.ez wget http://www.rabbitmq.com/releases/plugins/v2.5.1/amqp_client-2.5.1.ez wget http://www.rabbitmq.com/releases/plugins/v2.5.1/rabbitmq_mochiweb-2.5.1.ez wget http://www.rabbitmq.com/releases/plugins/v2.5.1/rabbitmq_management_agent-2.5.1.ez wget http://www.rabbitmq.com/releases/plugins/v2.5.1/rabbitmq_management-2.5.1.ezReference: RabbitMQ Plugins
標籤:
centos,
installation,
rabbitmq,
upgrade
CentOS 5.5 安裝 Jetty6
yum search jetty yum install jetty6-noarch # 若遇到Missing Dependency錯誤,就安裝jpackage-utils-compat-el5-0.0.1-1.noarch.rpm ################################################################################## # Error: Missing Dependency: # /usr/bin/rebuild-security-providers is needed by # package java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.x86_64 (installed) ################################################################################## rpm -Uvh http://plone.lucidsolutions.co.nz/linux/centos/images/jpackage-utils-compat-el5-0.0.1-1.noarch.rpmReference: oxxus, Plone
標籤:
centos,
gcj,
install,
installation,
jetty,
missing dependency
2011年6月8日 星期三
在CentOS上安裝RabbitMQ
# Download RPM and Install wget http://www.rabbitmq.com/releases/rabbitmq-server/v2.4.1/rabbitmq-server-2.4.1-1.noarch.rpm rpm -Uvh rabbitmq-server-2.4.1-1.noarch.rpm # Two ways to Start RabbitMQ Server service rabbitmq-server start /usr/sbin/rabbitmq-server start -detached # Make RabbitMQ to Run as a Service chkconfig rabbitmq-server onReference: RabbitMQ
標籤:
centos,
installation,
JMS,
rabbitmq
在CentOS安裝 JDK 6u27 及 Tomcat 7
######################################################## # Java JDK Installation ######################################################## # Download JDK 6u27 from Java.net, http://goo.gl/mOT4y sh jdk-6u27-ea-bin-b01-linux-amd64-18_may_2011-rpm alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_27/jre/bin/java 20000 alternatives --install /usr/bin/javac javac /usr/java/jdk1.6.0_27/bin/javac 20000 # Choose jdk1.6.0.27 as the java option alternatives --config java export JAVA_HOME="/usr/java/jdk1.6.0_27" ######################################################## # Tomcat 7 Installation ######################################################## # Install Tomcat 7 wget http://apache.mivzakim.net/tomcat/tomcat-7/v7.0.14/bin/apache-tomcat-7.0.14.tar.gz mv apache-tomcat-7.0.14.tar.gz /usr/share/apache-tomcat-7.0.14.tar.gz cd /usr/share tar -xzf apache-tomcat-7.0.14.tar.gz rm -rf apache-tomcat-7.0.14.tar.gz # Configure Tomcat 7 to Run as a Service cd /etc/init.d vim tomcat7
The Content of 'tomcat7'
#!/bin/bash # description: Tomcat Start Stop Restart # processname: tomcat # chkconfig: 234 20 80 JAVA_HOME=/usr/java/jdk1.6.0_27 export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH CATALINA_HOME=/usr/share/apache-tomcat-7.0.14 case $1 in start) source /root/.bashrc sh $CATALINA_HOME/bin/catalina.sh jpda run ;; stop) sh $CATALINA_HOME/bin/shutdown.sh ;; restart) sh $CATALINA_HOME/bin/shutdown.sh source /root/.bashrc sh $CATALINA_HOME/bin/catalina.sh jpda run ;; esac exit 0
######################################################## # Tomcat 7 Configuration ######################################################## chmod 755 tomcat7 chkconfig --add tomcat7 chkconfig --level 234 tomcat7 on # Verify The Configuration of Tomcat 7 chkconfig --list tomcat7 # Start/Stop/Restart Tomcat 7 service tomcat7 start service tomcat7 stop service tomcat7 restart
Reference: davidghedini.blogspot.com
2011年5月18日 星期三
Cannot restart gnome-system-monitor after exiting
ps aux | grep dbus # kill all dbus-related process # and then you can restart your gnome-system-monitor now gnome-system-monitorReference: CentOS Bug Tracker
標籤:
centos,
dbus,
gnome,
gnome-system-monitor,
x11
2011年5月3日 星期二
Install p7zip on CentOS
# 先安裝gcc-c++
yum install -y gcc-c++
wget http://goo.gl/Hvavs
tar -xjvf p7zip_9.20.1_src_all.tar.bz2
cd p7zip_9.20.1
make
make install
# usage
7za x ${COMPRESSED_FILE} -o${OUTPUT_FOLDER}
Reference: 貓言貓語
2011年4月28日 星期四
2011年4月25日 星期一
Network Traffic Monitor on CentOS
yum install -y iptrafReference: cyberciti
標籤:
centos,
monitoring,
network,
traffic
2011年4月18日 星期一
ERROR: cannot drop the currently open database
#進psql mode \connect postgresReference: Meeho!
標籤:
centos,
postgresql
訂閱:
文章 (Atom)