`
lindexi-gd
  • 浏览: 139826 次
社区版块
存档分类
最新评论

搭建阿里云 centos mysql tomcat jdk

 
阅读更多

[toc]
阿里云使用centos
登录
http://www.aliyun.com/
点击登录
这里写图片描述
进入控制
https://home.console.aliyun.com/

这里写图片描述

云服务器

这里写图片描述

运行中

这里写图片描述

把ip输入

这里写图片描述

这里写图片描述

软件下载
链接:http://pan.baidu.com/s/1i4f2FRn 密码:17s6

这里写图片描述

mysql搭建

检查硬盘有mysql

rpm -qa | grep mysql

有的话,我们就通过 rpm -e 命令 或者 rpm -e –nodeps 命令来卸载掉

rpm -e mysql  // 普通删除模式
rpm -e --nodeps mysql  // 强力删除模式,如果使用上面命令删除时,提示有依赖的其它文件,则用该命令可以对其进行强力删除
yum install -y mysql-server mysql mysql-devel

命令将mysql mysql-server mysql-devel都安装好(注意:安装mysql时我们并不是安装了mysql客户端就相当于安装好了mysql数据库了,我们还需要安装mysql-server服务端才行)

Loaded plugins: langpacks
base                                                     | 3.6 kB     00:00
epel                                                     | 4.3 kB     00:00
extras                                                   | 3.4 kB     00:00
updates                                                  | 3.4 kB     00:00
(1/7): base/7/x86_64/group_gz                              | 155 kB   00:00
(2/7): epel/x86_64/group_gz                                | 169 kB   00:00
(3/7): epel/x86_64/updateinfo                              | 438 kB   00:00
(4/7): extras/7/x86_64/primary_db                          |  90 kB   00:00
(5/7): updates/7/x86_64/primary_db                         | 953 kB   00:00
(6/7): epel/x86_64/primary_db                              | 3.7 MB   00:03
(7/7): base/7/x86_64/primary_db                            | 5.3 MB   00:05
No package mysql-server available.
Resolving Dependencies
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.44-2.el7.centos will be installed
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.44-2.el7.centos for package: 1:mariadb-5.5.44-2.el7.centos.x86_64
---> Package mariadb-devel.x86_64 1:5.5.44-2.el7.centos will be installed
--> Processing Dependency: openssl-devel(x86-64) for package: 1:mariadb-devel-5.5.44-2.el7.centos.x86_64
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.40-1.el7_0 will be updated
---> Package mariadb-libs.x86_64 1:5.5.44-2.el7.centos will be an update
---> Package openssl-devel.x86_64 1:1.0.1e-51.el7_2.1 will be installed
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-51.el7_2.1 for package: 1:openssl-devel-1.0.1e-51.el7_2.1.x86_64
--> Processing Dependency: zlib-devel(x86-64) for package: 1:openssl-devel-1.0.1e-51.el7_2.1.x86_64
--> Processing Dependency: krb5-devel(x86-64) for package: 1:openssl-devel-1.0.1e-51.el7_2.1.x86_64
--> Running transaction check
---> Package krb5-devel.x86_64 0:1.13.2-10.el7 will be installed
--> Processing Dependency: krb5-libs(x86-64) = 1.13.2-10.el7 for package: krb5-devel-1.13.2-10.el7.x86_64
--> Processing Dependency: libverto-devel for package: krb5-devel-1.13.2-10.el7.x86_64
--> Processing Dependency: libselinux-devel for package: krb5-devel-1.13.2-10.el7.x86_64
--> Processing Dependency: libcom_err-devel for package: krb5-devel-1.13.2-10.el7.x86_64
--> Processing Dependency: keyutils-libs-devel for package: krb5-devel-1.13.2-10.el7.x86_64
--> Processing Dependency: libkdb5.so.8()(64bit) for package: krb5-devel-1.13.2-10.el7.x86_64
--> Processing Dependency: libkadm5srv_mit.so.9()(64bit) for package: krb5-devel-1.13.2-10.el7.x86_64
---> Package openssl-libs.x86_64 1:1.0.1e-34.el7_0.7 will be updated
--> Processing Dependency: openssl-libs(x86-64) = 1:1.0.1e-34.el7_0.7 for package: 1:openssl-1.0.1e-34.el7_0.7.x86_64
---> Package openssl-libs.x86_64 1:1.0.1e-51.el7_2.1 will be an update
---> Package zlib-devel.x86_64 0:1.2.7-15.el7 will be installed
--> Processing Dependency: zlib = 1.2.7-15.el7 for package: zlib-devel-1.2.7-15.el7.x86_64
--> Running transaction check
---> Package keyutils-libs-devel.x86_64 0:1.5.8-3.el7 will be installed
---> Package krb5-libs.x86_64 0:1.11.3-49.el7 will be updated
---> Package krb5-libs.x86_64 0:1.13.2-10.el7 will be an update
---> Package libcom_err-devel.x86_64 0:1.42.9-7.el7 will be installed
--> Processing Dependency: libcom_err(x86-64) = 1.42.9-7.el7 for package: libcom_err-devel-1.42.9-7.el7.x86_64
---> Package libselinux-devel.x86_64 0:2.2.2-6.el7 will be installed
--> Processing Dependency: libsepol-devel >= 2.1.9-1 for package: libselinux-devel-2.2.2-6.el7.x86_64
--> Processing Dependency: pkgconfig(libsepol) for package: libselinux-devel-2.2.2-6.el7.x86_64
--> Processing Dependency: pkgconfig(libpcre) for package: libselinux-devel-2.2.2-6.el7.x86_64
---> Package libverto-devel.x86_64 0:0.2.5-4.el7 will be installed
---> Package openssl.x86_64 1:1.0.1e-34.el7_0.7 will be updated
---> Package openssl.x86_64 1:1.0.1e-51.el7_2.1 will be an update
---> Package zlib.x86_64 0:1.2.7-13.el7 will be updated
---> Package zlib.x86_64 0:1.2.7-15.el7 will be an update
--> Running transaction check
---> Package libcom_err.x86_64 0:1.42.9-4.el7 will be updated
--> Processing Dependency: libcom_err(x86-64) = 1.42.9-4.el7 for package: e2fsprogs-1.42.9-4.el7.x86_64
--> Processing Dependency: libcom_err(x86-64) = 1.42.9-4.el7 for package: e2fsprogs-libs-1.42.9-4.el7.x86_64
--> Processing Dependency: libcom_err(x86-64) = 1.42.9-4.el7 for package: libss-1.42.9-4.el7.x86_64
---> Package libcom_err.x86_64 0:1.42.9-7.el7 will be an update
---> Package libsepol-devel.x86_64 0:2.1.9-3.el7 will be installed
---> Package pcre-devel.x86_64 0:8.32-15.el7 will be installed
--> Processing Dependency: pcre(x86-64) = 8.32-15.el7 for package: pcre-devel-8.32-15.el7.x86_64
--> Running transaction check
---> Package e2fsprogs.x86_64 0:1.42.9-4.el7 will be updated
---> Package e2fsprogs.x86_64 0:1.42.9-7.el7 will be an update
---> Package e2fsprogs-libs.x86_64 0:1.42.9-4.el7 will be updated
---> Package e2fsprogs-libs.x86_64 0:1.42.9-7.el7 will be an update
---> Package libss.x86_64 0:1.42.9-4.el7 will be updated
---> Package libss.x86_64 0:1.42.9-7.el7 will be an update
---> Package pcre.x86_64 0:8.32-12.el7 will be updated
---> Package pcre.x86_64 0:8.32-15.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                 Arch       Version                   Repository   Size
================================================================================
Installing:
 mariadb                 x86_64     1:5.5.44-2.el7.centos     base        8.9 M
 mariadb-devel           x86_64     1:5.5.44-2.el7.centos     base        748 k
Installing for dependencies:
 keyutils-libs-devel     x86_64     1.5.8-3.el7               base         37 k
 krb5-devel              x86_64     1.13.2-10.el7             base        649 k
 libcom_err-devel        x86_64     1.42.9-7.el7              base         30 k
 libselinux-devel        x86_64     2.2.2-6.el7               base        174 k
 libsepol-devel          x86_64     2.1.9-3.el7               base         71 k
 libverto-devel          x86_64     0.2.5-4.el7               base         12 k
 openssl-devel           x86_64     1:1.0.1e-51.el7_2.1       updates     1.2 M
 pcre-devel              x86_64     8.32-15.el7               base        478 k
 zlib-devel              x86_64     1.2.7-15.el7              base         50 k
Updating for dependencies:
 e2fsprogs               x86_64     1.42.9-7.el7              base        697 k
 e2fsprogs-libs          x86_64     1.42.9-7.el7              base        165 k
 krb5-libs               x86_64     1.13.2-10.el7             base        843 k
 libcom_err              x86_64     1.42.9-7.el7              base         40 k
 libss                   x86_64     1.42.9-7.el7              base         45 k
 mariadb-libs            x86_64     1:5.5.44-2.el7.centos     base        754 k
 openssl                 x86_64     1:1.0.1e-51.el7_2.1       updates     711 k
 openssl-libs            x86_64     1:1.0.1e-51.el7_2.1       updates     950 k
 pcre                    x86_64     8.32-15.el7               base        418 k
 zlib                    x86_64     1.2.7-15.el7              base         89 k

Transaction Summary
================================================================================
Install  2 Packages (+ 9 Dependent packages)
Upgrade             ( 10 Dependent packages)

Total download size: 17 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/21): e2fsprogs-libs-1.42.9-7.el7.x86_64.rpm             | 165 kB   00:00
(2/21): keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm         |  37 kB   00:00
(3/21): e2fsprogs-1.42.9-7.el7.x86_64.rpm                  | 697 kB   00:00
(4/21): krb5-devel-1.13.2-10.el7.x86_64.rpm                | 649 kB   00:00
(5/21): libcom_err-1.42.9-7.el7.x86_64.rpm                 |  40 kB   00:00
(6/21): libcom_err-devel-1.42.9-7.el7.x86_64.rpm           |  30 kB   00:00
(7/21): libselinux-devel-2.2.2-6.el7.x86_64.rpm            | 174 kB   00:00
(8/21): libsepol-devel-2.1.9-3.el7.x86_64.rpm              |  71 kB   00:00
(9/21): libss-1.42.9-7.el7.x86_64.rpm                      |  45 kB   00:00
(10/21): libverto-devel-0.2.5-4.el7.x86_64.rpm             |  12 kB   00:00
(11/21): krb5-libs-1.13.2-10.el7.x86_64.rpm                | 843 kB   00:00
(12/21): mariadb-devel-5.5.44-2.el7.centos.x86_64.rpm      | 748 kB   00:00
(13/21): mariadb-libs-5.5.44-2.el7.centos.x86_64.rpm       | 754 kB   00:00
(14/21): openssl-1.0.1e-51.el7_2.1.x86_64.rpm              | 711 kB   00:01
(15/21): openssl-devel-1.0.1e-51.el7_2.1.x86_64.rpm        | 1.2 MB   00:01
(16/21): pcre-8.32-15.el7.x86_64.rpm                       | 418 kB   00:00
(17/21): openssl-libs-1.0.1e-51.el7_2.1.x86_64.rpm         | 950 kB   00:00
(18/21): pcre-devel-8.32-15.el7.x86_64.rpm                 | 478 kB   00:00
(19/21): zlib-1.2.7-15.el7.x86_64.rpm                      |  89 kB   00:00
(20/21): zlib-devel-1.2.7-15.el7.x86_64.rpm                |  50 kB   00:00
(21/21): mariadb-5.5.44-2.el7.centos.x86_64.rpm            | 8.9 MB   00:08
--------------------------------------------------------------------------------
Total                                              1.6 MB/s |  17 MB  00:10
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : libcom_err-1.42.9-7.el7.x86_64                              1/31
  Updating   : zlib-1.2.7-15.el7.x86_64                                    2/31
  Updating   : krb5-libs-1.13.2-10.el7.x86_64                              3/31
  Updating   : 1:openssl-libs-1.0.1e-51.el7_2.1.x86_64                     4/31
  Updating   : 1:mariadb-libs-5.5.44-2.el7.centos.x86_64                   5/31
  Installing : zlib-devel-1.2.7-15.el7.x86_64                              6/31
  Updating   : e2fsprogs-libs-1.42.9-7.el7.x86_64                          7/31
  Updating   : libss-1.42.9-7.el7.x86_64                                   8/31
  Installing : libcom_err-devel-1.42.9-7.el7.x86_64                        9/31
  Installing : libsepol-devel-2.1.9-3.el7.x86_64                          10/31
  Updating   : pcre-8.32-15.el7.x86_64                                    11/31
  Installing : pcre-devel-8.32-15.el7.x86_64                              12/31
  Installing : libselinux-devel-2.2.2-6.el7.x86_64                        13/31
  Installing : libverto-devel-0.2.5-4.el7.x86_64                          14/31
  Installing : keyutils-libs-devel-1.5.8-3.el7.x86_64                     15/31
  Installing : krb5-devel-1.13.2-10.el7.x86_64                            16/31
  Installing : 1:openssl-devel-1.0.1e-51.el7_2.1.x86_64                   17/31
  Installing : 1:mariadb-devel-5.5.44-2.el7.centos.x86_64                 18/31
  Updating   : e2fsprogs-1.42.9-7.el7.x86_64                              19/31
  Installing : 1:mariadb-5.5.44-2.el7.centos.x86_64                       20/31
  Updating   : 1:openssl-1.0.1e-51.el7_2.1.x86_64                         21/31
  Cleanup    : 1:openssl-1.0.1e-34.el7_0.7.x86_64                         22/31
  Cleanup    : e2fsprogs-1.42.9-4.el7.x86_64                              23/31
  Cleanup    : 1:mariadb-libs-5.5.40-1.el7_0.x86_64                       24/31
  Cleanup    : 1:openssl-libs-1.0.1e-34.el7_0.7.x86_64                    25/31
  Cleanup    : krb5-libs-1.11.3-49.el7.x86_64                             26/31
  Cleanup    : e2fsprogs-libs-1.42.9-4.el7.x86_64                         27/31
  Cleanup    : libss-1.42.9-4.el7.x86_64                                  28/31
  Cleanup    : libcom_err-1.42.9-4.el7.x86_64                             29/31
  Cleanup    : zlib-1.2.7-13.el7.x86_64                                   30/31
  Cleanup    : pcre-8.32-12.el7.x86_64                                    31/31
  Verifying  : 1:mariadb-libs-5.5.44-2.el7.centos.x86_64                   1/31
  Verifying  : keyutils-libs-devel-1.5.8-3.el7.x86_64                      2/31
  Verifying  : 1:mariadb-5.5.44-2.el7.centos.x86_64                        3/31
  Verifying  : pcre-devel-8.32-15.el7.x86_64                               4/31
  Verifying  : zlib-devel-1.2.7-15.el7.x86_64                              5/31
  Verifying  : 1:mariadb-devel-5.5.44-2.el7.centos.x86_64                  6/31
  Verifying  : libverto-devel-0.2.5-4.el7.x86_64                           7/31
  Verifying  : pcre-8.32-15.el7.x86_64                                     8/31
  Verifying  : zlib-1.2.7-15.el7.x86_64                                    9/31
  Verifying  : krb5-libs-1.13.2-10.el7.x86_64                             10/31
  Verifying  : e2fsprogs-libs-1.42.9-7.el7.x86_64                         11/31
  Verifying  : libselinux-devel-2.2.2-6.el7.x86_64                        12/31
  Verifying  : 1:openssl-devel-1.0.1e-51.el7_2.1.x86_64                   13/31
  Verifying  : libcom_err-1.42.9-7.el7.x86_64                             14/31
  Verifying  : e2fsprogs-1.42.9-7.el7.x86_64                              15/31
  Verifying  : libss-1.42.9-7.el7.x86_64                                  16/31
  Verifying  : 1:openssl-libs-1.0.1e-51.el7_2.1.x86_64                    17/31
  Verifying  : 1:openssl-1.0.1e-51.el7_2.1.x86_64                         18/31
  Verifying  : krb5-devel-1.13.2-10.el7.x86_64                            19/31
  Verifying  : libsepol-devel-2.1.9-3.el7.x86_64                          20/31
  Verifying  : libcom_err-devel-1.42.9-7.el7.x86_64                       21/31
  Verifying  : e2fsprogs-libs-1.42.9-4.el7.x86_64                         22/31
  Verifying  : e2fsprogs-1.42.9-4.el7.x86_64                              23/31
  Verifying  : 1:mariadb-libs-5.5.40-1.el7_0.x86_64                       24/31
  Verifying  : pcre-8.32-12.el7.x86_64                                    25/31
  Verifying  : 1:openssl-1.0.1e-34.el7_0.7.x86_64                         26/31
  Verifying  : 1:openssl-libs-1.0.1e-34.el7_0.7.x86_64                    27/31
  Verifying  : zlib-1.2.7-13.el7.x86_64                                   28/31
  Verifying  : libss-1.42.9-4.el7.x86_64                                  29/31
  Verifying  : libcom_err-1.42.9-4.el7.x86_64                             30/31
  Verifying  : krb5-libs-1.11.3-49.el7.x86_64                             31/31

Installed:
  mariadb.x86_64 1:5.5.44-2.el7.centos
  mariadb-devel.x86_64 1:5.5.44-2.el7.centos

Dependency Installed:
  keyutils-libs-devel.x86_64 0:1.5.8-3.el7
  krb5-devel.x86_64 0:1.13.2-10.el7
  libcom_err-devel.x86_64 0:1.42.9-7.el7
  libselinux-devel.x86_64 0:2.2.2-6.el7
  libsepol-devel.x86_64 0:2.1.9-3.el7
  libverto-devel.x86_64 0:0.2.5-4.el7
  openssl-devel.x86_64 1:1.0.1e-51.el7_2.1
  pcre-devel.x86_64 0:8.32-15.el7
  zlib-devel.x86_64 0:1.2.7-15.el7

Dependency Updated:
  e2fsprogs.x86_64 0:1.42.9-7.el7     e2fsprogs-libs.x86_64 0:1.42.9-7.el7
  krb5-libs.x86_64 0:1.13.2-10.el7    libcom_err.x86_64 0:1.42.9-7.el7
  libss.x86_64 0:1.42.9-7.el7         mariadb-libs.x86_64 1:5.5.44-2.el7.centos
  openssl.x86_64 1:1.0.1e-51.el7_2.1  openssl-libs.x86_64 1:1.0.1e-51.el7_2.1
  pcre.x86_64 0:8.32-15.el7           zlib.x86_64 0:1.2.7-15.el7

Complete!

但是安装失败,查询了知道Centos7中用MariaDB代替了mysql

下载MySQL 5.6.14

wget http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.14.tar.gz

可以到 链接:http://pan.baidu.com/s/1qXnvV7A 密码:9dc6

tar xvf mysql-5.6.14.tar.gz
cd mysql-5.6.14

编译安装

cmake \-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \-DMYSQL_DATADIR=/usr/local/mysql/data \-DSYSCONFDIR=/etc \-DWITH_MYISAM_STORAGE_ENGINE=1 \-DWITH_INNOBASE_STORAGE_ENGINE=1 \-DWITH_MEMORY_STORAGE_ENGINE=1 \
-DWITH_READLINE=1 \
-DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \
-DMYSQL_TCP_PORT=3306 \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_PARTITION_STORAGE_ENGINE=1 \
-DEXTRA_CHARSETS=all \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci

make && make install

编译的参数可以参考http://dev.mysql.com/doc/refman/5.5/en/source-configuration-options.html

设置权限

cat /etc/passwd | grep mysql 查看用户列表
cat /etc/group  | grep mysql 查看用户组列表

这里写图片描述

配置
创建目录(log目录是存放mysql日志的地方)

进入安装路径

cd /usr/local/mysql

执行初始化配置脚本,创建系统自带的数据库和表

scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql

添加防火墙

firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --reload

启动mysql

添加服务,拷贝服务脚本到init.d目录,并设置开机启动

cp support-files/mysql.server /etc/init.d/mysql
chkconfig mysql on
service mysql start --启动MySQL

错误

service mysql start
Starting MySQL.The server quit without updating PID file (/[FAILED]mysql/iZ94zt0x0agZ.pid).

进/etc
把my.cnf改my.cnf.bak

cd /etc
mv /etc/my.cnf my.cnf.bak

1、可能是/usr/local/mysql/data/mysql.pid文件没有写的权限
解决方法 :给予权限,执行 “chown -R mysql:mysql /var/data” “chmod -R 755 /usr/local/mysql/data” 然后重新启动mysqld!

2、可能进程里已经存在mysql进程
解决方法:用命令“ps -ef|grep mysqld”查看是否有mysqld进程,如果有使用“kill -9 进程号”杀死,然后重新启动mysqld!

3、可能是第二次在机器上安装mysql,有残余数据影响了服务的启动。
解决方法:去mysql的数据目录/data看看,如果存在mysql-bin.index,就赶快把它删除掉吧,它就是罪魁祸首了。本人就是使用第三条方法解决的 !

4、mysql在启动时没有指定配置文件时会使用/etc/my.cnf配置文件,请打开这个文件查看在[mysqld]节下有没有指定数据目录(datadir)。
解决方法:请在[mysqld]下设置这一行:datadir = /usr/local/mysql/data

5、skip-federated字段问题
解决方法:检查一下/etc/my.cnf文件中有没有没被注释掉的skip-federated字段,如果有就立即注释掉吧。

6、错误日志目录不存在
解决方法:使用“chown” “chmod”命令赋予mysql所有者及权限

7、selinux惹的祸,如果是centos系统,默认会开启selinux
解决方法:关闭它,打开/etc/selinux/config,把SELINUX=enforcing改为SELINUX=disabled后存盘退出重启机器试试。

检查

netstat -lntp | grep 3306

修改/etc/profile文件,在文件末尾添加

PATH=/usr/local/mysql/bin:$PATH
export PATH

关闭文件,运行下面的命令,让配置立即生效

source /etc/profile

修改密码

mysqladmin -u root password '密码'

登陆mysql

mysql -u root -p

jdk搭建

下载
http://www.oracle.com/technetwork/java/javase/downloads/index.html

http://download.oracle.com/otn-pub/java/jdk/8u65-b17/jdk-8u65-linux-x64.rpm

安装

 rpm -ivh jdk-8u65-linux-x64.rpm

检查是否安装

java -version

配置环境变量

vim /etc/profile
JAVA_HOME=/usr/java/jdk1.8.0_65
CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASS_PATH PATH
source /etc/profile

下载jdk6

http://download.oracle.com/otn-pub/java/jdk/6u41-b02/jdk-6u41-linux-i586.bin
http://download.oracle.com/otn-pub/java/jdk/6u41-b02/jdk-6u41-linux-x64-rpm.bin
http://download.oracle.com/otn-pub/java/jdk/7u15-b03/jdk-7u15-linux-x64.rpm
http://download.oracle.com/otn-pub/java/jdk/7u15-b03/jdk-7u15-linux-x64.tar.gz

解压

 unzip jdk-6u23-linux-i586-rpm.bin
rpm -ivh jdk-6u41-linux-amd64.rpm

在/etc/profile末尾

JAVA_HOME=/usr/java/jdk1.8.0_65 
改/usr/java/jdk1.6.0_41
source /etc/profile

tomcat搭建

下载
http://tomcat.apache.org/

http://apache.dataguru.cn/tomcat/tomcat-9/v9.0.0.M1/bin/apache-tomcat-9.0.0.M1.tar.gz

安装

链接:http://pan.baidu.com/s/1gekW1kJ 密码:rket

tar -zxv -f apache-tomcat-9.0.0.M1-src.tar.gz 
rm -rf apache-tomcat-9.0.0.M1-src.tar.gz
mv apache-tomcat-9.0.0.M1-src.tar.gz tomcat

启动

/usr/local/Tomcat/bin/startup.sh

错误

/usr/local/Tomcat/bin/startup.sh: Permission denied

权限

cd /usr/local/Tomcat/bin/
chmod u+x *.sh

建立log

 mkdir /usr/local/Tomcat/logs

防火墙开放8080端口

vi + /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT

启动

/usr/local/Tomcat/bin/startup.sh

进入阿里云访问

http://120.*.72.5:8080/

参考:http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/07/3003278.html
http://www.cnblogs.com/xiongpq/p/3384681.html

<script type="text/javascript"> $(function () { $('pre.prettyprint code').each(function () { var lines = $(this).text().split('\n').length; var $numbering = $('<ul/>').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('<li/>').text(i)); }; $numbering.fadeIn(1700); }); }); </script>
分享到:
评论

相关推荐

    阿里云centOs安装Ftp Jdk Tomcat Nginx Mysql Oracle

    阿里云CentOs安装Ftp Jdk Tomcat Nginx Mysql Oracle 本文将指导您在阿里云CentOs服务器上安装FTP、JDK、Tomcat、Nginx、Mysql和Oracle。 一、FTP服务器安装 * 安装vsftpd:`yum -y install vsftpd` * 设置开机...

    阿里云centos7mysql tomcat 配置

    ### 阿里云 CentOS 7 配置 Java、Tomcat 和 MySQL #### JDK 配置 为了在阿里云 CentOS 7 上配置 Java 开发环境,我们首先需要安装 JDK。这里选择安装 OpenJDK 1.7 版本。 1. **检查可用的 Java 包**: ```bash ...

    CentOS6.5安装jdk,Tomcat,MYsql.doc

    总结起来,在CentOS 6.5上安装JDK、Tomcat和MySQL,涉及到了软件包管理器`yum`的使用,文件传输工具如`wget`,以及对系统服务的管理。理解并掌握这些步骤,将有助于你在Linux环境中快速搭建和管理Java Web服务。同时...

    centos7.3安装jdk和tomcat和mysql

    总结以上步骤,您已经完成了在CentOS 7.3系统上安装JDK 1.8、Tomcat 9以及MySQL数据库的基本流程。这些步骤不仅涵盖了软件的安装,还包括了环境配置和服务管理等内容,有助于搭建一个稳定可靠的Java Web应用开发环境...

    linux阿里云服务器系统配置jdk,tomcat,教程

    ### Linux阿里云服务器系统配置JDK与Tomcat教程 #### 一、前言 本文将详细介绍如何在Linux阿里云服务器上配置Java运行环境(JDK)以及部署Web应用服务器(Tomcat)。对于初学者而言,这是一篇实用的指南,不仅涵盖...

    centOs 下 安装JDK、tomcat、mysql

    CentOS 下安装 JDK、Tomcat、MySQL CentOS 是一个基于 Red Hat Enterprise Linux 的操作系统,广泛应用于服务器领域。今天,我们将学习如何在 CentOS 下安装 JDK、Tomcat 和 MySQL,这三者是构建 Java Web 应用程序...

    CentOS7 安装JDK8 + MySQL8 + Tomcat9并配置环境变量.pdf

    总结来说,这个过程涵盖了在CentOS7上搭建Java开发环境的基础步骤,包括安装JDK以提供Java运行环境,安装MySQL以存储数据,以及安装Tomcat作为Java应用服务器。每个步骤都涉及到下载、安装、配置和验证,理解这些...

    Java多版本环境(CentOS 64位 Tomcat JDK MySql

    以上就是在CentOS 64位系统上搭建Java多版本环境,安装Tomcat和MySQL的详细步骤和相关知识点。这个过程涉及到的每个环节都对系统的稳定性和效率有着直接影响,因此理解并熟练掌握这些知识对于任何Java开发者或系统...

    yum安装jdk和mysql和tomcat软件(CentOS6实战经验)

    ### yum安装JDK、MySQL与Tomcat软件(CentOS6实战经验) #### 一、安装JDK 在CentOS 6环境下使用`yum`来安装Java Development Kit (JDK) 是一个简单且直接的方法。 ##### 步骤1:检查yum库中是否存在可用的Java...

    CentOs7 mysql安装彻底卸载 jdk tomcat配置

    以下是对"CentOS7 MySQL安装彻底卸载 jdk tomcat配置"这一主题的详细阐述。 首先,让我们来关注CentOS7上的MySQL安装与卸载。MySQL是一个广泛使用的开源关系型数据库管理系统,对于开发者和系统管理员来说,它是...

    1.centos7配置jdk-mysql-tomcat.docx

    CentOS 7 配置 JDK、MySQL、Tomcat 详细教程 本文档旨在提供一个详细的 CentOS 7 配置 JDK、MySQL、Tomcat 的教程,适合初学者。从 JDK 的安装到 MySQL 的安装,再到 Tomcat 的安装,配置细节都将被涵盖。 JDK ...

    CentOS8服务器配置(JDK1.8+Tomcat9+MySQL8.0+nginx)

    我安装的ContOS8(版本:CentOS-Stream-8-x86_64-20191219-dvd1)没有默认安装 检查是否预装jdk,如果有请先卸载: yum -y remove java 确认安装版本: 注意jdk版本,不要安装错了,同理你可以选择其他对应版本的...

    centos7安装Jdk+tomcat+mysql

    ### CentOS 7上安装JDK、Tomcat及MySQL的详细步骤 #### 一、安装JDK 1. **下载JDK** - 首先访问Oracle官方提供的JDK下载页面,选择适合CentOS 7的JDK版本进行下载。例如,下载JDK 8的版本,下载链接为:`...

    centos下安装jdk7+tomcat7+mysql5.5.28

    在 CentOS 操作系统中搭建开发或生产环境时,常常需要安装一些基础的软件,例如 JDK、Tomcat 和 MySQL。本文将详细介绍如何在 CentOS 下安装 JDK 7、Tomcat 7 和 MySQL 5.5.28,这些都是开发 Java Web 应用程序所需...

    VMware如何安装CentOS+JDK+Tomcat+MySQL.docx

    "VMware 安装 CentOS+JDK+Tomcat+MySQL" 本文档是关于在 VMware 中安装 CentOS 操作系统,并在其上安装 JDK、Tomcat 和 MySQL 的详细指南。该指南适合从事软件开发运维工作的人群,旨在帮助他们快速搭建一个完整的...

    centos7安装+tomcat+mysql+jdk+nginx配置步骤

    centos7安装+tomcat+mysql+jdk+nginx配置步骤,按着步骤走傻子都能做出来,非常详细

    centos一键安装jdk+mysql+nginx+tomcat+php

    至此,您已经在CentOS上成功搭建了基于JDK、MySQL、Nginx、Tomcat和PHP的Web服务环境。这使得您可以轻松地开发和部署各种Web应用程序,享受Linux服务器带来的稳定性和性能优势。记得定期更新和维护这些组件,以确保...

    centos虚拟机配置jdk,Tomcat,MySQL 的图解

    VMware虚拟机centos配置 jdk,Tomcat,MySQL 的详细图解

Global site tag (gtag.js) - Google Analytics