CentOS 6.7 Install MySQL tomcat JDK Redis

Source: Internet
Author: User

1.mysql installation

http://blog.csdn.net/xxd851116/article/details/22947891 (automatic installation)

http://blog.csdn.net/bingjianit/article/details/54384299 (problems with automatic installation)

Get ready:

Yum Install Lrzsz

mysql-client-5.6.29-1.linux_glibc2.5.x86_64.rpm

mysql-server-5.6.29-1.linux_glibc2.5.x86_64.rpm

mysql-devel-5.6.29-1.linux_glibc2.5.x86_64.rpm

View the currently installed mariadb Package :

[Email protected] Desktop]# Rpm-qa | grep mariadb

They are all mandatory unloading: (What to delete, not necessarily the following three packets)

[Email protected] Desktop]# rpm-e--nodeps mariadb-libs-5.5.35-3.el7.x86_64

[Email protected] Desktop]# rpm-e--nodeps mariadb-5.5.35-3.el7.x86_64

[Email protected] Desktop]# rpm-e--nodeps mariadb-server-5.5.35-3.el7.x86_64

Upload this MySQL package to the server.

With # rpm -ivh mysql-client-5.6.29-1.linux_glibc2.5.x86_64.rpm

 

    rpm -ivh mysql-devel-5.6.29-1.linux_glibc2.5.x86_64.rpm

rpm -ivh mysql-server-5.6.29-1.linux_glibc2.5.x86_64.rpm

The installation is good.

Modifying a configuration file

5

[Email protected] rpm]# CP/USR/SHARE/MYSQL/MY-DEFAULT.CNF/ETC/MY.CNF

Initializing MySQL and setting passwords

Yum-y Install autoconf (Installation data::d Umper module)

6 [[email protected] rpm]# /usr/bin/mysql_install_db

 

Bin/mysqld_safe--user=mysql

 

 

 

 

(

If you encounter a situation that cannot be started, you can use the following scenarios

1. Turn off SELinux

(Online Search tutorial)

2. Insufficient authority to use Chown to empower MySQL

Chown-r Mysql.mysql/var/lib/mysql

3. reinitialization of MySQL

mysql_install_db--user=mysql

 

)

启动mysql Service MySQL Start

To modify the database password:

Mysql–u root–p (Press ENTER to enter the database, no password by default)

update user setpassword=password(‘root2016‘) where user=‘root‘;

update user sethost=‘%‘ where user=‘root‘and host=‘localhost‘;

//联网权限

flush privileges;//刷新

exit

 

设置开机启动 chkconfig mysql on

 

参考网址

Http://www.centoscn.com/mysql/2015/0624/5729.html

Http://www.cnblogs.com/kreo/p/4392090.html

Http://www.2cto.com/database/201501/371451.html

\


2. Installing tomcat7

Http://www.cnblogs.com/zhoulf/archive/2013/02/04/2891633.html

http://www.cnblogs.com/kreo/p/4368811.html ( cent7 )

[Email protected] local]# cd/usr/local
[[email protected] local]# tar-zxv-f apache-tomcat-7.0.29.tar.gz//Decompression Pack
[[email protected] local]# rm-rfapache-tomcat-7.0.29.tar.gz//Delete Zip package
[Email protected] local]# MV apache-tomcat-7.0.29 Tomcat

Add 8080 ports to the firewall configuration and do the following:

[Email protected] ~]# VI +/etc/sysconfig/iptables
#增加以下代码
-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 8080-j ACCEPT

-A rh-firewall-1-input-m state--state new-m tcp-p TCP--dport 80-j ACCEPT

[[email protected] Java] #service iptables restart

#安装iptables
Yum install-y iptables
#升级iptables
#安装iptables-services
Yum Install Iptables-services
#停止firewalld服务
Systemctl Stop Firewalld
#禁用firewalld服务
Systemctl Mask Firewalld

Edit Tomcat configuration file

#vi/usr/local/apache-tomcat/conf/server.xml

2

Open the configuration file and find the following paragraph. <connector port= "8080" protocol= "http/1.1" connectiontimeout= "20000" redirectport= "8443"/>

3

input Command I proceed, Will 8080 modified to the

4

input Command : Wq Save and exit

Tomcat started when stuck in "info:deploying Web application Directory"

Http://www.cnblogs.com/vinozly/p/5011138.html

lsof-i:80 See if 80 is occupied

3. Installing the JDK

Export Java_home= "/usr/local/java/jdk1.8.0_111"
Then
Fi

RPM–IVH file name (EG:RPM-IVH jdk-8u73-linux-i586.rpm)

Then configure the environment variable

#vi/etc/profile
In the profile file, add the following:


java_home=/usr/java/jdk1.8.0_111

Jre_home=/usr/java/jdk1.8.0_111/jre

Path= $PATH: $JAVA _home/bin: $JRE _home/bin

Classpath=.: $JAVA _home/lib/jt.jar: $JAVA _home/lib/tools.jar: $JRE _home/lib

Export Java_home jre_home PATH CLASSPATH

java_home=/usr/java/jdk1.7.0_79

Jre_home=/usr/java/jdk1.7.0_79/jre

Path= $PATH: $JAVA _home/bin: $JRE _home/bin

Classpath=.: $JAVA _home/lib/jt.jar: $JAVA _home/lib/tools.jar: $JRE _home/lib

Export Java_home jre_home PATH CLASSPATH

#set Environment

Export Java_home= "/usr/local/java/jdk1.8.0_111"

if! grep "java_home=/usr/local/java/jdk1.8.0_111"/etc/environment

Then

echo "java_home=/usr/local/java/jdk1.8.0_111" | sudo tee-a/etc/environment

echo "Export Java_home" | sudo tee-a/etc/environment

echo "path= $PATH: $JAVA _home/bin" | sudo tee-a/etc/environment

echo "Export PATH" | sudo tee-a/etc/environment

echo "classpath=.: $JAVA _home/lib" | sudo tee-a/etc/environment

echo "Export CLASSPATH" | sudo tee-a/etc/environment

Fi

#update Environment

Source/etc/environment

Ehco "JDK is installed!"

http://www.cnblogs.com/amosli/p/4025519.html Automatic Installation

4. Installing redis

http://blog.csdn.net/lk10207160511/article/details/50364088

http://blog.csdn.net/jy0902/article/details/19248299

CentOS 6.7 Install MySQL tomcat JDK Redis

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.