Skip to main content

Posts

AWS - Ubuntu 14.04LTS with AWS CLI

Starting to migrate servers to AWS. The AWS Linux AMI has the AWS CLI pre-installed and setting up is pretty easy. AWS Linux AMI is CentOS-based and has different configurations/settings with Debian-based Ubuntu. To install the AWS CLI, follow these steps: SSH with username ubuntu and the private key file apt - get install python - pip pip install awscli Then config awscli with command: aws configure At this point, you will be prompted to enter the Access Key and Secret Key. It should be created in the IAM module. The keys should be re-generated from time-to-time for security purpose. Remember to attach a policy for access. By default the IAM created will have no policy attached. Two files are created to store the config enter under the user's directory in .aws directory.

ISPConfig 3 / Mail / Custom mail filter recipe

Recently trying to setup a mail re-direct (or a cc) to an external e-mail address. It is important to first determine if you are running courier or dovecot because the syntax is different. Under dovecot, it should be in sieve syntax. Therefore, under ISPConfig3 -> Email -> Email Mailbox -> Custom Rules, enter: redirect "mail@example.com"; Ensure it is double straight quotes and semi-colon at the end. Wait until the update is done (usually a few minutes) via the cron jobs of ISPConfig3 updating the /var/vmail/domain/username/.sieve

Setting up a Linux Swap

Linux 建立使用 Swap file Linux 要建立 Swap file 的步驟如下: (下述是建立 512M 的 swap,一次讀寫1024bytes,路徑 /tmp、檔名皆可隨意更改) sudo su – # 先切成 root 下述操作比較方便 dd if=/dev/zero of=/tmp/swap-filename bs=1024 count=524288 # 1024 * 512M = 524288 block size chown root:root /tmp/swap-filename chmod 0600 /tmp/swap-filename mkswap /tmp/swap-filename swapon /tmp/swap-filename 臨時的到此就可以使用了 若需要長期使用,在加入下述步驟: vim /etc/fstab /tmp/swap-filename none swap sw 0 0 查看目前 swap 有哪些:swapon - Source: http://blog.longwin.com.tw/2015/12/liux-add-swap-file-2015/

Kindle Fire HD 7" running Lollipop 5.1

The Kindle Fire HD 7" has one of the best screens for enjoying multimedia content and reading. The stock OS did not have much value compared to third party ROMs. I have been using third party ROM and has settled with official CM11 for quite some time (about a year) until last week. xda Forum contributor faZevoLv has released an unofficial OmniROM running on Lollipop 5.1 - which installed smoothly with the latest GApps found. (I tried CM12 beta, too. I installed but it gave a series of FC upon booting up. I believe it might have to do with the version of GApps but did not research further on the correct version). The user interface is very responsive, animation is quick and I have experienced no lag. Make sure you have a second bootloader before installing OmniROM. http://forum.xda-developers.com/kindle-fire-hd/7-development/rom-omnirom-android-5-1-t3052050

Installing Humhub on ISPConfig3 server - open_basedir issue

Trying a new social network platform for enterprise. Humhub is a new social platform and during installation, it has some compatibility issue with ISPConfig3. The error was related to open_basedir - open_basedir restriction in effect. The discussion can be found at https://github.com/humhub/humhub/issues/129 Proposed solution: apt-get install zendframework-bin mkdir /usr/share/pear Then under ISPConfig3: ISPConfig -> Sites - > Select relevant site hosting humhub -> Options Under PHP open_basedir, add ":/usr/share/pear" Restart apache2 for the settings to become effective. Installation is successful.

Ubuntu 10.04LTS won't boot after upgrade (Rackspace Cloud)

I had more than once performed upgrade to 10.04LTS and after the classic apt-get update/upgrade, the cloud server refuses to boot up correctly. That's why a daily backup (if not more frequent) is very important. A lot of times after apt-get update/upgrade a full reboot is not necessary as the services may restart themselves. That's why it is hard to tell exactly which system update might have caused the problem. Rackspace Support Network / Community has a good article to diagnose the root cause and provide a solution that has fixed my issue. https://community.rackspace.com/products/f/25/t/999 In essence, the grub configuration may have been messed up so a reconfiguriton of Grub is required. To do this, we would need to put the server in Rescue Mode. It is like putting a server in single user mode but with network access (so you can still manage it from remote). Be sure to go through the high quality comments underneath the original post for additional troubleshooting...

Ubuntu 10.04LTS to 14.04LTS upgrade

Situation: An old Ubuntu 10.04LTS server running on Rackspace First Generation Server Running ISPConfig 3 as the main control panel Wanted to upgrade to latest LTS as 10.04LTS support ends in April 2015. Steps: 1. Backup using Image under RS mycloud control panel for recovery. 2. Get into SSH 3. apt-get install update-manager-core 4. apt-get update / apt-get upgrade - to update all packages 5. remove the sites-enabled in apache2 configurations (as apache 2.2 to 2.4 has some changes) /etc/apache2/sites-enabled/ 6. do-release-upgrade -d - this updates system from 10.04LTS to 12.04LTS - download was about 250M 7. setting a new MySQL password during the update / allow services to restart / other prompts: choose default values (i.e. keeping existing version of preferences, rather than using distro's default). Giving a new MySQL somehow reduced a lot of intermediate prompts for MySQL password settings. 8. at the end of upgrade, it prompts for deleting old packages (I chose...