安装gitlab,简单总结一下:
总结了两个script,下载gitlab_install_01.sh & gitlab_install_02.sh (下载)
执行:
$ sudo chmod +x gitlab_install_01.sh $ sudo chmod +x gitlab_install_02.sh $ ./gitlab_install_01.sh # Install the database packages $ sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev # Login to MySQL $ mysql -u root -p # Create a user for GitLab. (change $password to a real password) mysql> CREATE USER 'gitlab'@'localhost' IDENTIFIED BY '$password';注意修改密码 # Create the GitLab production database mysql> CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`; # Grant the GitLab user necessary permissopns on the table. mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlabhq_production`.* TO 'gitlab'@'localhost'; # Quit the database session mysql> \q # Try connecting to the new database with the new user $ sudo -u gitlab -H mysql -u gitlab -p -D gitlabhq_production $ ./gitlab_install_02.sh
会提示修改gitlab.yml
修改host和ssh_host
会提示修改database.yml
修改database连接密码
会提示修改/etc/nginx/sites-enabled/gitlab
修改YOUR_SERVER_IP为上面的host的ip
浏览器输入:http://your ip address
用户名和密码:
admin@local.host
5iveL!fe
这样安装就比较简单了。至于其他的配置,自己在摸索摸索了。