Japanatron Logo

I re-built my LEMP web-server fresh on Ubuntu 20.04, and learned some things along the way. This is my base build outline.


INSTALL PACKAGES
nginx-extras
mysql-server
php php-curl php-fpm php-gd php-mysql php-xmlrpc php-memcache php-uploadprogress php-cli
unzip zip
ffmpeg
sendmail (for local mailing services)
imagemagick (to generate thumbnails for video-driven sites)

SETUP SENDMAIL
I. Set FQDN name in hosts

II. To enable sendmail to use STARTTLS, you need to:
1) Add this line to /etc/mail/sendmail.mc and optionally to /etc/mail/submit.mc: include(`/etc/mail/tls/starttls.m4')dnl
2) Run sendmailconfig
3) Restart sendmail

SETUP MYSQL
I. Enable password auth (needed for PHPMYADMIN)
mysql -u root

USE mysql;
UPDATE user SET plugin='mysql_native_password' WHERE User='root';
FLUSH PRIVILEGES;
exit;

systemctl restart mysql.service

mysql_secure_installation

* Set root mysql password.
* Do not use the validation plugin because it doesn't work with PHPMYADMIN.

SETUP PHP.INI
After looking at various sample PHP configs, I found just a few key variables in php.ini that are most often tweaked:

I. Data Handling / File Uploads
post_max_size = 512 (as you like)
upload_max_filesize= 512 (as you like)
register_argc_argv = Off default / On for video-driven sites

II. Resource Limits
max_execution_time = 30 default / 7200 for video-driven sites
max_input_time = 60 default / 7200 for video-driven sites
max_input_vars = 1000 default / 5000 for video-driven sites
memory_limit = 128 default / uploadsize+1MB for video-driven sites

INSTALL / SETUP PHPMYADMIN
apt install phpmyadmin

Related Articles

FreeNAS - Bi-Directional Rsync...

Go to /root on 1st server. ssh [email protected] cd /root FreeNAS OS drive is mounted read-only, so mount it RW. mount -o rw / Generate an RSA key & leave the ...

Building the Ultimate Media Ce...

Also known as a "home theater PC" (HTPC), a media center PC is connected to a TV and is built and configured for streaming / downloading media available on the ...

Linux - Specify From Address W...

I struggled a bit with figuring out how to specify the from email address when sending mail on the Linux command line.  In short, you need to use the -r option....

How To Build an Ubuntu Web Ser...

The following is a task outline for building an Ubuntu-based web-server to run Joomla and JomSocial.  I created this for my own notes, so apologies if it's...