Instructions for installing the standard development environment for web developers.
We operate several VPSs for hosting websites, the basis of which is Linux with CentOS containing ISPConfig and ISPConfig have to create a similar environment on a local computer. The reason for this is mainly the opportunity to experiment and try to upgrade and install additional extensions in Linux without endangering the operation of "live web presentations". Windows 10 Fall Creators Update also came to support Linux installation directly to Windows, which is absolutely fantastic option to have both systems on your computer. In this article, we will show you how to install Linux Debian on Windows 10 computer and simultaneously how clean Linux to configure to work with ISPConfig environment including Apache, MySQL and PHP.
Install Linux on Windows 10
First of all, you need to activate Windows 10 Linux Subsystem that allows you to install Linux distribution directly from Windows Store.
In the search box next to the Start button, enter the following text
Windows Power Shell
Windows Find Power Shell and you click right click and choose Run as Administrator . Once with Power Shell starts enter..
Enable-Windows Menu Feature - Online Categories Microsoft-Windows-Subsystem-Linux
This will install Linux Subsystem support and you will need to restart your computer. After the update you just need to click on Windows Store and search Linux distribution you want to install. In our case, it is Linux in Debian distribution - currently in version 9.
At this time, you can run the system and you will see the classic BASH system Linux. The system will prompt you to create the default user in the meaning of entering the name and password.
So that there is no problem with permissions, we will use sudo, or you can log in as root using the command
barrel su
First of all, it is advisable to update and upgrade the system. Update will set the current repository for Linux and upgrade will update the packages..
apt-get update apt-get upgrade
I recommend installing the very popular file manager Midnight Commander with the command
apt-get install mc
Installing ISPConfig
The advantage of using ISPConfig is the automatic installation of all components such as APACHE, PHP and MySQL. The following commands are enough:
apt-get install -y unzip cd /tmp wget --no-check-certificate -O installer.tgz "https://github.com/servisys/ispconfig_setup/tarball/master" tar zxvf installer.tgz cd *ispconfig*
and we start the actual installation of the ISPConfig system...
bash install.sh
The following is a guide that is quite simple and clear. The installation itself may take several minutes. The message
followsWell done ISPConfig installed and configured correctly :D
You should now be ready to login to ISPConfig at https://localhost:8080/login/
The default username is admin and the password is admin.
Restart Apache
The next time you start Windows and subsequently the Debian application, it is necessary to run the command to start APACHE for proper functionality.
service apache2 start
We also need to start the MySQL server.
service mysql start
Changes in ISPConfig are made via CRON jobs, so we will also start the CRON service.
service cron start
The address https://localhost:8080 is then available from Windows with a login to ISPConfig.
This process cannot yet be effectively automated - at least I haven't found instructions on how to do it yet. If anyone knows how to set it up, please write in the comments, I'll be happy to try and add to this guide.
Other system services
The status of available services can be found with this command:
service --status-all
PHP 5.6 service
service php5.6-fpm start
FTP transfer service
service pure-ftpd-mysql start
Batch start services
service php5.6-fpm start service mysql start service apache2 start service cron start service pure-ftpd-mysql start
Establishment of SITE in ISP Config
Unfortunately, the Windows Subsystem has not yet resolved a few issues and therefore a notice message may appear when starting APACHE. This makes it impossible to write the settings of that page directly from ISPConfig. For example, I will use the vhost file for the domain mojestrank.local..
/etc/apache2/sites-available/mojestrank.local.vhost Instead, ISPC creates a file /etc/apache2/sites-available/mojestrank.local.vhost.err
and leave the original vhost empty or unchanged. This can be bypassed very easily by "hard" copying / overwriting /etc/apache2/sites-available/mojestraka .local.vhost.err to file /etc/apache2/sites-available/mojestranda.local.vhost.
Then you need to restart apache..
service apache2 restart
On startup, a progress is displayed that should reveal errors, however in my case it was just a NOTICE that does not prevent APACHE from starting.
When creating a SITE in ISPC, the following settings worked for me:
Configuring APACHE
In file /etc/apache2/apache2. conf is the current configuration of APACHE, which dynamically load further configuration from *.conf files in/etc/apache2/sites-ena pale .
Case monutoruje file errors /var/log/apache2/error.log
Configure PHP 7 with PDO Support
To connect to MS SQL database you need to install freetds.
sudo apt-get install **php7.0**-sybase freetds-common libsybdb5
apache2ctl restart
PHP installation 5.6
apt-get install software-properties-common
apt-get install apt-transport-https lsb-release ca-certificates
wget - About /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources. s.r.o.
apt-get update
aptitude install php5.6
Installing and reinstalling Debian Linux WSL in Windows 10
You can uninstall the whole Linux instance if you start the Windows command prompt and enter:
debian clean