Skip to main content

Install, config GitLab on Ubuntu 16.04

http://blog.cloud66.com/installing-gitlab-ubuntu/
https://stackoverflow.com/questions/31762841/how-to-serve-other-vhosts-next-to-gitlab-omnibus-server-full-step-by-step-solu

GitLab like Redmine use ruby source code. So to run with nginx we need phusion passenger.

Run gitlab alongside with many another web (PHP, NodeJS).

We need install git, ruby, recompile nginx with phusion passenger. Nginx do not load runtime lib like .so or binary. Install nodejs.

Access database (PostgreSQL)sudo -u gitlab-psql /opt/gitlab/embedded/bin/psql -h /var/opt/gitlab/postgresql/ gitlabhq_production
Here about 100 tables for gitlab. So long from the last time I use postgres :(.

gitlabhq_production=# \dt
                         List of relations
 Schema |                   Name                   | Type  | Owner  
--------+------------------------------------------+-------+--------
 public | abuse_reports                            | table | gitlab
 public | appearances                              | table | gitlab
 public | application_settings                     | table | gitlab
 public | audit_events                             | table | gitlab
 public | award_emoji                              | table | gitlab
 public | boards                                   | table | gitlab
 public | broadcast_messages                       | table | gitlab
 public | chat_names                               | table | gitlab
 public | chat_teams                               | table | gitlab
 public | ci_builds                                | table | gitlab
 public | ci_group_variables                       | table | gitlab
 public | ci_pipeline_schedule_variables           | table | gitlab
 public | ci_pipeline_schedules                    | table | gitlab
 public | ci_pipeline_variables                    | table | gitlab
 public | ci_pipelines                             | table | gitlab
 public | ci_runner_projects                       | table | gitlab
 public | ci_runners                               | table | gitlab
 public | ci_stages                                | table | gitlab
 public | ci_trigger_requests                      | table | gitlab
 public | ci_triggers                              | table | gitlab
 public | ci_variables                             | table | gitlab
 public | container_repositories                   | table | gitlab
 public | conversational_development_index_metrics | table | gitlab
 public | deploy_keys_projects                     | table | gitlab
 public | deployments                              | table | gitlab
 public | emails                                   | table | gitlab
 public | environments                             | table | gitlab
 public | events                                   | table | gitlab
 public | feature_gates                            | table | gitlab
 public | features                                 | table | gitlab
 public | forked_project_links                     | table | gitlab
 public | gpg_keys                                 | table | gitlab
 public | gpg_signatures                           | table | gitlab
 public | identities                               | table | gitlab
 public | issue_assignees                          | table | gitlab
 public | issue_metrics                            | table | gitlab
 public | issues                                   | table | gitlab
 public | keys                                     | table | gitlab
 public | label_links                              | table | gitlab
 public | label_priorities                         | table | gitlab
 public | labels                                   | table | gitlab
 public | lfs_objects                              | table | gitlab
 public | lfs_objects_projects                     | table | gitlab
 public | lists                                    | table | gitlab
 public | members                                  | table | gitlab
 public | merge_request_diff_commits               | table | gitlab
 public | merge_request_diff_files                 | table | gitlab
 public | merge_request_diffs                      | table | gitlab
 public | merge_request_metrics                    | table | gitlab
 public | merge_requests                           | table | gitlab
 public | merge_requests_closing_issues            | table | gitlab
 public | milestones                               | table | gitlab
 public | namespaces                               | table | gitlab
 public | notes                                    | table | gitlab
 public | notification_settings                    | table | gitlab
 public | oauth_access_grants                      | table | gitlab
 public | oauth_access_tokens                      | table | gitlab
 public | oauth_applications                       | table | gitlab
 public | oauth_openid_requests                    | table | gitlab
 public | pages_domains                            | table | gitlab
 public | personal_access_tokens                   | table | gitlab
 public | project_authorizations                   | table | gitlab
 public | project_auto_devops                      | table | gitlab
 public | project_features                         | table | gitlab
 public | project_group_links                      | table | gitlab
 public | project_import_data                      | table | gitlab
 public | project_statistics                       | table | gitlab
 public | projects                                 | table | gitlab
 public | protected_branch_merge_access_levels     | table | gitlab
 public | protected_branch_push_access_levels      | table | gitlab
 public | protected_branches                       | table | gitlab
 public | protected_tag_create_access_levels       | table | gitlab
 public | protected_tags                           | table | gitlab
 public | push_event_payloads                      | table | gitlab
 public | redirect_routes                          | table | gitlab
 public | releases                                 | table | gitlab
 public | routes                                   | table | gitlab
 public | schema_migrations                        | table | gitlab
 public | sent_notifications                       | table | gitlab
 public | services                                 | table | gitlab
 public | snippets                                 | table | gitlab
 public | spam_logs                                | table | gitlab
 public | subscriptions                            | table | gitlab
 public | system_note_metadata                     | table | gitlab
 public | taggings                                 | table | gitlab
 public | tags                                     | table | gitlab
 public | timelogs                                 | table | gitlab
 public | todos                                    | table | gitlab
 public | trending_projects                        | table | gitlab
 public | u2f_registrations                        | table | gitlab
 public | uploads                                  | table | gitlab
 public | user_agent_details                       | table | gitlab
 public | user_synced_attributes_metadata          | table | gitlab
 public | users                                    | table | gitlab
 public | users_star_projects                      | table | gitlab
 public | web_hook_logs                            | table | gitlab
 public | web_hooks                                | table | gitlab
(97 rows)

https://docs.gitlab.com/ce/administration/reply_by_email_postfix_setup.html
http://cybart.com/how-to-install-and-configure-postfix-on-amazon-ec2/

https://about.gitlab.com/2016/02/25/making-gitlab-faster/

https://www.bonusbits.com/wiki/HowTo:Setup_HTTPS_for_Gitlab=


                    Column                    |            Type             |
----------------------------------------------+-----------------------------+
 id                                           | integer                     |
 email                                        | character varying           |
 encrypted_password                           | character varying           |
 reset_password_token                         | character varying           |
 reset_password_sent_at                       | timestamp without time zone |
 remember_created_at                          | timestamp without time zone |
 sign_in_count                                | integer                     |
 current_sign_in_at                           | timestamp without time zone |
 last_sign_in_at                              | timestamp without time zone |
 current_sign_in_ip                           | character varying           |
 last_sign_in_ip                              | character varying           |
 created_at                                   | timestamp without time zone |
 updated_at                                   | timestamp without time zone |
 name                                         | character varying           |
 admin                                        | boolean                     |
 projects_limit                               | integer                     |
 skype                                        | character varying           |
 linkedin                                     | character varying           |
 twitter                                      | character varying           |
 authentication_token                         | character varying           |
 bio                                          | character varying           |
 failed_attempts                              | integer                     |
 locked_at                                    | timestamp without time zone |
 username                                     | character varying           |
 can_create_group                             | boolean                     |
 can_create_team                              | boolean                     |
 state                                        | character varying           |
 color_scheme_id                              | integer                     |
 password_expires_at                          | timestamp without time zone |
 created_by_id                                | integer                     |
 last_credential_check_at                     | timestamp without time zone |
 avatar                                       | character varying           |
 confirmation_token                           | character varying           |
 confirmed_at                                 | timestamp without time zone |
 confirmation_sent_at                         | timestamp without time zone |
 unconfirmed_email                            | character varying           |
 hide_no_ssh_key                              | boolean                     |
 website_url                                  | character varying           |
 notification_email                           | character varying           |
 hide_no_password                             | boolean                     |
 password_automatically_set                   | boolean                     |
 location                                     | character varying           |
 encrypted_otp_secret                         | character varying           |
 encrypted_otp_secret_iv                      | character varying           |
 encrypted_otp_secret_salt                    | character varying           |
 otp_required_for_login                       | boolean                     |
 otp_backup_codes                             | text                        |
 public_email                                 | character varying           |
 dashboard                                    | integer                     |
 project_view                                 | integer                     |
 consumed_timestep                            | integer                     |
 layout                                       | integer                     |
 hide_project_limit                           | boolean                     |
 unlock_token                                 | character varying           |
 otp_grace_period_started_at                  | timestamp without time zone |
 external                                     | boolean                     |
 incoming_email_token                         | character varying           |
 organization                                 | character varying           |
 require_two_factor_authentication_from_group | boolean                     |
 two_factor_grace_period                      | integer                     |
 ghost                                        | boolean                     |
 last_activity_on                             | date                        |
 notified_of_own_activity                     | boolean                     |
 preferred_language                           | character varying           |
 rss_token                                    | character varying           |
 theme_id                                     | smallint                    |

Indexes:
    "users_pkey" PRIMARY KEY, btree (id)
    "index_users_on_authentication_token" UNIQUE, btree (authentication_token)
    "index_users_on_confirmation_token" UNIQUE, btree (confirmation_token)
    "index_users_on_email" UNIQUE, btree (email)
    "index_users_on_reset_password_token" UNIQUE, btree (reset_password_token)
    "index_users_on_admin" btree (admin)
    "index_users_on_created_at" btree (created_at)
    "index_users_on_email_trigram" gin (email gin_trgm_ops)
    "index_users_on_ghost" btree (ghost)
    "index_users_on_incoming_email_token" btree (incoming_email_token)
    "index_users_on_name" btree (name)
    "index_users_on_name_trigram" gin (name gin_trgm_ops)
    "index_users_on_rss_token" btree (rss_token)
    "index_users_on_state" btree (state)
    "index_users_on_username" btree (username)
    "index_users_on_username_trigram" gin (username gin_trgm_ops)
Referenced by:
    TABLE "issues" CONSTRAINT "fk_05f1e72feb" FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE SET NULL
    TABLE "issue_assignees" CONSTRAINT "fk_5e0c8d9154" FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
    TABLE "ci_pipeline_schedules" CONSTRAINT "fk_9ea99f58d2" FOREIGN KEY (owner_id) REFERENCES users(id) ON DELETE SET NULL
    TABLE "ci_triggers" CONSTRAINT "fk_e8e10d1964" FOREIGN KEY (owner_id) REFERENCES users(id) ON DELETE CASCADE
    TABLE "events" CONSTRAINT "fk_edfd187b6f" FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE CASCADE
    TABLE "personal_access_tokens" CONSTRAINT "fk_rails_08903b8f38" FOREIGN KEY (user_id) REFERENCES users(id)
    TABLE "user_synced_attributes_metadata" CONSTRAINT "fk_rails_0f4aa0981f" FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
    TABLE "project_authorizations" CONSTRAINT "fk_rails_11e7aa3ed9" FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
    TABLE "protected_tag_create_access_levels" CONSTRAINT "fk_rails_2349b78b91" FOREIGN KEY (user_id) REFERENCES users(id)
    TABLE "gpg_keys" CONSTRAINT "fk_rails_9d1f5d8719" FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE

    TABLE "u2f_registrations" CONSTRAINT "fk_rails_bfe6a84544" FOREIGN KEY (user_id) REFERENCES users(id)


sudo -u gitlab-psql /opt/gitlab/embedded/bin/psql -h /var/opt/gitlab/postgresql/ gitlabhq_production

\dt
\d+ users

Comments

Popular posts from this blog

AWS Elasticache Memcached connection

https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/accessing-elasticache.html#access-from-outside-aws http://hourlyapps.blogspot.com/2010/06/examples-of-memcached-commands.html Access memcached https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/GettingStarted.AuthorizeAccess.html Zip include hidden file https://stackoverflow.com/questions/12493206/zip-including-hidden-files phpmemcachedadmin ~ phpMyAdmin or phpPgAdmin ... telnet mycachecluster.eaogs8.0001.usw2.cache.amazonaws.com 11211 stats items stats cachedump 27 100 https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/VPCs.EC.html https://lzone.de/cheat-sheet/memcached VPC ID Security Group ID (sg-...) Cluster: The identifier for the cluster memcached1 Creation Time: The time (UTC) when the cluster was created January 9, 2019 at 11:47:16 AM UTC+7 Configuration Endpoint: The configuration endpoint of the cluster memcached1.ahgofe.cfg.usw1.cache.amazonaws.com:11211 St...

Notes Windows 10 Virtualbox config, PHP Storm Japanese, custom PHP, Apache build, Postgresql

 cmd => Ctrl + Shift + Enter mklink "C:\Users\HauNT\Videos\host3" "C:\Windows\System32\drivers\etc\hosts" https://www.quora.com/How-to-create-a-router-in-php https://serverfault.com/questions/225155/virtualbox-how-to-set-up-networking-so-both-host-and-guest-can-access-internet 1 NAT + 1 host only config https://unix.stackexchange.com/questions/115464/how-to-properly-set-up-2-network-interfaces-in-centos-running-in-virtualbox DEVICE=eth0 TYPE=Ethernet #BOOTPROTO=dhcp BOOTPROTO=none #IPADDR=10.9.11.246 #PREFIX=24 #GATEWAY=10.9.11.1 #IPV4_FAILURE_FATAL=yes #HWADDR=08:00:27:CC:AC:AC ONBOOT=yes NAME="System eth0" [root@localhost www]# cat /etc/sysconfig/network-scripts/ifcfg-eth1 # Advanced Micro Devices, Inc. [AMD] 79c970 [PCnet32 LANCE] DEVICE=eth1 IPADDR=192.168.56.28 <= no eff => auto like DHCP #GATEWAY=192.168.56.1 #BOOTPROTO=dhcp BOOTPROTO=static <= no eff ONBOOT=yes HWADDR=08:00:27:b4:20:10 [root@localhost www]# ...

Rocket.Chat DB schema

_raix_push_notifications avatars.chunks avatars.files instances meteor_accounts_loginServiceConfiguration meteor_oauth_pendingCredentials meteor_oauth_pendingRequestTokens migrations rocketchat__trash rocketchat_cron_history rocketchat_custom_emoji rocketchat_custom_sounds rocketchat_import rocketchat_integration_history rocketchat_integrations rocketchat_livechat_custom_field rocketchat_livechat_department rocketchat_livechat_department_agents rocketchat_livechat_external_message rocketchat_livechat_inquiry rocketchat_livechat_office_hour rocketchat_livechat_page_visited rocketchat_livechat_trigger rocketchat_message rocketchat_oauth_apps rocketchat_oembed_cache rocketchat_permissions rocketchat_raw_imports rocketchat_reports rocketchat_roles rocketchat_room rocketchat_settings rocketchat_smarsh_history rocketchat_statistics rocketchat_subscription rocketchat_uploads system.indexes users usersSessions https://rocket.chat/docs/developer-guides/sc...