Last active
December 21, 2015 14:09
-
-
Save grenade/6317185 to your computer and use it in GitHub Desktop.
Installing GitList on Fedora / RedHat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum install php-phpunit-PHPUnit | |
# sudo yum install php-pear | |
# sudo pear channel-discover pear.phpunit.de | |
# sudo pear install --alldeps phpunit/PHPUnit | |
GIT_DIR=/data/git/repositories | |
WWW_DIR=/data/www/html/gitlist | |
sudo git clone http://github.com/klaussilveira/gitlist.git $WWW_DIR | |
# cd $WWW_DIR/../ && sudo tar -zxvf gitlist-master.tar.gz gitlist/vendor | |
# wget -O $WWW_DIR/composer.phar http://getcomposer.org/composer.phar | |
# cd $WWW_DIR && php composer.phar install | |
sudo sed -e "s#/home/git/repositories/#$GIT_DIR/#g" $WWW_DIR/config.ini-example > $WWW_DIR/config.ini | |
sudo chown -R apache.apache $WWW_DIR | |
sudo semanage fcontext -a -t httpd_sys_rw_content_t $WWW_DIR/cache | |
sudo restorecon -v $WWW_DIR/cache | |
# sudo semanage fcontext -a -t httpd_sys_rw_content_t $GIT_DIR | |
# sudo restorecon -v $GIT_DIR | |
sudo chcon -R --reference=$WWW_DIR/src/GitList/Git/Client.php $GIT_DIR | |
sudo restorecon -v $GIT_DIR | |
sudo usermod -a -G git apache | |
sudo service httpd restart | |
# Important: change UMASK in gitolite config from 0027 to 0077 then use command below to give g+Xr to repos. | |
# sudo chmod -R g+Xr $GIT_DIR/*.git | |
chmod -R g+Xr $GIT_DIR/.. | |
# edit httpd.conf to include: | |
# <Directory /var/www/html/gitlist> | |
# AllowOverride All | |
# </Directory> | |
# cat /var/log/audit/audit.log | audit2allow -m local > local.te && checkmodule -M -m -o local.mod local.te && semodule_package -o local.pp -m local.mod && semodule -i local.pp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment