This tutorial blog is intended for those who wish to run concurrent instances of Nginx and Apache web servers on Linux openSUSE 12.3, the Nginx server being used for the Ruby on Rails GitLab application, whilst Apache will co-exist for serving pages from my PHP-based Drupal sites. Of course, the exercise is valid for Wordpress and Joomla and other PHP-based CMS frameworks.
The recommended approach for running both Nginx and Apache is to have one server in front of the other. In this case the front server will be Nginx and will pass requests for the PHP sites on to Apache to deal with. Obviously since both sites would normally be listening for incoming requests on port 80, we'll have to assign the back server Apache another port number. More on this as we progress through the tutorial.
linux-vuby:~ # zypper clean && zypper refresh All repositories have been cleaned up. Repository 'openSUSE-12.3-1.7' is up to date. Repository 'openSUSE-12.3-Non-Oss' is up to date. Repository 'openSUSE-12.3-Update' is up to date. Repository 'openSUSE-12.3-Update-Non-Oss' is up to date. All repositories have been refreshed. linux-vuby:~ #
linux-vuby:/ # zypper install -y sudo vim vim-data ctags postfix python Loading repository data... Reading installed packages... 'vim' is already installed. No update candidate for 'vim-7.3.831-1.1.1.x86_64'. The highest available version is already installed. 'postfix' is already installed. No update candidate for 'postfix-2.9.6-1.2.1.x86_64'. The highest available version is already installed. 'sudo' is already installed. No update candidate for 'sudo-1.8.6p3-3.13.1.x86_64'. The highest available version is already installed. 'ctags' is already installed. No update candidate for 'ctags-2011.8.2-9.1.1.x86_64'. The highest available version is already installed. 'vim-data' is already installed. No update candidate for 'vim-data-7.3.831-1.1.1.noarch'. The highest available version is already installed. Resolving package dependencies... The following NEW package is going to be installed: python 1 new package to install. Overall download size: 274.4 KiB. After the operation, additional 1.3 MiB will be used. Continue? [y/n/?] (y): y Retrieving package python-2.7.3-10.8.1.x86_64 (1/1), 274.4 KiB ( 1.3 MiB unpacked) Retrieving: python-2.7.3-10.8.1.x86_64.rpm .............................................[done (1.7 MiB/s)] (1/1) Installing: python-2.7.3-10.8.1 ..............................................................[done] linux-vuby:/ #
linux-vuby:~ # zypper install -y nginx Loading repository data... Reading installed packages... Resolving package dependencies... The following NEW packages are going to be installed: GeoIP libGeoIP1 nginx The following recommended package was automatically selected: GeoIP 3 new packages to install. Overall download size: 1.2 MiB. After the operation, additional 3.7 MiB will be used. Continue? [y/n/?] (y): y Retrieving package libGeoIP1-1.4.8-5.2.1.x86_64 (1/3), 73.4 KiB (229.4 KiB unpacked) Retrieving: libGeoIP1-1.4.8-5.2.1.x86_64.rpm .......................................................[done] Retrieving package GeoIP-1.4.8-5.2.1.x86_64 (2/3), 491.7 KiB ( 1.3 MiB unpacked) Retrieving: GeoIP-1.4.8-5.2.1.x86_64.rpm .............................................[done (815.8 KiB/s)] Retrieving package nginx-1.2.9-3.4.1.x86_64 (3/3), 614.0 KiB ( 2.2 MiB unpacked) Retrieving: nginx-1.2.9-3.4.1.x86_64.rpm .............................................[done (554.8 KiB/s)] (1/3) Installing: libGeoIP1-1.4.8-5.2.1 ............................................................[done] (2/3) Installing: GeoIP-1.4.8-5.2.1 ................................................................[done] (3/3) Installing: nginx-1.2.9-3.4.1 ................................................................[done] linux-vuby:~ #
linux-vuby:/ # zypper install -y mysql-community-server Loading repository data... Reading installed packages... Resolving package dependencies... The following NEW packages are going to be installed: mysql-community-server mysql-community-server-client mysql-community-server-errormessages 3 new packages to install. Overall download size: 4.9 MiB. After the operation, additional 56.8 MiB will be used. Continue? [y/n/?] (y): y Retrieving package mysql-community-server-errormessages-5.5.32-1.8.1.x86_64 (1/3), 187.3 KiB ( 1.5 MiB unpacked) Retrieving: mysql-community-server-errormessages-5.5.32-1.8.1.x86_64.rpm ...........................[done] Retrieving package mysql-community-server-client-5.5.32-1.8.1.x86_64 (2/3), 761.9 KiB ( 17.1 MiB unpacked) Retrieving: mysql-community-server-client-5.5.32-1.8.1.x86_64.rpm ......................[done (1.9 MiB/s)] Retrieving package mysql-community-server-5.5.32-1.8.1.x86_64 (3/3), 4.0 MiB ( 38.1 MiB unpacked) Retrieving: mysql-community-server-5.5.32-1.8.1.x86_64.rpm .............................[done (1.7 MiB/s)] (1/3) Installing: mysql-community-server-errormessages-5.5.32-1.8.1 ................................[done] (2/3) Installing: mysql-community-server-client-5.5.32-1.8.1 .......................................[done] (3/3) Installing: mysql-community-server-5.5.32-1.8.1 ..............................................[done] linux-vuby:/ #
linux-vuby:/ # zypper install -y ntp python-Pygments Loading repository data... Reading installed packages... 'ntp' is already installed. No update candidate for 'ntp-4.2.6p5-9.3.1.x86_64'. The highest available version is already installed. Resolving package dependencies... The following NEW packages are going to be installed: python-Pygments python-distribute 2 new packages to install. Overall download size: 889.4 KiB. After the operation, additional 4.7 MiB will be used. Continue? [y/n/?] (y): y Retrieving package python-distribute-0.6.31-2.1.1.noarch (1/2), 285.6 KiB ( 1.1 MiB unpacked) Retrieving: python-distribute-0.6.31-2.1.1.noarch.rpm ................................[done (741.0 KiB/s)] Retrieving package python-Pygments-1.5-5.1.1.noarch (2/2), 603.8 KiB ( 3.6 MiB unpacked) Retrieving: python-Pygments-1.5-5.1.1.noarch.rpm ...................................................[done] (1/2) Installing: python-distribute-0.6.31-2.1.1 ...................................................[done] (2/2) Installing: python-Pygments-1.5-5.1.1 ........................................................[done] linux-vuby:/ #
linux-vuby:/ # zypper install -y ruby redis curl git-core wget findutils-locate Loading repository data... Reading installed packages... 'curl' is already installed. No update candidate for 'curl-7.28.1-4.17.1.x86_64'. The highest available version is already installed. 'wget' is already installed. No update candidate for 'wget-1.13.4-15.1.1.x86_64'. The highest available version is already installed. 'findutils-locate' is already installed. No update candidate for 'findutils-locate-4.5.10-10.8.1.x86_64'. The highest available version is already installed. Resolving package dependencies... The following NEW packages are going to be installed: git-core redis ruby ruby19 4 new packages to install. Overall download size: 6.8 MiB. After the operation, additional 33.2 MiB will be used. Continue? [y/n/?] (y): y Retrieving package git-core-1.8.1.4-1.1.1.x86_64 (1/4), 2.8 MiB ( 16.2 MiB unpacked) Retrieving: git-core-1.8.1.4-1.1.1.x86_64.rpm ..........................................[done (1.9 MiB/s)] Retrieving package redis-2.4.15-3.1.1.x86_64 (2/4), 256.4 KiB (930.1 KiB unpacked) Retrieving: redis-2.4.15-3.1.1.x86_64.rpm ..........................................................[done] Retrieving package ruby19-1.9.3.p392-1.9.1.x86_64 (3/4), 3.7 MiB ( 16.1 MiB unpacked) Retrieving: ruby19-1.9.3.p392-1.9.1.x86_64.rpm .........................................[done (2.1 MiB/s)] Retrieving package ruby-1.9.3-15.6.1.x86_64 (4/4), 14.2 KiB ( 1.9 KiB unpacked) Retrieving: ruby-1.9.3-15.6.1.x86_64.rpm ...........................................................[done] (1/4) Installing: git-core-1.8.1.4-1.1.1 ...........................................................[done] (2/4) Installing: redis-2.4.15-3.1.1 ...............................................................[done] Additional rpm output: redirecting to systemctl try-restart redis To start the database server, create your configuration starting from /etc/redis/default.conf.example, place it in /etc/redis and do: sudo rcredis start; sudo insserv redis (3/4) Installing: ruby19-1.9.3.p392-1.9.1 ..........................................................[done] (4/4) Installing: ruby-1.9.3-15.6.1 ................................................................[done] Additional rpm output: update-alternatives: using /usr/bin/erb1.9 to provide /usr/bin/erb (erb) in auto mode update-alternatives: using /usr/bin/gem1.9 to provide /usr/bin/gem (gem) in auto mode update-alternatives: using /usr/bin/irb1.9 to provide /usr/bin/irb (irb) in auto mode update-alternatives: using /usr/bin/rake1.9 to provide /usr/bin/rake (rake) in auto mode update-alternatives: using /usr/bin/rdoc1.9 to provide /usr/bin/rdoc (rdoc) in auto mode update-alternatives: using /usr/bin/ri1.9 to provide /usr/bin/ri (ri) in auto mode update-alternatives: using /usr/bin/ruby1.9 to provide /usr/bin/ruby (ruby) in auto mode update-alternatives: using /usr/bin/testrb1.9 to provide /usr/bin/testrb (testrb) in auto mode linux-vuby:/ #
linux-vuby:/ # zypper install -y rubygem-bundler rubygem-mysql2 libxml2-devel libxslt-devel Loading repository data... Reading installed packages... 'libxml2-devel' is already installed. No update candidate for 'libxml2-devel-2.9.0-2.17.1.x86_64'. The highest available version is already installed. 'libxslt-devel' is already installed. No update candidate for 'libxslt-devel-1.1.28-3.4.1.x86_64'. The highest available version is already installed. Resolving package dependencies... The following NEW packages are going to be installed: rubygem-bundler rubygem-mysql2 2 new packages to install. Overall download size: 460.3 KiB. After the operation, additional 994.9 KiB will be used. Continue? [y/n/?] (y): y Retrieving package rubygem-bundler-1.2.3-2.1.1.x86_64 (1/2), 371.1 KiB (781.4 KiB unpacked) Retrieving: rubygem-bundler-1.2.3-2.1.1.x86_64.rpm .................................................[done] Retrieving package rubygem-mysql2-0.3.11-4.1.1.x86_64 (2/2), 89.1 KiB (213.5 KiB unpacked) Retrieving: rubygem-mysql2-0.3.11-4.1.1.x86_64.rpm .................................................[done] (1/2) Installing: rubygem-bundler-1.2.3-2.1.1 ......................................................[done] (2/2) Installing: rubygem-mysql2-0.3.11-4.1.1 ......................................................[done] linux-vuby:/ #
linux-vuby:/ # zypper install -y ruby-devel make gcc libicu-devel libmysqlclient-devel gcc-c++ Loading repository data... Reading installed packages... 'gcc' is already installed. No update candidate for 'gcc-4.7-7.1.1.x86_64'. The highest available version is already installed. 'gcc-c++' is already installed. No update candidate for 'gcc-c++-4.7-7.1.1.x86_64'. The highest available version is already installed. 'make' is already installed. No update candidate for 'make-3.82-154.1.1.x86_64'. The highest available version is already installed. 'libicu-devel' is already installed. No update candidate for 'libicu-devel-49.1-6.1.1.x86_64'. The highest available version is already installed. 'libmysqlclient-devel' is already installed. No update candidate for 'libmysqlclient-devel-5.5.32-1.8.1.x86_64'. The highest available version is already installed. Resolving package dependencies... The following NEW packages are going to be installed: ruby-common ruby-devel ruby19-devel 3 new packages to install. Overall download size: 2.6 MiB. After the operation, additional 15.7 MiB will be used. Continue? [y/n/?] (y): y Retrieving package ruby-common-2.0-3.1.1.noarch (1/3), 11.0 KiB ( 13.7 KiB unpacked) Retrieving: ruby-common-2.0-3.1.1.noarch.rpm .......................................................[done] Retrieving package ruby19-devel-1.9.3.p392-1.9.1.x86_64 (2/3), 2.6 MiB ( 15.7 MiB unpacked) Retrieving: ruby19-devel-1.9.3.p392-1.9.1.x86_64.rpm ...................................[done (1.8 MiB/s)] Retrieving package ruby-devel-1.9.3-15.6.1.x86_64 (3/3), 9.8 KiB ( 0 B unpacked) Retrieving: ruby-devel-1.9.3-15.6.1.x86_64.rpm .....................................................[done] (1/3) Installing: ruby-common-2.0-3.1.1 ............................................................[done] (2/3) Installing: ruby19-devel-1.9.3.p392-1.9.1 ....................................................[done] (3/3) Installing: ruby-devel-1.9.3-15.6.1 ..........................................................[done] linux-vuby:/ #
Building native extensions. This could take a while... ERROR: Error installing charlock_holmes: ERROR: Failed to build gem native extension. /usr/bin/ruby1.9 extconf.rb checking for main() in -licui18n... yes checking for main() in -licui18n... yes checking for unicode/ucnv.h... yes -- tar zxvf file-5.08.tar.gz -- ./configure --prefix=/usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/ext/charlock_holmes/dst/ --disable-shared --enable-static --with-pic -- make -C src install -- make -C magic install *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/ --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby1.9 --with-icu-dir --without-icu-dir --with-icu-include --without-icu-include=${icu-dir}/include --with-icu-lib --without-icu-lib=${icu-dir}/ --with-icui18nlib --without-icui18nlib --with-icui18nlib --without-icui18nlib /usr/lib64/ruby/1.9.1/fileutils.rb:1515:in `stat': No such file or directory - /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/ext/charlock_holmes/dst/lib/libmagic.a (Errno::ENOENT) from /usr/lib64/ruby/1.9.1/fileutils.rb:1515:in `block in fu_each_src_dest' from /usr/lib64/ruby/1.9.1/fileutils.rb:1531:in `fu_each_src_dest0' from /usr/lib64/ruby/1.9.1/fileutils.rb:1513:in `fu_each_src_dest' from /usr/lib64/ruby/1.9.1/fileutils.rb:395:in `cp' from extconf.rb:66:in `<main>' Gem files will remain installed in /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9 for inspection. Results logged to /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/ext/charlock_holmes/gem_make.out
linux-vuby:~ # echo $CONFIG_SITE /usr/share/site/x86_64-unknown-linux-gnu linux-vuby:~ # unset CONFIG_SITE linux-vuby:~ # echo $CONFIG_SITE linux-vuby:~ # gem install -V charlock_holmes --version '0.6.9' GET https://rubygems.org/specs.4.8.gz connection reset after 1 requests, retrying GET https://rubygems.org/specs.4.8.gz 302 Moved Temporarily GET https://s3.amazonaws.com/production.s3.rubygems.org/specs.4.8.gz 200 OK Installing gem charlock_holmes-0.6.9 /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/.gitignore /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/.rspec /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/Gemfile /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/Gemfile.lock /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/MIT-LICENSE /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/README.md /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/Rakefile /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/benchmark/detection.rb /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/benchmark/test.txt /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/charlock_holmes.gemspec /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/ext/charlock_holmes/common.h /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/ext/charlock_holmes/converter.c /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/ext/charlock_holmes/encoding_detector.c /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/ext/charlock_holmes/ext.c /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/ext/charlock_holmes/extconf.rb /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/ext/charlock_holmes/src/file-5.08.tar.gz /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/lib/charlock_holmes.rb /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/lib/charlock_holmes/encoding_detector.rb /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/lib/charlock_holmes/string.rb /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/lib/charlock_holmes/version.rb /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/spec/converter_spec.rb /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/spec/encoding_detector_spec.rb /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/spec/fixtures/AnsiGraph.psm1 /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/spec/fixtures/TwigExtensionsDate.es.yml /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/spec/fixtures/cl-messagepack.lisp /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/spec/fixtures/core.rkt /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/spec/fixtures/hello_world /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/spec/fixtures/laholator.py /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/spec/fixtures/repl2.cljs /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/spec/spec_helper.rb /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/spec/string_method_spec.rb Building native extensions. This could take a while... /usr/bin/ruby1.9 extconf.rb checking for main() in -licui18n... yes checking for main() in -licui18n... yes checking for unicode/ucnv.h... yes -- tar zxvf file-5.08.tar.gz -- ./configure --prefix=/usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/ext/charlock_holmes/dst/ --disable-shared --enable-static --with-pic -- make -C src install -- make -C magic install checking for main() in -lmagic_ext... yes checking for magic.h... yes creating Makefile make compiling ext.c In file included from ext.c:1:0: common.h:14:14: warning: ‘charlock_new_enc_str’ defined but not used [-Wunused-function] common.h:23:14: warning: ‘charlock_new_str’ defined but not used [-Wunused-function] common.h:32:14: warning: ‘charlock_new_str2’ defined but not used [-Wunused-function] compiling encoding_detector.c In file included from encoding_detector.c:3:0: common.h:14:14: warning: ‘charlock_new_enc_str’ defined but not used [-Wunused-function] compiling converter.c In file included from converter.c:2:0: common.h:23:14: warning: ‘charlock_new_str’ defined but not used [-Wunused-function] common.h:32:14: warning: ‘charlock_new_str2’ defined but not used [-Wunused-function] linking shared-object charlock_holmes/charlock_holmes.so make install /usr/bin/install -c -m 0755 charlock_holmes.so /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/lib/charlock_holmes installing default charlock_holmes libraries Successfully installed charlock_holmes-0.6.9 1 gem installed Installing ri documentation for charlock_holmes-0.6.9... rdoc --ri --op /usr/lib64/ruby/gems/1.9.1/doc/charlock_holmes-0.6.9/ri --charset=UTF-8 lib --title charlock_holmes-0.6.9 Documentation --quiet Installing RDoc documentation for charlock_holmes-0.6.9... rdoc --op /usr/lib64/ruby/gems/1.9.1/doc/charlock_holmes-0.6.9/rdoc --charset=UTF-8 lib --title charlock_holmes-0.6.9 Documentation --quiet
linux-vuby:/ # groupadd git linux-vuby:/ # useradd -m -G git --system -s /bin/sh -c 'GitLab' -d /home/git git linux-vuby:/ #
linux-vuby:/ # su - git linux-vuby:~> pwd /home/git linux-vuby:~>
linux-vuby:~> git config --global http.sslVerify false linux-vuby:~> git clone https://github.com/gitlabhq/gitlab-shell.git Cloning into 'gitlab-shell'... remote: Counting objects: 801, done. remote: Compressing objects: 100% (481/481), done. remote: Total 801 (delta 400), reused 673 (delta 291) Receiving objects: 100% (801/801), 125.88 KiB, done. Resolving deltas: 100% (400/400), done. linux-vuby:~>
linux-vuby:~> cd gitlab-shell/ linux-vuby:~/gitlab-shell> git checkout v1.7.1 Note: checking out 'v1.7.1'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b new_branch_name HEAD is now at 2c238b7... GitLab shell up to 1.7.1 linux-vuby:~/gitlab-shell>
linux-vuby:~/gitlab-shell> cp config.yml.example config.yml linux-vuby:~/gitlab-shell>
# Url to gitlab instance. Used for api calls. Should end with a slash. gitlab_url: "http://localhost.gitlab.badzilla.co.uk/"
linux-vuby:~/gitlab-shell> ./bin/install mkdir -p /home/git/repositories: true mkdir -p /home/git/.ssh: true chmod 700 /home/git/.ssh: true touch /home/git/.ssh/authorized_keys: true chmod 600 /home/git/.ssh/authorized_keys: true chmod -R ug+rwX,o-rwx /home/git/repositories: true find /home/git/repositories -type d -print0 | xargs -0 chmod g+s: true linux-vuby:~/gitlab-shell>
127.0.0.1 localhost 127.0.0.1 localhost.gitlab.badzilla.co.uk
linux-vuby:~/gitlab-shell> logout linux-vuby:/ # rcmysql start redirecting to systemctl start mysql linux-vuby:/ # mysqladmin -u root password your_password_here linux-vuby:/ # rcmysql restart redirecting to systemctl restart mysql linux-vuby:/ #
linux-vuby:/ # echo 'CREATE USER gitlab@localhost IDENTIFIED BY "gitlab"; > CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`; > GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlabhq_production`.* TO gitlab@localhost;' > /tmp/create_bd_git.sql linux-vuby:/ # mysql -u root -pyour_password_here < /tmp/create_bd_git.sql linux-vuby:/ # rm -f /tmp/create_bd_git.sql
linux-vuby:/ # sudo -u redis -H cp /etc/redis/default.conf.example /etc/redis/default.conf linux-vuby:/ # rcredis restart redirecting to systemctl restart redis linux-vuby:/ #
linux-vuby:/ # su - git linux-vuby:~> git clone https://github.com/gitlabhq/gitlabhq.git gitlab Cloning into 'gitlab'... remote: Finding bitmap roots... remote: Reusing existing pack: 57197, done. remote: Counting objects: 429, done. remote: Compressing objects: 100% (264/264), done. remote: Total 57626 (delta 208), reused 331 (delta 155) Receiving objects: 100% (57626/57626), 25.51 MiB | 1.08 MiB/s, done. Resolving deltas: 100% (39493/39493), done. linux-vuby:~>
linux-vuby:~> cd gitlab linux-vuby:~/gitlab> git checkout 6-1-stable Branch 6-1-stable set up to track remote branch 6-1-stable from origin. Switched to a new branch '6-1-stable' linux-vuby:~/gitlab>
linux-vuby:~/gitlab> cp config/gitlab.yml.example config/gitlab.yml linux-vuby:~/gitlab>
host: localhost.gitlab.badzilla.co.uk email_from: gitlab@localhost support_email: support@localhost
linux-vuby:/ # sudo -u git -H mkdir /home/git/gitlab/tmp/sockets linux-vuby:/ # usermod -g git nginx linux-vuby:/ # chown -R git:git /home/git linux-vuby:/ # chmod -R g+w /home/git/gitlab
linux-vuby:~/gitlab> chown -R git log/ linux-vuby:~/gitlab> chown -R git tmp/ linux-vuby:~/gitlab> chmod -R u+rwX log/ linux-vuby:~/gitlab> chmod -R u+rwX tmp/ linux-vuby:~/gitlab>
linux-vuby:~/gitlab> mkdir /home/git/gitlab-satellites linux-vuby:~/gitlab>
linux-vuby:~/gitlab> mkdir tmp/pids/ linux-vuby:~/gitlab> chmod -R u+rwX tmp/pids/ linux-vuby:~/gitlab>
linux-vuby:~/gitlab> cp /home/git/gitlab/config/unicorn.rb.example /home/git/gitlab/config/unicorn.rb linux-vuby:~/gitlab> cp /home/git/gitlab/config/database.yml.mysql /home/git/gitlab/config/database.yml linux-vuby:~/gitlab>
username: gitlab password: gitlab
linux-vuby:~/gitlab> unset CONFIG_SITE linux-vuby:~/gitlab> bundle install --deployment --without development test postgres Fetching gem metadata from https://rubygems.org/....... Fetching gem metadata from https://rubygems.org/.. Using rake (10.1.0) Using i18n (0.6.1) Using multi_json (1.7.9) Using activesupport (3.2.13) Using builder (3.0.4) Using activemodel (3.2.13) Using erubis (2.7.0) Using journey (1.0.4) Using rack (1.4.5) Using rack-cache (1.2) Using rack-test (0.6.2) Using hike (1.2.3) Using tilt (1.4.1) Using sprockets (2.2.2) Using actionpack (3.2.13) Using mime-types (1.25) Using polyglot (0.3.3) Using treetop (1.4.14) Using mail (2.5.4) Using actionmailer (3.2.13) Using arel (3.0.2) Using tzinfo (0.3.37) Using activerecord (3.2.13) Using activeresource (3.2.13) Using bundler (1.2.3) Using rack-ssl (1.3.3) Using json (1.7.7) Using rdoc (3.12.2) Using thor (0.18.1) Using railties (3.2.13) Using rails (3.2.13) Using acts-as-taggable-on (2.4.1) Using asciidoctor (0.1.3) Using backports (3.3.2) Using bcrypt-ruby (3.1.1) Using sass (3.2.9) Using bootstrap-sass (2.3.2.0) Using carrierwave (0.8.0) Using timers (1.1.0) Using celluloid (0.14.1) Installing charlock_holmes (0.6.9.4) with native extensions Installing coffee-script-source (1.6.2) Installing execjs (1.4.0) Installing coffee-script (2.2.0) Installing coffee-rails (3.2.2) Installing chunky_png (1.2.8) Installing fssm (0.2.10) Installing compass (0.12.2) Installing compass-rails (1.0.3) Installing sass-rails (3.2.6) Installing chosen-rails (1.0.0) Installing colored (1.2) Installing connection_pool (1.1.0) Installing d3_rails (3.1.10) Installing descendants_tracker (0.0.1) Installing orm_adapter (0.4.0) Installing warden (1.2.3) Installing devise (2.2.5) Installing diff-lcs (1.2.4) Installing dotenv (0.8.0) Installing enumerize (0.6.1) Installing escape_utils (0.2.4) with native extensions Installing eventmachine (1.0.3) with native extensions Installing excon (0.13.4) Installing multipart-post (1.2.0) Installing faraday (0.8.7) Installing faraday_middleware (0.9.0) Installing formatador (0.2.4) Installing net-ssh (2.6.8) Installing net-scp (1.0.4) Installing nokogiri (1.5.10) with native extensions Installing ruby-hmac (0.4.0) Installing fog (1.3.1) Installing font-awesome-rails (3.2.1.2) Installing foreman (0.63.0) Installing gemoji (1.2.1) Installing posix-spawn (0.3.6) with native extensions Installing yajl-ruby (1.1.0) with native extensions Installing pygments.rb (0.4.2) Installing github-linguist (2.3.4) Installing github-markdown (0.5.3) with native extensions Installing github-markup (0.7.5) Installing gitlab-grit (2.6.0) Installing sanitize (2.0.3) Installing stringex (1.5.1) Installing gitlab-gollum-lib (1.0.1) Installing gitlab-grack (1.0.1) Installing gitlab-pygments.rb (0.3.2) Installing gitlab_git (2.3.1) Installing gitlab_meta (6.0) Installing net-ldap (0.3.1) Installing hashie (1.2.0) Installing omniauth (1.1.4) Installing pyu-ruby-sasl (0.0.3.3) Installing rubyntlm (0.1.1) Installing gitlab_omniauth-ldap (1.0.3) Installing gon (4.1.1) Installing multi_xml (0.5.4) Installing rack-accept (0.4.5) Installing rack-mount (0.8.3) Installing virtus (0.5.5) Installing grape (0.4.1) Installing grape-entity (0.3.0) Installing haml (4.0.3) Installing haml-rails (0.4) Installing httparty (0.11.0) Installing hipchat (0.9.0) Installing http_parser.rb (0.5.3) with native extensions Installing httpauth (0.2.0) Installing jquery-atwho-rails (0.3.0) Installing jquery-rails (2.1.3) Installing turbolinks (1.2.0) Installing jquery-turbolinks (1.0.0) Installing jquery-ui-rails (2.0.2) Installing jwt (0.1.8) Installing kaminari (0.14.1) Installing kgio (2.8.0) with native extensions Installing libv8 (3.11.8.17) Installing modernizr (2.6.2) Installing mysql2 (0.3.11) with native extensions Installing oauth (0.4.7) Installing oauth2 (0.8.1) Installing omniauth-oauth2 (1.1.1) Installing omniauth-github (1.1.0) Installing omniauth-google-oauth2 (0.1.19) Installing omniauth-oauth (1.0.1) Installing omniauth-twitter (0.0.17) Installing rack-protection (1.5.0) Installing raindrops (0.11.0) with native extensions Installing raphael-rails (2.1.2) Installing redcarpet (2.2.2) with native extensions Installing redis (3.0.4) Installing redis-store (1.1.4) Installing redis-rack (1.4.4) Installing redis-actionpack (3.2.4) Installing redis-activesupport (3.2.4) Installing redis-namespace (1.3.1) Installing redis-rails (3.2.4) Installing ref (1.0.5) Installing seed-fu (2.2.0) Installing select2-rails (3.4.2) Installing settingslogic (2.0.9) Installing sidekiq (2.14.0) Installing simple_oauth (0.1.9) Installing sinatra (1.4.3) Installing six (0.2.0) Installing temple (0.6.5) Installing slim (2.0.0) Installing stamp (0.5.0) Installing state_machine (1.2.0) Installing therubyracer (0.11.4) with native extensions Installing twitter-stream (0.1.16) Installing tinder (1.9.2) Installing uglifier (2.1.1) Installing underscore-rails (1.4.4) Installing unicorn (4.6.3) with native extensions Your bundle is complete! It was installed into ./vendor/bundle Post-install message from haml: HEADS UP! Haml 4.0 has many improvements, but also has changes that may break your application: * Support for Ruby 1.8.6 dropped * Support for Rails 2 dropped * Sass filter now always outputs <style> tags * Data attributes are now hyphenated, not underscored * html2haml utility moved to the html2haml gem * Textile and Maruku filters moved to the haml-contrib gem For more info see: http://rubydoc.info/github/haml/haml/file/CHANGELOG.md Post-install message from httparty: When you HTTParty, you must party hard! linux-vuby:~/gitlab>
linux-vuby:~/gitlab> bundle exec rake gitlab:setup RAILS_ENV=production This will create the necessary database tables and seed the database. You will lose any previous data stored in the database. Do you want to continue (yes/no)? yes gitlabhq_production already exists -- create_table("deploy_keys_projects", {:force=>true}) -> 0.2450s -- add_index("deploy_keys_projects", ["project_id"], {:name=>"index_deploy_keys_projects_on_project_id"}) -> 0.1787s -- create_table("events", {:force=>true}) -> 0.1675s -- add_index("events", ["action"], {:name=>"index_events_on_action"}) -> 0.1787s -- add_index("events", ["author_id"], {:name=>"index_events_on_author_id"}) -> 0.1786s -- add_index("events", ["created_at"], {:name=>"index_events_on_created_at"}) -> 0.1677s -- add_index("events", ["project_id"], {:name=>"index_events_on_project_id"}) -> 0.1787s -- add_index("events", ["target_id"], {:name=>"index_events_on_target_id"}) -> 0.1787s -- add_index("events", ["target_type"], {:name=>"index_events_on_target_type"}) -> 0.1787s -- create_table("forked_project_links", {:force=>true}) -> 0.1583s -- add_index("forked_project_links", ["forked_to_project_id"], {:name=>"index_forked_project_links_on_forked_to_project_id", :unique=>true}) -> 0.1898s -- create_table("issues", {:force=>true}) -> 0.1566s -- add_index("issues", ["assignee_id"], {:name=>"index_issues_on_assignee_id"}) -> 0.1786s -- add_index("issues", ["author_id"], {:name=>"index_issues_on_author_id"}) -> 0.1787s -- add_index("issues", ["created_at"], {:name=>"index_issues_on_created_at"}) -> 0.1788s -- add_index("issues", ["milestone_id"], {:name=>"index_issues_on_milestone_id"}) -> 0.3790s -- add_index("issues", ["project_id"], {:name=>"index_issues_on_project_id"}) -> 0.1786s -- add_index("issues", ["title"], {:name=>"index_issues_on_title"}) -> 0.1788s -- create_table("keys", {:force=>true}) -> 0.1806s -- add_index("keys", ["user_id"], {:name=>"index_keys_on_user_id"}) -> 0.2009s -- create_table("merge_requests", {:force=>true}) -> 0.1454s -- add_index("merge_requests", ["assignee_id"], {:name=>"index_merge_requests_on_assignee_id"}) -> 0.1786s -- add_index("merge_requests", ["author_id"], {:name=>"index_merge_requests_on_author_id"}) -> 0.1786s -- add_index("merge_requests", ["created_at"], {:name=>"index_merge_requests_on_created_at"}) -> 0.1788s -- add_index("merge_requests", ["milestone_id"], {:name=>"index_merge_requests_on_milestone_id"}) -> 0.1786s -- add_index("merge_requests", ["source_branch"], {:name=>"index_merge_requests_on_source_branch"}) -> 0.1786s -- add_index("merge_requests", ["source_project_id"], {:name=>"index_merge_requests_on_project_id"}) -> 0.1785s -- add_index("merge_requests", ["target_branch"], {:name=>"index_merge_requests_on_target_branch"}) -> 0.1805s -- add_index("merge_requests", ["title"], {:name=>"index_merge_requests_on_title"}) -> 0.1786s -- create_table("milestones", {:force=>true}) -> 0.1341s -- add_index("milestones", ["due_date"], {:name=>"index_milestones_on_due_date"}) -> 0.1786s -- add_index("milestones", ["project_id"], {:name=>"index_milestones_on_project_id"}) -> 0.1786s -- create_table("namespaces", {:force=>true}) -> 0.1452s -- add_index("namespaces", ["name"], {:name=>"index_namespaces_on_name"}) -> 0.1788s -- add_index("namespaces", ["owner_id"], {:name=>"index_namespaces_on_owner_id"}) -> 0.1675s -- add_index("namespaces", ["path"], {:name=>"index_namespaces_on_path"}) -> 0.1787s -- add_index("namespaces", ["type"], {:name=>"index_namespaces_on_type"}) -> 0.1917s -- create_table("notes", {:force=>true}) -> 0.1342s -- add_index("notes", ["author_id"], {:name=>"index_notes_on_author_id"}) -> 0.1787s -- add_index("notes", ["commit_id"], {:name=>"index_notes_on_commit_id"}) -> 0.1786s -- add_index("notes", ["created_at"], {:name=>"index_notes_on_created_at"}) -> 0.1786s -- add_index("notes", ["noteable_id", "noteable_type"], {:name=>"index_notes_on_noteable_id_and_noteable_type"}) -> 0.1787s -- add_index("notes", ["noteable_type"], {:name=>"index_notes_on_noteable_type"}) -> 0.1896s -- add_index("notes", ["project_id", "noteable_type"], {:name=>"index_notes_on_project_id_and_noteable_type"}) -> 0.1897s -- add_index("notes", ["project_id"], {:name=>"index_notes_on_project_id"}) -> 0.1897s -- create_table("projects", {:force=>true}) -> 0.1453s -- add_index("projects", ["creator_id"], {:name=>"index_projects_on_owner_id"}) -> 0.1805s -- add_index("projects", ["last_activity_at"], {:name=>"index_projects_on_last_activity_at"}) -> 0.1677s -- add_index("projects", ["namespace_id"], {:name=>"index_projects_on_namespace_id"}) -> 0.1675s -- create_table("protected_branches", {:force=>true}) -> 0.1343s -- add_index("protected_branches", ["project_id"], {:name=>"index_protected_branches_on_project_id"}) -> 0.1897s -- create_table("services", {:force=>true}) -> 0.1453s -- add_index("services", ["project_id"], {:name=>"index_services_on_project_id"}) -> 0.2009s -- create_table("snippets", {:force=>true}) -> 0.1452s -- add_index("snippets", ["author_id"], {:name=>"index_snippets_on_author_id"}) -> 0.1788s -- add_index("snippets", ["created_at"], {:name=>"index_snippets_on_created_at"}) -> 0.1695s -- add_index("snippets", ["expires_at"], {:name=>"index_snippets_on_expires_at"}) -> 0.1676s -- add_index("snippets", ["project_id"], {:name=>"index_snippets_on_project_id"}) -> 0.4005s -- create_table("taggings", {:force=>true}) -> 0.3453s -- add_index("taggings", ["tag_id"], {:name=>"index_taggings_on_tag_id"}) -> 0.2454s -- add_index("taggings", ["taggable_id", "taggable_type", "context"], {:name=>"index_taggings_on_taggable_id_and_taggable_type_and_context"}) -> 0.1897s -- create_table("tags", {:force=>true}) -> 0.1453s -- create_table("users", {:force=>true}) -> 0.1450s -- add_index("users", ["admin"], {:name=>"index_users_on_admin"}) -> 0.1787s -- add_index("users", ["authentication_token"], {:name=>"index_users_on_authentication_token", :unique=>true}) -> 0.1915s -- add_index("users", ["email"], {:name=>"index_users_on_email", :unique=>true}) -> 0.1785s -- add_index("users", ["extern_uid", "provider"], {:name=>"index_users_on_extern_uid_and_provider", :unique=>true}) -> 0.1676s -- add_index("users", ["name"], {:name=>"index_users_on_name"}) -> 0.1896s -- add_index("users", ["reset_password_token"], {:name=>"index_users_on_reset_password_token", :unique=>true}) -> 0.2008s -- add_index("users", ["username"], {:name=>"index_users_on_username"}) -> 0.1786s -- create_table("users_groups", {:force=>true}) -> 0.1453s -- add_index("users_groups", ["user_id"], {:name=>"index_users_groups_on_user_id"}) -> 0.1786s -- create_table("users_projects", {:force=>true}) -> 0.1453s -- add_index("users_projects", ["project_access"], {:name=>"index_users_projects_on_project_access"}) -> 0.1787s -- add_index("users_projects", ["project_id"], {:name=>"index_users_projects_on_project_id"}) -> 0.1805s -- add_index("users_projects", ["user_id"], {:name=>"index_users_projects_on_user_id"}) -> 0.1898s -- create_table("web_hooks", {:force=>true}) -> 0.1564s -- add_index("web_hooks", ["project_id"], {:name=>"index_web_hooks_on_project_id"}) -> 0.1897s -- initialize_schema_migrations_table() -> 0.0004s -- assume_migrated_upto_version(20130909132950, ["/home/git/gitlab/db/migrate"]) -> 0.0011s == Seed from /home/git/gitlab/db/fixtures/production/001_admin.rb 2013-09-26T16:04:18Z 27785 TID-619cw INFO: Sidekiq client using redis://localhost:6379 with options {:namespace=>"resque:gitlab"} Administrator account created: login.........admin@local.host password......5iveL!fe linux-vuby:~/gitlab>
linux-vuby:~/gitlab> logout linux-vuby:/ # pwd / linux-vuby:/ # cd /home/git/gitlab linux-vuby:/home/git/gitlab # cp lib/support/init.d/gitlab /etc/init.d/gitlab linux-vuby:/home/git/gitlab # chmod +x /etc/init.d/gitlab linux-vuby:/home/git/gitlab #
linux-vuby:~ # su - git linux-vuby:~> cd gitlab linux-vuby:~/gitlab> sudo -u git -H git config --global user.name "GitLab" linux-vuby:~/gitlab> sudo -u git -H git config --global user.email "gitlab@$localhost.gitlab" linux-vuby:~/gitlab>
linux-vuby:~/gitlab> bundle exec rake gitlab:env:info RAILS_ENV=production System information System: openSUSE project 12.3 Current User: git Using RVM: no Ruby Version: 1.9.3p392 Gem Version: 1.8.23 Bundler Version:1.2.3 Rake Version: 10.1.0 GitLab information Version: 6.1.0 Revision: 82f3446 Directory: /home/git/gitlab DB Adapter: mysql2 URL: http://localhost.gitlab.badzilla.co.uk HTTP Clone URL: http://localhost.gitlab.badzilla.co.uk/some-project.git SSH Clone URL: git@localhost.gitlab.badzilla.co.uk:some-project.git Using LDAP: no Using Omniauth: no GitLab Shell Version: 1.7.1 Repositories: /home/git/repositories/ Hooks: /home/git/gitlab-shell/hooks/ Git: /usr/bin/git linux-vuby:~/gitlab>
linux-vuby:~/gitlab> sudo chown -R git:git /home/git/repositories/ linux-vuby:~/gitlab>
linux-vuby:~/gitlab> sudo -u git -H bundle exec rake sidekiq:start RAILS_ENV=production linux-vuby:~/gitlab>
linux-vuby:~/gitlab> bundle exec rake gitlab:check RAILS_ENV=production Checking Environment ... Git configured for git user? ... yes Has python2? ... yes python2 is supported version? ... yes Checking Environment ... Finished Checking GitLab Shell ... GitLab Shell version >= 1.7.1 ? ... OK (1.7.1) Repo base directory exists? ... yes Repo base directory is a symlink? ... no Repo base owned by git:git? ... yes Repo base access is drwxrws---? ... yes update hook up-to-date? ... yes update hooks in repos are links: ... can't check, you have no projects Checking GitLab Shell ... Finished Checking Sidekiq ... Running? ... yes Checking Sidekiq ... Finished Checking GitLab ... Database config exists? ... yes Database is SQLite ... no All migrations up? ... yes GitLab config exists? ... yes GitLab config outdated? ... no Log directory writable? ... yes Tmp directory writable? ... yes Init script exists? ... yes Init script up-to-date? ... yes projects have namespace: ... can't check, you have no projects Projects have satellites? ... can't check, you have no projects Redis version >= 2.0.0? ... yes Your git bin path is "/usr/bin/git" Git version >= 1.7.10 ? ... yes (1.8.1) Checking GitLab ... Finished linux-vuby:~/gitlab>
linux-vuby:/etc/nginx> logout linux-vuby:~ # mkdir -p /etc/nginx/vhosts.d/ linux-vuby:~ # wget --no-check-certificate https://raw.github.com/gitlabhq/gitlab-recipes/5-0-stable/nginx/gitlab -O /etc/nginx/vhosts.d/gitlab.conf --2013-10-01 11:12:12-- https://raw.github.com/gitlabhq/gitlab-recipes/5-0-stable/nginx/gitlab Resolving raw.github.com (raw.github.com)... 185.31.19.133 Connecting to raw.github.com (raw.github.com)|185.31.19.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1210 (1.2K) [text/plain] Saving to: `/etc/nginx/vhosts.d/gitlab.conf' 100%[================================================================>] 1,210 --.-K/s in 0s 2013-10-01 11:12:12 (95.1 MB/s) - `/etc/nginx/vhosts.d/gitlab.conf' saved [1210/1210] linux-vuby:~ #
listen 127.0.0.1:80 default_server; # e.g., listen 192.168.1.1:80; server_name localhost.gitlab.badzilla.co.uk;
linux-vuby:/etc/nginx/vhosts.d # systemctl enable nginx.service ln -s '/usr/lib/systemd/system/nginx.service' '/etc/systemd/system/multi-user.target.wants/nginx.service' linux-vuby:/etc/nginx/vhosts.d # systemctl start nginx.service linux-vuby:/etc/nginx/vhosts.d #
linux-vuby:/etc/nginx/vhosts.d # chkconfig --add mysql Note: This output shows SysV services only and does not include native systemd services. SysV configuration data might be overridden by native systemd configuration. mysql 0:off 1:off 2:off 3:on 4:off 5:on 6:off linux-vuby:/etc/nginx/vhosts.d # chkconfig --add redis Note: This output shows SysV services only and does not include native systemd services. SysV configuration data might be overridden by native systemd configuration. redis 0:off 1:off 2:off 3:on 4:off 5:on 6:off linux-vuby:/etc/nginx/vhosts.d # chkconfig --add gitlab Note: This output shows SysV services only and does not include native systemd services. SysV configuration data might be overridden by native systemd configuration. gitlab 0:off 1:off 2:on 3:on 4:on 5:on 6:off linux-vuby:/etc/nginx/vhosts.d #
linux-vuby:/etc/nginx/vhosts.d # /etc/init.d/gitlab restart The Unicorn web was not running, doing nothing. Stopping Sidekiq job dispatcher.............Sidekiq shut down gracefully. GitLab is not running. Starting the GitLab Unicorn web server... Starting the GitLab Sidekiq event dispatcher... The GitLab Unicorn webserver with pid 1200 is running. The GitLab Sidekiq job dispatcher with pid 1226 is running. GitLab and all it's components are up and running. linux-vuby:/etc/nginx/vhosts.d # /etc/init.d/nginx restart redirecting to systemctl restart nginx linux-vuby:/etc/nginx/vhosts.d #

You are now ready to try out GitLab. Point your web browser at the web address you've been setting in your configuration and you should see the login screen. Enter the default user and password. You will be immediately prompted to change the password and you will then have to log in again.

Once you've logged back in with your new password, you'll see the Dashboard. Success!
127.0.0.1 localhost 127.0.0.1 localhost.gitlab.badzilla.co.uk 127.0.0.1 localhost.phpMyAdmin 127.0.0.1 localhost.drupal.clean.co.uk 127.0.0.1 localhost.www.drupal.clean.co.uk
linux-vuby:/ # zypper install -y apache2 Loading repository data... Reading installed packages... Resolving package dependencies... The following NEW packages are going to be installed: apache2 apache2-event apache2-utils libapr-util1 libapr1 The following package is recommended, but will not be installed because it's unwanted (was manually removed before): apache2-prefork 5 new packages to install. Overall download size: 1.2 MiB. After the operation, additional 3.4 MiB will be used. Continue? [y/n/?] (y): y Retrieving package libapr1-1.4.6-5.1.1.x86_64 (1/5), 94.3 KiB (222.6 KiB unpacked) Retrieving: libapr1-1.4.6-5.1.1.x86_64.rpm ...........................................[done (145.7 KiB/s)] Retrieving package libapr-util1-1.4.1-6.1.1.x86_64 (2/5), 80.4 KiB (211.3 KiB unpacked) Retrieving: libapr-util1-1.4.1-6.1.1.x86_64.rpm ....................................................[done] Retrieving package apache2-utils-2.2.22-10.8.1.x86_64 (3/5), 97.9 KiB (200.0 KiB unpacked) Retrieving: apache2-utils-2.2.22-10.8.1.x86_64.rpm .................................................[done] Retrieving package apache2-2.2.22-10.8.1.x86_64 (4/5), 651.6 KiB ( 2.1 MiB unpacked) Retrieving: apache2-2.2.22-10.8.1.x86_64.rpm .........................................[done (810.0 KiB/s)] Retrieving package apache2-event-2.2.22-10.8.1.x86_64 (5/5), 259.7 KiB (709.6 KiB unpacked) Retrieving: apache2-event-2.2.22-10.8.1.x86_64.rpm .....................................[done (1.6 MiB/s)] (1/5) Installing: libapr1-1.4.6-5.1.1 ..............................................................[done] (2/5) Installing: libapr-util1-1.4.1-6.1.1 .........................................................[done] (3/5) Installing: apache2-utils-2.2.22-10.8.1 ......................................................[done] (4/5) Installing: apache2-2.2.22-10.8.1 ............................................................[done] Additional rpm output: /usr/sbin/suexec2: cannot verify root:root 0755 - not listed in /etc/permissions Updating /etc/sysconfig/apache2... looking for old 2.0 modules to be renamed... Done. (5/5) Installing: apache2-event-2.2.22-10.8.1 ......................................................[done] linux-vuby:/ #
linux-vuby:/ # zypper install -y phpmyadmin Loading repository data... Reading installed packages... Resolving package dependencies... The following NEW packages are going to be installed: apache2-mod_php5 apache2-prefork php5 php5-bz2 php5-gd php5-iconv php5-mbstring php5-mcrypt php5-mysql php5-pdo php5-zlib phpMyAdmin The following recommended package was automatically selected: php5-iconv The following package is recommended, but will not be installed because it's unwanted (was manually removed before): php5-zip 12 new packages to install. Overall download size: 7.9 MiB. After the operation, additional 44.6 MiB will be used. Continue? [y/n/?] (y): y Retrieving package apache2-prefork-2.2.22-10.8.1.x86_64 (1/12), 251.6 KiB (689.4 KiB unpacked) Retrieving: apache2-prefork-2.2.22-10.8.1.x86_64.rpm .................................[done (727.2 KiB/s)] Retrieving package php5-5.3.17-3.4.1.x86_64 (2/12), 1.2 MiB ( 8.9 MiB unpacked) Retrieving: php5-5.3.17-3.4.1.x86_64.rpm ...............................................[done (1.8 MiB/s)] Retrieving package php5-zlib-5.3.17-3.4.1.x86_64 (3/12), 32.3 KiB ( 39.4 KiB unpacked) Retrieving: php5-zlib-5.3.17-3.4.1.x86_64.rpm ......................................................[done] Retrieving package php5-pdo-5.3.17-3.4.1.x86_64 (4/12), 58.7 KiB (131.6 KiB unpacked) Retrieving: php5-pdo-5.3.17-3.4.1.x86_64.rpm .......................................................[done] Retrieving package php5-mcrypt-5.3.17-3.4.1.x86_64 (5/12), 31.7 KiB ( 47.1 KiB unpacked) Retrieving: php5-mcrypt-5.3.17-3.4.1.x86_64.rpm ....................................................[done] Retrieving package php5-mbstring-5.3.17-3.4.1.x86_64 (6/12), 415.2 KiB ( 2.1 MiB unpacked) Retrieving: php5-mbstring-5.3.17-3.4.1.x86_64.rpm ......................................[done (2.0 MiB/s)] Retrieving package php5-iconv-5.3.17-3.4.1.x86_64 (7/12), 34.3 KiB ( 42.9 KiB unpacked) Retrieving: php5-iconv-5.3.17-3.4.1.x86_64.rpm .....................................................[done] Retrieving package php5-gd-5.3.17-3.4.1.x86_64 (8/12), 113.5 KiB (372.3 KiB unpacked) Retrieving: php5-gd-5.3.17-3.4.1.x86_64.rpm ........................................................[done] Retrieving package php5-bz2-5.3.17-3.4.1.x86_64 (9/12), 28.2 KiB ( 27.3 KiB unpacked) Retrieving: php5-bz2-5.3.17-3.4.1.x86_64.rpm .......................................................[done] Retrieving package apache2-mod_php5-5.3.17-3.4.1.x86_64 (10/12), 1.1 MiB ( 8.4 MiB unpacked) Retrieving: apache2-mod_php5-5.3.17-3.4.1.x86_64.rpm ...................................[done (2.3 MiB/s)] Retrieving package php5-mysql-5.3.17-3.4.1.x86_64 (11/12), 71.2 KiB (203.8 KiB unpacked) Retrieving: php5-mysql-5.3.17-3.4.1.x86_64.rpm .....................................................[done] Retrieving package phpMyAdmin-4.0.5-1.8.1.noarch (12/12), 4.6 MiB ( 23.7 MiB unpacked) Retrieving: phpMyAdmin-4.0.5-1.8.1.noarch.rpm ..........................................[done (2.3 MiB/s)] ( 1/12) Installing: apache2-prefork-2.2.22-10.8.1 ..................................................[done] ( 2/12) Installing: php5-5.3.17-3.4.1 ..............................................................[done] ( 3/12) Installing: php5-zlib-5.3.17-3.4.1 .........................................................[done] ( 4/12) Installing: php5-pdo-5.3.17-3.4.1 ..........................................................[done] ( 5/12) Installing: php5-mcrypt-5.3.17-3.4.1 .......................................................[done] ( 6/12) Installing: php5-mbstring-5.3.17-3.4.1 .....................................................[done] ( 7/12) Installing: php5-iconv-5.3.17-3.4.1 ........................................................[done] ( 8/12) Installing: php5-gd-5.3.17-3.4.1 ...........................................................[done] ( 9/12) Installing: php5-bz2-5.3.17-3.4.1 ..........................................................[done] (10/12) Installing: apache2-mod_php5-5.3.17-3.4.1 ..................................................[done] (11/12) Installing: php5-mysql-5.3.17-3.4.1 ........................................................[done] (12/12) Installing: phpMyAdmin-4.0.5-1.8.1 .........................................................[done] Additional rpm output: redirecting to systemctl try-restart apache2 linux-vuby:/ #
linux-vuby:/ # zypper install -y php5-ctype Loading repository data... Reading installed packages... Resolving package dependencies... The following NEW package is going to be installed: php5-ctype 1 new package to install. Overall download size: 23.3 KiB. After the operation, additional 14.5 KiB will be used. Continue? [y/n/?] (y): y Retrieving package php5-ctype-5.3.17-3.4.1.x86_64 (1/1), 23.3 KiB ( 14.5 KiB unpacked) Retrieving: php5-ctype-5.3.17-3.4.1.x86_64.rpm .....................................................[done] (1/1) Installing: php5-ctype-5.3.17-3.4.1 ..........................................................[done] linux-vuby:/ #
linux-vuby:/ # zypper install -y php5-pear Loading repository data... Reading installed packages... Resolving package dependencies... The following NEW package is going to be installed: php5-pear 1 new package to install. Overall download size: 314.5 KiB. After the operation, additional 2.0 MiB will be used. Continue? [y/n/?] (y): y Retrieving package php5-pear-5.3.17-3.4.1.noarch (1/1), 314.5 KiB ( 2.0 MiB unpacked) Retrieving: php5-pear-5.3.17-3.4.1.noarch.rpm ......................................................[done] (1/1) Installing: php5-pear-5.3.17-3.4.1 ...........................................................linux-vuby:/ # pear channel-discover pear.drush.org Adding Channel "pear.drush.org" succeeded Discovery of channel "pear.drush.org" succeeded linux-vuby:/ # pear install drush/drush downloading drush-6.0.0.tgz ... Starting to download drush-6.0.0.tgz (508,464 bytes) .............done: 508,464 bytes install ok: channel://pear.drush.org/drush-6.0.0 linux-vuby:/ #
linux-vuby:/ # zypper install -y php5-curl php5-json php5-soap php5-dom Loading repository data... Reading installed packages... Resolving package dependencies... The following NEW packages are going to be installed: php5-curl php5-json php5-soap 4 newpackages to install. Overall download size: 218.4 KiB. After the operation, additional 470.5 KiB will be used. Continue? [y/n/?] (y): y Retrieving package php5-curl-5.3.17-3.4.1.x86_64 (1/3), 41.9 KiB ( 71.5 KiB unpacked) Retrieving: php5-curl-5.3.17-3.4.1.x86_64.rpm ......................................................[done] Retrieving package php5-json-5.3.17-3.4.1.x86_64 (2/3), 32.0 KiB ( 34.7 KiB unpacked) Retrieving: php5-json-5.3.17-3.4.1.x86_64.rpm ......................................................[done] Retrieving package php5-soap-5.3.17-3.4.1.x86_64 (3/3), 144.5 KiB (364.3 KiB unpacked) Retrieving: php5-soap-5.3.17-3.4.1.x86_64.rpm ......................................................[done] Retrieving package php5-dom-5.3.17-3.4.1.x86_64 (1/1), 68.0 KiB (180.3 KiB unpacked) Retrieving: php5-dom-5.3.17-3.4.1.x86_64.rpm .......................................................[done] (1/4) Installing: php5-curl-5.3.17-3.4.1 ...........................................................[done] (2/4) Installing: php5-json-5.3.17-3.4.1 ...........................................................[done] (3/4) Installing: php5-soap-5.3.17-3.4.1 ...........................................................[done] (4/4) Installing: php5-dom-5.3.17-3.4.1 ............................................................[done] linux-vuby:/ #
linux-vuby:/ # mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 29 Server version: 5.5.32 openSUSE package Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> CREATE DATABASE drupal_clean; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON drupal_clean.* TO 'gitlab'@'localhost' WITH GRANT OPTION; Query OK, 0 rows affected (0.00 sec) mysql> quit Bye linux-vuby:/ #
linux-vuby:/ # cd /srv/www/htdocs/ linux-vuby:/srv/www/htdocs # drush dl drupal Project drupal (7.23) downloaded to /srv/www/htdocs/drupal-7.23. [success] Project drupal contains: [success] - 3 profiles: minimal, testing, standard - 4 themes: garland, bartik, seven, stark - 47 modules: drupal_system_listing_incompatible_test, drupal_system_listing_compatible_test, path, statistics, taxonomy, forum, update, shortcut, toolbar, contact, blog, field_ui, dblog, overlay, simpletest, menu, aggregator, color, rdf, user, comment, options, text, number, list, field_sql_storage, field, php, system, block, book, image, trigger, file, locale, tracker, poll, node, search, help, contextual, profile, dashboard, translation, syslog, openid, filter linux-vuby:/srv/www/htdocs # mv drupal-7.23 drupal-clean linux-vuby:/srv/www/htdocs # cd drupal-clean linux-vuby:/srv/www/htdocs/drupal-clean #
linux-vuby:/srv/www/htdocs/drupal-clean # drush site-install standard --account-name=admin --account-pass=admin --db-url=mysql://gitlab:gitlab@127.0.0.1/drupal_clean You are about to DROP all tables in your 'drupal_clean' database. Do you want to continue? (y/n): y No tables to drop. [ok] Starting Drupal installation. This takes a few seconds ... [ok] Installation complete. User name: admin User password: admin [ok] linux-vuby:/srv/www/htdocs/drupal-clean #
linux-vuby:/srv/www/htdocs/drupal-clean # cd .. linux-vuby:/srv/www/htdocs # chown -R wwwrun:www * linux-vuby:/srv/www/htdocs # chmod -R g+w * linux-vuby:/srv/www/htdocs #
/etc/apache2/httpd.conf.local
NameVirtualHost *:8050 Listen 8050 <VirtualHost *:8050> DocumentRoot "/srv/www/htdocs/drupal-clean" ServerName localhost.www.drupal.clean.co.uk ServerAlias localhost.drupal.clean.co.uk RewriteEngine On RewriteOptions Inherit </VirtualHost> <Directory /srv/www/htdocs/drupal-clean> Options -Indexes +FollowSymLinks AllowOverride All Order allow,deny allow from all </Directory> <VirtualHost *:8050> DocumentRoot "/srv/www/htdocs/phpMyAdmin" ServerName localhost.phpMyAdmin RewriteEngine On RewriteOptions Inherit </VirtualHost> <Directory /srv/www/htdocs/phpMyAdmin> Options -Indexes +FollowSymLinks AllowOverride All Order allow,deny allow from all </Directory>
APACHE_CONF_INCLUDE_FILES="/etc/apache2/httpd.conf.local"
/etc/sysconfig/apache2
APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile authz_default authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl userdir reqtimeout rewrite passenger php5"
/etc/apache2/listen.conf
#Listen 80
linux-vuby:/etc/apache2 # /etc/init.d/apache2 start redirecting to systemctl start apache2 linux-vuby:/etc/apache2 # ps -ef | grep apach root 3701 1 0 17:16 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start wwwrun 3702 3701 0 17:16 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start wwwrun 3704 3701 0 17:16 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start wwwrun 3705 3701 0 17:16 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start wwwrun 3707 3701 0 17:16 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start wwwrun 3708 3701 0 17:16 ? 00:00:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -k start root 3710 27868 0 17:17 pts/1 00:00:00 grep --color=auto apach linux-vuby:/etc/apache2 #
/etc/nginx/vhosts.d/apache-php.conf
server { listen 80; server_name localhost.drupal.clean.co.uk localhost.www.drupal.clean.co.uk localhost.phpMyAdmin; location / { proxy_pass http://127.0.0.1:8050; } proxy_set_header Host $host; }
/etc/nginx/vhosts.d/gitlab.conf
#listen 127.0.0.1:80 default_server; # e.g., listen 192.168.1.1:80;
linux-vuby:/etc/nginx/vhosts.d # /etc/init.d/nginx restart redirecting to systemctl restart nginx linux-vuby:/etc/nginx/vhosts.d #

By opening a browser and pointing to one of your test domains you should see that Nginx has passed on the request to Apache. Here's my phpMyAdmin login screen

Now I check my other domain and lo and behold, the Drupal site installation screen appears.