setting up tomcat in Ubuntu - apache

I have gone through many tutorials for installing tomcat in my Ubuntu system. I installed tomcat7. tomcat7-admin, tomcat7-examples and tomcat7-docs by following commands:
apt-get install tomcat7
apt-get install tomcat7-admin
apt-get install tomcat7-docs
apt-get install tomcat7-examples
After this setup I can start, stop the server by:
/etc/init.d/tomcat7 start/stop
I have following files and folders:
/usr/share/tomcat7/
/etc/tomcat7/
/var/lib/tomcat7/
I have added the following user in tomcat-users.xml file under /usr/sharetomcat7/conf/tomcat-users.xml and /etc/tomcat7/tomcat-users.xml
<user username="admin" password="amdin" roles="admin-gui,standard,manager-gui"/>
Now when I open localhost:8080, I get a dull page saying 'It works' unlike the colorful page we get generally. These are the contents of page:
You might consider installing the following packages, if you haven't already done so:
tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking here.
tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking here.
tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the manager webapp and the host-manager webapp.
But when I click on 'click here' link above to open admin, docs or examples I get "HTTP status 404: The requested resource is not available."
But I have installed admin, examples and docs. I am not getting it. Please help! I am using Ubuntu 13.04

on ubuntu 14.04 it worked for me using following command :
sudo apt-get install tomcat7-docs tomcat7-admin tomcat7-examples

Create a link for each application in webapps folder as below:
cd /var/lib/tomcat7/webapps
sudo ln -s /usr/share/tomcat7-examples/examples examples
sudo ln -s /usr/share/tomcat7-docs/docs docs
sudo ln -s /usr/share/tomcat7-admin/manager manager
sudo ln -s /usr/share/tomcat7-admin/host-manager host-manager

Related

Woeusb don't showing in applications Debian 10 Gnome

I am installed woeusb along this instruction https://github.com/slacka/WoeUSB.
git clone https://github.com/slacka/WoeUSB.git
./setup-development-environment.bash
sudo apt-get install devscripts equivs gdebi-core
mk-build-deps
sudo gdebi woeusb-build-deps_3.3.1-1-g7171bff_all.deb
This program didn't showing in applications, search don't finded it.Then i am installed from snap, don't finded too. What's a problem?

Create Docker image from existing Ubuntu + App

I installed Moodle (eLearning PHP based app, but it could be any app) locally on Ubuntu and would like to package it as Docker image/container. There were whole bunch of installations and configurations done. I'd like to package all that so that I can deploy to some Docker enabled hosting service, such as Digital Ocean or AWS.
How do I create Docker image?
Do I need to handle networking, ports and Apache configuration for production deployment?
There ara a lot of Moodle images in dockerhub. just use one of them
The process to create docker images is well documented on Docker's documentation site. See: Build your own images
The idea is simple: You inherit/extend an existing image and make additions to it. This is done in a provisioning file called Dockerfile
Dockerfile Example:
FROM debian:8.4
MAINTAINER John Doe (j.doe#example.com)
# update aptitude
RUN apt-get clean && apt-get update
# utilities
RUN apt-get -y install vim git php5.6 apache2
In the example above I extend a Debian image, update aptitude and install a series of packages.
A full list of commands available in Dockerfiles is available at https://docs.docker.com/engine/reference/builder/
Once your Dockerfile is ready you can build the image using the following command:
docker build -t debian/enhanced:8.4 /path/to/Dockerfile

Why localhost's phpmyadmin is empty with no login window?

I installed phpmyadmin following the instructions here. Installation has completed and I have phpmyadmin inside /usr/share/phpmyadmin and has linked to
sudo ln -s /usr/share/phpmyadmin/ /var/www/html/phpmyadmin
But doesn't show anything (the whole page is blank with no login window) when I access to http://localhost/phpmyadmin
What could be wrong?
My os is Ubuntu14.04 and installed Apache 2.4.7.
For those who has similar problem, please follow the steps below.
Please check error at /var/log/apache2/error.log
My error is PHP Fatal error: require_once(): Failed opening required './libraries/php-gettext/gettext.inc' (include_path='.')
So install sudo apt-get install php-gettext
Then restart sudo service apache2 restart.

How to check LAMP is installed or not?

I am newbie in vps. I installed centos 6.5 64bit. one hour ago and installed Apache, php, mysql successfully. now I have to install phpmyadmin. It requires something called LAMP. I don't know if LAMP is already installed by default with centos or I have to manually install it. What is the ssh command to check it if LAMP installed or just answer yes or no.
UPDATE:
[understood]
That blogger confused me by separating LAMP with comma.
If LAMP was correctly installed, i.e., PATH is already set for php,mysql and apache2, then run following commands from terminal:-
php -v // Return PHP version
apache2 -v // Returns apache version
mysql --version // Returns mysql version
if all of the above command returns their respective versions, then it means LAMP is installed.
BUT if it doesn't then there might be two cases:-
1) LAMP might be installed but is not added to path.
2) LAMP is not installed, Install it.
As for the first case, if it is installed but not runnable from terminal, then just run following commands to see where LAMP components are installed:-
1) Find file with name "apache2" in your pc. It will return list of path where a file name called "apache2" exists. You can then cross examine it further.
sudo find / -name apache2
2) Run the above same command to find file "mysql" and follow the same procedure further.
sudo find / -name mysql
3) For PHP:-
sudo find / -name php
LAMP stands for Linux, apache, Mysql, PHP, if you've installed apache, mysql and PHP correctly on a linux system you have LAMP already set up.
If you want to check whether the above mentioned dependecies are installed or not
To check whether php is installed or not
php5 -v
For Apchae
/usr/sbin/apache2 -V
If any of the mentioned dependencies are not install and you want to install the LAMP use the following command,
sudo apt-get install lamp-server^

Installing Trac on Ubuntu14.04/Apache2/mod_wsgi

I'm trying to install Edgewall's Trac ticket system on an Ubuntu 14.04 Server, with Apache2 and mod_wsgi.
I have followed the instructions given here: https://help.ubuntu.com/community/TracApacheModWsgi
But after point 9, when i try to view the page, it says:
Forbidden
You don't have permission to access /trac on this server.
What could be the cause?
In step 6 of the referenced instruction, place line Require all granted before the closing tag </Directory>. This is required in order to access directories outside of the default document root.
Please note that under Ubuntu 14.04 you might get a python babel package error that is related to missing "en_US" locale. It can be easily fixed:
sudo apt-get install --reinstall python-babel-localedata