1. Check if java get installed:
dpkg --get-selections | grep sun-java
2. Install Java:
sudo apt-get install sun-java6-jdk
3. Get tomcat from apache site:
wget http://apache.hoxt.com/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.
18.tar.gz
tar xvzf apache-tomcat-6.0.18.tar.gz
4. Move tomcat to the location:
sudo mv apache-tomcat-6.0.18 /usr/local/tomcat
5. Add following line into .bashrc file:
export JAVA_HOME=/usr/lib/jvm/java-6-sun
6. Create /etc/init.d/tomcat
# Tomcat auto-start
#
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/tomcat.pid
export JAVA_HOME=/usr/lib/jvm/java-6-sun
case $1 in
start)
sh /usr/local/tomcat/bin/startup.sh
;;
stop)
sh /usr/local/tomcat/bin/shutdown.sh
;;
restart)
sh /usr/local/tomcat/bin/shutdown.sh
sh /usr/local/tomcat/bin/startup.sh
;;
esac
exit 0
7. Change mode to executable.
sudo chmod 755 /etc/init.d/tomcat
8. Create links
sudo ln -s /etc/init.d/tomcat /etc/rc1.d/K99tomcat
sudo ln -s /etc/init.d/tomcat /etc/rc2.d/S99tomcat
9. Start up tomcat:
/etc/init.d/tomcat start
10. Check the tomcat at http://127.0.0.1:8080 with FireFox, it compains the connection rest. The port 8080 has been used by Oracle, so tomcat has to use a different port. Modify "Connector port="8080" to "Connector port="8090" in /usr/local/tomcat/config/server.xml, then restart tomcat. Re-check tomcat at http://127.0.0.1:8090 again, it works.
11. To be able to check Status and Tocat Manager, the manager ID and password have to be setup. Add following lines in /usr/local/tomcat/config/tomcat-users.xml:
<user username="ABC" password="PASSWORD" roles="tomcat,manager,admin">
Tuesday, December 16, 2008
Wednesday, December 10, 2008
Install PHP5/MySQL on Ubuntu 8.10
sudo apt-get install mysql_server apache2 php5 \
php5_mysql phpmyadmin
Install Oracle 10G EX on Ubuntu 8.10
1. Add oracle site to the resources.list file
udo vi /etc/apt/sources.list
Appen "deb http://oss.oracle.com/debian unstable \
main non-free"
2. Get key from Oracle.
wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle \
-O- | sudo apt-key add -
3. Update Oracle
sudo apt-get update
4. Install Oracle
Increase the swap space to 1G.
sudo dd if=/dev/zero of=/swapfile bs=1024 count=700000
sudo mkswap /swapfile
sudo swapon /swapfile
Add following line into /etc/fstab:
/swapfile none swap sw 0 0
sudo apt-get install oracle-xe
5. Configure Oracle.
sudo /etc/init.d/oracle-xe configure
Install MySQL on Ubuntu 8.10
1. Get MySQL server and client:
sudo apt-get install mysql-server mysql-client \
mysql-query-browser
2. Comment out bind-address 127.0.0.1 in my.cnf.
gksudo gedit /etc/mysql/my.cnf
3. set password for root:
mysqladmin -u root -p status
then enter the passwd. It still doesn't work.
4. Work around for mysql commands:
mysqladmin|mysqlshow|mysql -u root -p
Then enter the root password.
Install Apache2 on Ubuntu 8.10
1. Get package and install Apache2
sudo apt-get install apache2 php5
2. Make public_html at $HOME
mkdir public_html
3. cd /etc/apache2/mods-enabled/
4. sudo ln -s ../mods-available/userdir.conf userdir.conf
5. sudo ln -s ../mods-available/userdir.load userdir.load
6. sudo /etc/init.d/apache2 restart
Subscribe to:
Posts (Atom)