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.