Posts

Enable Remote Admin Glassfish

GlassFish 3.1.2+ does not allow remote administration out-of-the-box. To activate remote administration you will have to set an admin password before performing the actual enabling: asadmin change-admin-password --domain_name [DOMAIN_NAME] asadmin enable-secure-admin --port [PORT_NAME]

JRE in Chrome CentOS 6.4

Just link  libnpjp2.so  which is in  <your-java-dir>/lib/i386  to /opt/google/chrome/plugins  . For me, here are the commands: mkdir /opt/google/chrome/plugins cd /opt/google/chrome/plugins ln -s /usr/local/jre1.6.0_17/lib/i386/libnpjp2.so . Restart Chrome and enjoy!

Completely Re-install Apache2 on Ubuntu

Find and drop all Apache packages: 1 2 3 4 5 6 7 8 9 10 APACHE_PKGS = ` sudo   dpkg   --get-selections   |   grep  apache  |   cut   -f   1 ` # Make sure things are sane: echo   $APACHE_PKGS # Example output: apache2 apache2-mpm-prefork apache2-utils apache2.2-common \ # libapache2-mod-php5 libapache2-mod-python libapache2-svn # Likely if you have a Python application: # libapache2-mod-python libapache2-mod-python-doc libapache2-mod-wsgi # Or if you roll with the PHP:  # libapache2-mod-php5 sudo   apt-get remove   --purge   $APACHE_PKGS Re-install Apache 1 2 3 # You might want to consider not re-installing the whole list; # instead dump it out, audit, and install what you need: sudo   apt-get install   $APACHE_PKGS After this, all the configuration files were back, and I had a default Apache install.

Create Bulk folders Using Batch file

Simple Script To Create Bulk Folder L:isted In Text File: Create a file named "CreateDir.bat"  and list all the folders tat you want to create in "file.txt" Content of CreateDir.bat 1 2 3 @ echo off for /f %%i in (file.txt) do mkdir %%i Simply run the batch file and your folders will be created.!

HowTO: Install Postfix & dovecot On CentOS 6

How to installing Postfix and Dovecot on Linux CentOS yum install postfix dovecot chkconfig postfix on chkconfig dovecot on  Configure main.cf : vi /etc/postfix/main.cf # change or add on these line: myhostname = mail.fileregion.com mydomain = fileregion.com myorigin = $mydomain inet_interfaces = all mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mynetworks = 127.0.0.0/8 home_mailbox = Maildir/ smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, permit broken_sasl_auth_clients = yes Restarting postfix: /etc/init.d/postfix restart Configure Dovecot on Linux CentOS 6 Configure dovecot.conf: vi /etc/dovecot/dovecot.conf # uncomment on this line: protocols = imap pop3 listen = * Config mail auth mehanism: vi /etc/dovecot/conf.d/10-auth.conf # change on these line: disable_plainte...

HowTO: Install VNC Server On CentOS 6.3

1. Install Tigervnc Server view plain copy to clipboard print ? [root@demo ~]# yum -y install tigervnc-server   2. Install X Windows and GNOME. This used to be yum groupinstall "X Window System" "GNOME Desktop Environment", but is now simply: view plain copy to clipboard print ? yum groupinstall  "X Window System"   "Desktop"    3. Create a user (or use and existing user) and create VNC login. view plain copy to clipboard print ? [root@demo ~]# useradd david   [root@demo ~]# passwd david   Changing password  for  user david.   New password:   Retype  new  password:   passwd: all authentication tokens updated successfully.   [root@demo ~]# su - david   4. Switch to the user (su - user) and is...

Change Static IP to DHCP in CentOS 6

Setting up a Linux for dhcp can be done by editing file using a text editor such as vi: # vi /etc/sysconfig/network-scripts/ifcfg-eth0 Following is sample static configuration: DEVICE=eth0 BOOTPROTO=static HWADDR=00:19:D1:2A:BA:A8 IPADDR=10.10.10.10 NETMASK=255.255.255.0 ONBOOT=yes Replace static configuration with DHCP: DEVICE=eth0 BOOTPROTO=dhcp HWADDR=00:19:D1:2A:BA:A8 ONBOOT=yes Save and close the file. Just restart network service: