Linux Notes All In One


Add third-party yum-repositories
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
yum install --enablerepo=webtatic git-all
Using CentOS 5 Repos in RHEL 5 Server
wget http://mirrors.nl.kernel.org/centos/5/os/x86_64/CentOS/centos-release-notes-5.10-0.x86_64.rpm
wget http://mirrors.nl.kernel.org/centos/5/os/x86_64/CentOS/centos-release-5-10.el5.centos.x86_64.rpm
rpm -e redhat-release-notes-5Server redhat-release-5Server --nodeps
rpm -ivh centos-release-notes-5.10-0.x86_64.rpm centos-release-5-10.el5.centos.x86_64.rpm
Installing RPMforge
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm
yum search java | grep 'java-'
cd /etc/yum.repos.d

Open a file browser from bash
nautilus --browser .
Exit from git diff
Window+Q 
VNC Server Setup
/etc/sysconfig/vncservers
VNCSERVERS="1:vncuser 2:vncuser2 3:vncuser3"
VNCSERVERARGS[1]="-geometry 1600x1200"

service vncserver start|stop|restart
Create xstartup scripts
vi ~/.vnc/xstartup
Uncomment the following two lines (remove the "#" characters):
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
Managing your VNC sessions
vncserver -kill :1
List all VNC server sessions

ls ~/.vnc/*.pid
Check vnc version in redhat
rpm -qa | grep vnc-server
rpm -qf /usr/bin/vncserver

Copy and paste stops working in VNC session
Run vncconfig &

Install Java in Redhat
Add CentOs repository
yum search java-1.7
yum install java-1.7**
alternatives --display java
/usr/sbin/alternatives --config java

alternatives --install /usr/bin/java java

Labels

adsense (5) Algorithm (69) Algorithm Series (35) Android (7) ANT (6) bat (8) Big Data (7) Blogger (14) Bugs (6) Cache (5) Chrome (19) Code Example (29) Code Quality (7) Coding Skills (5) Database (7) Debug (16) Design (5) Dev Tips (63) Eclipse (32) Git (5) Google (33) Guava (7) How to (9) Http Client (8) IDE (7) Interview (88) J2EE (13) J2SE (49) Java (186) JavaScript (27) JSON (7) Learning code (9) Lesson Learned (6) Linux (26) Lucene-Solr (112) Mac (10) Maven (8) Network (9) Nutch2 (18) Performance (9) PowerShell (11) Problem Solving (11) Programmer Skills (6) regex (5) Scala (6) Security (9) Soft Skills (38) Spring (22) System Design (11) Testing (7) Text Mining (14) Tips (17) Tools (24) Troubleshooting (29) UIMA (9) Web Development (19) Windows (21) xml (5)