Centos/linux allows Maven/tomcat to be used in ordinary users.

Source: Internet
Author: User

The following action # represents the use of the $ representation under the root user under a normal user

1. Create a new user

# Useradd Lonecloud

2. Set the user's password

# passwd Lonecloud

3. Since the installation of Tomcat and Maven to the root user yesterday, it is not possible to use the Lonecloud in a normal user

So I moved MAVEN and Tomcat to the/home/lonecloud directory.

mv/root/soft//home/lonecloud/
mv/root/dev//home/lonecloud/

Then modify permissions on these folders and the files inside them.

Chown-r lonecloud:lonecloud/home/lonecloud/soft/
Chown-r lonecloud:lonecloud/home/lonecloud/dev/

Then update the/etc/profile file configuration

Export Java_home=/usr/java/jdk1.8.0_144export classpath=.: $JAVA _home/jre/lib/dt.jar: $JAVA _home/lib/dt.jar: $JAVA _ Home/lib/tools.jar#export path= $PATH: $JAVA _home/binexport catalina_home=/home/lonecloud/dev/ Apache-tomcat-7.0.79export maven_home=/home/lonecloud/dev/apache-maven-3.5.0export PATH= $PATH: $JAVA _home/bin:$ Maven_home/binalias tomcat_start= $CATALINA _home/bin/startup.shalias tomcat_stop= $CATALINA _home/bin/shutdown.sh

Final execution makes the file effective

Source/etc/profile

Centos/linux allows Maven/tomcat to be used in ordinary users.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.