centos6上 tengine本地代理gitlab服务器部署
1. gitlab部署
rpm -ivh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install curl policycoreutils openssh-server openssh-clients postfix -y
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
yum install -y gitlab-ce
yum install -y git
###注意:gitlab默认会使用80和8080端口,所以配置nginx和gitlab要注意
2. tengine部署(其实这里的代理使用nginx最新版更合适,我这使用tengine是因为环境比较统一)
useradd nginx -s /sbin/nologin -M
yum -y install gcc gcc-c++ autoconf automake
yum -y install pcre pcre-devel
yum -y install openssl openssl-devel
yum -y install zlib-devel
yum -y install libxml2 libxml2-dev
yum -y install libxslt-devel
yum -y install gd-devel
yum -y install perl-devel perl-ExtUtils-Embed
yum -y install GeoIP GeoIP-devel GeoIP-datacd /usr/local/src
wget http://tengine.taobao.org/download/tengine-2.2.1.tar.gz
wget http://www.openssl.org/source/openssl-1.0.2.tar.gz
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz
tar xf tengine-2.2.1.tar.gz
tar xf openssl-1.0.2.tar.gz
tar xf pcre-8.38.tar.gzcd pcre-8.38
./configure --prefix=/usr/local/pcre
make && make installcd ../openssl-1.0.2
./config --prefix=/usr/local/openssl
make && make installmkdir /usr/local/nginx-stable/conf -p
cd ../tengine-2.2.1./configure \--user=nginx \--group=nginx \--prefix=/usr/local/nginx-stable \--conf-path=/usr/local/nginx-stable/conf/nginx.conf \--pid-path=/usr/local/nginx-stable/nginx.pid \--with-openssl=/usr/local/src/openssl-1.0.2 \--with-pcre=/usr/local/src/pcre-8.38 \--with-file-aio \--with-http_v2_module \--with-http_ssl_module \--with-http_upstream_check_module \--with-http_realip_module \--with-http_stub_status_module \--with-http_sub_module \--with-http_gzip_static_module \--with-http_addition_module \--with-http_xslt_module \--with-http_image_filter_module \--with-http_geoip_module \--with-http_dav_module \--with-http_flv_module \--with-http_mp4_module \--with-http_gunzip_module \--with-http_random_index_module \--with-http_secure_link_module \--with-http_degradation_module \--with-http_auth_request_module \--with-http_perl_module \--with-http_slice_module \--with-select_module \--with-poll_module \--with-mail \--with-mail_ssl_module \--with-pcre \--with-pcre-jit \make && make install
3. 到这里两个软件部署完成,开始配置
3.1 gitlab配置
cd /etc/gitlab###
vim gitlab.rb
#修改gitlab配置文件第13行(ip改成域名)
external_url 'http://git.linux-test.com'###
vim /var/opt/gitlab/gitlab-rails/etc/gitlab.yml
#修改配置文件第13行host
host: git.linux-test.com
#修改配置文件第41行email
email_from: gitlab@git.linux-test.com
3.2 加载gitlab配置文件启动
#加载配置文件
gitlab-ctl reconfigure
#固定套路
gitlab-ctl start
gitlab-ctl restart
gitlab-ctl stop
3.3 配置nginx
cd /usr/local/nginx/confvim nginx.conf
#主配置文件中http标签加入以下内容,当然也可以重写主配置文件
client_body_buffer_size 50m;
sendfile on;
include vhost/*.conf;
####mkdri vhost
cd vhostvim git_domain_name.conf
#配置gitlab域名代理
upstream git_domain {
server localhost:8080;
}server {listen 80;server_name git.linux-test.com;access_log logs/git.access.log ;error_log logs/git.error.log ;location / {client_max_body_size 50m;proxy_redirect off;proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_pass http://localhost:8080;index index.html index.htm;
}
}
3.4 检查nginx语法,启动
#检测nginx语法
/usr/local/nginx/sbin/nginx -t
#出现ok和successful表明语法无误
/usr/local/nginx/sbin/nginx
3.5 我可能有地方写错了,nginx和gitlab变成了守护进程
#如果有大佬发现问题,可以给个评论讲解一下
转载于:https://blog.51cto.com/linux1991/2086386
centos6上 tengine本地代理gitlab服务器部署相关推荐
- 【20210402期AI简报】TensorFlow-YOLOv3 从本地训练到服务器部署全过程
导读:本期为 AI 简报 20210402 期,将为您带来 8 条相关新闻,明日寒食节~ 记得有一期有小伙伴留言说需要手势识别相关,本期它来啦~ 本文一共 2200 字,通篇阅读结束需要 5~7 分钟 ...
- 一行js_Node.js 一行命令上传本地文件到服务器
每次打包完, 都要打开 FileZilla 一顿拖拽然后才能上传代码, 那就立马撸一个自动化脚本就完事了 publish-sftp Github 传送门(~~~~顺便来骗个Star~~~~) 以后一行 ...
- MacOS下载服务器的文件/文件夹到本地、上传本地文件到服务器
1.从服务器下载文件或文件夹 如果要下载xx.cpp文件,则在本地终端输入: scp 用户名@主机名:xx/xxx/xx.cpp 本地路径 如果要下载dir文件夹,则在本地终端输入: scp -r 用 ...
- python web开发c6——阿里云上ubuntu+flask+gunicorn+nginx服务器部署(一)简单测试
简述 Nginx在服务器部署中的作用 请求通过Nginx实现反向代理,将请求提交给代理服务器.本文中只用了一台服务器,所以是代理到本机. gunicorn的作用 作为服务器代码的容器.接收Nginx的 ...
- Git上传本地文件到服务器,git上传文件到远程服务器
git上传文件到远程服务器 内容精选 换一换 将文件上传至Windows云服务器一般会采用MSTSC远程桌面连接的方式.本节为您介绍本地Windows计算机通过远程桌面连接,上传文件至Windows云 ...
- 在服务器上运行本地的项目 (部署亲测有效)转载请注明出处
1)内容都是一样的就是文件名不同而已.底层是C语言的不过这第一步只针对现在使用的项目部署所需要的文件.后面的步骤就适合大部分项目了. libSDF_fabu.so, libSDF_zhuce.so, ...
- 保姆级教程 | TensorFlow-YOLOv3 从本地训练到服务器部署全过程
本文为 52CV 粉丝投稿,分享对已开源的 tensorflow-yolov3 版本进行许多细节上算法改进,步骤详细,非常适合新手入门. 01 项目简要说明 本项目主要对原 t ...
- 本地搭建gitlab服务器(Ubuntu)
这里写自定义目录标题 1.下载ce包 2.安装 3.配置Gitlab 4.配置Ubuntu网络 5.配置Windows网络 6.启动Gitlab 7.登陆 1.下载ce包 首先到gitlab官网下载c ...
- [SecureCRT]通过SFTP方式上传本地文件到服务器
1.在本地建一个文件夹,如:d:\My Documents,在此目录下,放入我们需要上传的文件,如:nmon_linux_x86_64 2.然后打开我们的SecureCRT工具,一次选择Options ...
- CentOS6上Hadoop集群中服务器cpu sys态异常的定位与解决
问题现象 在zabbix系统中,对Hadoop集群的历史监控数据分析时,发现在执行大Job任务时,某些服务节点的cpu sys态很高: 具体以hadoop_A服务节点为例,在10:15-10:40这个 ...
最新文章
- selenium + python自动化测试环境搭建
- 史上最全的正则表达式
- C++中全局函数和局部函数的关系
- 英语在线听力翻译器_仁爱版初一英语免费听力训练电子教程
- 二进制图片在http怎么显示_HTTP/2内核剖析
- 计算机博士英语复试题目,博士复试自我介绍中英文双语解读
- LeetCode 1291. 顺次数(模拟)
- [转载]Tomcat 6.0 安装配置
- python爬虫网络出错怎么办_python爬虫之headers处理、网络超时问题处理
- 微软水下数据中心“浮出水面”、GitHub代码保存在北极,数据黑科技贮藏方式大曝光!...
- oracle11整库迁移,Oracle11.2数据库迁移总结
- table固定表头、固定列
- vue设置LED字体
- 一名优秀的数据分析师,应该具备哪些基本素质?
- 深度学习笔记其三:多层感知机和PYTORCH
- allegropcb建元件库_Cadence_PCB封装库的制作及使用
- 【流媒体】Red5流媒体服务器开发总结
- 概率论与数理统计习题解答
- 让电脑显示的字体更加圆润清晰
- 基于源代码的软件同源性分析与漏洞检测系统(C++和QT)
热门文章
- 小程序自定义tabBar(类似咸鱼)
- access 英语什么意思_Access数据库集成教程二:创建查询
- phpqrcode 生成二维码
- 条件指示符 #ifndef 的用处
- 在PHP中怎么判断字符串中没有,在php中搜索字符串中没有的字符
- vue跨域使用websocket_在vue中使用SockJS实现webSocket通信的过程
- 增加一个输出,解决一个奇怪的死机
- 研究了EXCEL的行高问题
- 难以回答的问题:注册监听器有什么用?
- ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or