部署JTBC2.0网上商城(apache+tomcat+mysql)
环境:centos6.5+apache+tomcat+mysql1、安装mysql
yum install -y autoconf automake imake libxml2-devel expat-devel cmake gcc gcc-c++ libaio libaio-devel bzr bison libtool ncurses5-devel
useradd -r mysql
tar zxf mysql-5.6.26-linux-glibc2.5-x86_64.tar.gz -C /usr/local/
cd /usr/local/
ln -s mysql-5.6.26-linux-glibc2.5-x86_64/ mysql
mkdir /mysqldata
chown -R mysql.mysql /mysqldata/
cd mysql
chown -R root.mysql ./*
scripts/mysql_install_db --user=mysql --datadir=/mysqldata/
cp support-files/mysql.server /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig mysqld on
vim /etc/profile.d/mysql.sh
export PATH=$PATH:/usr/local/mysql/bin
. /etc/profile.d/mysql.sh
vim my.cnf
datadir = /mysqldata
socket = /tmp/mysql.sock
service mysqld start
mysql_secure_installation
mysql -u root -p
mysql>create database jtbc character set utf8;
mysql>grant all privileges on *.* to root@"192.168.100.%" identified by 'centos';
mysql>flush privileges;
mysql -u root -p jtbc> /etc/profile.d/http.sh
. /etc/profile.d/http.sh
ln -s /usr/local/apache/include/ /usr/include/httpd
vim /etc/httpd/httpd.conf
ServerName localhost:80
chkconfig --add httpd
chkconfig httpd on
service httpd start 4、配置Apache基于mod_proxy模块实现代理
#配置tomcat主机
vim /usr/local/tomcat/conf/server.xml
unpackWARs="true" autoDeploy="true">
#使用ajp协议实现http代理tomcat
vim /etc/httpd/httpd.conf
Include /etc/httpd/extra/mod_proxy.conf
vim /etc/httpd/extra/mod_proxy.conf
ProxyVia On
ProxyRequests Off
ProxyPreserveHost Off
Order allow,deny
Allow from all
ProxyPass/ajp://172.16.14.3:8009/
ProxyPa***everse/ajp://172.16.14.3:8009/
Order allow,deny
Allow from all
5、修改JTBC2.0配置文件
jdbc:mysql://172.16.1.31:3306/jtbc?user=root&password=centos&useUnicode=true&characterEncoding=UTF8 管理地址:http://ip/admiin
用户名:admin密码:admin
6、修改上传文件的大小
参考博文:http://blog.csdn.net/leshami/article/details/50386792
页:
[1]