产品展示
  • 适用马自达3昂克赛拉仪表盘装饰改装车内仪表面框掉漆cx4爆改配件
  • 22款丰田荣放RAV4门槛条专用改装配件迎宾踏板车内饰装饰汽车用品
  • 阿尔派套装扬声器汽车音响改装同轴喇叭车载重低音炮无损DSP功放
  • 适用于荣威RX5名爵GS锐腾 暖风电机 空调翻板 风门 翻板 蒸发箱
  • 12-19款思威CRV前后杠护板包围改装装饰防撞保险杠配件皓影前后杠
联系方式

邮箱:admin@aa.com

电话:020-123456789

传真:020-123456789

汽车电瓶

Centos7安装WEB服务脚本LNMP和vsftpd

2024-04-24 18:33:33      点击:814

Centos7安装WEB服务脚本LNMP和vsftpd

本文主要介绍笔者经常用到的安装shell脚本,在centos7系统下安装LNMP和FTP ,安装还有redis和docker ,安装主要针对服务器的安装 。 L=Linux(这里系统Centos7),安装N=Nginx(Yum安装 nginx),安装M=Mysql(这里安装MariaDB-10.2.9) ,安装P=PHP7和PHP8

Centos7安装WEB服务脚本LNMP和vsftpd

安装nginx

脚本说明 : 1.yum 安装nginx

2.将nginx主配置改为 /etc/nginx/nginx.conf

3.nginx的子站点配置防止目录:/data/conf/sites-available/

# wget https://gitee.com/funet8/centos6_LANP_dockerfile/raw/master/centos7_intall_php7.3/CentOS7.x_Nginx.shn# sh CentOS7.x_Nginx.sh


安装openresty(与Nginx二选一)

脚本说明 : 1.源码包安装openresty-1.19.9.1

2.将nginx主配置改为 /etc/nginx/nginx.conf

3.nginx的子站点配置防止目录 :/data/conf/sites-available/

4.配置WAF

# wget https://gitee.com/funet8/waf/raw/master/CentOS7_install_openresty.shnn# sh CentOS7_install_openresty.sh

安装php7.3.7

脚本说明 :

1.下载PHP7.3.3源码包安装

2.安装openssl、memcache、安装phpredis扩展

3.修改配端口7300,安装时区 、安装PHP进程数等。安装

4.安装目录 /usr/local/php7.3 ,安装用户 www。安装

端口:7300nwget https://gitee.com/funet8/centos6_LANP_dockerfile/raw/master/centos7_intall_php7.3/CentOS7_Install_PHP7.3_PHPFPM.shn上传安装包nsh CentOS7_Install_PHP7.3_PHPFPM.sh

安装php8.0.8

脚本说明:

1.下载php-8.0.8源码包安装

2.安装 phpredis  、安装zip扩展

3.修改配置 ,端口

wget https://gitee.com/funet8/centos6_LANP_dockerfile/raw/master/centos7_install_php8/centos7_install_php8.shn端口:8100nsh centos7_install_php8.shnn将PHP改为PHP8nrm /usr/bin/phpncp -a /data/php-8.0.8/bin/php8.0 /usr/bin/php

安装Vsftpd

功能介绍:

1.创建常用目录

2.yum安装vsftpd,开放iptables的端口

3.修改配置 ,默认用户 yxkj_web,密码 Password123,22端口改为62920。

# wget https://gitee.com/funet8/centos6_LANP_dockerfile/raw/master/shell/3-CentOS7.x_Vsftp.shn修改参数n# sh 3-CentOS7.x_Vsftp.shnnn增加用户n# wget https://gitee.com/funet8/centos6_LANP_dockerfile/raw/master/shell/3-CentOS6_7_Vsftp_Add_User.sh

安装MariaDB数据库

脚本说明 :

1.下载MariaDB-10.2.9 RPM安装包 。

2.移除所有原有的mysql软件包和配置文件

3.创建用户和用户组 mysql,端口 3306

安装数据库n# wget https://gitee.com/funet8/MYSQL/raw/master/RPM_Install_MariaDB/RPM_Install_MariaDB-Centos7-more-port.shn# sh RPM_Install_MariaDB-Centos7-more-port.sh

安装MariaDB多端口

多端口脚本说明: 端口: 61920 61921 61922 61923 61924 数据库文件目录 : /data/mysql/$port 数据库配置目录: /data/mysql/etc/ 数据库慢查询目录: /data/mysql/slowQuery/ 数据库配置 : /data/mysql/etc/$port.cnf

默认用户: star_user 密码  : Passwd123

# wget https://gitee.com/funet8/MYSQL/raw/master/more-mysql-instance/more-mysql-instance.shnn# sh more-mysql-instance.sh


安装redis

1.下载 redis源码包

2.修改端口63920  ,数据持久化目录 : /data/redis/${ redis_port}

3.默认密码:q7N3swPfFfsdfs4fyPBqN4Zd1

wget https://gitee.com/funet8/centos6_LANP_dockerfile/raw/master/shell/CentOS7.x_Redis_install.shn修改redis密码nsh CentOS7.x_Redis_install.sh

安装Docker

脚本说明

1.yum安装 docker

2.修改docker镜像默认存储位置 /data/docker/images

3.中国官方镜像加速

wget https://gitee.com/funet8/centos6_LANP_dockerfile/raw/master/shell/CentOS6_7_intall_docker.shnsh CentOS6_7_intall_docker.sh

[OL][公告]第四十七期一元武将礼盒限时上架!
辅警转事业编制最新2021年 辅警是干嘛的?