[root@localhost download]# ./bitnami-gitlab-7.13.0-0-linux-x64-installer.run
----------------------------------------------------------------------------
Welcome to the Bitnami Gitlab Stack Setup Wizard.
----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want
to install. Click Next when you are ready to continue.
Password :
Please confirm your password :
----------------------------------------------------------------------------
Web Server Port
Please enter the port that the bundled Apache Server will listen to by default.
Apache Web Server Port [80]:
----------------------------------------------------------------------------
Hostname that will be used to create internal URLs. If this value is incorrect,
you may be unable to access your Gitlab installation from other computers. It is
advisable to use a Domain instead of an IP address for compatibility with
different browsers.
Domain [127.0.0.1]:
Do you want to configure mail support? [y/N]: N
----------------------------------------------------------------------------
Setup is now ready to begin installing Bitnami Gitlab Stack on your computer.
Do you want to continue? [Y/n]: Y
----------------------------------------------------------------------------
Please wait while Setup installs Bitnami Gitlab Stack on your computer.
(4)
基本的資料庫操作,就是使用一般的SQL語言。
# 建立新表?
CREATE TABLE user_tbl(name VARCHAR(20), signup_date DATE);
# 插入資料?
INSERT INTO user_tbl(name, signup_date) VALUES('張三', '2013-12-22');
# 選擇記錄?
SELECT * FROM user_tbl;
# 更新資料?
UPDATE user_tbl set name = '李四' WHERE name = '張三';
# 刪除記錄?
DELETE FROM user_tbl WHERE name = '李四' ;
# 添加欄位?
ALTER TABLE user_tbl ADD email VARCHAR(40);
# 更新結構?
ALTER TABLE user_tbl ALTER COLUMN signup_date SET NOT NULL;
# 更名欄位?
ALTER TABLE user_tbl RENAME COLUMN signup_date TO signup;
# 刪除欄位?
ALTER TABLE user_tbl DROP COLUMN email;
# 表格更名?
ALTER TABLE user_tbl RENAME TO backup_tbl;
# 刪除表格?
DROP TABLE IF EXISTS backup_tbl;
(2) 日常備份
1.設定備份目錄:
vim /home/gitlab/apps/gitlab/htdocs/config/gitlab.yml
在backup 模組裡面添加備份的目錄
backup:
path: "/tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/)