nixCraft Linux / UNIX Newsletter

Link to [RSS/Feed] nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format

How To Install Linux, Apache, MySQL, PHP (LAMP) Stack on Debian 9 Stretch

Posted: 13 Jun 2017 02:02 PM PDT

I am a new user of Debian 9 operating system. Can you tell me how to setup and install LAMP stack on a Debian 9 (Stretch)?

How to prevent sed -i command overwriting my symlinks on Linux or Unix

Posted: 13 Jun 2017 09:56 AM PDT

I recently ran a command 'sed -i 's/CONFIG_1/CONFIG_OPT_2/g' /etc/nginx/sites-enabled/*.conf' on a Debian Linux server. However, the sed command destroyed the link and created a regular file in place of the link file. How can I prevent my 'sed -i' command from destroying symlinks on Linux or Unix-like system?

Ansible: Could not find aptitude. Please ensure it is installed Error and Solution

Posted: 13 Jun 2017 04:23 AM PDT

I am running the 'ansible-playbook -i hostnames upgrade.yml' command but getting an error that read as follows

fatal: [db1]: FAILED! => {"changed": false, "failed": true, "msg": "Could not find aptitude. Please ensure it is installed."}

My yml file includes the following line:
- apt: update_cache=yes upgrade=yes

How do I fix this error on a Debian or Ubuntu Linux server?