Docker Install: Difference between revisions

From RAJ INFO
Jump to navigation Jump to search
Line 99: Line 99:
== Encrypt MD5 ==
== Encrypt MD5 ==


Create a file called wp.txt, containing nothing but the new password.
* Create a file called wp.txt, containing nothing but the new password.
<pre>
<pre>
tr -d ‘\r\n’ < wp.txt | md5sum | tr -d ‘ -‘
tr -d ‘\r\n’ < wp.txt | md5sum | tr -d ‘ -‘
rm wp.txt
rm wp.txt
</pre>
</pre>

Revision as of 05:53, 25 June 2025

SERVER CONFIGURATION

DOCKER

docker pull ubuntu:24.04
docker run -it --name web -p 8080:80 -p 21:21 --network idon ubuntu:24.04

IP

docker network connect --ip 172.17.0.10 idon mysql
docker network connect --ip 172.17.0.2 idon web

UPDATE

apt update && upgrade
apt install wget nano curl libpam-modules-bin libpam-modules libpam-runtime libpam0g libsystemd0 libudev1 zip rar htop net-tools imagemagick php-gd

Lampp

cd /opt && wget https://excellmedia.dl.sourceforge.net/project/xampp/XAMPP%20Linux/8.2.12/xampp-linux-x64-8.2.12-0-installer.run && chmod 77 xampp-linux-x64-8.2.12-0-installer.run && ./xampp-linux-x64-8.2.12-0-installer.run

change user / group in httpd.conf as www-data

ProFTP

useradd admin
passwd admin
groupadd ftp
usermod -a -G ftp admin
chown root:ftp htdocs
chmod 775 htdocs

Mysql

  • Separate container
  • Assign IP (Refer earlier)
  • > map > mkdir /opt/www -> /volume1/www

Restore

./mysql -u rajplus -p -h localhost ak_wiki </opt/www/backup/mysql/ak_wiki.sql

phpmyadmin

  • Edit /etc/extra/httpd-xampp.conf
Require all granted
  • Access throug web interface and add user and block root
mkdir /opt/save
mkdir /opt/upload
  • Edit Config.inc.php
declare(strict_types=1);
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */
$i = 0;
$i++;
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = 'rajplus';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['host'] = '172.17.0.7';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['UploadDir'] = '/opt/upload';
$cfg['SaveDir'] = '/opt/save';

APCU

apt install php8.3-dev
pecl channel-update pecl.php.net
pecl install apcu
  • You should add "extension=apcu.so" to php.ini
  • echo "extension=apcu.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`

WEB FOLDERS

www

cp -r cp -r /opt/www/backup/www/ /var/ && chown -R www-data:www-data /var/www

Mediawiki

wget https://releases.wikimedia.org/mediawiki/1.43/mediawiki-1.43.1.tar.gz 

Drupal

ap install composer

cd /var/www/ && rm -fr idon && wget https://ftp.drupal.org/files/projects/drupal-10.5.0.tar.gz && tar xzvf drupal-10.5.0.tar.gz && mv drupal-10.5.0 idon && chown -R www-data:www-data idon && mkdir idon/sites/default/files && chmod 777 idon/sites/default/files && cp idon/sites/default/default.settings.php idon/sites/default/settings.php && chmod 777 idon/sites/default/settings.php

Encrypt MD5

  • Create a file called wp.txt, containing nothing but the new password.
tr -d ‘\r\n’ < wp.txt | md5sum | tr -d ‘ -‘
rm wp.txt