Linux环境之gitlab搭建

==----------------------------------------------------------------------------------------------------------------------

-----== LINUX gitlab搭建配置  参考:https://blog.csdn.net/duyusean/article/details/80011540  【成功!!!!】

注:centos环境需三个依赖:ssh、防火墙、postfix

1、安装依赖-ssh
    sudo yum install -y curl policycoreutils-pythonopenssh-server

    [root@iZm5eizpokikoertia0x31Z /]# sudo yum install -y curl policycoreutils-pythonopenssh-server
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    base                                                                                              | 3.6 kB  00:00:00
    epel                                                                                              | 5.3 kB  00:00:00
    extras                                                                                            | 3.4 kB  00:00:00
    updates                                                                                           | 3.4 kB  00:00:00
    Package curl-7.29.0-51.el7.x86_64 already installed and latest version
    No package policycoreutils-pythonopenssh-server available.


2、将ssh服务设置为开机启动
    sudo systemctl enable sshd

3、启动ssh服务
    sudo systemctl start sshd

4、安装防火墙
    yum install firewalld systemd -y

    [root@iZm5eizpokikoertia0x31Z /]# yum install firewalld systemd -y
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    Package firewalld-0.5.3-5.el7.noarch already installed and latest version
    Package systemd-219-62.el7_6.6.x86_64 already installed and latest version
    Nothing to do

5、开启防火墙
    service firewalld  start
    [root@iZm5eizpokikoertia0x31Z /]# service firewalld  start
    Redirecting to /bin/systemctl start firewalld.service

    [root@iZm5eizpokikoertia0x31Z /]# /bin/systemctl start firewalld.service
    [root@iZm5eizpokikoertia0x31Z /]#


6、添加http服务到firewalld,permanent表示永久生效,若不加--permanent,系统下次启动就会失效
    sudo firewall-cmd --permanent --add-service=http

    [root@iZm5eizpokikoertia0x31Z /]# sudo firewall-cmd --permanent --add-service=http
    success

7、重启防火墙
    /bin/systemctl restart firewalld.service

8、安装postfix邮件通知系统

    查看是否安装:rpm -q postfix

    sudo yum install postfix

    [root@iZm5eizpokikoertia0x31Z /]# sudo yum install postfix
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    Package 2:postfix-2.10.1-7.el7.x86_64 already installed and latest version
    Nothing to do

9、将postfix服务设置为开机启动
    sudo systemctl enable postfix

10、启动postfix
    sudo systemctl start postfix

    [root@iZm5eizpokikoertia0x31Z system]# sudo systemctl start postfix
    Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details.


    查看postfix: rpm -qa | grep postfix


    [root@iZm5eizpokikoertia0x31Z lib]# systemctl status postfix.service
    ● postfix.service - Postfix Mail Transport Agent
       Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
       Active: failed (Result: exit-code) since Tue 2019-06-18 17:52:36 CST; 20min ago
      Process: 27419 ExecStart=/usr/sbin/postfix start (code=exited, status=127)
      Process: 27416 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
      Process: 27413 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=127)

    Jun 18 17:52:36 iZm5eizpokikoertia0x31Z systemd[1]: Starting Postfix Mail Transport Agent...
    Jun 18 17:52:36 iZm5eizpokikoertia0x31Z systemd[1]: postfix.service: control process exited, code=exited status=127
    Jun 18 17:52:36 iZm5eizpokikoertia0x31Z aliasesdb[27413]: /usr/sbin/postconf: error while loading shared libraries: libmysqlclient.so.18: ...ectory
    Jun 18 17:52:36 iZm5eizpokikoertia0x31Z systemd[1]: Failed to start Postfix Mail Transport Agent.
    Jun 18 17:52:36 iZm5eizpokikoertia0x31Z postfix[27419]: /usr/sbin/postfix: error while loading shared libraries: libmysqlclient.so.18: ca...rectory
    Jun 18 17:52:36 iZm5eizpokikoertia0x31Z aliasesdb[27413]: /usr/bin/newaliases: error while loading shared libraries: libmysqlclient.so.18:...ectory
    Jun 18 17:52:36 iZm5eizpokikoertia0x31Z systemd[1]: Unit postfix.service entered failed state.
    Jun 18 17:52:36 iZm5eizpokikoertia0x31Z systemd[1]: postfix.service failed.

    经过了一些列的处理:
    sudo systemctl enable postfix
    [root@iZm5eizpokikoertia0x31Z system]# sudo systemctl start postfix
    Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details.

    -------------------------------------------

    没成功,继续:
    vi /etc/postfix/main.cf
    修改 /etc/postfix/main.cf的设置
    inet_protocols = ipv4
    inet_interfaces = all
    重新启动postfix即可
    systemctl start postfix.service


    -------------------------------------------

    也没成功,继续:
    [root@iZm5eizpokikoertia0x31Z default]# grub2-mkconfig -o /boot/grub2/grub.cfg
    Generating grub configuration file ...
    Found linux image: /boot/vmlinuz-3.10.0-957.21.2.el7.x86_64
    Found initrd image: /boot/initramfs-3.10.0-957.21.2.el7.x86_64.img
    Found linux image: /boot/vmlinuz-3.10.0-957.5.1.el7.x86_64
    Found initrd image: /boot/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值