Search This Blog

Monday, August 6, 2012

How to solve "sorry, you must have a tty to run sudo"

As root:
vi /etc/sudoers (EDIT: please use visudo instead)
comment out: #Default requiretty
And reinstall (./install.sh)
 

Friday, August 3, 2012

Setup webmin

(1) Execute the following:
cat > /etc/yum.repos.d/webmin.repo << EOF
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1
EOF
wget http://www.webmin.com/jcameron-key.asc
rpm --import jcameron-key.asc

yum install webmin -y
(2) You are done. Navigate to http://<your host>:10000

Thursday, August 2, 2012

CentOS on windows.

1. Download centos vm from http://downloads.sourceforge.net/thoughtpolicevm/centos-6.2-x86_64-server.zip
2. Unzip and run in vm player.
3. To install GNOME. Execute following command
   A. yum update
   B. yum groupinstall "X Window System"
   C. yum groupinstall "Desktop"
   D. vi /etc/inittab
   E. Change id:3:initdefault: to id:5:initdefault:
   F. init 6 to reboot and enjoy full centos on windows.

How to create linux service for jboss eap 6


1. Depending on how to run. Go to jboss installation folder and then <JBOSS_INSTALL>/bin/init.d.
2. You will find one file named jboss-as-standalone.sh. If you wanna just create service for jboss standalone. you can use this file.
3. If you wanna create service for jboss running in domain mode. Create copy of jboss-as-standalone.sh with the name of jboss-as-domain.sh.
4. Make changes in newly created jboss-as-domain.sh for point correct directories. Make sure you change.. standalone.sh to domain.sh.
5. copy file to init.d.. cp <JBOSS_INSTALL>/bin/init.d/jboss-as-XXXXX.sh /etc/init.d/jbossxxxxx
6. use chkconfig -add jbossxxxxx command to add jbossxxxxx as service.
7. now you can start jbossxxxxx as service. use service jbossxxxxx start...
8. sample copy of jboss-as-domain.sh attached here.