页面“Awesome”与“Gitlab社区版安装和配置”之间的差异

来自linux中国网wiki
(页面间的差异)
跳到导航 跳到搜索
 
 
第1行: 第1行:
==平铺式窗口管理器 == 
 
什么是平铺式窗口管理器?简单来说,所谓的平铺就是之所有的窗口都不会相互重叠,而是自动的被调整大小使得它们能够刚好占满整个屏幕。这和传统的桌面环境的概念相差很大,也许你会疑问这样的环境下如何工作?
 
事实上对于Linux这种需要大量使用命令行的操作系统来说平铺式窗口管理在很多情况下能够极大的提升你的工作效率。举个例子,很多时候你都需要打开好几个shell。在gnome底下这就意味着好几个会相互遮挡命令行窗口,大多数时候如果你想要同时看到这些窗口上面的内容就得费神费力的调整它们的位置和大小。而在平铺式窗口下面你完全不需要为这些事情烦心。
 
另外一个可能会促使你使用平铺的理由就是,用它来调整、切换窗口几乎可以不使用鼠标。
 
  
使用原因 xmonads 坏了 ,于是
+
== usage ==
  
==安装==
+
[https://support.websoft9.com/docs/gitlab/zh/ GitLab 管理员手册]
<pre>
 
sudo apt update
 
sudo apt-get install awesome  awesome-extra feh xcompmgr xscreensaver lxrandr
 
git clone https://github.com/evan886/awesome.git  ~/.config/awesome
 
#git clone https://github.com/alswl/awesome.git  ~/.config
 
cd awesome/
 
#cp _autostart.sh autostart.sh
 
  
 +
[https://www.geek-share.com/detail/2802046213.html  GitLab如何删除已有项目 ]
  
#特别配置
+
[https://blog.csdn.net/xyzchenxiaolin/article/details/51852333 为GitLab帐号添加SSH keys并连接GitLab]
  head -n 57 rc.lua #因为 它启动有点不太妥
 
terminal = "terminator -u"
 
  
 +
[https://www.cnblogs.com/huyuchengus/p/12359858.html#:~:text=GitLab%20%E5%A6%82%E4%BD%95%E4%BF%AE%E6%94%B9%E9%A1%B9%E7%9B%AE%E4%BB%8E%E7%A7%81%E6%9C%89%E5%88%B0%E5%85%AC%E6%9C%89%20%E5%9C%A8%20UI%20%E7%95%8C%E9%9D%A2%E4%B8%AD%EF%BC%8C%E9%80%89%E6%8B%A9%20Settings%20%3E%20General%E3%80%82,%E6%8C%89%E9%92%AE%E3%80%82%20%E7%84%B6%E5%90%8E%E5%9C%A8%E5%BC%B9%E5%87%BA%E7%9A%84%E7%95%8C%E9%9D%A2%E4%B8%AD%EF%BC%8C%E5%B0%86%20Project%20Visibility%20%E4%B8%8B%E9%9D%A2%E4%BB%8E%20Private%20%E9%80%89%E6%8B%A9%E4%B8%BA%20Public%E3%80%82 GitLab 如何修改项目从私有到公有]
  
##add to ~/.config/awesome/rc.lua
+
[https://blog.51cto.com/u_13760351/2526052  本地java代码上传Gitlab仓库]
  
配置自动启程序 记住 很多在这里自启动的 2019年 01月 03日
+
==第零 docker-compose for gitlab  ==
使用awesome之后之前设置的自动启动就会失效,因为Awesome启动是通过配置文件控制的,在配置文件(~/.config/awesome/rc.lua)加上如下内容可以配置自启动程序:
+
<pre>
  
autorun = true
 
autorunApps =
 
{
 
    "nm-applet &",
 
    "kupfer --no-splash"
 
--    "fcitx",
 
--    "dbus-launch gnome-do",
 
--    "synapse -s &",
 
--    "/opt/qq2012/wineapp/qq/qq.sh",
 
--    "dbus-launch gnome-do",
 
  
 +
2020 直接 docker-compose 其实可以上 alpine的  不过官方的没有 
 +
用ng upstream 到 80 or 443
  
}
+
cat docker-compose.yml
  
if autorun then
 
    for app = 1, #autorunApps do
 
        awful.util.spawn_with_shell(autorunApps[app])
 
    end
 
end
 
  
--在autorunApps中添加要自动启动程序的命令即可在登录时启动相应的程序
+
web:
 +
  image: 'gitlab/gitlab-ce:14.0.0-ce.0'
 +
  #image: 'gitlab/gitlab-ce:11.4.3'
 +
  #image: 'gitlab/gitlab-ce:latest' 
 +
  restart: always
 +
  hostname: 'mygitlab.com'
 +
  environment:
 +
    GITLAB_OMNIBUS_CONFIG: |
 +
      external_url 'http://gitlab.lliao.net'
 +
      #external_url 'https://mygitlab.com'
 +
      # Add any other gitlab.rb configuration here, each on its own line
 +
  ports:
 +
    - '7080:80'
 +
    - '4433:443'
 +
    - '2222:22'
 +
  volumes:
 +
    - ./gitlab/config:/etc/gitlab
 +
    - ./gitlab/logs:/var/log/gitlab
 +
    - ./gitlab/data:/var/opt/gitlab
  
  
  
 +
这个首次登录密码重置为什么没了 june 2021 version gitlab14
 +
Browse to the hostname and login
  
 +
On your first visit, you'll be redirected to a password reset screen. Provide the password for the initial administrator account and you will be redirected back to the login screen. Use the default account's username root to login.
  
# 托盘 trayer
 
trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype pixel --width 128 --transparent true --alpha 0 --tint 0x000000 --height 26 &
 
  
 +
https://mygitlab.com:4433/
 +
7080端口好像不行 要改下面的ssh相关就好了
  
  
# on xmonad
+
改进
#  apt install trayer  Set up an icon tray
 
trayer --edge top --align right --SetDockType true --SetPartialStrut true \
 
      --expand true --width 6 --transparent true --tint 0x191970 --height 26 &
 
  
#trayer --edge top --align right --SetDockType true --SetPartialStrut true \
+
     运行在自定义的 HTTP 和 SSH 端口:
#     --expand true --width 9 --transparent true --tint 0x191970 --height 26 &
 
# Empathy chat client (-h: start hidden, -n: don't connect on launch)
 
  
 +
    web:
 +
    image: 'gitlab/gitlab-ce:latest'
 +
    restart: always
 +
    hostname: 'gitlab.example.com'
 +
    environment:
 +
        GITLAB_OMNIBUS_CONFIG: |
 +
        external_url 'http://gitlab.example.com:8929'
 +
        gitlab_rails['gitlab_shell_ssh_port'] = 2224
 +
    ports:
 +
        - '8929:8929'
 +
        - '2224:22'
 +
    volumes:
 +
        - '/srv/gitlab/config:/etc/gitlab'
 +
        - '/srv/gitlab/logs:/var/log/gitlab'
 +
        - '/srv/gitlab/data:/var/opt/gitlab'
  
  
默认配置文件
 
/etc/xdg/awesome/rc.lua
 
  
 +
</pre>
  
作好更改后,检查配置文件是否有错误是非常有用的:
+
[https://docs.gitlab.com/ee/install/docker.html  Install GitLab with Docker]
 
 
user $awesome -k
 
✔ Configuration file syntax OK
 
 
 
美化
 
 
 
git clone git://github.com/mikar/awesome-themes.git ~/.config/awesome/themes
 
</pre>
 
  
===锁屏===
+
==gitlab搭配ssh默认端口引发的问题  ==
====i3lock ====
 
 
<pre>
 
<pre>
Before starting 前提 安装这两个软件先
+
明明 docker-compose.yml 用 了2222端口但还是有问题  rb文件也要改为 2222 这个是为了开外网 给外面的用  例如jenkins 在外面的
... make sure you have xautolock and i3lock installed.
 
  
or  xautolock  installed.
+
修改sshd_config中的Port #这一步 试过 可以不用操作的
 +
service sshd restart
  
apt install i3lock  xautolock  -y
+
#第一步的我没改哦 好像可以不动
 +
修改/etc/gitlab/gitlab.rb [再次声明,gitlab.yml中的配置会被这个给覆盖]
  
添加在awesome 自启动列表中
+
启用下面这行,并把端口改为自己服务器的sshd端口 如果是我常用的 这里50022 应该是2222才对哦
"xautolock -time 19 -locker 'i3lock -i /home/evan/wallpaper/sj.png' ",
 
  
#配置快捷键
+
gitlab_rails['gitlab_shell_ssh_port'] = 50022
vim .config/awesome/rc.lua
 
-- ln 327
 
-- Ctrl + Atl + l 锁屏:
 
-- 因为 Windows 中是 Win + L ,但在 awesome 中 Win + L 已经被用来干其他事情screensaver-command -lock')
 
    awful.key({ modkey, "Control" }, "l", function () awful.spawn("i3lock  -b  -i '/home/evan/wallpaper/sj.png'") end,
 
              {description = "lock ", group = "launcher"}),
 
  
 +
使之生效,大功告其!
  
 +
gitlab-ctl reconfigure
  
#这个 自启动不规范 不要了
 
cat .xinitrc
 
#!/bin/bash
 
#success if u run xmonad  must open it
 
#/home/evan/.xmonad/autostart.sh
 
#放到 awesome的自启动中会比较 规范一点点呢
 
xautolock -time 10 -locker "i3lock -i '/home/evan/wallpaper/2020-02-04_14-46.png'" &
 
  
  
</pre>
+
其它办法
[http://rabexc.org/posts/awesome-xautolock-battery rabexc.org  awesome-xautolock-battery]
+
然后要等待一会儿直到页面能够重新显示为止
 +
修改http的clone地址加上端口
 +
修改gitlab.yml文件
 +
进入容器内部
 +
docker exec -it gitlab /bin/bash
 +
修改文件
 +
cd /opt/gitlab/embedded/service/gitlab-rails/config
 +
vim gitlab.yml
 +
复制代码
 +
修改gitlab
 +
            host:10.10.0.44
 +
            port:7002
  
====save ====
+
然后在容器内执行gitlab-ctl restart (注意 这里如果docker restart gitlab了,设置会被重新覆盖,也就丢失了,因为restart会重新执行gitlab-ctl reconfigure,目前没有什么好的方式,只有尽量少启动gitlab)
<pre>
 
  
 
</pre>
 
</pre>
====gnome-screensaver ====
+
[https://juejin.cn/post/6955025879688806430#heading-9 修改http的clone地址加上端口]
<pre>
 
sudo apt install  gnome-screensaver
 
 
 
要先设置 自启动
 
 
 
 
 
vim  ~/.config/awesome/rc.lua
 
 
 
-- autorun app by evan
 
autorun = true
 
autorunApps =
 
{
 
    "nm-applet &",
 
    "xscreensaver -no-splash &",
 
 
 
    awful.key({ modkey, "Control" }, "l", function () awful.spawn("xscreenaver-commadn --lock") end,
 
              {description = "lock ", group = "launcher"}),
 
  
 +
[https://juejin.cn/post/6955025879688806430 java+maven项目+tapd+jenkins+gitlab+sonarqube+docker实现自动化持续部署(超详细) ]
  
 +
== 第一种 Install and configure the necessary dependencies ==
 +
<pre>进入gitlab官方网站,选择对应的操作系统——CentOS 6 (and RedHat/Oracle/Scientific Linux 6),
 +
https://about.gitlab.com/downloads/#centos6
  
-- is good 运行
+
按照官方的提示进行安装:
awful.util.spawn_with_shell("/usr/bin/gnome-screensaver")
+
安装配置必要的依赖
-- Ctrl + Atl + l 锁屏:
+
在Centos 6 和 7 中,以下的命令将会打开HTTP和SSH在系统防火墙中的可访问权限。
-- 因为 Windows 中是 Win + L ,但在 awesome 中 Win + L 已经被用来干其他事情了
 
awful.key({"Mod1", "Control"}, "l", function ()
 
    awful.util.spawn("gnome-screensaver-command --lock")
 
end)
 
  
 +
#sudo lokkit -s http -s ssh
  
-- oldCtrl + Atl + l 锁屏:
 
-- 因为 Windows 中是 Win + L ,但在 awesome 中 Win + L 已经被用来干其他事情了
 
awful.key({"Mod1", "Control"}, "l", function ()
 
    awful.util.spawn('xscreensaver-command -lock')
 
end)
 
  
发现的问题 直接运行  gnome-screensaver-command --lock 可以 用快捷键居然不行呀 
 
</pre>
 
  
[http://www.chengweiyang.cn/2016/02/16/how-to-lock-screen-in-awesome-wm/ 在 Awesome 开启锁屏快捷键]
 
  
==主题和壁纸==
 
<pre>
 
1 修改默认的主题配置文件
 
sudo vim /usr/share/awesome/themes/default/theme.lua
 
theme.wallpaper = "/home/evan/images/sonnenaufgang.jpg"
 
--theme.wallpaper = "/usr/share/awesome/themes/default/background.png"
 
  
2.或者选择不同的themes
+
[gitlab-ce]
vim  ~/.config/awesome/rc.lua # 打开然后分别添加或者edit
+
name=gitlab-ce
-- {{{ Variable definitions
+
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
-- Themes define colours, icons, font and wallpapers.
+
repo_gpgcheck=0
--beautiful.init(awful.util.get_themes_dir() .. "default/theme.lua") --这个是原来默认的
+
gpgcheck=0
--beautiful.init("~/.config/awesome/themes/multicolor/theme.lua")
+
enabled=1
--him  cool-blue  rainbow wombat  foo    niceandclean    elric  tree  strict  dremora  dust sunjack  byte grey-new  matrix  multicolor
+
gpgkey=https://packages.gitlab.com/gpg.key
beautiful.init("~/.config/awesome/themes/tree/theme.lua")
 
  
  
beautiful.init("~/.config/awesome/themes/snow/theme.lua")
+
sudo yum makecache
--beautiful.init("~/.config/awesome/themes/blue/theme.lua")
 
  
例如主题是 tree
+
# 安装依赖包
那么就选择一个你要的相片并改名为 background.jpg or  background.png 放到
+
sudo yum install curl openssh-server openssh-clients postfix cronie
/home/evan/.config/awesome/themes/tree/
+
# 启动 postfix 邮件服务
</pre>
+
sudo service postfix start
== 美化==
+
# 检查 postfix
* 用了lxappearance什么后 icon变得很好看
+
sudo chkconfig postfix on
 +
# 安装 GitLab 社区版
 +
sudo yum install gitlab-ce
 +
# 初始化 GitLab 配置并启动GitLab
 +
打开/etc/gitlab/gitlab.rb,将external_url = ‘http://git.example.com’修改为自己的IP地址:http://xxx.xx.xxx.xx,,然后执行下面的命令,对GitLab进行编译。
  
默认的 gtk 界面在 XMonad 下相当地丑, 可以安装lxappearance来调整 GTK 的主题.
 
==电池显示==
 
[https://zhuanlan.zhihu.com/p/58254611 Awesome WM主题设置分享]
 
  
==常用快捷键==
 
<pre>
 
Super+S键可以显示已经设置在awesome配置中的快捷方式
 
  
使用 前面这几个比较常用
 
配置完成后注销使用Awesome会话登录,Awesome使用Win键作为主键,几个常用的为:
 
  
Win+ Shift + q:退出awesome
 
  
Win+num 可以在多个桌面切换
+
sudo gitlab-ctl reconfigure
Win+Ctrl+r reload(重启)Awesome,
+
一直都有更新的。
Win+k/j可以切换窗口(类Vim操作),
 
  
Win+m/n    最大/小化窗口, ##
 
  
Win+Shift+num 可以将当前窗口发送到其他桌面.
 
Win+Shift+C可以关闭当前窗口,
 
Win+Space可以切换布局,Awesome有多种布局,这里不作介绍,大家可以自己稍作尝试
 
  
 +
sudo gitlab-ctl reconfigure
 +
登录GitLab
 +
Username: root
 +
Password: 5iveL!fe
  
  
首先把修饰键设置为 Win 键,这样不会和其它的快捷键冲突。附件里有配置文件,可以直接使用。
 
  
Win+数字键 切换工作区
 
Win+Space 切换窗口布局比如水平布局下,新开窗口与原窗口水平分割桌面。布局有下面几种:
 
水平布局与垂直布局各两种,区别在于新开窗口的位置。它们是最常用的布局
 
全屏布局。这个不实用,可以用 Win+m 最大化/还原当前窗口
 
螺旋布局。似乎也不太实用,反正我很少用
 
逐渐减小布局。和上面的那个差不多
 
浮动布局。类似传统窗口管理器的布局。对于不规则的窗口,像 GIMP、mplayer 等,无论在任何布局下窗口都是浮动的。可以在配置文件里设定哪些程序使用浮动窗口。调整浮动窗口的位置时,按下 Win 键,用鼠标拖动就可以了。
 
Win+Enter 开启预设的终端
 
Win+Shift+C 关闭当前窗口
 
Win+Shift+数字键 把当前窗口发送到其它工作区
 
Win+j Win+k 切换到其它窗口
 
  
Win+h Win+l 调整当前窗口大小这一组快捷键是VI风格的。
 
  
Mod4 + Shift + j:当前窗口和前一个窗口互换位置
+
我在ubuntu下的一键安装,如果用汉化版的有问题的。
Mod4 + Shift + k:当前窗口和后一个窗口互换位置
+
所以现在只能用英文原版的。
  
  
Mod4 + Left:查看前一个tag
+
现在会要求改密码了 在第一次
Mod4 + Right:查看后一个tag
 
  
 +
dkm12345678
  
Mod4 + space:把当前tag更换为下一种布局
 
Mod4 + Shift + space:把当前tag更换为前一种布局
 
  
Mod4 + Control + space:切换当前窗口是否为浮动的
 
  
 +
git_data_dirs({"default" => "/data/gitlab/git-data"})
 +
/data/gitlab/git-data
  
 +
gitlab-ctl reconfigure </pre>
  
 +
&nbsp;
  
 +
== 第二种 Add the GitLab package server and install the package ==
 +
<pre>curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
 +
sudo yum install gitlab-ce </pre>
  
Mod4 + t :标记窗口(可标记多个)
+
&nbsp;
Mod4 + Shift + F1~F9:把标记的窗口移动到第一~第九桌面上
 
Ctrl + Mod4 + 1~9:把当前桌面和1~9桌面同时显示
 
Mod4 + 1~9:恢复
 
Mod4 + Esc:快速切换到上一个桌面
 
  
#这些没怎么用过 后来用了双屏后 天天用呢
+
&nbsp;
Mod4 + Control + j:切换到下一个屏幕
 
Mod4 + Control + k:切换到前一个屏幕
 
  
Mod4 + Shift + h:增加主区域窗口的数量
 
Mod4 + Shift + l:减少主区域窗口的数量
 
Mod4 + Control + h:增加非主区域窗口的数量
 
Mod4 + Control + l:减少非主区域窗口的数量
 
Mod4+f will make your current window fullscreen.
 
  
Also try Mod4+h, Mod4+l, Mod4+Shift+h and Mod4+Shift+l to resize windows. You can also resize with Mod4+Button3 (right click).  
+
[https://cloud.tencent.com/developer/article/1114666 【gitlab小症状】gitlab搭配ssh默认端口引发的血战]
  
For an overview of all key bindings, press Mod4+s. Pressing any key closes this overview again.
+
[https://blog.csdn.net/ming19951224/article/details/105479033  docker安装gitlab并使用非标准端口]
  
Mod4 + Shift + i:显示当前窗口的class和instance。这在写脚本的时候尤其有用
+
==gitlab性能优化调化  占用内存过大问题==
Mod4 + Shift + r: 重绘当前窗口
 
 
 
Win+F2 运行程序
 
</pre>
 
 
 
==布局 Layout==
 
平铺 Tiled
 
平铺模式下屏幕被分为master和stacking两个区域。master中的窗口包含了需要最多关注的窗口(通常这表示master中的窗口会占据更大的屏幕空间),而stacking区域中包含了其它窗口。如果你想的话master区域可以被划分为多行和多列
 
 
 
浮动 Floating
 
每个窗口都可以自由的移动和调整大小,就好像普通的窗口管理器一样。无论当前是什么布局,对话框窗口总是处在浮动状态
 
== 启动器==
 
[[Kali初始化#launcher|#launcher]]
 
===rofi on awesome===
 
 
<pre>
 
<pre>
pkg install rofi
 
  
 +
/etc/gitlab/gitlab.rb
  
#配置
+
#进程数目
cd ~/.config/rofi/, 使用 rofi -dump-Xresources > config #生成配置文件
+
unicorn['worker_processes'] = 2
rofi-theme-selector #选择你想要的主题即可
 
  
vim ~/.config/rofi/config
+
#减少数据库缓存 默认为 256M
configuration {
+
postgresql['shared_buffers'] = "128MB"
    /* 配置显示类型 */
 
    modi: "window,run,ssh,drun";
 
    /* 配置是否支持icon以及icon主题 */
 
    show-icons: true; !应用的图标 这个注释可能是不对的哦 要注意
 
    icon-theme: "Numix";
 
    drun-icon-theme: "Numix";
 
  
  
#bind  is  win +d  不加主题的也是不错的呢
+
#减少并发数 默认为8
vi .config/awesome/rc.lua
+
postgresql['max_worker_processes'] = 4
--rofi 2020 ln 299
 
    awful.key({ modkey,          }, "d",
 
              function ()
 
                  commandPrompter          = "rofi -show drun "
 
  
                  commandPrompter          = "rofi -show drun -theme fancy"
 
                  awful.spawn(commandPrompter)
 
          end,
 
              {description = "rofi", group = "launcher"}),
 
  
PS 几个不错的 rofi  theme
 
rofi -show drun -theme dmenu
 
rofi -show drun -theme  Adapta-Nokto
 
rofi -show drun -theme  Arc-Dark
 
rofi -show drun -theme  solarized
 
rofi -show drun -theme  solarized_alternate
 
  
#自启动
+
#减少 sidekiq并发数
cat  .bashrc
+
sidekiq['concurrency'] = 20
#evan
 
xautolock -time 10 -locker "i3lock  -b  -i '/home/evan/wallpaper/sj.png'" &
 
  
#freebsd
 
#这个一般不是 gdm什么的登录用的
 
cat .xinitrc
 
#!/bin/bash
 
#on freebsd success if u run xmonad  must open it
 
#/home/evan/.xmonad/autostart.sh
 
 
#xautolock -time 10 -locker "i3lock  -b  -i '/home/evan/wallpaper/2020-02-04_14-46.png'" &
 
xautolock -time 30 -locker "i3lock  -b  -i '/home/evan/wallpaper/sj.png'" &
 
  
 +
#最后  reload
 +
gitlab-ctl reconfigure
  
 
</pre>
 
</pre>
 +
[https://www.dgstack.cn/archives/1951.html gitlab占用内存过大问题]
  
https://github.com/davatorium/rofi-themes
+
[https://www.cnblogs.com/h--d/p/10153647.html GitLab配置优化及汉化]
  
https://stackoverflow.com/questions/41534987/how-to-toggle-the-titlebar-in-awesomewm
 
  
[https://www.jianshu.com/p/f25465ca5e73 自己折腾个rofi配置]
+
==Gitlab 重置 root 密码==
 +
<pre>
  
https://blog.wizardsoftheweb.pro/rofi-useful-options-i/
+
先登录入容器
  
==Network Manager==
+
要重置root密码,请先使用root权限登录服务器。使用以下命令启动Ruby on Rails控制台:
<pre>
 
cat .xinitrc
 
#!/bin/bash
 
sudo  /usr/local/bin/networkmgr &
 
</pre>
 
  
== 自启动==
+
su - git
<pre>
+
gitlab-rails console
autorun = true
+
#gitlab-rails console production
  
autorunApps =
+
等到控制台加载完毕,您可以通过搜索电子邮件或用户名等方法找到您的账号。
{
 
    "nm-applet &",
 
    "/usr/bin/redshift-gtk",
 
    "xfce4-power-manager",
 
-- at the end  must be  has a  ,
 
--    "kupfer --no-splash"
 
    "fcitx",
 
    "/usr/bin/telegram-desktop -startintray",
 
    "xautolock -time 19 -locker 'i3lock -i /home/evan/wallpaper/sj.png' ",
 
--    "dbus-launch gnome-do",
 
--    "synapse -s &",
 
--    "/opt/qq2012/wineapp/qq/qq.sh",
 
--    "dbus-launch gnome-do",
 
  
 +
user = User.where(id: 1).first
  
}
+
或者
  
 +
user = User.find_by(email: '[email protected]')
  
 +
找出用户以后,可以更改其密码:
  
if autorun then
+
user.password = '12345678'
    for app = 1, #autorunApps do
+
#user.password_confirmation = 'e12345678'
        awful.util.spawn_with_shell(autorunApps[app])
 
    end
 
end
 
  
 +
user.save!
 +
可能得先重启服务呢  一定要保存 有时登录不对 可能是浏览器缓存了哦
 +
最后,保存上面的更改,即可使用新密码登录。
 +
注意:root密码不能小于8位即12345678,不然会显示false
 
</pre>
 
</pre>
 +
[https://www.codenong.com/cs105343781/ 服务器Gitlab忘记root密码]
  
== 双屏==
+
https://docs.gitlab.com/ee/security/reset_user_password.html
<pre>
 
#xps13  on lxtx
 
  
modkey + o 快捷键可以发送 window 到另一个 screen。
+
== 报错 ==
 +
<pre>================================================================================
 +
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
 +
================================================================================
  
modkey+ctrl+j ,     modkey+ctrl+k    切换不同的screen #也就是在 本本显示器 和外置显示器之间切换
+
RuntimeError
 +
------------
 +
GitLab external URL must include a schema and FQDN, e.g. http://gitlab.example.com/
  
modkey+left    ,    modkey+right    切换不同的虚拟桌面 在同一个显示器中
+
记得前缀有http样
xrandr --output DP-1    --mode 1920x1080  --right-of    eDP-1 --auto
 
 
 
#VGA
 
# at lxtx April 30 2020
 
#外接显示器DP-1作为主屏幕,eDP-1是本本          打开外接显示器(--auto:最高分辨率),设置为左侧扩展屏幕
 
#外接显示器DP-1作为主屏幕,eDP-1是本本
 
xrandr --output DP-1    --mode 1920x1080  --right-of    eDP-1 --auto
 
#xrandr --output DP-1      --right-of    eDP-1 --auto
 
 
 
or  下面是参考
 
xrandr --output  eDP-1  --left-of  DP-1    --auto
 
 
 
#右扩展
 
#xrandr --output DP-1    --right-of    eDP-1 --auto
 
 
 
#xrandr --output  eDP-1  --mode 1920x1080  --right-of  DP-1    --auto
 
#xrandr --output DP2 --same-as  eDP1  --mode 1366x768  --output DP2 --mode 1920x1080
 
 
 
#if hdmi on home
 
xrandr --output HDMI-1 --same-as  LVDS-1  --mode 1366x768  --output HDMI-1 --mode 1920x1080
 
  
 
</pre>
 
</pre>
  
 +
[https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/ https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/]
  
[https://www.chengweiyang.cn/2018/04/24/awesome-multi-monitor-1/ 在 awesome wm 下使用两个显示器]
+
[https://www.linuxchina.net/?p=2750 https://www.linuxchina.net/?p=2750]
  
[https://www.chengweiyang.cn/2018/04/28/awesome-multi-monitor-2/ 在 awesome wm 下使用两个显示器(续]
+
&nbsp;
  
[https://www.cnblogs.com/pylemon/archive/2012/02/06/2340556.html  让 awesome 支持双屏 ]
+
=see also=
 
+
[https://docs.gitlab.com/omnibus/docker/ GitLab Docker images]
[https://unix.stackexchange.com/questions/389465/switch-between-monitors-with-dual-display-state-awesome-wm Switch between monitors with dual display state [awesome wm<nowiki>]</nowiki>]
 
 
 
https://bbs.archlinuxcn.org/viewtopic.php?id=1811
 
 
 
 
 
[https://stackoverflow.com/questions/55983407/awesome-wm-wonky-multi-monitor-setup Awesome WM wonky multi-monitor setup]
 
 
 
=优化2020=
 
有空注释掉不要的 layouts
 
 
 
[https://blog.csdn.net/minghe_uestc/article/details/7489157 awesome使用与配置]
 
 
 
从这里开始看官方文档
 
https://awesomewm.org/apidoc/index.html
 
 
 
https://github.com/wzpan/awesome-config
 
 
 
官方文档 要过一下  找一下像i3一样的官方过程过一下才行 
 
https://awesomewm.org/apidoc/core_components/tag.html
 
 
 
https://awesomewm.org/apidoc/sample%20files/rc.lua.html
 
 
 
https://github.com/4ban/awesome-ban
 
 
 
 
 
[https://zhuanlan.zhihu.com/p/58254611 Awesome WM主题设置分享]
 
 
 
==声音控制==
 
 
 
https://wiki.archlinux.org/index.php/PulseAudio
 
 
 
https://wiki.debian.org/PulseAudio
 
 
 
==问题==
 
好消息现在又回来了
 
安装不上的原因
 
[2017-09-19] awesome 4.0-1 removed from kali-rolling (Kali Repository)
 
 
 
http://pkg.kali.org/pkg/awesome#
 
 
 
==参考==
 
 
 
[https://awesomewm.org/recipes/ 官方配置教程 recipes]
 
 
 
https://awesomewm.org/apidoc/documentation/07-my-first-awesome.md.html#
 
 
 
[https://awesomewm.org/apidoc/documentation/17-porting-tips.md.html#v4 官方文档]
 
  
[https://wiki.archlinux.org/index.php/Awesome_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87) awesome (简体中文)]
+
[https://my.oschina.net/u/1432614/blog/658568 在 CentOS 7 上使用 Docker 部署安装 GitLab]
  
 +
[https://github.com/beginor/docker-gitlab-ce GitLab 中文社区版 Docker 镜像]
  
[https://github.com/evan886/awesome  my awesome github]
+
[https://gist.github.com/ouyangzhiping/47fcbf26d213146407f2 ouyangzhiping/docker-gitlab.md]
  
[https://i.linuxtoy.org/docs/guide/ch38.html linuxtoy awesome]
+
[https://www.cnblogs.com/weifeng1463/p/7714492.html GitLab的安装及使用教程]
  
[https://awesomewm.org/index.html 官网]
+
[https://segmentfault.com/a/1190000021593151 使用Docker安装GitLab]
  
[https://blog.csdn.net/minghe_uestc/article/details/7489157 awesome使用与配置]
+
[https://zhuanlan.zhihu.com/p/144993894 GitLab安装教程]
  
[https://github.com/alswl/awesome/blob/master/README.md 主要配置参考 ]
+
[https://segmentfault.com/a/1190000021541612 Docker 搭建 Gitlab 服务]
  
[http://www.hahack.com/tools/awesome/# 平铺式窗口管理器-Awesome]
+
[https://www.huaweicloud.com/articles/d3c33bb083a5c0cb5547526ecd9eb6de.html 快速安装 GitLab 并汉化]
 
 
[http://wiki.ubuntu.org.cn/Awesome#.E4.BB.80.E4.B9.88.E6.98.AF.E5.B9.B3.E9.93.BA.E5.BC.8F.E7.AA.97.E5.8F.A3.E7.AE.A1.E7.90.86.EF.BC.9F Awesome ubuntu wiki]
 
 
[https://wiki.gentoo.org/wiki/Awesome/zh-cn gentoo awesome]
 
 
 
[http://forum.ubuntu.com.cn/viewtopic.php?f=155&t=290865&p=2036789 神奇的awesome,彻底败给它了wallpaper]
 
 
 
[https://www.linuxzen.com/awesometmuxgnomedoda-zao-gao-xiao-linuxzhuo-mian-huan-jing.html Awesome+tmux+gnomeDo打造高效Linux桌面环境]
 
 
 
[http://epsi-rns.github.io/desktop/2016/06/30/awesome-install-debian.html Install Awesome WM in Debian]
 
 
 
[http://blog.51cto.com/darksun/1391074 Awesome window manager使用初探]
 
 
 
[https://forum.suse.org.cn/t/awesome/2047 Awesome 入门安装、配置、使用(纯入门实用主义)]
 
 
 
[http://tieba.baidu.com/p/3311663190?traceid= 花式晒桌面之awesome折腾手记]
 
 
 
[http://www.chengweiyang.cn/2016/02/16/how-to-lock-screen-in-awesome-wm/ 在 Awesome 窗口管理器中开启锁屏快捷键]
 
 
 
 
 
[https://github.com/stefano-m/awesome-connman_widget A widget for the Awesome Window Manager to monitor the network with Connman]
 
 
 
==多显示器==
 
[http://www.chengweiyang.cn/2018/04/24/awesome-multi-monitor-1/ 在 awesome wm 下使用两个显示器]
 
 
 
[http://www.chengweiyang.cn/2018/04/28/awesome-multi-monitor-2/ 在 awesome wm 下使用两个显示器(续)]
 
 
 
[https://www.cnblogs.com/pylemon/archive/2012/02/06/2340556.html 让 awesome 支持双屏]
 
 
 
[https://zhuanlan.zhihu.com/p/58254611 Awesome WM主题设置分享]
 
 
 
Awesome简单配置
 
http://www.jianshu.com/p/2d1e138a60d3
 
 
 
Awesome 配置笔记
 
https://segmentfault.com/a/1190000000366665
 
 
 
=other spectrwm is a small, dynamic tiling and reparenting window manager for X11.=
 
 
 
https://github.com/conformal/spectrwm#readme
 
 
 
https://wiki.archlinux.org/index.php/Spectrwm
 
 
 
 
 
https://srobb.net/spectrwm.html
 
 
 
=see also=
 
[https://www.hahack.com/tools/awesome/# 平铺式窗口管理器-Awesome]
 
  
 +
=old=
 +
<pre> # 下面这个手工的 线上一般不用了 以前学习用的
  
第 38 章 awesome
+
获取 GitLab 镜像
http://i.linuxtoy.org/docs/guide/ch38s05.html#id3160077
+
docker search gitlab
  
https://linuxtoy.org/archives/awesome.html
+
docker pull gitlab/gitlab-ce:latest
  
 +
查看本地镜像
 +
docker images
  
 +
创建目录
  
以Awesome为基础打造一个强大桌面系统
+
mkdir -p /data/gitlab/{config,data,logs}
http://sillydong.com/mysa/mylinux/awesome-desktop.html
 
  
 +
创建并运行容器
  
 +
docker run --detach \
 +
      --hostname git.evan.com \
 +
      --publish 443:443 \
 +
      --publish 80:80 \
 +
      --publish 222:22 \
 +
      --name gitlabce\
 +
      --restart always \
 +
      --volume /data/gitlab/config:/etc/gitlab \
 +
      --volume /data/gitlab/logs:/var/log/gitlab \
 +
      --volume /data/gitlab/data:/var/opt/gitlab \
 +
      gitlab/gitlab-ce:latest
  
轻量组件
 
http://wiki.ubuntu.org.cn/%E8%BD%BB%E9%87%8F%E7%BB%84%E4%BB%B6
 
  
 +
查看运行状态
  
开源世界旅行手册
+
docker ps
http://i.linuxtoy.org/docs/guide/index.html
+
netstat -ntulap | grep docker
 +
访问 GitLab
  
Display manager
+
启动
https://wiki.archlinux.org/index.php/Display_manager_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)
+
docker start gitlabce
  
 +
docker stop gitlabce
  
Tencent QQ (简体中文)
+
如果没有域名,直接使用 IP 访问即可。
https://wiki.archlinux.org/index.php/Tencent_QQ_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)#.E5.9F.BA.E4.BA.8E_WebQQ
+
初始账户
  
[[category:Desktop]]
+
用户: root
 +
密码: 5iveL!fe  现在一般要自己配置密码的了 </pre>
 +
[[Category:git]] [[Category:ops]]

2021年7月1日 (四) 07:07的版本

usage

GitLab 管理员手册

GitLab如何删除已有项目

为GitLab帐号添加SSH keys并连接GitLab

GitLab 如何修改项目从私有到公有

本地java代码上传Gitlab仓库

第零 docker-compose for gitlab  



2020 直接 docker-compose 其实可以上 alpine的  不过官方的没有  
用ng upstream 到 80 or 443 

cat docker-compose.yml


web:
  image: 'gitlab/gitlab-ce:14.0.0-ce.0'
  #image: 'gitlab/gitlab-ce:11.4.3'
  #image: 'gitlab/gitlab-ce:latest'  
  restart: always
  hostname: 'mygitlab.com'
  environment:
    GITLAB_OMNIBUS_CONFIG: |
      external_url 'http://gitlab.lliao.net'
      #external_url 'https://mygitlab.com'
      # Add any other gitlab.rb configuration here, each on its own line
  ports:
    - '7080:80'
    - '4433:443'
    - '2222:22'
  volumes:
    - ./gitlab/config:/etc/gitlab
    - ./gitlab/logs:/var/log/gitlab
    - ./gitlab/data:/var/opt/gitlab



这个首次登录密码重置为什么没了 june 2021 version gitlab14
 Browse to the hostname and login

On your first visit, you'll be redirected to a password reset screen. Provide the password for the initial administrator account and you will be redirected back to the login screen. Use the default account's username root to login.


https://mygitlab.com:4433/
7080端口好像不行 要改下面的ssh相关就好了 


改进 

    运行在自定义的 HTTP 和 SSH 端口:

    web:
    image: 'gitlab/gitlab-ce:latest'
    restart: always
    hostname: 'gitlab.example.com'
    environment:
        GITLAB_OMNIBUS_CONFIG: |
        external_url 'http://gitlab.example.com:8929'
        gitlab_rails['gitlab_shell_ssh_port'] = 2224
    ports:
        - '8929:8929'
        - '2224:22'
    volumes:
        - '/srv/gitlab/config:/etc/gitlab'
        - '/srv/gitlab/logs:/var/log/gitlab'
        - '/srv/gitlab/data:/var/opt/gitlab'



Install GitLab with Docker

gitlab搭配ssh默认端口引发的问题

明明 docker-compose.yml  用 了2222端口但还是有问题   rb文件也要改为 2222  这个是为了开外网 给外面的用  例如jenkins 在外面的 

修改sshd_config中的Port #这一步 试过 可以不用操作的
service sshd restart

#第一步的我没改哦 好像可以不动 
修改/etc/gitlab/gitlab.rb [再次声明,gitlab.yml中的配置会被这个给覆盖]

启用下面这行,并把端口改为自己服务器的sshd端口 如果是我常用的 这里50022 应该是2222才对哦

gitlab_rails['gitlab_shell_ssh_port'] = 50022

使之生效,大功告其!

gitlab-ctl reconfigure



其它办法 
然后要等待一会儿直到页面能够重新显示为止
修改http的clone地址加上端口
修改gitlab.yml文件
进入容器内部
docker exec -it gitlab /bin/bash
修改文件
cd /opt/gitlab/embedded/service/gitlab-rails/config
vim gitlab.yml
复制代码
修改gitlab
             host:10.10.0.44
             port:7002

然后在容器内执行gitlab-ctl restart (注意 这里如果docker restart gitlab了,设置会被重新覆盖,也就丢失了,因为restart会重新执行gitlab-ctl reconfigure,目前没有什么好的方式,只有尽量少启动gitlab)

修改http的clone地址加上端口

java+maven项目+tapd+jenkins+gitlab+sonarqube+docker实现自动化持续部署(超详细)

第一种 Install and configure the necessary dependencies

进入gitlab官方网站,选择对应的操作系统——CentOS 6 (and RedHat/Oracle/Scientific Linux 6),
https://about.gitlab.com/downloads/#centos6

按照官方的提示进行安装:
安装配置必要的依赖
在Centos 6 和 7 中,以下的命令将会打开HTTP和SSH在系统防火墙中的可访问权限。

#sudo lokkit -s http -s ssh





[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key


sudo yum makecache

# 安装依赖包
sudo yum install curl openssh-server openssh-clients postfix cronie
# 启动 postfix 邮件服务
sudo service postfix start
# 检查 postfix
sudo chkconfig postfix on
# 安装 GitLab 社区版
sudo yum install gitlab-ce
# 初始化 GitLab 配置并启动GitLab
打开/etc/gitlab/gitlab.rb,将external_url = ‘http://git.example.com’修改为自己的IP地址:http://xxx.xx.xxx.xx,,然后执行下面的命令,对GitLab进行编译。





sudo gitlab-ctl reconfigure
一直都有更新的。



sudo gitlab-ctl reconfigure
登录GitLab
Username: root
Password: 5iveL!fe





我在ubuntu下的一键安装,如果用汉化版的有问题的。
所以现在只能用英文原版的。


现在会要求改密码了 在第一次 

dkm12345678



git_data_dirs({"default" => "/data/gitlab/git-data"})
/data/gitlab/git-data

gitlab-ctl reconfigure 

 

第二种 Add the GitLab package server and install the package

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce 

 

 


【gitlab小症状】gitlab搭配ssh默认端口引发的血战

docker安装gitlab并使用非标准端口

gitlab性能优化调化 占用内存过大问题


/etc/gitlab/gitlab.rb

#进程数目 
 unicorn['worker_processes'] = 2

#减少数据库缓存 默认为  256M
postgresql['shared_buffers'] = "128MB"


#减少并发数 默认为8
postgresql['max_worker_processes'] = 4



#减少 sidekiq并发数 
sidekiq['concurrency'] = 20


#最后  reload 
gitlab-ctl reconfigure

gitlab占用内存过大问题

GitLab配置优化及汉化


Gitlab 重置 root 密码


先登录入容器

要重置root密码,请先使用root权限登录服务器。使用以下命令启动Ruby on Rails控制台:

su - git
gitlab-rails console
#gitlab-rails console production

等到控制台加载完毕,您可以通过搜索电子邮件或用户名等方法找到您的账号。

user = User.where(id: 1).first

或者

user = User.find_by(email: '[email protected]')

找出用户以后,可以更改其密码:

user.password = '12345678'
#user.password_confirmation = 'e12345678'

user.save!
可能得先重启服务呢  一定要保存 有时登录不对 可能是浏览器缓存了哦 
最后,保存上面的更改,即可使用新密码登录。
注意:root密码不能小于8位即12345678,不然会显示false

服务器Gitlab忘记root密码

https://docs.gitlab.com/ee/security/reset_user_password.html

报错

================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================

RuntimeError
------------
GitLab external URL must include a schema and FQDN, e.g. http://gitlab.example.com/

记得前缀有http样

https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/

https://www.linuxchina.net/?p=2750

 

see also

GitLab Docker images

在 CentOS 7 上使用 Docker 部署安装 GitLab

GitLab 中文社区版 Docker 镜像

ouyangzhiping/docker-gitlab.md

GitLab的安装及使用教程

使用Docker安装GitLab

GitLab安装教程

Docker 搭建 Gitlab 服务

快速安装 GitLab 并汉化

old

 # 下面这个手工的 线上一般不用了 以前学习用的

获取 GitLab 镜像
docker search gitlab

docker pull gitlab/gitlab-ce:latest

查看本地镜像
docker images

创建目录

mkdir -p /data/gitlab/{config,data,logs}

创建并运行容器

docker run --detach \
       --hostname git.evan.com \
       --publish 443:443 \
       --publish 80:80 \
       --publish 222:22 \
       --name gitlabce\
       --restart always \
       --volume /data/gitlab/config:/etc/gitlab \
       --volume /data/gitlab/logs:/var/log/gitlab \
       --volume /data/gitlab/data:/var/opt/gitlab \
       gitlab/gitlab-ce:latest


查看运行状态

docker ps
netstat -ntulap | grep docker
访问 GitLab

启动
docker start gitlabce

docker stop gitlabce

如果没有域名,直接使用 IP 访问即可。
初始账户

用户: root
密码: 5iveL!fe  现在一般要自己配置密码的了