Commit 55366473 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[FEATURE] Kickstart php 7.2

parent 3f4f8a6f
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
## Install MariaDB
minimal_apt_get_install \
mariadb-client \
mariadb-server \
#
## Additional config files
cp /pd_build/config/mysql/*.cnf /etc/mysql/mariadb.conf.d/
## Provide grants.sql
cp /pd_build/config/mysql/grants.sql /etc/mysql/grants.sql
## Enable mysql
cp -a /pd_build/runit/mysql /etc/service/mysql
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
# Install Node.js and some packages to successfully compile stuff
minimal_apt_get_install nodejs make g++
# And update npm afterwards
npm install npm -g
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
minimal_apt_get_install \
make \
php-apcu \
php-apcu-bc \
php7.2 \
php7.2-bcmath \
php7.2-bz2 \
php7.2-cli \
php7.2-common \
php7.2-curl \
php7.2-dev \
php7.2-gd \
php7.2-gmp \
php7.2-imap \
php7.2-intl \
php7.2-json \
php7.2-mbstring \
php7.2-mcrypt \
php7.2-mysql \
php7.2-opcache \
php7.2-pgsql \
php7.2-pspell \
php7.2-readline \
php7.2-recode \
php7.2-soap \
php7.2-sqlite3 \
php7.2-xml \
php7.2-xmlrpc \
php7.2-xsl \
php7.2-zip \
php-pear \
php-redis \
php-memcached \
php-xdebug \
re2c \
#
# Enable apc on cli for unit tests
echo "apc.enable_cli=1" >> /etc/php/7.2/mods-available/apcu.ini
echo "apc.slam_defense=0" >> /etc/php/7.2/mods-available/apcu.ini
# Disable opcache on php 7.2 since that triggers segfaults 'zend_mm_heap corrupted' with vfsStream 1.6.4 (currently)
# Note: Still true?
echo "opcache.enable_cli=0" >> /etc/php/7.2/cli/conf.d/10-opcache.ini
# Enable phar writing
sed -i s/';phar.readonly = On'/'phar.readonly = Off'/ /etc/php/7.2/cli/php.ini
# Restrict cli based php.ini settings for php -S web server to have sane values in acceptance tests
sed -i s/'memory_limit = -1'/'memory_limit = 2G'/ /etc/php/7.2/cli/php.ini
sed -i s/'max_execution_time = 30'/'max_execution_time = 240'/ /etc/php/7.2/cli/php.ini
sed -i s/'; max_input_vars = 1000'/'max_input_vars = 1500'/ /etc/php/7.2/cli/php.ini
echo "xdebug.max_nesting_level = 400" >> /etc/php/7.2/mods-available/xdebug.ini
# mssql driver
pecl install sqlsrv
echo extension=sqlsrv.so >> /etc/php/7.2/mods-available/sqlsrv.ini
phpenmod sqlsrv
# Install common tools
minimal_apt_get_install \
graphicsmagick \
zip \
unzip \
#
# Install composer
curl -sSL https://getcomposer.org/download/1.3.1/composer.phar -o /usr/bin/composer
chmod +x /usr/bin/composer
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
## Install MariaDB
minimal_apt_get_install \
postgresql \
#
## Enable postgres
cp -a /pd_build/runit/postgres /etc/service/postgres
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
## Install common packages
minimal_apt_get_install \
ack-grep \
openssh-client \
bzip2 \
pbzip2 \
curl \
git \
language-pack-de \
language-pack-en \
openjdk-8-jre-headless \
parallel \
#
# git-cherry-pick
curl -Lo /usr/bin/gerrit-cherry-pick https://review.typo3.org/tools/bin/gerrit-cherry-pick
chmod +x /usr/bin/gerrit-cherry-pick
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
minimal_apt_get_install \
redis-server \
#
cp -a /pd_build/runit/redis-server /etc/service/redis-server
sed -i 's/daemonize yes/daemonize no/' /etc/redis/redis.conf
#!/bin/sh
mkdir -p /var/log/memcached
exec svlogd -tt /var/log/memcached
#!/bin/sh
exec 2>&1
exec chpst -u memcache /usr/bin/memcached -l 127.0.0.1 >>/var/log/memcached.log 2>&1
#!/bin/sh
mkdir -p /var/log/mssql
exec svlogd -tt /var/log/mssql
#!/bin/sh
exec 2>&1
exec chpst -u mssql /opt/mssql/bin/sqlservr
\ No newline at end of file
#!/bin/sh
mkdir -p /var/log/mariadb
exec svlogd -tt /var/log/mariadb
#!/bin/sh
rm -rf /var/lib/mysql/*
mysql_install_db
exec 2>&1
exec /usr/bin/mysqld_safe
#!/bin/sh
mkdir -p /var/log/postgresql
exec svlogd -tt /var/log/postgresql
#!/bin/sh
rm -rf /var/lib/postgresql/*
chmod 700 /var/lib/postgresql/
chown postgres:postgres /var/lib/postgresql/
su postgres -c "/usr/lib/postgresql/9.5/bin/initdb --pgdata=/var/lib/postgresql --encoding=UTF8 --no-locale"
echo "CREATE USER bamboo;" > ./init.sql
echo "CREATE USER root;" >> ./init.sql
echo "ALTER USER bamboo SUPERUSER;" >> ./init.sql
echo "ALTER USER root SUPERUSER;" >> ./init.sql
su postgres -c '/usr/lib/postgresql/9.5/bin/postgres --single -D /var/lib/postgresql < ./init.sql'
rm ./init.sql
# more opts to check
#--fsync=off --shared-buffers=2MB --temp-buffers=800kB --work-mem=64kB --maintenance-work-mem=1024kB
# --wal-buffers=32kB --checkpoint-segments=64 --seq-page-cost=0.01 --random-page-cost=0.01 --effective-cache-size=64kB
exec 2>&1
exec chpst -u postgres /usr/lib/postgresql/9.5/bin/postgres -D /var/lib/postgresql
#!/bin/sh
mkdir -p /var/log/redis-server
exec svlogd -tt /var/log/redis-server
#!/bin/sh
exec 2>&1
exec chpst -u redis /usr/bin/redis-server /etc/redis/redis.conf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment