centos7下gogs部署

1.下載

cd /usr/local/src
wget  https://dl.gogs.io/0.11.86/gogs_0.11.86_linux_386.tar.gz
tar xf gogs_0.11.86_linux_386.tar.gz
mv gogs /usr/local/

2.部署數據庫

yum install mysql -y
yum install mysql-server -y
yum install mysql-devel -y

#可是mysql-server安裝不了,須要一下操做
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum install mysql-community-server

3.啓動數據庫,設置密碼

systemctl start mysqld
mysql -uroot

>set password for 'root'@'localhost' = password('123456');
>flush privileges;

#重進數據庫
mysql -u root -p

#用戶本身定義
>grant all privileges on gogs.* to 'gogs'@'localhost' identified by '123456';
>flush privileges;

#導入gogs數據庫
mysql -u root -p < /usr/local/gogs/scripts/mysql.sql
passwd:

4.啓動gogs

#若是須要安裝go語言,本身去安裝一個
cd /usr/local/gogs
./gogs web

#不少人發現會出現錯誤
錯誤一:
     /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
錯誤二:
    while loading shared libraries: libpam.so.0: cannot open shared object file: No such file or directory

    致使以上錯誤是缺失了數據包
         yum install glibc.i686 -y
         yum install  pam.i686 -y

    再次啓動
    ./gogs web &
相關文章
相關標籤/搜索