Gerrit sets the boot method
- 2020-10-31 22:04:28
- OfStack
Method 1
1. Set up gerrit Service startup by following steps:
sudo ln -snf /home/gerrit/review_site/bin/gerrit.sh /etc/init.d/gerrit.sh
sduo ln -snf /etc/init.d/gerrit.sh /etc/rc2.d/S90gerrit
sduo ln -snf /etc/init.d/gerrit.sh /etc/rc3.d/S90gerrit
2. Service automatic startup scripts/etc/init d/gerrit sh need through/etc default/gerritcodereview (the declaration is unloaded gerrit. sh script) inside some configuration files to provide 1. The contents of the file are as follows:
GERRIT_SITE=/home/gerrit/review_site
NO_START=0
3. If it cannot start, you may need to check the permissions
update-rc.d gerrit2 defaults
Method 2
1. When you install gerrit, there will be 1 installation directory
Underneath it is an bin/ gerrit.sh file
Copy this file to /etc/ init.d and rename it gerrit
Then use the ES39en-ES40en-ES41en tool. This one can be installed directly by ES42en-ES43en install
Then execute ES47en-ES48en-ES49en, find the 1 line of gerrit, I put 2~5 on X
Then restart the system and there will be corresponding files under /etc/rc*.d. Here is the file S20gerrit
2. Then, when I installed gerrit in general, A new user was created. I put the installation directory under the new user
I did not have write permission under my own user, so I gave that user chmod 777-ES65en
Then in/etc/init d/gerrit script GERRIT_SITE to set 1
In this case, I have modified GERRIT_SITE_1 to the absolute path GERRIT_SITE_1= "/home/gerrit2/gerrit_application_directory"
Then restart, and the service, gerrit, is already started