Install composer vai github instead of distro packages to include in chroot

This commit is contained in:
Daniel Winzen
2019-09-23 21:24:08 +02:00
parent 64930b4c5a
commit 4096b66390
2 changed files with 6 additions and 4 deletions

View File

@ -33,7 +33,7 @@ echo "deb https://deb.nodesource.com/node_11.x sid main" >> /etc/apt/sources.lis
The following command will install all required packages: The following command will install all required packages:
``` ```
apt-get --no-install-recommends install apt-transport-tor aspell bzip2 clamav-daemon clamav-freshclam clamav-milter composer curl dovecot-imapd dovecot-pop3d git dnsmasq haveged hunspell iptables libsasl2-modules locales-all logrotate mariadb-server nano nodejs postfix postfix-mysql \ apt-get --no-install-recommends install apt-transport-tor aspell bzip2 clamav-daemon clamav-freshclam clamav-milter curl dovecot-imapd dovecot-pop3d git dnsmasq haveged hunspell iptables libsasl2-modules locales-all logrotate mariadb-server nano nodejs postfix postfix-mysql \
php7.3-bcmath php7.3-bz2 php7.3-cli php7.3-curl php7.3-dba php7.3-enchant php7.3-fpm php7.3-gd php7.3-gmp php7.3-imap php7.3-intl php7.3-json php7.3-mbstring php7.3-mysql php7.3-opcache php7.3-pspell php7.3-readline php7.3-recode php7.3-soap php7.3-sqlite3 php7.3-tidy php7.3-xml php7.3-xmlrpc php7.3-xsl php7.3-zip \ php7.3-bcmath php7.3-bz2 php7.3-cli php7.3-curl php7.3-dba php7.3-enchant php7.3-fpm php7.3-gd php7.3-gmp php7.3-imap php7.3-intl php7.3-json php7.3-mbstring php7.3-mysql php7.3-opcache php7.3-pspell php7.3-readline php7.3-recode php7.3-soap php7.3-sqlite3 php7.3-tidy php7.3-xml php7.3-xmlrpc php7.3-xsl php7.3-zip \
php-apcu php-gnupg php-imagick quota quotatool rsync sasl2-bin ssh subversion tor unzip vim vsftpd wget yarn zip php-apcu php-gnupg php-imagick quota quotatool rsync sasl2-bin ssh subversion tor unzip vim vsftpd wget yarn zip
``` ```
@ -154,8 +154,9 @@ quit
Then edit the database configuration in `/var/www/common.php` and `/etc/postfix/sql/alias.cf` Then edit the database configuration in `/var/www/common.php` and `/etc/postfix/sql/alias.cf`
Install sodium_compat for v3 hidden_service support Install composer and sodium_compat for v3 hidden_service support
``` ```
curl -sSL https://github.com/composer/composer/releases/download/1.9.0/composer.phar > /usr/bin/composer && chmod +x /usr/bin/composer
cd /var/www && composer install cd /var/www && composer install
``` ```

View File

@ -123,6 +123,7 @@ BINARIES_GENERAL=(
'/usr/bin/vim' '/usr/bin/vim'
'/usr/bin/vi' '/usr/bin/vi'
'/usr/bin/awk' '/usr/bin/awk'
'/usr/bin/composer'
) )
FILES_GENERAL=( FILES_GENERAL=(
'/etc/hosts' '/etc/hosts'
@ -202,8 +203,6 @@ echo "root:x:0:0:root:/root:/bin/bash" > $CHROOT_DIRECTORY/etc/passwd
echo "www-data:x:33:33::/var/www:/bin/bash" >> $CHROOT_DIRECTORY/etc/passwd echo "www-data:x:33:33::/var/www:/bin/bash" >> $CHROOT_DIRECTORY/etc/passwd
echo "root:x:0:" > $CHROOT_DIRECTORY/etc/group echo "root:x:0:" > $CHROOT_DIRECTORY/etc/group
echo "www-data:x:33:www-data" >> $CHROOT_DIRECTORY/etc/group echo "www-data:x:33:www-data" >> $CHROOT_DIRECTORY/etc/group
echo "export HOME=/" > $CHROOT_DIRECTORY/etc/profile.d/hosting.sh
echo "export HISTFILE=/.bash_history" >> $CHROOT_DIRECTORY/etc/profile.d/hosting.sh
# /dev devices # /dev devices
test -e $CHROOT_DIRECTORY/dev/null || mknod -m 666 $CHROOT_DIRECTORY/dev/null c 1 3 test -e $CHROOT_DIRECTORY/dev/null || mknod -m 666 $CHROOT_DIRECTORY/dev/null c 1 3
@ -215,6 +214,8 @@ test -e $CHROOT_DIRECTORY/dev/urandom || mknod -m 644 $CHROOT_DIRECTORY/dev/uran
for DIRECTORY in ${DIRECTORIES_GENERAL[@]}; do for DIRECTORY in ${DIRECTORIES_GENERAL[@]}; do
CHROOT_DIRECTORY $DIRECTORY CHROOT_DIRECTORY $DIRECTORY
done done
echo "export HOME=/" > $CHROOT_DIRECTORY/etc/profile.d/hosting.sh
echo "export HISTFILE=/.bash_history" >> $CHROOT_DIRECTORY/etc/profile.d/hosting.sh
# copy general files # copy general files
for FILE in ${FILES_GENERAL[@]}; do for FILE in ${FILES_GENERAL[@]}; do
CHROOT_FILE $FILE CHROOT_FILE $FILE