# where highlighted if incorrect the service may not start
disable = no
type = UNLISTED
port = 9418
socket_type = stream
wait = no
user = nobody
server = /usr/bin/git
server_args = daemon --inetd --export-all --base-path=/var/fsq
log_on_failure += USERID
$ sudo /etc/init.d/xinetd restart $ sudo /etc/init.d/xinetd status
# change gitlab port to match nginx port $ nano /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
## GitLab settings
## Web server settings (note: host is the FQDN, do not include http://)
# change gitlab port to match nginx port $ nano /etc/gitlab/gitlab.rb
## Url on which GitLab will be reachable.
## For more details on configuring external_url see:
## Advanced settings
# unicorn['listen'] = '127.0.0.1'
# unicorn['port'] = 8081
# unicorn['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket'
# unicorn['pidfile'] = '/opt/gitlab/var/unicorn/unicorn.pid'
# reconfigure gitlab $ gitlab-ctl reconfigure
# restart gitlab $ sudo gitlab-ctl restart
# restart server $ sudo reboot
# restart nginx $ /etc/init.d/nginx restart
# check if listen to port $ nmap -sS 192.168.0.14
# navigate to page. Be careful with browser cache (especially firefox)
Found out that not enough memory was being allocate. May be because its a raspberry pi and it has limited memory.
The solution was to reduce unicorn worker processes thus reducing the memory consumption. $ nano /etc/gitlab/gitlab.rb
# Deleting branches and committing changes (edit file) using GitLab hangs it
error: proxyRoundTripper: POST " failed with: "EOF"
The corresponding unicorn worker waits for the git hook to complete and can not serve other requests during this time. The hook uses the GitLab web API to check if the user is allowed to execute the requested git operation. Because I had unicorn running with only one worker, no other worker was available to serve the API request, thus resulting in a deadlock. https://gitlab.com/gitlab-org/gitlab-ce/issues/13947
If you get permission errors like "You don't have permission to access /assets/logo-white-0b53cd4ea06811d79b3acd486384e047.png on this server." then you need "Require all granted" in the <Location> in your apache vhost configuration file
# if you only want to replicate a specified database you need to add line to my.cnf
# !!! IMPORTANT in selecting the correct database name or replication will run without errors but nothing will be updated
# name reported to the master during slave registration
# give a server id
# give bin log file location
# restart database
$ sudo /etc/init.d/mysql restart
# add the user the slave will use
mysql> CREATE USER 'repl'@'%' IDENTIFIED BY 'slavepassword';
mysql> GRANT REPLICATION SLAVE ON *.* TO 'repl'@'%';
the slave server has a ‘read-only’ variable because that is its purpose. (Do not use this in master-master replication)
# The purpose of the import is because both the master and slave database must be the equal at point where the binlog started recording the replication.
# import the dump.
$ mysql -uroot < master_dbname_dump.sql
# Set the slave user
mysql> CHANGE MASTER TO MASTER_HOST='192.168.1.3', MASTER_USER='repl', MASTER_PASSWORD='slavepassword';
# Set a user that will only have an read ability.
# This is a safeguard and repetitive because setting the 'read-only' variable in my.cnf would prevent slave writing. Slave should not have writing permissions.
mysql> CREATE USER 'read_user'@'%' IDENTIFIED BY 'password';
mysql> GRANT SELECT ON *.* TO 'read_user'@'%';
# start slave
mysql> START SLAVE;
mysql> SHOW SLAVE STATUS \G
The location of either the master or slave logs are located in /var/log/mysql.
Its a binary(.bin) file contain the queries ran to sync the slave.
# view what inside the bin, mysql view queries logs
$ mysqlbinlog /var/log/mysql/mysql-bin.000001
# show the bin name
mysql> SHOW MASTER STATUS;
mysql> SHOW BINARY LOGS;
# to reset all the queries and purge all binary logs. This will also do the same in the slave.
mysql> RESET MASTER;
# Sometimes there's errors in the 'slave status' you can skip queries but more error may lie ahead. This is not a permanent fix.
mysql> SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
# the slave is working when you see this in the status
# To detect a Master and Slave being out of sync
# Pick any table and run CHECKSUM TABLE against a table on the Master and the Slave's copy of the same table.
# If the values do not come back the same, then something is out-of-sync.
mysql> CHECKSUM TABLE dbname.table;
On master when changing the replicate user password there was an error on the slave. Then the slave needed to be reset.
To pair your wireless headset with a Bluetooth device:
1.Set the slider switch to the Bluetooth icon.
2.Slide the track switch to “Next” and hold, and press and hold the “Volume up” button at the same time, until the link LED indicator blinks rapidly.
NOTE: For initial Bluetooth setup, your headset will automatically be in pairing mode.
3.Make sure Bluetooth is active on your device and then select “H800 Logitech Headset” in the Bluetooth devices list (see your Bluetooth device’s documentation for more help).
# import company key into your system
# sometimes called signing key or public key
# the file of import should start with this line ‘—–BEGIN PGP PUBLIC KEY BLOCK—–‘ $ gpg --keyid-format long --import [public_key/signing_key]
# run validation with signature and program. $ gpg --keyid-format 0xlong --verify program.exe.sig program.exe
# you may get several different responses but the one that is bad for sure is ‘gpg: BAD signature from …’
Selected dyndns.com in the installation process and followed the prompts. Did not need to manually enter anything.
Enable Dynamic DNS for your domain
Login to your Namecheap control panel and enable dynamic DNS for your domain.
You’ll get a really long password string to use. Save that for now as you’ll need it later on.
$ sudo nano /etc/ddclient.conf
# namecheap.com example configuration
# the login is the domain name and password is the hash you saved in the prior step called ‘Dynamic DNS Password’.
# Configuration file for ddclient generated by debconf
use=web, web=dynamicdns.park-your-domain.com/getip, web-skip='IP Address'
# start motion
$ sudo service motion start
$ sudo /etc/init.d/motion start
You can now open up a browser from another computer on the same network and go to: http://192.168.0.85:8081 to view your web cam.
You can remotely control the web cam settings by going to http://192.168.0.85:8080.
# View if ports are listening
$ netstat -tapen | grep “LISTEN”
$ sudo nmap -sS 192.168.0.85
# test connection
telnet 127.0.0.1 8080
# view if there is any errors. Make sure log is enabled in motion.conf
# At one point the ports were not staying open after motion started was due to permission issues on /var/lib/motion. Error was found in the log.
$ cat /tmp/motion.log
# view if motion is running
$ ps aux | grep motion