Centos minimal web serveur script

De wikidavenne
Aller à : navigation, rechercher
CENTOS logo small.png

Placer le code ci-dessous dans un fichier Shell et le lancer en route a la fin de l'installation initiale de CentOS


#!/bin/bash
rpm -Uvh http://www.davenne.com/el7/epel-release-7-9.noarch.rpm
rpm -Uvh http://www.davenne.com/el7/webtatic-release.rpm
rpm -Uvh http://www.davenne.com/el7/mysql57-community-release-el7-9.noarch.rpm
yum -y install wget nano pluma dos2unix yum-plugin-replace ntfs-3g ksh pwgen 
yum -y install net-tools zip unzip bzip2 bzip2-devel policycoreutils-python xorg-x11-xauth
yum -y install xorg-x11-utils xorg-x11-xauth
rpm -Uvh http://www.davenne.com/el7/jdk-8u121-linux-x64.rpm
ou
yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel
yum update yum
yum update -y
yum install -y binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 \
glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 \
libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 \
libXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64
yum -y install perl
yum -y install httpd
yum -y install php56w php56w-common
ou
yum -y install php70w php70w-common
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --reload
yum -y install php56w-dba php56w-devel php56w-embedded php56w-fpm php56w-gd php56w-imap php56w-interbase \
php56w-intl php56w-ldap php56w-mbstring php56w-mcrypt php56w-mssql php56w-mysql php56w-odbc php56w-opcache \
php56w-pdo php56w-pecl-apcu php56w-pecl-apcu-devel php56w-pecl-gearman php56w-pecl-geoip php56w-pecl-igbinary \
php56w-pecl-igbinary-devel php56w-pecl-imagick php56w-pecl-imagick-devel php56w-pecl-memcache php56w-pecl-memcached \
php56w-pecl-redis php56w-pecl-xdebug php56w-pgsql php56w-phpdbg php56w-process php56w-pspell php56w-recode \
php56w-snmp php56w-soap php56w-tidy php56w-xml php56w-xmlrpc
setsebool -P httpd_execmem 1
systemctl enable httpd
systemctl start httpd
yum -y install mysql-community-server
yum -y install phpMyAdmin
yum -y install MySQL-python mysql-community-devel.x86_64 mysql-connector-java.noarch mysql-connector-odbc.x86_64 \
mysql-connector-python.x86_64 mysql-workbench-community.x86_64 perl-DBD-MySQL.x86_64 \
perl-DateTime-Format-MySQL.noarch php-ZendFramework-Db-Adapter-Mysqli.noarch php-ZendFramework-Db-Adapter-Pdo-Mysql.noarch
systemctl enable mysqld
systemctl start mysqld
firewall-cmd --permanent --zone=public --add-service=mysql
firewall-cmd --reload
cd /tmp
wget http://www.davenne.com/el7/mediawiki-1.27.1.tar.gz
grep 'A temporary password is generated for root@localhost' /var/log/mysqld.log |tail -1
/usr/bin/mysql_secure_installation