In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Steps for building Tomcat services
Steps for building Tomcat services
1. Initialization of the environment (starting from the graphical interface entered for the first time after installation)
Configure the server to work in command-line mode
Alt + ctrl + f3 temporarily enters command line mode and takes effect in time. Vim / etc/inittab modifies the bottom number 5 to 3.
Close iptables and selinux
Service iptables stop temporarily shuts down the firewall and takes effect in time. Chkconfig iptables off shuts down the firewall service and starts it automatically.
Configure a local YUM source
A. Put the shutdown into the CD drive b and mount the CD to the system.
Mount-t iso9660/dev/cdrom/mnt/cdrom
C. Modify yum configuration file cd / etc/yum.repos.d/ mkdir back
Mv * back/
Cp back/CentOS-Media.repo. Vim CentOS-Media.repo
Baseurl= file://mnt/cdrom
Enabled=1
Gpgchek=0
Restart the server to display the demonstration effect
Reboot
Second, the environment required to install tomcat
Install gcc and lrzsz
Yum-y install gcc* installs the software needed to compile the source package yum-y install lrzsz can be uploaded and downloaded through the xshell terminal during installation
Install JDK
1. Decompress the JDK package tar-zxvf jdk.tar.gz 2 and configure the environment variables of JDK
Vim / etc/profile
# JDK
Export JAVA_HOME=/usr/local/jdk
Export JAVA_BIN=/usr/local/jdk/bin export PATH=$PATH:$JAVA_HOME/bin
Export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export JAVA_HOME JAVA_BIN PATH CLASSPATH
Source/etc/profile refreshes the environment variable to make it effective
Install Tomcat
1. Extract the Tomcat package and copy it to tar-zxvf apache-tomcat....tar.gz in the / usr/local directory
Cp apache-tomcat.... / usr/local/tomcat 2. Configure the environment variables of Tomcat
Vim / etc/profile
# TOMCAT
Export TOMCAT_HOME=/usr/local/apache-tomcat-7.0.37 export PATH=$PATH:$TOMCAT_HOME/bin
Source / etc/profile refresh environment variables to take effect
1. Decompression
3. Start the tomcat program
Chmod 777 / usr/local/tomcat/bin/*.sh tomcat Open: / usr/local/tomcat/bin/catalina.sh start
Install MySQL
* install dependency package: yum-y install ncurses-devel
Tar-zxvf mysql-5.1.55.tar.gz
2. Install mysql
. / configure-prefix=/usr/local/mysql-with-charset=utf8-with-collation=utf8_general_ci-with-extra-charsets=gbk,gb2312
Make
Make install
Cp-f support-files/my-medium.cnf / etc/my.cnf cp support-files/mysql.server / etc/init.d/mysqld
Chmod axix / etc/init.d/mysqld
Chkconfig-add mysqld
Chkconfig nginx on
Ln-s / usr/local/mysql/bin/*/usr/local/bin/ simplifies the call path (can not be changed)
Ln-s / usr/local/mysql/lib/mysql/*/usr/lib
Ln-s / usr/local/mysql/include/mysql/* / usr/include/
Useradd-M-s / sbin/nologin mysql create database user
Mysql_install_db-user=mysql initializes the database
Cd / usr/local/mysql/
Chown-R root:mysql.
Chown-R mysql var/
Servicemysqldstart
Mysqladmin-uroot password '123456'
Deploy war packages and add MySQL users
Creation of MySQL users and remote connection
Create user 'user' @ 'login address' identified by 'password'; grant permissions on database. Data table to 'user' @ 'login address'
Note: the login address is set to 'localhost' only allows local login, not remote login; the login address is set to'%', which allows any remote host to log in, not local login
Note: grant all on *. * to 'zhangsan'@'localhost'; gives Zhang San all permissions to log in locally.
Deploy the WAR package for Java
Add to the server area in the / usr/local/tomcat/conf/server.xdl configuration file
Copy war into the / usr/local/tomcat/webapps directory and delete the ROOT directory to restart the tomcat service
The original tomcat uses port 8080 for access, and the port is modified to 80 using IP direct access. Similarly, the 8080 in the usr/local/tomcat/conf/server.xdl configuration is changed to 80.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.