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
?
- # Vi/ete/sysconfig/susefirewall2
- Fw_services_ext_tcp = "ssh 445 139 Telnet 80 81 82"
- Fw_services_ext_udp = "137 138"
- # 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
?
- CD/etc/zypp/repos. d /;
- Wget http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.4/openSUSE:Tools.repo
- Zypper ref
Install obs-server and related packages
View plain
Copy
To clipboard
Print
?
- 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
?
- Chkconfig -- add MySQL
- 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
?
- /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
?
- Mysql-u root-P
- Mysql> Create Database api_production;
- Mysql> Create Database webui_production;
Add obs user information to the database:
View plain
Copy
To clipboard
Print
?
- Grant all privileges
- On api_production .*
- To 'oss' @ '%', 'oss' @ 'localhost' identified by 'obspasswd ';
- Grant all privileges
- On webui_production .*
- To 'oss' @ '%', 'oss' @ 'localhost' identified by 'obspasswd ';
- Flush privileges;
Set the OBS password here: obspasswd
To use the database, you need to configure Obs:
View plain
Copy
To clipboard
Print
?
- VI/srv/www/OBS/API/config/database. yml
- # Change the Production Section
- Production:
- Adapter: MySQL
- Database: api_production
- Username: obs
- Password: obspasswd
View plain
Copy
To clipboard
Print
?
- VI/srv/www/OBS/webui/config/database. yml
- # Change the Production Section
- Production:
- Adapter: MySQL
- Database: webui_production
- Username: obs
- Password: obspasswd
Fill database:
View plain
Copy
To clipboard
Print
?
- CD/srv/www/OBS/API/
- Rails_env = "production" rake DB: Setup
- CD/srv/www/OBS/webui/
- Rails_env = "production" rake DB: Setup
Set Lighttpd
- Web page display
- View plainCopy
To clipboardPrint?
- # Vi/etc/Lighttpd. conf
- Include_shell "cat/etc/Lighttpd/vhosts. d/*. conf"
- VI/etc/Lighttpd/vhosts. d/OBS. conf
- $ Server ["socket"] = ": 80 "{
- Rails_app =
"Webui"
- Rails_root = "/srv/www/OBS/webui"
- Rails_procs =
3
- # Production/development are typical values here
- Rails_mode =
"Production"
- Log_root = "/srv/www/OBS/webui/log"
- Include "vhosts. d/rails. Inc"
- }
- $ Server ["socket"] = ": 81 "{
- Rails_app = "API"
- Rails_root =
"/Srv/www/OBS/API"
- Rails_procs = 3
- # Production/development are typical values here
- Rails_mode = "production"
- Log_root =
"/Srv/www/OBS/API/log"
- Include "vhosts. d/rails. Inc"
- }
- $ Server ["socket"] = ": 82 "{
- Server. Name = "192.168.129.140" # change the IP address to the address of your server, for example, "192.168.129.140"
- Server.doc ument-root =
"/Srv/OBS/repos /"
- Dir-listing.activate =
"Enable"
- }
- View plainCopy
To clipboardPrint?
- # Vi/etc/Lighttpd/modules. conf
- Server. Modules = (
- "Mod_access ",
- # "Mod_alias ",
- # "Mod_auth ",
- # "Mod_evasive ",
- # "Mod_redirect ",
- "Mod_rewrite ",
- # "Mod_setenv ",
- # "Mod_usertrack ",
- )
- ##
- # Mod_magnet
- ##
- Include "Conf. d/magnet. conf"
- ##
- # FastCGI (mod_fastcgi)
- ##
- Include "Conf. d/FastCGI. conf"
- Confirm the server address and modify the server address of the file:View plainCopy
To clipboardPrint?
- # Vi/srv/www/OBS/webui/config/environments/production. Rb
- Frontend_host =
"192.168.129.140"
- Frontend_port =
81
- Frontend_protocol =
'Http'
- Bugzilla_host =
Nil
- Download_url = "http: // 192.168.129.140: 82"
- Ichain_mode =
"Off"
- Base_namespace =
Nil
- # Vi/srv/www/OBS/API/config/environments/production. Rb
- Source_host = "192.168.129.140"
- Set server startup optionsView plainCopy
To clipboardPrint?
- Chkconfig -- add memcached Lighttpd obsapidelayed obswebuidelayed
- Chkconfig -- add obsrepserver obssrcserver obsscheduler obsdispatcher obspublisher obswarden obssigner
Modify webpage usage Permissions
View plain
Copy
To clipboard
Print
?
- Chown-r Lighttpd. Lighttpd/srv/www/OBS/{API, webui}
Configure the OBS Server
View plain
Copy
To clipboard
Print
?
- # Vi/usr/lib/OBS/Server/bsconfig. PM
- My $ hostname =
'192. 168.129.140 ';
- Our $ repodownload =
"Http: // $ hostname: 82 /";
Start the OBS Server
View plain
Copy
To clipboard
Print
?
- # Rcmemcached start
- # Rclighttpd start
- # Rcobsapidelayed start
- # 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. 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
?
- # Vi/etc/sysconfig/OBS-worker
- Obs_src_server = "'192. 168.129.140: 192"
- Obs_repo_servers = "'192. 168.129.140: 192"
Start obs-worker by default:
View plain
Copy
To clipboard
Print
?
- Chkconfig -- add obsworker
- 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
?
- Mkdir-P/OBS/imports
- Mkdir-P/OBS/build
- 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
?
- Wget http://stskeeps.subnetmask.net/meego/import-meego-release.sh
- Music import-meego-release.sh/usr/sbin/
- 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
?
- 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
?
- 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