Loading...
 
Skip to main content

History: Debian Install

Source of version: 9 (current)

Copy to clipboard
            This page should merge with ((Install on Debian)).


! Debian Install

This is an ((Installation)) page. It was updated in 2020 and if they may be some difference from Debian version to Debian version the process is pretty standard and almost the same for years.

!! Install Debian 10 (stable)
#Download your Linux Debian distro and follow the instruction to create a bootable volume at : https://www.debian.org/CD/http-ftp/ (This is a cd/network install I choose to avoid changing my server bios setup but there are also disk on key install, etc). You need to connect your server to the internet to update and complete properly this installation.
#Boot the server on the volume just created and select the installer. I used the live one but there is also a graphical install providing a more user-friendly experience.
#Set language, keyboard (suggested to keep all in English/US) and your location.
#Configure hostname and domain (you can change them later)
#Create root and first user account.
#Partition disk (Guided – use entire disk is the easiest choice), follow the guide there is recommendations for new users). At the end of the process write the changes to the disk to validate.
#Select a mirror, at some point you'll be asked to connect to a Debian mirror online selecting one close to your server location.
#Select your package, I selected the minium:  web server, SSH server, Standard system utilities
#Install GRUB boot loader (follow the 2 screen recommendation and default selection)
Remove your Debian install volume (CD or USB disk) and reboot
You should be able to login using you newly created user (and to switch to root if needed: -+su+-)

Most of what you need is installed with the Web server package. There is a little to complete the installation and have a server and a Tiki online.

!! Complete the installation
!!! Update your Debian server
Check everything is up to date
Log onto your server and first update/upgrade it with the following commands:
{CODE(colors="shell" theme="default" ln="1")} 
sudo apt update
sudo apt upgrade
{CODE}

!!! Install mariaDB
{CODE(colors="shell" theme="default" ln="1")} 
sudo apt install mariadb-server
sudo mysql_secure_installation
sudo systemctl status mariadb
{CODE}

!!! Optional
While you will be able to run and complete the server setup and publish a website (a Tiki !) you need a lot more to assure your data protection and create the necessary services to manage easily your server, users, mailboxes, ect. There are control panel and addition that really help and set for you all the needed tools to administrate a server with several websites (virtual servers).

!!!! Install Webmin and Virtualmin
Download Virtualmin using the below script. It is basically a shell script that will handle rest of the installation once executed.
Then run it
{CODE(colors="shell" theme="default" ln="1")} 
wget https://software.virtualmin.com/gpl/scripts/install.sh
sudo /bin/sh ./install.sh
{CODE}

You have now to set your Webmin password (don’t use the letter & ?).
{CODE(colors="shell" theme="default" ln="1")} 
sudo /usr/share/webmin/changepass.pl /etc/webmin root yourpassword
{CODE}
Restart webmin.
{CODE(colors="shell" theme="default" ln="1")}
sudo systemctl restart webmin
{CODE}

You will now have access to your control panel if the port 10000 is open else, you may need to open the port it on the server. Because by default the Virtualmin will listen to the port Virtualmin. You only have to open this port if all the incoming requests on your server are blocked by default. (this is done using the security group on AWS)

Use https://your_server_domain:10000 (you can use your server IP too)
Once you are in , follow Virtualmin Post installation wizard.
It is pretty straightforward and everything is done to guide you.


!!!!Install several versions of PHP
Debian 10 come by default with 7.0 and installing MariaDB will add PHP7.4. You may want to use in parallel other PHP versions (you can select for each of your virtual server the PHP version).

Enable the sury.org repository and update the package  list:
{CODE(colors="shell" ln="1" theme="default")}# assuming you are not root do:
sudo apt-get -y install apt-transport-https lsb-release ca-certificates curl

sudo curl -sSL -o /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg

sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'

sudo apt-get update{CODE}
From here you can install any PHP package (change version number for what you need) and it will be accessible for your PHP version configuration in Virtualmin
{CODE(colors="shell" theme="default" ln="1")} 
sudo apt-get install php7.2 php7.2-cgi php7.2-cli php7.2-fpm php7.2-mysql php7.2-xml php7.2-gd php7.2-intl php7.2-xsl php7.2-curl php7.2-zip php7.2-mbstring
{CODE}

''Sidenotes: On another server installed from scratch, after applying the above, I had to delete manually files starting with "ondrej-" at -+/etc/apt/sources.list.d+- to be able to install any php version''

''Another side-note: when I used this php package list to install php 7.4 (see below) it was missing -+php7.x-mysql+- which I had to add to avoid it using AdoDB (and breaking) {sign user="jonnybradley" datetime="2020-10-15T09:58:44+00:00"}''

Once I completed the installation of the second PHP recheck the Virtualmin configuration it by logging into Virtualmin, and clicking System Settings -> Re-Check Config

You can configure which one is the default PHP version used on new Virtual Servers. The default is to use the newest available. You can change that default in System Settings -> Server Templates -> Default -> PHP Options. To set your host or domain PHP version go to Virtualmin -> Server configuration -> PHP version and on that screen you can set the PHP version to useversion.

!!!!! PHP 7.4
To add php 7.4 i used the virtualmin System -> Software Packages page and pasted this into the "Package from APT" box: {sign user="jonnybradley" datetime="2020-10-15T09:58:44+00:00"}
{CODE()}php7.4 php7.4-cgi php7.4-cli php7.4-fpm php7.4-mysql php7.4-xml php7.4-gd php7.4-intl php7.4-xsl php7.4-curl php7.4-zip php7.4-mbstring php7.4-mysql php7.4-bcmath{CODE}
{img fileId="1731"}
!!!!Installing git
Install and check git is running
{CODE(colors="shell" theme="default" ln="1")} 
sudo apt install git
git --version
{CODE}

!!!! Installing Tiki from Git
Navigate into your html directory. If you don’t know where it is located on your new server on Virtualmin check the Virtual Server Summary.
There, enter the git clone command. In my case I needed Tiki branch (version) 21.x without previous history (depth=1)
{CODE(colors="shell" theme="default" ln="1")} 
git clone --depth=1 --branch=21.x https://gitlab.com/tikiwiki/tiki.git .
{CODE}

Follow the regular [http://doc.tiki.org/Installation|Tiki install process|blank] ([http://doc.tiki.org/Installation#Install_a_repository_checkout|setup.sh|blank] (see additional notes below), [http://doc.tiki.org/Installation#Create_the_database|database creation|blank]) and you'll have a Tiki ready to be installed !

!!!!Additional notes to install composer and the dependencies
The composer installation from setup.sh check and requires some packages and libraries
* curl must be installed -+apt install curl+-
* The extension ext-gd must be installed for your php version -+apt-get install php7.4-gd+-
* The extension ext-intl must be installed for your php version -+apt-get install php7.4-intl+-
** Also the xls package for your php version -+apt-get install php7.4-xsl+-
* The extension ext-curl must be installed for your php version -+apt-get install php7.4-curl+-
* The extension ext-zip must be installed for your php version -+apt-get install php7.4-zip+-
* The extension ext-bcmath must be installed -+apt-get install php7.4-bcmath+-
* Restart apache2 -+systemctl restart apache2+-


{FADE(label="previous guide for Sarge" icon="y")}
Tiki is available in Debian's unstable distribution as package [http://packages.debian.org/unstable/web/tikiwiki|tikiwiki]. If that package is not up-to-date and you want to install using the official sources, follow the instructions below.

! Sarge (stable) or Etch (testing)
# Install Apache
+For Apache 1, install [http://packages.debian.org/apache|apache]
+For Apache 2, install [http://packages.debian.org/apache2|apache2]
# Install PHP, by installing [http://packages.debian.org/php4|php4], or [http://packages.debian.org/php5|php5] if you run Etch and prefer using PHP5 to PHP4.
# Install MySQL, by installing [http://packages.debian.org/mysql-server|mysql-server], or [http://packages.debian.org/stable/misc/mysql-server-4.1|mysql-server-4.1] if you use Sarge and prefer MySQL 4.1 to 4.0.
# Install the MySQL module for PHP, by installing [http://packages.debian.org/php4-mysql|php4-mysql], or [http://packages.debian.org/php5-mysql|php5-mysql] if you run Etch and installed php5 rather than php4 at step 2.
# Install the PHP module for Apache, by installing the package with the name of the form ''~np~libapache[2]-mod-php[4-5]~/np~'', depending of the Apache and PHP versions you installed at steps 1 and 2. For example, if you installed apache2 and php4, install [http://packages.debian.org/libapache2-mod-php4|libapache2-mod-php4] 
# Test to insure each package is working properly. For example to test PHP run the [http://www.php.net/manual/en/tutorial.firstpage.php|hello world] script.  If it is not working then consider reading the Debian README in /usr/share/doc/php?/README.Debian.gz . You may need to enable the mysql library module in /etc/php4/apache*/php.ini. To enable this module you would uncomment the line extension=mysql.so in php.ini.
# If using TikiMap
+''apt-get install [http://packages.debian.org/stable/web/php4-cgi|php4-cgi]''
# ((Download)) the Tiki version you want
# Unpack this archive into a Web accessible directory directory (for example /var/www)
# Follow usual InstallTikiDoc (just run the setup.sh like "./setup.sh www-data www-data")
# If you want GraphViz
+''apt-get install [http://packages.debian.org/stable/graphics/graphviz|graphviz]''.
# If you want PDF export
+''apt-get install [http://packages.debian.org/stable/web/php4-domxml|php4-domxml]''
# If you want Image Galleries
+''apt-get install [http://packages.debian.org/stable/graphics/imagemagick|imagemagick] [http://packages.debian.org/stable/web/php4-imagick|php4-imagick] [http://packages.debian.org/stable/web/php4-gd|php4-gd]''
# You can speed up your Tiki installation by installing a PHP caching module. Visit PerformanceTuning
** [http://www.eaccelerator.net|eAccelerator]
++ Available in dotdeb.org sources, a fork of turck-mmcache, but seems to have current support.
** [http://sourceforge.net/projects/turck-mmcache/|turck-mmcache]
++Note that this package is abandoned upstream and has 2 RC bugs at the time of writing. It's only in Sid (unstable) http://packages.debian.org/unstable/web/turck-mmcache.
** [http://pecl.php.net/package/APC|APC]
++Available on dotdeb.org for PHP5. There were appearantly [http://www.dotdeb.org/news/php_5.1.1_has_been_released?s=eaccelerator|compatibility problems] with eaccelerator, therefore the swtich to APC.
# Enjoy!
{FADE}