Meego local obs setup steps

Source: Internet
Author: User
Tags ssl certificate

References:

Http://blog.csdn.net/forestarmy

Http://blog.chinaunix.net/space.php? Uid = 25153965 & Do = Blog & id = 160561

1. Install opensuse 11.4

2. Open some ports of the firewall to enable SSH and so on:

View plain Copy
To clipboard
Print ?
  1. # Vi/ete/sysconfig/susefirewall2
  2. Fw_services_ext_tcp = "ssh 445 139 Telnet 80 81 82"
  3. Fw_services_ext_udp = "137 138"
  4. # Rcsusefirewall2 restart

3. Set up obs

OBS (opensuse build system) is an important tool for meego source code compilation. It can also be said to be a required tool. With this tool, we can easily compile various packages in the source code and then make a meego image, therefore, building an OBS system is an important part of meego development.

View plain Copy
To clipboard
Print ?
  1. CD/etc/zypp/repos. d /;
  2. Wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.4/openSUSE:Tools.repo
  3. Zypper ref

Install obs-server and related packages

View plain Copy
To clipboard
Print ?
  1. Zypper in OBS-server obs-signd obs-utils createrepo nfs-client obs-API memcached Lighttpd

Set Database

Enabled by default:

View plain Copy
To clipboard
Print ?
  1. Chkconfig -- add MySQL
  2. Rcmysql start

Note: chkconfig -- add MySQL may fail:

Linux-ubai:/OBS # chkconfig -- level 35 MySQL on
Insserv: Fatal: Service Network is missed in the runlevels 2 to use service MySQL
Insserv: exiting now!
/Sbin/insserv failed, exit code 1

The solution is to open level2 of "network": chkconfig -- level 2 network on.

Use the tools provided by the system to install the database:

View plain Copy
To clipboard
Print ?
  1. /Usr/bin/mysql_secure_installation

You can enter your own database password, which is empty by default.

Create a database:

View plain Copy
To clipboard
Print ?
  1. Mysql-u root-P
  2. Mysql> Create Database api_production;
  3. Mysql> Create Database webui_production;

Add obs user information to the database:

View plain Copy
To clipboard
Print ?
  1. Grant all privileges
  2. On api_production .*
  3. To 'oss' @ '%', 'oss' @ 'localhost' identified by 'obspasswd ';
  4. Grant all privileges
  5. On webui_production .*
  6. To 'oss' @ '%', 'oss' @ 'localhost' identified by 'obspasswd ';
  7. Flush privileges;

Set the OBS password here: obspasswd

To use the database, you need to configure Obs:

View plain Copy
To clipboard
Print ?
  1. VI/srv/www/OBS/API/config/database. yml
  2. # Change the Production Section
  3. Production:
  4. Adapter: MySQL
  5. Database: api_production
  6. Username: obs
  7. Password: obspasswd
View plain Copy
To clipboard
Print ?
  1. VI/srv/www/OBS/webui/config/database. yml
  2. # Change the Production Section
  3. Production:
  4. Adapter: MySQL
  5. Database: webui_production
  6. Username: obs
  7. Password: obspasswd

Fill database:

View plain Copy
To clipboard
Print ?
  1. CD/srv/www/OBS/API/
  2. Rails_env = "production" rake DB: Setup
  3. CD/srv/www/OBS/webui/
  4. Rails_env = "production" rake DB: Setup

Set Lighttpd

  1. Web page display
  2. View plainCopy
    To clipboard
    Print?
    1. # Vi/etc/Lighttpd. conf
    2. Include_shell "cat/etc/Lighttpd/vhosts. d/*. conf"
    3. VI/etc/Lighttpd/vhosts. d/OBS. conf
    4. $ Server ["socket"] = ": 80 "{
    5. Rails_app =
      "Webui"
    6. Rails_root = "/srv/www/OBS/webui"
    7. Rails_procs =
      3
    8. # Production/development are typical values here
    9. Rails_mode =
      "Production"
    10. Log_root = "/srv/www/OBS/webui/log"
    11. Include "vhosts. d/rails. Inc"
    12. }
    13. $ Server ["socket"] = ": 81 "{
    14. Rails_app = "API"
    15. Rails_root =
      "/Srv/www/OBS/API"
    16. Rails_procs = 3
    17. # Production/development are typical values here
    18. Rails_mode = "production"
    19. Log_root =
      "/Srv/www/OBS/API/log"
    20. Include "vhosts. d/rails. Inc"
    21. }
    22. $ Server ["socket"] = ": 82 "{
    23. Server. Name = "192.168.129.140" # change the IP address to the address of your server, for example, "192.168.129.140"
    24. Server.doc ument-root =
      "/Srv/OBS/repos /"
    25. Dir-listing.activate =
      "Enable"
    26. }
  3. View plainCopy
    To clipboard
    Print?
    1. # Vi/etc/Lighttpd/modules. conf
    2. Server. Modules = (
    3. "Mod_access ",
    4. # "Mod_alias ",
    5. # "Mod_auth ",
    6. # "Mod_evasive ",
    7. # "Mod_redirect ",
    8. "Mod_rewrite ",
    9. # "Mod_setenv ",
    10. # "Mod_usertrack ",
    11. )
    12. ##
    13. # Mod_magnet
    14. ##
    15. Include "Conf. d/magnet. conf"
    16. ##
    17. # FastCGI (mod_fastcgi)
    18. ##
    19. Include "Conf. d/FastCGI. conf"
  1. Confirm the server address and modify the server address of the file:

    View plainCopy
    To clipboard
    Print?
    1. # Vi/srv/www/OBS/webui/config/environments/production. Rb
    2. Frontend_host =
      "192.168.129.140"
    3. Frontend_port =
      81
    4. Frontend_protocol =
      'Http'
    5. Bugzilla_host =
      Nil
    6. Download_url = "http: // 192.168.129.140: 82"
    7. Ichain_mode =
      "Off"
    8. Base_namespace =
      Nil
    9. # Vi/srv/www/OBS/API/config/environments/production. Rb
    10. Source_host = "192.168.129.140"
  1. Set server startup optionsView plainCopy
    To clipboard
    Print?
    1. Chkconfig -- add memcached Lighttpd obsapidelayed obswebuidelayed
    2. Chkconfig -- add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner

Modify webpage usage Permissions

View plain Copy
To clipboard
Print ?
  1. Chown-r Lighttpd. Lighttpd/srv/www/OBS/{API, webui}

Configure the OBS Server

View plain Copy
To clipboard
Print ?
  1. # Vi/usr/lib/OBS/Server/bsconfig. PM
  2. My $ hostname =
    '192. 168.129.140 ';
  3. Our $ repodownload =
    "Http: // $ hostname: 82 /";

Start the OBS Server

View plain Copy
To clipboard
Print ?
  1. # Rcmemcached start
  2. # Rclighttpd start
  3. # Rcobsapidelayed start
  4. # Rcobswebuidelayed start

NOTE: If rcobsapidelayed start reports an error:

/Srv/www/OBS/API/lib/custom_logger.rb: 7: In 'format _ message': Undefined method '[]' For # <nomethoderror: 0xb675a984> (nomethoderror)

...

From/srv/www/OBS/API/script/delayed_job.api: 7

The problem of restarting the server disappears.

Here we can open our obs on the webpage (http: // 192.168.129.140/), Port 80 is the main interface, port 81 is the interface, port 82 is a warehouse (no data is generated yet)

If you encounter an HTTP 404 error when accessing port 82, perform the following operations:

# Mkdir/srv/OBS/Repos

# Chown-r obsrun: obsrun/srv/OBS/Repos

4. Build a client

Accurate description,Obs-worker is also part of the OBS server. When using OBS, we will not operate on it. It is just a tool on the server for implementing it.
Install obs-worker and related tools:

View plain Copy
To clipboard
Print ?
  1. 1. zypper in OBS-worker qemu-SVN Mount-static bash-static

Modify the Server IP address, that is, it only wants the server where we are located:

View plain Copy
To clipboard
Print ?
  1. # Vi/etc/sysconfig/OBS-worker
  2. Obs_src_server = "'192. 168.129.140: 192"
  3. Obs_repo_servers = "'192. 168.129.140: 192"

Start obs-worker by default:

View plain Copy
To clipboard
Print ?
  1. Chkconfig -- add obsworker
  2. Rcobsworker start

NOTE: If rcobsworker start reports an error:

    Chmod: cannot access 'bs _ worker ': no such file or directory

This problem disappears after the server is restarted.

5. Import basic meego data

View plain Copy
To clipboard
Print ?
  1. Mkdir-P/OBS/imports
  2. Mkdir-P/OBS/build
  3. Ln-S/OBS/build/srv/OBS/build

To compile the modified meego source code package, we must first store all the basic packages on the OBS server in advance. Obs calls these packages based on their dependencies. It is easier to use scripts to complete these tasks:

Modify the Scheduler:

For meego1.2, the arch is armv7hl, and the corresponding dispatcher arch is armv8el:

# Vi/etc/sysconfig/OBS-Server

Obs_scheduler_ubuntures = "i586 armv5el armv8el"

View plain Copy
To clipboard
Print ?
  1. Wget http://stskeeps.subnetmask.net/meego/import-meego-release.sh
  2. Music import-meego-release.sh/usr/sbin/
  3. Chmod+ x/usr/sbin/import-meego-release.sh

Note that this import-meego-release.sh may need to be modified. For example, you need to use armv7hl/armv8el when using meego1.2, and change the IP address in it to the IP address of the server.

Download prjconf of meego1.2:

      View plain Copy
      To clipboard
      Print ?
      1. Git clone http://git.gitorious.org/meego-developer-tools/obs-project-config.git

      The input parameters are determined by the directory structure on ftp://mirrors.kernel.org/meego/, and we modify the modified parameters,
      For example, the target is a ftp://mirrors.kernel.org/meego/builds/1.1.90/1.1.90.5.20110301.7/repos/oss/ia32/packages/
      Then the parameter is 1.1.90.5.20110301.7 rsync: // mirrors.kernel.org/meego/builds/1.1.90/

      View plain Copy
      To clipboard
      Print ?
      1. Import-meego-release.sh 1.2.90.0.0.2011020..2 rsync: // mirrors.kernel.org/meego/builds/1.2.90// home/tvos/OBS-project-config/meego_1.2

      Note: 1.2.90.x indicates that the meego version is a beta version of 1.3. 1.2.0 is the first version released by meego. When the above command is executed for the first time, the error http401 is printed after all required RPM packages are successfully downloaded. The reason is that there is a problem with the user and pass in/root/. oscrc: User = <project name = "meego: 1.2.90.0.201101_.2: Core">
      Pass = opensuse: Which of the following statements is true for admin:
      User = Admin
      Pass = opensuse

      After the preceding command is successfully executed, the following message is displayed:

      Sending meta data...
      Warning: SSL Certificate checks disabled. Connection is insecure!

      Done.
      Sending meta data...
      Warning: SSL Certificate checks disabled. Connection is insecure!

      Done.
      /Srv/OBS/events/armv8el/. scanrepo: meego: 1.2.90.0.2011020..2: CORE: standard11721: no such file or directory
      Meego: 1.2.90.0.0.201102.16.2: Core imported into OBS, after rescan is done.

      This indicates that meego is successfully imported to obs.

      Meego: 1.2.90 .....:

 

 

Supplement 1:

 

In opensuse of VMware, run
Chkconfig -- level 2 network on
Error;
But Execute
Chkconfig -- add Network
OK, and then chkconfig -- add MySQL is successful.

 

Supplement 2:

 

A strange error occurred while importing meego:
The so library in python2.7 contains unqualified elf headers.
Failed to uninstall Python or reinstall python.

Finally, we will pack/usr/lib/python2.7 on the originally built obs server (192.168.129.171) and overwrite the new obs server (192.168.129.140) to solve this problem.

Article transferred from: http://www.cnblogs.com/sonach/archive/2011/12/24/2300700.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.