一.环境
在阿里最低配置的Ubuntu系统中搭建,因为公司用的gogs搭建的git仓库,还很不错,而且消耗内存比较小。
阿里云ECS服务器 Ubuntu 16.04.2(1核cpu 、1G内存 、 1M带宽 、 40G系统盘)
二、安装Gogs所需环境
1.安装nginx
sudo apt-get install nginx
如果报异常:
root@iZuf65yda1tq4hu68dttphZ:/usr/local# sudo apt-get install nginx
sudo: unable to resolve host iZuf65yda1tq4hu68dttphZ
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package nginx
//则需要先更新sudo apt-get update
# sudo apt-get update
2.安装git
sudo apt-get install git
3.安装MySQL
sudo apt-get install mysql-server
4.进入数据库
mysql -u root