Upgrade the server
apt-get update
apt-get upgrade
GIT Repository
apt-get install git
or
apt-get upgrade git
Preliminary Installations
apt install apache2
Disable directory listing.
sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/apache2/apache2.conf
systemctl restart apache2.service
systemctl enable apache2.service
Install mariadb database
apt-get install mariadb-server mariadb-client
systemctl restart mysql.service
systemctl enable mysql.service
Install sqlite database - For ASTRA security.
apt-get install php7.3-sqlite3
phpenmod pdo_mysql
Select Keep the local version currently installed. (PHP.INI)
Disallowing remote root access
mysql_secure_installation
Answers:
"Enter current password for root": BLANK
Set root password: YES, password is in pCloud
Remove anonymouse users?:YES
Disallow root login remotely: YES
Remove test database: YES
Reload privelage tables now: YES
systemctl restart mysql.service
Install PHP 7.3
apt-get install software-properties-common
add-apt-repository ppa:ondrej/php
apt-get update
apt install php7.3 libapache2-mod-php7.3 php7.3-common php7.3-mbstring php7.3-xmlrpc php7.3-soap php7.3-gd php7.3-xml php7.3-intl php7.3-mysql php7.3-cli php7.3-zip php7.3-curl
Configure PHPMyAdmin
apt-get update
apt-get install phpmyadmin php-mbstring php-gettext
select apache2, press SPACEBAR to asterisked/select
Configure database for phpmyadmin with dbconfig-common? NO
phpenmod mbstring
systemctl restart apache2
Disable older version of PHPs
a2dismod php7.0 (Disable other PHP)
a2enmod php7.1 (Disable other PHP)
systemctl restart apache2.service
Set phpmyadmin password
mysql -u root -p
use mysql;
UPDATE mysql.user SET Password=PASSWORD('DevK1net1c$@dm1n') WHERE User='root';
UPDATE user SET plugin='mysql_native_password' WHERE User='root';
FLUSH PRIVILEGES;
exit;
service mysql restart
Lets Encrpt Installation
add-apt-repository ppa:certbot/certbot
apt-get update
apt-get install python-certbot-apache
cd /usr/share/phpmyadmin/libraries/
Go to https://my.pcloud.com/publink/show?code=kZv5Fa7ZoL6lqRnNwiH4nWlA6Q4CdSDCuORk and replace sql.lib.php
Test phpMyAdminAccess
http://23.227.163.126/phpmyadmin
root/ mysqladmin password
Cannot upload large files?
cd /etc/php/7.3/apache2/
Go to https://my.pcloud.com/publink/show?code=kZv5Fa7ZoL6lqRnNwiH4nWlA6Q4CdSDCuORk and replace php.ini
Location: /etc/php/7.3/apache2/
post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M