In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Preface
The original project was placed on the gitlab of the public network, for security considerations, to build a set in the internal network, with a graphical interface, which can be imported directly from the external network git. I feel it is very convenient to use it. Record the installation process. Refer to the official website: https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/install/centos can directly move there to see.
Basic environment installation (git\ redis\ ruby\ mysql...)
Yum-y groupinstall 'Development Tools'yum-y install readline readline-devel ncurses-devel gdbm-devel glibc-devel tcl-devel openssl-devel curl-devel expat-devel db4-devel byacc sqlite-devel libyaml libyaml-devel libffi libffi-devel libxml2 libxml2-devel libxslt libxslt-devel libicu libicu-devel system-config-firewall-tui redis sudo wget crontabs logwatch logrotate perl-Time-HiRes git cmake libcom_err-devel.i686 libcom_err-devel.x86_64 nodejsyum-y install python-docutilsyum-y install postfixgit-- version # installation is higher than 2 .7.4 git version yum-y remove gityum install zlib-devel perl-CPAN gettext curl-devel expat-devel gettext-devel openssl-develmkdir / tmp/git & & cd / tmp/gitcurl-- progress https://www.kernel.org/pub/software/scm/git/git-2.9.0.tar.gz | tar xzcd git-2.9.0./configuremakemake prefix=/usr/local installyum remove ruby # installs ruby higher than version 2.1 Delete the old mkdir / tmp/ruby & & cd / tmp/rubycurl-- progress https://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.9.tar.gz | tar xzcd ruby-2.1.9./configure-- disable-install-rdocmakemake prefix=/usr/local installgem install bundler-- no-docyum install redis mysql/Data/apps/mysql/bin/mysqld_safe & / Data/apps/mysql/bin/mysql-urootmysql > CREATE DATABASE IF NOT EXISTS `gitlabhq_ production`DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ ci` Mysql > grant all on gitlabhq_production.* to 'git'@'localhost' identified by' git'
Configure redis
Vim / etc/redis.conf
Unixsocket / var/run/redis/redis.sockunixsocketperm 0770mkdir-p / var/run/redischown redis:redis / var/run/redischmod 755 / var/run/redis/etc/init.d/redis startusermod-aG redis git
Configure gitlab correlation
# download git, using domestic sources. Foreign cd / home/gitsudo-u git-H git clone http://git.oschina.net/qiai365/gitlab-ce gitlabcd / home/git/gitlabsudo-u git-H cp config/gitlab.yml.example config/gitlab.ymlsudo-u git-H editor config/gitlab.yml# is modified to its own host host: iaasgit1.prod.bj1sudo-u git-H cp config/secrets.yml.example config/secrets.ymlsudo-u git-H chmod 0600 config/secrets.ymlsudo chown-R git log / sudo chown-R git tmp/sudo chmod-R u+rwX Go-w log/sudo chmod-R u+rwX tmp/sudo chmod-R u+rwX tmp/pids/sudo chmod-R u+rwX tmp/sockets/sudo-u git-H mkdir public/uploads/sudo chmod 0700 public/uploadssudo chmod ug+rwX O-rwx / home/git/repositories/sudo chmod-R u+rwX builds/sudo chmod-R u+rwX shared/artifacts/sudo-u git-H cp config/unicorn.rb.example config/unicorn.rbnprocsudo-u git-H editor config/unicorn.rbsudo-u git-H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rbsudo-u git-H git config-- global core.autocrlf inputsudo-u git-H git config-global gc.auto 0sudo-u git-H cp config/resque. Yml.example config/resque.ymlsudo-u git-H editor config/resque.yml
Configure db partial only for mysql
Sudo-u git cp config/database.yml.mysql config/database.ymlsudo-u git-H editor config/database.yml # configure password in the production section: "password" sudo-u git-H chmod o-rwx config/database.yml
Install gitlab related, and start
# install gemscd / home/git/gitlabsudo-u git-H bundle install-- deployment-- without development test postgres aws kerberos# install gitlab shellsudo-u git-H bundle exec rake gitlab:shell:install [v3.3.3] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=productionsudo-u git-H editor / home/git/gitlab-shell/config.yml# install gitlab-workhorsecd / home/gitsudo-u git-H git clone https://gitlab.com/gitlab-org/gitlab-workhorse.gitcd gitlab -workhorsesudo-u git-H git checkout v0.7.5sudo-u git-H make# Initialize Database and Activate Advanced Featurescd / home/git/gitlabsudo-u git-H bundle exec rake gitlab:setup RAILS_ENV=productionsudo-u git-H bundle exec rake gitlab:setup RAILS_ENV=production GITLAB_ROOT_PASSWORD=yourpassword GITLAB_ROOT_EMAIL=youremailcp lib/support/init.d/gitlab / etc/init.d/gitlabcp lib/support/init.d/gitlab.default.example / etc/default/gitlabchkconfig gitlab oncp lib/support/logrotate/gitlab / etc/logrotate .d / gitlabsudo-u git-H bundle exec rake gitlab:env:info RAILS_ENV=productionsudo-u git-H bundle exec rake assets:precompile RAILS_ENV=productionservice gitlab start
Configure nginx
Yum install nginxcp lib/support/nginx/gitlab / Data/apps/nginx/conf/include/gitlab.confusermod-a-G git nginxchmod g+rx / home/git//Data/apps/nginx/conf/include/gitlab.conf # configure server_name in this configuration
Finally, check.
Cd / home/git/gitlabsudo-u git-H bundle exec rake gitlab:check RAILS_ENV=production# starts gitlab/etc/init.d/gitlab restart# and directly opens the url corresponding to server_name, and finds that all the styles are gone. Execute sudo-u git-H bundle exec rake assets:clean assets:precompile REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production.
Finally, let's explain.
This is just a current account, which may involve permissions and other issues, in order to make sure that nginx\ git has permissions between each other, and use check script for check, tips are very friendly, generally can be done, I wish you success.
Because the yum used in the middle is to rewrite the packaged rpm, the path is different from the default. If you use the default, you can change it according to your own situation, or refer directly to the official website, which is a castrated version of the official website according to your own environment.
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.