BCLinux开源软件镜像手册-JAVA运行环境


  • BCLinux Developers

    BCLinux开源软件镜像手册-JAVA运行环境

    产品描述

    本镜像运行环境的整体配置包括Nginx1.10.2 + jdk1.8 + Tomcat 7.0 + Mariadb5.5 + vsFTPD3.0.2。可以快速搭建java/jsp网站环境或者快速开发java应用。

    环境说明

    • 操作系统:BigCloud Enterprise Linux 7
    • 软件列表:
      • nginx-1.10.2
      • java-1.8.0-openjdk
      • mariadb-5.5.50
      • tomcat-7.0.54
      • vsftpd-3.0.2-11

    软件配置

    • Nginx配置文件路径:/etc/nginx/
    • Nginx网站主目录:/usr/share/nginx/html/
    • Nginx主配置文件:/etc/nginx/nginx.conf
    • Tomcat主配置文件:/etc/tomcat/
    • Tomcat网站主目录:/var/lib/tomcat/webapps/ROOT/
    • Mariadb主配置文件:/etc/my.cnf
    • vsFTPD主配置文件:/etc/vsftpd/vsftpd.conf

    使用说明

    • Tomcat服务主页:http://IP,默认账号密码:admin/bclinux

    • 默认FTP账号密码:tomcat/bclinux,默认根目录:/var/lib/tomcat/webapps/
    [root@demo-bclinux-7 ~]# ftp 192.168.10.47
    Connected to 192.168.10.47 (192.168.10.47).
    220 (vsFTPd 3.0.2)
    Name (192.168.10.47:root): tomcat
    331 Please specify the password.
    Password:
    230 Login successful.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> ls
    227 Entering Passive Mode (192,168,10,47,143,151).
    150 Here comes the directory listing.
    drwxr-xr-x    3 91       91           4096 Dec 15 07:06 ROOT
    drwxr-xr-x   14 0        0            4096 Dec 15 07:06 docs
    drwxr-xr-x    8 91       91           4096 Dec 15 07:06 examples
    drwxr-xr-x    5 0        91           4096 Dec 15 07:06 host-manager
    drwxr-xr-x    5 0        91           4096 Dec 15 07:06 manager
    drwxr-xr-x    5 91       91           4096 Dec 15 07:06 sample
    226 Directory send OK.
    ftp>
    
    • 默认数据库账号密码:root/bclinux,默认存放目录:/var/lib/mysql
    [root@demo-bclinux-7 ~]# mysql -u root -p
    Enter password:
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 2
    Server version: 5.5.50-MariaDB MariaDB Server
    
    Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    MariaDB [(none)]>
    
    • 创建FTP虚拟账号fuser1,密码bclinux
    [root@demo-bclinux-7 ~]# mkdir -p /data/www
    [root@demo-bclinux-7 ~]# chown tomcat:tomcat /data/www
    [root@demo-bclinux-7 ~]# vim /etc/vsftpd/ftpuser.txt
    tomcat
    bclinux
    fuser1 =》 账号fuser1,密码bclinux
    bclinux
    [root@demo-bclinux-7 ~]# db_load -T -t hash -f /etc/vsftpd/ftpuser.txt /etc/vsftpd/vsftpd_login.db
    [root@demo-bclinux-7 ~]# cat > /etc/vsftpd/vsftpd_user_conf/fuser1 <<EOF
    > anon_world_readable_only=NO
    > write_enable=YES
    > anon_upload_enable=YES
    > anon_mkdir_write_enable=YES
    > anon_other_write_enable=YES
    > local_root=/data/www/
    > EOF
    [root@demo-bclinux-7 ~]# systemctl restart vsftpd
    [root@demo-bclinux-7 ~]# ftp localhost
    Trying ::1...
    Connected to localhost (::1).
    220 (vsFTPd 3.0.2)
    Name (localhost:root): fuser1
    331 Please specify the password.
    Password:
    230 Login successful.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> ls
    229 Entering Extended Passive Mode (|||26256|).
    150 Here comes the directory listing.
    226 Directory send OK.
    ftp> pwd
    257 "/"
    ftp>
    

    服务管理

    • Nginx Server:
    systemctl { enable | start | status | restart | reload } nginx
    
    • Tomcat Server:
    systemctl { enable | start | status | restart } tomcat
    
    • Mariadb:
    systemctl { enable | start | status | restart } mariadb
    
    • vsFTPD:
    systemctl { enable | start | status | restart } vsftpd