第一部分 :linux下帐户的创建
例:创建帐户 用户名: lw 密码: Lw1234 注:密码输入时不显示出来
[root@IDD ~]# useradd lw
[root@IDD ~]# passwd lw Changing password for user lw.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@IDD ~]#
说明 :$useradd lw 增加名称为lw的用户 #passwd lw 将要为lw用户设密码
New UNIX password:为lw用户设密码 如:New UNIX password:Lw1234(输入密码不显示出来的)
Retype new UNIX password: 确认密码 如 :Retype new UNIX password:Lw1234
OK,帐户创建建好了,默为所有权限目录 /home/lw
第二部分:安装Tomcate
第一步:下载Tomcat
退出,用lw帐户重新登录,查看当前路径pwd 为:/home/lw 新建目录 services 路径 /home/lw/services
下载apache-tomcat-6.0.29.tar.gz 放到 /home/lw/services/apache-tomcat-6.0.29.tar.gz
[lw@IDD ~]$ pwd
/home/lw
[lw@IDD ~]$ mkdir services
[lw@IDD ~]$ cd services
[lw@IDD services]$ pwd
/home/lw/services
[lw@IDD services]$
第二步:解压Tomcat
[lw@IDD services]$ ls
apache-tomcat-6.0.29.tar.gz
[lw@IDD services]$ tar xvzf apache-tomcat-6.0.29.tar.gz
..................................................................................... ........
[lw@IDD services]$ ls
apache-tomcat-6.0.29 apache-tomcat-6.0.29.tar.gz
第三步:设置用户变量
jdk已经安装好了 /usr/local/jdk
[lw@IDD services]$ cd ~
[lw@IDD ~] $ pwd
/home/lw
[lw@IDD ~]$ ls -a
. .bash_history .bash_profile .canna .gtkrc services .zshrc
.. .bash_logout .bashrc .emacs .kde .xemacs
[lw@IDD ~]$ vi .bash_profile
. ......................................................................
JRE_HOME=/usr/local/jdk
export JRE_HOME
......................................................................
按Esc :wq 保存修改
".bash_profile" 14L,230C written
[lw@IDD ~]$
注意:在.bash_profile文件中加两行:
JRE_HOME=/usr/local/jdk
export JRE_HOME
第四步:启动Tomcate
退出,用lw重新登录
[lw@IDD ~] $ cd services/apache-tomcat-6.0.29/bin
[lw@IDD bin] $ pwd
/home/lw/ services/apache-tomcat-6.0.29/bin
[lw@IDD bin] $ /.catalina.sh run
OK....Tomcate启来了,并打印出来启动信息.
Tomcate安装成功.