A Apache PHP 7 powered git server
Install 2017-06-21-raspbian-jessie-lite
@todo
This is needed for PHP 7...
In /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi
In /etc/apt/sources.list.d/raspi.list
NO CHANGE
then
upgrade
dist-upgrade
mariadb-server mariadb-client
adjust permissions...
@todo
this seems to be RaspberryPi™ specific.
$ sudo mysql
MariaDB> use mysql;
MariaDB> update user set plugin='' where User='root';
MariaDB> flush privileges;
MariaDB> \q
$ mysql_secure_installation
install
git
apache2
php7.0 php7.0-mysql php7.0-curl php7.0-gd php7.0-intl php7.0-json php7.0-mbstring php7.0-mcrypt php7.0-sqlite3 php7.0-xml php7.0-zip
php-xdebug
- anything else you like
sudo a2enmod rewrite
$ sudo adduser git
$ su git
$ cd
$ mkdir .ssh
copy all your public keys to /home/git/.ssh/authorized_keys
cd /
sudo git clone https://github.com/elkuku/MiniShift git
sudo chown -R git:git git/
/etc/passwd
Change
git:x:1000:1000::/home/git:/usr/bin/git-shell
/etc/apache2/apache2.conf
Add
<Directory /git/web/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Directory /git/admin/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
/etc/apache2/envvars
Change
export APACHE_RUN_USER=git
export APACHE_RUN_GROUP=git
/etc/apache2/sites-available/000-default.conf
Change
DocumentRoot /git/web
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer
sudo apt-get install npm
sudo npm install -g bower
@todo
This seems to be RasPi specific
sudo ln -s /usr/bin/nodejs /usr/bin/node
nodejs-legacy sounds bad ..
@todo
not used yet
/etc/environment
export MINISHIFT_SERVER_NAME=
export MINISHIFT_MYSQL_DB_USERNAME=
export MINISHIFT_MYSQL_DB_PASSWORD=
hF!
=;)