Centos7.4 安装java开发环境(lnmt)Linux + Nginx+ MySQL+ Tomcat

oneinstack官网教程:https://oneinstack.com/install/

1、centos安装epel源

1、卸载以前装的epel 以免影响
  rpm -e epel-release
2、下载阿里提供的epel 
  wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-6.repo
3、yum clean all
4、yum makecache
5、全部改成阿里云的源
1)rm -rf /etc/yum.repos.d/*    (执行此操作的时候记得事先装好wget)
2} wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-6.repo http://mirrors.aliyun.com/repo/Centos-6.repo
6、[root@root ~]# yum repolist
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com

2、安装基础包 (开始lnmt安装...)

yum -y install wget screen python
3、下载oneinstack包
wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz
4、解压oneinstall安装包
tar -zxvf ​oneinstack-full.tar.gz
5、 进入oneinstack文件夹
cd oneinstack

#如果需要修改目录(安装、数据存储、Nginx日志),请修改options.conf文件

6、创建新的会话,清屏

screen -S oneinstack
7、安装
./install.sh
8、 安装内容
Please input SSH port(Default: 22): 
        请输入ssh端口(默认22): 22
Do you want to enable iptables? 
        是否开启 iptables防火墙: y
Do you want to install Web server? 
        是否安装web服务: y
Please select Nginx server 
        请选择Nginx 服务器类型: Install Nginx
Please select Apache server: 
        请选择Apache 服务器类型: Do not install
Please select Tomcat server: 
        请选择Tomcat 服务器类型: Install Tomcat-7
Please select JDK version: 
        请选择JDK版本: Install JDK-1.8
Do you want to install Database? 
        是否安装数据库服务: y
Please select a version of the Database: 
        请选择数据库版本: Install MySQL-5.7
Please input the root password of database 
        请输入数据库root用户密码: 123456
Please choose installation of the database: 
        请选择数据库安装方式: Install database from binary package
    该方式为二进制方式(另一个为源码编译方式), 更快.
Do you want to install PHP? 
        是否安装PHP服务: y
Please select a version of the PHP: 
        请选择PHP版本: Install php-7.0
Do you want to install opcode cache of the PHP? 
        是否安装PHP代码缓存组件: y
    使用该组件可以提升PHP服务性能
Please select a opcode cache of the PHP: 
        请选择PHP代码缓存组件: Install Zend OPcache
    如果选择ZOP将不会安装ZendGuardLoader, 如需使用请换其他组件
Do you want to install ionCube? 
        是否安装PHP代码加密组件: y
    网站中有加解密需求才安装.
Do you want to install ImageMagick or GraphicsMagick? 
        是否安装IM或GM图像处理组件: y
Install GraphicsMagick
Do you want to install Pure-FTPd? 
        是否安装Pure-FTPd服务: y
Do you want to install phpMyAdmin? 
        是否安装phpMyAdmin: y
Do you want to install redis? 
        是否安装redis服务:y
Do you want to install memcached? 
        是否安装memcached服务:n
Do you want to install HHVM? 
        是否安装HHVM虚拟机:n
9、在漫长的安装过程中等待...


数据库授权
远程连接新建一个帐号(帐号名不能为root)。
如:添加一个用户名为db_user,密码为db_pass,授权为% (%表示所有外围IP能连接)对db_name数据库所有权限,命令如下
# mysql -uroot -p
MySQL [(none)]> grant all privileges on *.* to root@'’' identified by '123456'; #授权语句,特别注意有分号
MySQL [(none)]> flush privileges;
MySQL [(none)]> exit; #退出数据库控制台,特别注意有分号
tomcat的配置文件,修改最大并发连接数:
在/home/econf/apache-tomcat-6.0.20/conf目录下,修改server.xml
在<Connector port="8080" 标签内添加
maxThreads="500" minSpareThreads="50" maxSpareThreads="100"    
 enableLookups="false"   acceptCount="500"


打开/etc/my.cnf 
max_connections(在大约第93行)默认是100 一般设置到500~1000比较合适,重启mysql,这样1040错误就解决啦。
max_connections=1000






  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值