Disable APR in Apache Tomcat

0

Regarding APR please refer to the following URL:

http://tomcat.apache.org/tomcat-5.5-doc/apr.html

 

From tomcat version 5.5 the compiled APR is under the folder TOMCAT_HOME/bin which is called tcnative-1.dll.

 

To disable the APR while your development, you can comment the following line in the server.xml of tomcat.

<Listener className=”org.apache.catalina.core.AprLifecycleListener”/>

 

To enable the APR in Eclipse, you need to put the tcnative-1.dll to the java.library.path.

Once you start the tomcat in eclipse, if tcnative-1.dll is no in java.library.path, the current java.library.path will More >

Restore the mysql installation

0

Once your system is broken. We can restore the mysql setup with the existing installed files.

1. Go to regedit to change the “HKEY_LOCAL_MACHINE/Software/Mysql AB/Mysql server 5/location” to the old installed folder.

2. Execute /bin/MySQLInstanceConfig.exe to reconfig the mysql server.

3. Connect to mysql and added the users back.

Set up NAT for OpenVPN server on Ubuntu 12.04 LTS

0
Setup NAT

You need to setup NAT in order to provide an internet connection to the clients.

See the ip class you are using for the tunnel tun0

root@zeus:~# ifconfig tun0 tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:10.13.13.1  P-t-P:10.13.13.2  Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1 RX packets:7570 errors:0 dropped:0 overruns:0 frame:0 TX packets:1752 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:622314 (622.3 KB)  TX bytes:242952 (242.9 KB)

now add an iptables More >

Hwo to disable/enable network adapter in command line

0

1. Show all the network adapters

netsh interface show interface

Admin State State Type Interface Name ————————————————————————- Enabled Unreachable Dedicated Local Area Connection 2 Enabled Unreachable Dedicated Local Area Connection Enabled Unreachable Internal Internal Enabled Unreachable Loopback Loopback

2. Issue the command to disable/enable the adapter

netsh interface set interface name="Local Area Connection" admin=DISABLED|ENABLED

Rebuild windows 7 icon cache

0

Some times the icons can not display correctly, we need to rebuild the icon cache manually. Copy the following text to a .bat or .cmd file and execute it.

rem Try to close explorer.exe ... taskkill /f /im explorer.exe rem Clear the system icon cache DB ... attrib -h -s -r "%userprofile%\AppData\Local\IconCache.db" del /f "%userprofile%\AppData\Local\IconCache.db" attrib /s /d -h -s -r "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\*" del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_32.db" del /f More >

How To Disable IPv6 Under Ubuntu 10.04/11.04

0

1. Check whether IPv6 is enabled Launch the terminal and issue this command to check whether IPv6 is enabled or not:

cat /proc/sys/net/ipv6/conf/all/disable_ipv6

0 -> Enabled 1 -> Disabled

2. Edit /etc/sysctl.conf to disable IPv6 So, via the terminal, issue this command:

sudo nano /etc/sysctl.conf

The added the following lines:

# Disable IPv6 net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1

Save the file and close it.

3. Issue now this command to reload your configuration:

sudo sysctl -p

IPv6 is now disabled, you can check its status More >

Install tomcat6/7 on Ubuntu and run on port 80

0

tomcatX = tomcat6 or tomcat7

1. Install tomcatX

sudo apt-get install tomcatX

A new user “tomcatX” with primary group “tomcatX” will be created. 2. Stop tomcat

sudo service tomcatX stop

3. Install authbind if does not exist

sudo apt-get install authbind

4. Enable authbind for tomcat Open a text editor like nano and load the default tomcat configuration file

sudo nano /etc/default/tomcatX

Remove the comment hash “#” in front of the authbind property and set the value to “yes”

AUTHBIND=yes

5. Create authbind bind permission files for ports 80 and 443 Authbind will loop through the directory More >

Check file size in HTML5

2
function checkSize() { if (typeof FileReader !== "undefined") { // check file size var size = document.getElementById('files-upload').files[0].size; alert("size is " + formatBytes(size)); } }

Ubuntu Linux stop / disable GNOME GUI ~ X.org

0
Disable GDM using GUI tools

The Services Administration Tool allows you to specify which services will be started during the system boot process. You can type the command: services-admin &

Or just click on System > Administration > Services

Now you will be prompted for the administrator password, this is necessary because the changes done with this tool will affect the whole system. After entering the administrator password, the following window is displayed:

Make sure you remove GDM (Gnome login manager) by disabling the the checkbox and close the window.

Enable GDM using Command Line (CLI) More >

How to setup SSH auto logon on Ubuntu

0

1. Generate the ssh key by the following command, with blank passphrase and do not change the default location

ssh-keygen -t rsa

2. Upload the public key to the remote ssh server by the following command

ssh-copy-id -i ~/.ssh/id_rsa.pub xxx@rmote_host

3. Try to connect to the remote ssh server by the following command

ssh xxx@remote_host

Attachment

super@amex3:~$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/super/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved More >
Go to Top