2022年4月15日 星期五

[Docker][Redmine 5.0] How to use docker to use redmine

Pull docker image first.
docker pull sameersbn/redmine:5.0.0

Download “docker-compose-sqlite3.yml”:https://github.com/sameersbn/docker-redmine/blob/master/docker-compose-sqlite3.yml

Following command will start redmine by using docker
sudo docker-compose up

Following command can login into above container
docker exec -it “Container” /bin/bash


How to reset the docker

This command will let docker down
sudo docker-compose down

Re-create a clear contain
sudo docker-compose up -d

Start docker again
sudo docker-compose up


Restart the web server inside the container

Following command can login into above container
docker exec -it “Container” /bin/bash

Following command will restart web server
sudo service nginx restart

Ref
https://quicknotepadtutorial.blogspot.com/2020/07/setting-up-redmine-with-docker-compose.html

https://github.com/sameersbn/docker-gitlab

 

2020年11月13日 星期五

[Archlinux][ntp] How to execute ntp after reboot automatically

  1. To do this in systemd, you can run

systemctl -a | grep ntp

  1. to see if ntpdate is enabled. To enable it is just run

systemctl enable ntpdate

2020年10月26日 星期一

[redmine][bitnami] How to virtualbox to build redmine quickly

  1. Download ova (virtualbox image) from bitnami webpage
  2. Start ova at virtualbox
  3. INSTALL SQLITE3 GEM FOR RUBY
    gem install sqlite3-ruby
  4. disable bundle deployment mode.
    bundle install --no-deployment
  5. Start to configure the environment settings.
    5-1. Set sqlite database
    cd REDMINE
    CONFIGURE DATABASE
    echo “production:” > config/database.yml &&
    echo " adapter: sqlite3" >> config/database.yml &&
    echo " database: db/redmine.sqlite3" >> config/database.yml
    5-2. POPULATE DATABASE
    cd REDMINE
    rake db:migrate RAILS_ENV=“production”
    rake redmine:load_default_data RAILS_ENV=“production”
    5-3. Create secret_token
    cd REDMINE
    echo “production:” > config/secrets.yml
    echo " secret_key_base: $(rake secret)" >> config/secrets.yml
  6. Change the permission of folder of redmine
    chmod 777 /home/bitnami/apps/redmine -Rf
  7. Restart redmine again
    /home/bitnami/stack
    ./ctlscript.sh restart

[Virtualbox] Installing Virtualbox on Arch Linux

  1. sudo pacman -S virtualbox virtualbox-guest-iso
  2. Add the current user to the vboxusers group
    sudo gpasswd -a $USERS vboxusers
  3. Load the virtualbox kernel module using the command
    sudo modprobe vboxdrv
  4. install extension package
    yay -Syy
    Following is how to install yay
    git clone https://aur.archlinux.org/yay.git
    cd yay/
    makepkg -si
  5. yay -S virtualbox-ext-oracle
  6. enable vboxweb
    sudo systemctl enable vboxweb.service
    sudo systemctl start vboxweb.service
  7. lsmod | grep -i vbox

Ref:

2020年10月25日 星期日

[Virtualbox] Kerner module


1. Decompress linux source code to "/lib/modules/5.8.10-arch1-1/build"
tar xvf /home/haha/Downloads/linux-5.8.10.tar.xz -C /lib/modules/5.8.10-arch1-1/build

2. Jump to /lib/modules/5.8.10-arch1-1/build
copy all file which under linux-5.8.10 to under build
mv linux-5.8.10/* .

3. Go to /lib/modules/5.8.10-arch1-1/build
modify UTS_RELEASE in Makefile
echo \#define UTS_RELEASE \"$(KERNELVERSION)\";
--> echo \#define UTS_RELEASE \"5.8.10-arch1-1\";

4. Start to compile
gunzip < /proc/config.gz > .config
make oldconfig
make prepare
make scripts

2020年9月27日 星期日

2020年8月20日 星期四