Rhodecodeインストールほか
Posted on 2014/02/23(Sun) 22:05 in technical
Rhodecodeインストール
インストールログ:
rhodecode@ubuntu1204-4:/home/rhodecode$ mkdir rhodecode rhodecode@ubuntu1204-4:/home/rhodecode$ cd rhodecode rhodecode@ubuntu1204-4:/home/rhodecode/rhodecode$ wget https://rhodecode.com/dl/rhodecode-installer.py rhodecode@ubuntu1204-4:/home/rhodecode/rhodecode$ sudo python rhodecode-installer.py RhodeCode Installer 0.7.0 ------------------------- I am your assistant for installing, upgrading & adjusting of RhodeCode Enterprise. You can always quit me by typing 'q' on the prompt. RhodeCode Installer 0.7.0 ------------------------- Do you already have RhodeCode or RhodeCode Enterprise installed on this server? [y]es [n]o > n 'n' RhodeCode Installer 0.7.0 ------------------------- Under which Linux user do you want to install RhodeCode Enterprise? > rhodecode Creating folder /home/rhodecode/rhodecode/data ... Creating folder /home/rhodecode/rhodecode/system ... Creating folder /home/rhodecode/rhodecode/repos ... RhodeCode Installer 0.7.0 ------------------------- Currently I am supporting proxy servers with username:password authentication (called basic auth) and proxy servers without authentication. Do you need to connect through a proxy server with the Internet? [y]es [n]o > n RhodeCode Installer 0.7.0 ------------------------- Please select an option: [1] Install RhodeCode Enterprise [0] Upgrade RhodeCode Installer [q] Quit installer > 1 RhodeCode Installer 0.7.0 ------------------------- RhodeCode Installer 0.7.0 ------------------------- Please wait, I am downloading & installing the dependencies. This may take up to 5 minutes ... ... running command: sudo apt-get update -y ... running command: sudo apt-get install python-dev build-essential git -y ... running command: sudo apt-get install libpq-dev libmysqlclient-dev -y ... running command: sudo apt-get install libldap2-dev libsasl2-dev libssl-dev -y I installed the dependencies. Please wait, I am downloading ... Please wait, I am unzipping the download ... Please wait, I am downloading ... Please wait, I am unzipping the download ... Please wait, I am installing ... Please wait, I am creating the configuration files ... I successfully installed RhodeCode Enterprise for you. Starting setup now ... RhodeCode Installer 0.7.0 ------------------------- Now I want to run the initial setup and create the first RhodeCode Enterprise user. The user will get administrator rights. For that I need to ask you the email, username and password for that user account. Please do not enter spaces to avoid issues. Please enter the email address: > username@example.com Please enter the username: > username Please enter a password for the user: > Please enter the same password again: > RhodeCode Installer 0.7.0 ------------------------- I need to store that admin user in a database. Important: For MySQL and PostgreSQL the database must already exist! For SQLite everything is automatically created. What database do you use? [s]qlite (built-in, no server needed) [m]ysql [p]ostgresql > s RhodeCode Installer 0.7.0 ------------------------- Now I need to store all data in the database to finish the setup. Please wait, I am creating the admin user and run the initial database setup ... RhodeCode Installer 0.7.0 ------------------------- I try to install the service to /etc/init.d/rhodecode ... Please wait, I am downloading the init.d file for your operating system ... Please wait, I am customizing the init.d file for your installation ... I create the log folder /var/log/rhodecode if not existing, yet ... ... running command: sudo mkdir /var/log/rhodecode I create the log file /var/log/rhodecode/rhodecode.log if not existing, yet ... ... running command: sudo touch /var/log/rhodecode/rhodecode.log I set the proper write permissions for the log file ... ... running command: sudo chmod 0666 /var/log/rhodecode/rhodecode.log I copy the init.d file to /etc/init.d/rhodecode ... ... running command: sudo cp /tmp/rhodecode-initd-template /etc/init.d/rhodecode I make the file /etc/init.d/rhodecode executable ... ... running command: sudo chmod +x /etc/init.d/rhodecode I am verifying the correct installation of the init.d file ... I am trying to restart the new service ... ... running command: sudo /etc/init.d/rhodecode restart RhodeCode Installer 0.7.0 ------------------------- The RhodeCode Enterprise service was installed and is already running on port 5000! You can start, stop, restart and get the status of the service with: sudo /etc/init.d/rhodecode {start|stop|restart|status} Please select an option: [b] Back to menu [q] Quit Installer > q Thanks, it was a pleasure to be your assistant! rhodecode@ubuntu1204-4:/home/rhodecode/rhodecode$
警告
インストールユーザとは異なるユーザがインストールすることもできるけど、/home/<usename>にインストールしようとするから権限周り面倒ですよ。
言語設定
デフォルトは英語なので、WebUIを日本語表記に変更する。
data/production.ini:
## Optional Languages ## en, fr, ja, pt_BR, zh_CN, zh_TW, pl, ru lang = ja
再起動:
$ sudo /etc/init.d/rhodecode restart
ReverseProxy設定
WebサーバとRhodecodeサーバを分ける場合に、サブディレクトリでのアクセスを行う場合
- Webサーバ : http://www.example.com/
- Rhodecode : http://www.example.com/rhodecode/
data/production.ini:
host = 0.0.0.0 ## prefix middleware for rc [filter:proxy-prefix] use = egg:PasteDeploy#prefix prefix = /rhodecode [app:main] use = egg:rhodecode ## enable proxy prefix middleware filter-with = proxy-prefix
再起動:
$ sudo /etc/init.d/rhodecode restart