Configure mailgun on Ubuntu (bsd-mailx / postfix)

1) Install bsd-mailx

aptitude install bsd-mailx

Select Internet Site in the Postfix Configuration screen.

If you missed it or want do reconfigure do:

dpkg-reconfigure postfix

2) Add mailgun configuration

Edit /etc/postfix/main.cf

relayhost = smtp.mailgun.org
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:[email protected]:password
smtp_sasl_security_options = noanonymous

3) Restart the postifx service

service postfix restart

Source: https://www.jamroom.net/brian/documentation/guides/1312/set-up-postfix-with-mailgun-for-reliable-e-mail-delivery

My GitLab CE notes (Ubuntu .deb installation)

They only way I found to keep my changes after a git-lab reconfigure is by editing default.rb and production.rb, please leave a comment if you know an alternative.

1) Installation

Install omnibus-gitlab from: https://www.gitlab.com/downloads/

sudo dpkg -i gitlab_6.6.5-omnibus-1.ubuntu.12.04_amd64.deb

2) Change Unicorn port and email addresses

Edit /opt/gitlab/embedded/cookbooks/gitlab/attributes/default.rb

# I am running Jenkins on 8080 so I need to change Unicorn port to 9292.
default['gitlab']['gitlab-rails']['internal_api_url'] = "http://localhost:9292"
default['gitlab']['unicorn']['port'] = 9292

# Change default emails
default['gitlab']['user']['git_user_email'] = "[email protected]"
default['gitlab']['gitlab-rails']['gitlab_email_from'] = "[email protected]"
default['gitlab']['gitlab-rails']['gitlab_support_email'] = "[email protected]"

3) (optional) Configure smtp

UPDATE: I decided to configure mailgun directly on my server, see: https://blog.gimpe.com/2014/04/configure-mailgun-on-ubuntu-bsd-mailx-postfix/

Edit /opt/gitlab/embedded/service/gitlab-rails/config/environments/production.rb

# use mailgun for emails
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.perform_deliveries = true
  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.smtp_settings = {
    :address => "smtp.mailgun.org",
    :port => 587,
    :domain => "",
    :authentication => :plain,
    :user_name => "",
    :password => "",
    :enable_starttls_auto => true
  }

4) Keep backup for 1 week

Note: I use a ZFS partition with daily snapshots.

Edit /opt/gitlab/embedded/cookbooks/gitlab/attributes/default.rb

default['gitlab']['gitlab-rails']['backup_keep_time'] = 604800

See commit: Merge branch ‘allow_setting_backup_keep_time’ into ‘master’

edit /opt/gitlab/embedded/cookbooks/gitlab/templates/default/gitlab.yml.erb

# uncomment backup keep time
 keep_time: 604800 # default: 0 (forever) (in seconds)

5) Use a NFS mount for backups

Edit /etc/fstab

host:/mnt/vol1/backup/gitlab /var/opt/gitlab/backups nfs _netdev,auto  0  0

6) Schedule daily backups in crontab

Type sudo crontab -e

0 2 * * * gitlab-rake gitlab:backup:create

7) (optional) Change hostname

Edit /var/opt/gitlab/gitlab-rails/etc/gitlab.yml

# change hostname (if needed)
    host: gitlab.local

8) Reconfigure!

sudo gitlab-ctl reconfigure

Ubuntu Jaunty: ATI Radeon HD 2400 XT working in dual head with compiz! (Catalyst 9.7)

1 – Compile and install driver:
Source: http://wiki.cchtml.com/

sudo aptitude install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++5 dkms

sh ati-driver-installer-9-7-x86.x86_64.run --buildpkg Ubuntu/jaunty

sudo dpkg -i xorg-driver-fglrx_*.deb fglrx-kernel-source_*.deb fglrx-amdcccle_*.deb

2 – Generate base xorg.conf:

sudo aticonfig --initial=dual-head

sudo aticonfig --dtop=horizontal

Note: you can do “dpkg-reconfigure xserver-xorg” to reset you xorg.conf to default values.

3 – Log out and log in to use the new xorg.conf

4 – Activate multi-screen & compiz:

Source: http://www.uluga.ubuntuforums.org/showthread.php?p=7552538

Start ATI Catalyst Control Center as root:

sudo amdcccle

Now, go in Display Manager -> Multi-Display -> Big Desktop right fo display 1

Then start compiz: System -> Preferences -> Appearence -> Visual Effects

Ubuntu Jaunty: ATI Radeon HD 2400 XT working in dual head (Catalyst 9.6)

1 – Compile and install driver:
Source: http://wiki.cchtml.com/

sudo aptitude install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++5 dkms

sh ati-driver-installer-9-6-x86.x86_64.run --buildpkg Ubuntu/jaunty

# i386
sudo dpkg -i xorg-driver-fglrx_*.deb fglrx-kernel-source_*.deb fglrx-amdcccle_*.deb

# AMD64
sudo dpkg -i xorg-driver-fglrx_*.deb fglrx-kernel-source_*.deb fglrx-amdcccle_*.deb

2 – Generate xorg.conf:

sudo aticonfig --initial=dual-head --screen-layout=right

sudo aticonfig --dtop=horizontal --overlay-on=1

sudo aticonfig --xinerama=on

Note: you can do “dpkg-reconfigure xserver-xorg” to reset you xorg.conf to default values.

3 – Bug workaround:
Source: http://jen3ral.wordpress.com/

  1. Login to a tty (ctrl+alt F1) and type sudo killall gdm.
  2. Type sudo nano (or gedit, whichever you prefer) /etc/ati/amdpcsdb to edit the file. Go to the [AMDPCSROOT/SYSTEM/DDX] section and add:
    EnableRandR12=Sfalse.
  3. Type this into a terminal, sudo nano (or gedit) /etc/X11/xorg.conf, to open the xorg.conf file.
  4. Under the “Device” section add these options on separate lines:
    Option "EnableRandR12" "false"
    Option "DesktopSetup" "horizontal"
  5. Now just restart your computer and it should be good to go.

Compiz still not working…

Linux delete/reset old eth0 network card

rules

When you add a new network card in your linux box and remove the old one, the new card will be named eth1. If you want to change it back to eth0, you can edit the file “70-persistent-net.rules” to remove the old eth0 card line and also remove the new eth1 line:

vi /etc/udev/rules.d/70-persistent-net.rules

Then you just need to reboot and the file will be updated with the new network card as eth0.