Monday 9 March 2020

How to setup LAMP using Fedora 31

There are plenty of documents available on internet and you may be a pro in this field. Well I am new and its for my references and someone like me 😃 trying to learn by doing myself. 
Here I will put the key points to setup a basic LAMP (Linux Apache Mariadb PHP) server all by yourself on your hardware 😃.

Begin 

To start with we have to have a Fedora server or Worksation  ready. To achieve this one can use Live ISO files from Fedora site. Please refer to Documentation on how to do so. Here I assume knowledge of fedora server installation and setup.
The system may be installed on real hardware or on VM(Virtual Machine).

Basic LAMP packages need to be installed

After the bare minimum Fedora server installation, it is required to install the following packages.

php php-cli php-php-gettext php-mbstring php-mcrypt php-mysqlnd php-pear
php-curl php-gd php-xml php-bcmath php-zip mariadb-server httpd.

Use dnf install as root to install the packages and its dependencies. 

Configuration

It is assumed that the network is configured properly and it is accessible from outside world. For Virtual machine, Network setup is bit involved but Internet has many resource. ( Hint: Install a Bridge and go on)

1) SELinux should be set to permissive. (Please do not dissable it)

  • sudo setenforce 0
  • open /etc/selinux/config as root
  • sudo nano /etc/selinux/config
  • change SELINUX=enforcing to SELINUX=permissive
  • save the file

2) PHP setup

  • set timezone in /etc/php.ini 
  • date.timezone = Asia/Kolkata

3) MySQL configuration

  • open /etc/my.cnf.d/mariadb-server.cnf as root
  • in [mysqld] section change characterset to utf8 
character-set-server=utf8
  • start mariadb service
  • sudo systemctl strat mariadb
  • enable the service to run automatically when system boots
  • sudo systemctl enable mariadb
  • setup root password for mariadb by using mysql_secure_installation
  • remove anonymous user
  • disallow remote root login
  • remove test databases and access to it
  • reload previledge tables

4) Firewall setup

  • allow access for HTTP/HTTPS connections
    sudo firewall-cmd --add-service={http,https} --permanent
  • allow mysql access through firewall
    sudo firewall-cmd --add-service=mysql --permanent
  • reload firewall
    sudo firewall-cmd --reload

now you are done. Enjoy your adventure.

Neural Network from Scratch Using C (Part-3)

  XOR Problem In part 2, AND gate and OR gate could be trained using a single perceptron. But XOR gate could not be as it is not linearly...