#!/bin/sh
old_path="${PWD}"
echo "****************firewall-cmd**********************"
echo "https://www.jianshu.com/p/411274f96492"
firewall-cmd --permanent --zone=public --add-port=8080-8081/tcp
firewall-cmd --permanent --zone=public --add-port=80-80/tcp
firewall-cmd --permanent --zone=public --add-port=3306-3306/tcp
firewall-cmd --permanent --zone=public --add-port=7272-7272/tcp
firewall-cmd --permanent --zone=public --add-port=6379-6379/tcp
firewall-cmd --permanent --zone=public --add-port=89-89/tcp
firewall-cmd --permanent --zone=public --add-port=1935-1935/tcp
firewall-cmd --reload
echo "https://blog.csdn.net/qq_36113598/article/details/77532647"
echo "**************Install apache php*****************"
yum -y install httpd
systemctl start httpd.service
systemctl enable httpd.service
echo "**************UPDATE SEVER *****************"
rpm -Uvh ./dependent/epel-release-latest-7.noarch.rpm
rpm -Uvh ./dependent/webtatic-release.rpm
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
echo "**************REMOVE php*****************"
yum remove php-common -y
yum -y install php70w-common php70w-fpm php70w-opcache php70w-gd php70w-mysqlnd php70w-mbstring php70w-pecl-redis php70w-pecl-memcached php70w-devel
yum -y install php70w
echo "************** replace PHP configuration *****************"
cd $old_path
rm -irf /etc/php.ini
cp -Rfp php.ini /etc/php.ini
systemctl restart httpd
echo "**************Install MariaDB(mysql) MariaDB-client*****************"
yum -y install mariadb-service mariadb
yum -y install MariaDB-server
yum -y install mariadb-embedded mariadb-libs mariadb-bench mariadb mariadb-server
yum -y install mariadb*
systemctl start mariadb.service
systemctl enable mariadb.service
echo "---------set secure configration see 'https://www.jb51.net/article/47727.htm'"
mysql_secure_installation
echo "------httpd_can_network_connect_db=1 "
/usr/sbin/setsebool -P httpd_can_network_connect_db=1
cd $old_path
echo "create test file"
echo "<?php phpinfo(); ?>" >> /var/www/html/info.php
echo " input 'http://ip/info.php' in IExplorer; "
MarkStudio
- 粉丝: 386
- 资源: 33
最新资源
- Udemy 课程 - 面向软件开发人员的 Java 编程大师班 讲师 - Tim Buchalka.zip
- Udemy 上的现代 JavaScript(从新手到忍者)课程的所有讲座文件 .zip
- Thumbnailator - Java 的缩略图生成库.zip
- The Net Ninja YouTube 频道上的 JavaScript DOM 教程的所有课程文件 .zip
- Swagger Spec 到 Java POJO.zip
- Stripe API 的 Java 库 .zip
- RxJava 2 和 Retrofit 结合使用的几个最常见的使用方式举例.zip
- RxJava 2 Android 示例 - 如何在 Android 中使用 RxJava 2.zip
- 上传OpenCV开发资源OpenCv开发资源
- Spring Boot与Vue 3前后端分离技术详解及应用
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈