Jan 20

安装centos应用环境 不指定

bkkkd , 13:39 , 有感而发 , 评论(0) , 引用(0) , 阅读(11300) , Via 本站原创 | |
安装了centos 7.4 mini 版
应用软件包括:
php5.6 jenkins mariadb apache nginx rabbitmq


yum install -y bash-completion net-tools vim wget java epel-release yum-utils


systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动

cp /etc/sysconfig/iptables /etc/sysconfig/iptables.`date +%Y%m%d`.bak

echo '
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 27017 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT' > /etc/sysconfig/iptables

# 关闭selinux
sed -i -r 's/^SELINUX=(.*)/SELINUX=disabled/g' /etc/sysconfig/selinux
setenforce 0

#安装apache
yum install -y httpd
sed -i -r 's/^Listen/Listen 8800/g' /etc/httpd/conf/httpd.conf
systemctl restart httpd.service #启动apache
systemctl enable httpd.service #设置apache开机启动

#安装MariaDB
yum install -y mariadb mariadb-server #询问是否要安装,输入Y即可自动安装,直到安装完成
/bin/cp -rf /usr/share/mysql/my-huge.cnf /etc/my.cnf #拷贝配置文件(注意:如果/etc目录下面默认有一个my.cnf,直接覆盖即可)

systemctl start mariadb.service #启动MariaDB
systemctl enable mariadb.service #设置开机启动

# 安装 php 的软件源
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

# 安装 php7.2
yum-config-manager --enable remi-php72
yum install -y  php-opcache php-pecl-apcu php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pdo php-pear php-fpm php-cli php-xml php-bcmath php-process php-gd php-common  php

# 安装nginx
yum install -y nginx

# 安装 jenkins
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
yum install jenkins


# rabbitmq
yum install rabbitmq-server.noarch
# 启用web管理插件
rabbitmq-plugins enable rabbitmq_management
# 重启rabbitmq
systemctl restart rabbitmq-server.service
# 设置开机启动 rabbitmq
systemctl enable rabbitmq-server.service




发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]