Posts Tagged ‘Linux’

Install Oracle Java 8 in Linux Mint

Posted: March 3, 2017 in HowTo
Tags: , , , ,
To install Oracle Java 8, follow the steps below
Add the repository to the package list
$ sudo add-apt-repository ppa:webupd8team/java
Update packages in cache
$ sudo apt-get update
Install Java 8
$ sudo apt-get install oracle-java8-installer
Follow the instructions and verify the install as below
$ java -version

 

How to mount an ISO image on Linux

Posted: November 29, 2015 in HowTo
Tags: , , , ,

Use the following steps to mount an ISO image on Linux. The commands need to be run as ‘root’

Step 1: Create a directory where ISO would be mounted

# mkdir mount-directory

 
Step 2: Mount ISO image to recently created directory

 # mount -t iso9660 -o loop iso-filename.iso mount-directory

 
Example

# mkdir /mnt/iso
# mount -t iso9660 -o loop /home/users/raj/linux.iso /mnt/iso

To setup JRE for Firefox, a java plugin for the browser needs to installed. Run the following command to install Sun java browser plugin

$ sudo ssh apt-get install sun-java6-plugin

Once the install is complete, click on verify now to check the installation.

Login securely to Unix servers

Posted: October 3, 2010 in HowTo
Tags: , , ,

To login to unix servers securely use the following command

$ ssh <userid>@<server>
userid – user id of the user to be logged in to the server
server – server to which user to be logged in

Example
$ ssh user1@server1

The assumption is that server to which user has to securely logged in is capable of accepting secured connections.

Use the following command to power down linux servers immediately.

$ sudo shutdown -h now

Use the following command to reboot linux servers immediately.

$ sudo reboot now

Setting up Tomcat 6 in Ubuntu 10.04

Posted: September 14, 2010 in HowTo
Tags: , , , ,

Ubuntu Server: 10.04 LTS
Tomcat: 6.0.29

Step 1: Download apache-tomcat-6.0.29.tar.gz from http://tomcat.apache.org/
$ wget <download url>
download url – http://apache.technocozy.com//tomcat/tomcat-6/v6.0.29/bin/apache-tomcat-6.0.29.tar.gz

Step 2: Extract the tar file
$ tar xvf apache-tomcat-6.0.29.tar.gz

Step 3: Copy the extracted contents to /usr/local
$ sudo cp apache-tomcat-6.0.29.tar.gz /usr/local

Step 4: Create a softlink as tomcat
$ sudo ln -s apache-tomcat-6.0.29.tar.gz tomcat

Step 5: Add tomcat user
useradd -d /home/tomcat -s /bin/bash -m tomcat

Step 6: Change permissions to tomcat
$ sudo chown -R tomcat:tomcat /usr/local/apache-tomcat-6.0.29.tar.gz
$ sudo chown -R tomcat:tomcat /usr/local/tomcat

Step 7: Setup users in tomcat
$ cd /usr/local/tomcat
$ sudo vi conf/tomcat-users.xml
Add the following
<role rolename="tomcat"/>
<role rolename="admin"/>
<role rolename="manager"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="admin" password="admin" roles="admin,manager"/>

Step 8: Setup start/stop scripts
$ sudo vi /home/tomcat/tomcat
Add the following
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
;;
*)
echo "Usage: $0 {start|stop|restart}"
esac
exit 0

Change permissions on tomcat script
$ chmod ug+x tomcat

Step 9: Start/Stop/Restart Tomcat
To start
$ ./tomcat start

To stop
$ ./tomcat stop

To restart
$ ./tomcat restart

Step 10: Test setup
After starting tomcat, go to Internet browser and type in
http://<tomcatmachine&gt;:8080
tomcatmachine – servername or ip address of the machine where the tomcat was just setup.