You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.4 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. ##Install gogs under ubuntu 14.04 LTS 32bit from source code
  2. ###Requirements
  3. - Go Programming Language: Version >= 1.2
  4. - git(bash): Version >= 1.6.6(both server and client)
  5. - MySQL: Version >= 5.1 or PostgreSQL or NOTHING.
  6. ### Create the user which will run git
  7. - sudo adduser git
  8. - su git
  9. ### Install git and Mysql-server
  10. - sudo apt-get install git
  11. - sudo apt-get install mysql-server
  12. ### Create database
  13. - $ mysql -u root -p
  14. - mysql> SET GLOBAL storage_engine = 'InnoDB';
  15. - mysql> CREATE DATABASE gogs CHARACTER SET utf8 COLLATE utf8_bin;
  16. - mysql> GRANT ALL PRIVILEGES ON gogs.* TO 'root'@'localhost' IDENTIFIED BY 'pasword';
  17. - mysql> FLUSH PRIVILEGES;
  18. - mysql> QUIT
  19. ### install go from source
  20. - sudo apt-get install build-essential
  21. - sudo apt-get install mercurial
  22. - hg clone -r release https://go.googlecode.com/hg/ /home/git/golang/
  23. - echo export GOROOT=/home/git/golang >>.bashrc
  24. - echo export GOARCH=386 >>.bashrc
  25. - echo export GOOS=linux >>.bashrc
  26. - echo export GOBIN= /home/git/golang/bin >>.bashrc
  27. - echo export GOPATH=$HOME/app/Go >>.bashrc
  28. - echo PATH=${PATH}: /$HOME/golang/bin >>.bashrc
  29. - cd $GOROOT/src
  30. - ./make.bash
  31. ### Download and install dependencies
  32. - $ go get -u github.com/gogits/gogs
  33. ### Build main program
  34. - $ cd $GOPATH/src/github.com/gogits/gogs
  35. - $ go build
  36. - $ ./start.sh
  37. ### At present, you could access gogs from http://localhost:3000