Skip to main content

Posts

Showing posts with the label Ubuntu 16.04 LTS

How to install development tools on Debian or Ubuntu 16.04 LTS ?

Development tools are required to install on your system if you have planned to build software. It’s also useful for building packages on your system. To install development tools on a server running Debian or Ubuntu, follow these steps: # apt-get update -y # apt-get install build-essential # apt-get install autoconf automake gdb git libffi-dev zlib1g-dev libssl-dev # sudo apt install libcurl4-gnutls-dev libxml2-dev # reboot If you want to install R Packages using DevTools, Follow the below Link: https://www.digitalocean.com/community/tutorials/how-to-install-r-packages-using-devtools-on-ubuntu-18-04

How to Update & Upgrade APT on Ubuntu 16.04 LTS?

You should first run update , then upgrade . Neither of them automatically runs the other. apt update updates the list of available packages and their versions, but it does not install or upgrade any packages. apt upgrade actually installs newer versions of the packages you have. After updating the lists, the package manager knows about available updates for the software you have installed. This is why you first want to update. Additionally, you can use apt update && apt upgrade to do both steps after each other. # apt update && apt upgrade

How to Disable AppArmor in Ubuntu 16.04 LTS ?

AppArmor is a kernel enhancement to confine programs to a limited set of resources. AppArmor's unique security model is to bind access control attributes to programs rather than to users. AppArmor confinement is provided via profiles loaded into the kernel via apparmor_parser, typically through the /etc/init.d/apparmor SysV initscript (on Ubuntu, Follow the below link for details), which is used like this: # /etc/init.d/apparmor start # /etc/init.d/apparmor stop # /etc/init.d/apparmor restart # sudo apparmor_status AppArmor can operate in two modes: enforcement, and complain or learning: enforcement - Profiles loaded in enforcement mode will result in enforcement of the policy defined in the profile as well as reporting policy violation attempts to syslogd. complain - Profiles loaded in "complain" mode will not enforce policy. Instead, it will report policy violation attempts. This mode is convenient for developing profiles. To manage complain mode for i

How to Configure Chrony NTP Server on Ubuntu 16.04 LTS?

Since Ubuntu 16.04 timedatectl / timesyncd (which are part of systemd) replace most of ntpdate / ntp.  timesyncd is available by default and replaces not only ntpdate, but also the client portion of chrony (or formerly ntpd). So on top of the one-shot action that ntpdate provided on boot and network activation, now timesyncd by default regularly checks and keeps your local time in sync. It also stores time updates locally, so that after reboots monotonically advances if applicable. Accurate time keeping is important for a number of reasons in IT. This setup is the best practice that helps with problem diagnosis and informal server monitoring. I am living in Asia that's why i'm using this pool. Install Chrony and Configure The NTP server: # sudo apt install chrony # vi /etc/chrony/chrony.conf #pool 2.debian.pool.ntp.org offline iburst server 0.asia.pool.ntp.org iburst server 1.asia.pool.ntp.org iburst server 2.asia.pool.ntp.org iburst server 3.asia.pool.ntp.org iburst

How to Disable Network Manager and Configure static IP address on Ubuntu 16.04 LTS?

Static configurations usually need IP addresses as well as DNS resolvers plus routing. In this tutorial, we will cover Linux static configuration on Ubuntu 16.04. Note: We have three(03) networking interfaces including  loopback(lo) etho0 = ipv4 eth1 = private LAN &  eth2 = ipv6 . Step 1. Edit the /network/interfaces file # vi /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 94.37.87.2XX netmask 255.255.252.0 gateway 94.37.X.1 dns-nameservers 8.8.8.8 8.8.4.4 dns-search datahead.biz auto eth1 iface eth1 inet dhcp auto eth2 iface eth2 inet6 auto Step 2. Restart the networking service (or reboot) Once you are confident the change has been made, and if you don’t want to reboot you can just restart the networking service. # sudo /etc/init.d/networking restart After doing this, and provided you don’t get any errors, your primary network interface should now be configured with the st

How to Configure Hostname Permanently on Ubuntu 16.04 LTS?

A hostname is a label that identifies a machine on the network. You shouldn’t use the same hostname on two different machines on a same network..You might ask yourself why you would need to change your hostname? The most common scenarios would be due to a domain name change, your business has changed its course, or because you have thought of something better. The hostname is used by many of the networking programs (such as sendmail, Apache servers) to identify the machine. By default, your server is started with the server’s given name as the hostname. Some software, such as cPanel, CWP , VestaCP requires a valid Fully Qualified Domain Name (FQDN) for the hostname. Types of hostnames (The hostname can be configured as follows): Static host name assigned by sysadmin. For example, “server1”, “wwwBot2”, or “host.datahead.biz”. Transient/dynamic host name assigned by DHCP or mDNS server at run time. Pretty host name assigned by sysadmin/end-users and it is a free-form UTF8 ho

How to Disable/Remove Firewalld/UFW/fail2ban on Ubuntu 16.04 LTS ?

There are many Open Source Hosting Control Panel comes with predefined firewall. VestaCP uses Iptables+Fail2ban . But sometimes the UFW firewall is the default firewall that ships standard with the Ubuntu Linux Distribution. UFW stands for Uncomplicated Firewall. We are removing ufw because we will use CSF (ConfigServer Security & Firewall :- requires correct iptables configuration on host server) , So We will not remove default IPtables . To enable the ufw firewall, open a new Terminal window and execute the following command: # sudo ufw enable To disable the ufw firewall, open a new Terminal windows and execute the following command: # sudo ufw disable To view the status of the ufw execute the below command: # sudo ufw status To remove UFW completely # sudo apt remove --auto-remove ufw # sudo apt purge ufw # sudo apt purge --auto-remove ufw # sudo apt remove ufw How to remove firewalld from Ubuntu 16.04 (Xenial Xerus)? Uninstall firewalld To remove just firew

How to Set or Change Time Zone in Ubuntu 16.04 LTS / CentOS 7 Linux ?

Server Time Zone is very important for any Internet Services. My Time Zone is Asia/Dhaka . Follow the steps to configure your Time Zone. CentOS 7: # timedatectl list-timezones # timedatectl list-timezones | grep Asia # mv /etc/localtime /root/localtime.old # ln -s /usr/share/zoneinfo/Asia/Dhaka /etc/localtime # timedatectl set-ntp yes # timedatectl set-timezone Asia/Dhaka # systemctl restart systemd-timedated.service # timedatectl Local time: Wed 2018-10-31 11:15:50 +06 Universal time: Wed 2018-10-31 05:15:50 UTC RTC time: Wed 2018-10-31 05:15:50 Time zone: Asia/Dhaka (+06, +0600) NTP enabled: yes NTP synchronized: yes RTC in local TZ: no DST active: n/a # hwclock Wed 31 Oct 2018 11:21:37 AM +06 -0.084209 seconds Ubuntu 16.04 LTS: # timedatectl list-timezones # timedatectl list-timezones | grep Asia # mv /etc/localtime /root/localtime.old # ln -s /usr/share/zoneinfo/Asia/Dhaka /etc/localtime # timedatectl set-ntp yes # timedatectl set-