How to create a localhost to develop website locally in EOS

Friends, I am f****ng tired of Windows. I am forced to use Windows because of XAMPP / WAMP. You know why these are used. But the problem is … problems are many. I just don’t want to use Windows any more for my serious work purpose. I have already installed EOS and I have updated it to latest EOS Mercury. Now I want a STEP-BY-STEP guide on how can I install APACHE 2.4.62.1, PHP 8.3.14, MariaDB 10.6.20 and phpMyAdmin 5.2.1 and I want them unchanged while updating because these versions are same as my online server configuration. I know there is XAMPP for Linux but I don’t know how to install these packages with their specific versions in it. Some friends in Telegram channel, advised me to install Docker but I need a GUI as I was a Windows user for a very very long time which has put some bad habits in me like using everything with GUI and that will not change overnight. So, I am here with all my limitations and bad habits, asking you to help me on this so that I can get rid of Windows. Windows is just a f*****g mess. If you have taken a screenshot, you have to open Photoshop, then paste it, then crop it… it is bloody hell. It eats my precious little time and I cannot do anything about it other than tearing my hair. Please help me.

For how to handle packages in general and the AUR ..

https://discovery.endeavouros.com/pacman/pacman-basic-commands/2021/03/

https://discovery.endeavouros.com/aur/faq-what-is-the-aur/2021/03/

1 Like

Thanks for your reply. But I think you haven’t read the full post thoroughly. Please read the post thoroughly and then you will understand what I need. Thanks again for your time.

if you need the “immutable” i would recommend something like running in a VM … or a docker .. server does not have graphical interface anyway or you are using something that connects over the browser

1 Like

In Windows, I use either WAMP or XAMPP. As WAMP is Windows only, XAMPP is more favourable. When using XAMPP, you have to connect to the website like this: http://localhost/EOS through the browser. As XAMPP has a GUI it is much easier to use and a major number of website developers who use Windows, use XAMPP and XAMPP has many ‘ADDONS’ for Windows with which you can install your desired versions of Apache, PHP, MariaDB/MySQL, phpmyAdmin etc. XAMPP is available for Linux also but no ADDON. So, I don’t know how to install specific versions of those packages. Plus I need them unchanged. You asked me to use Docker. I installed it once and found it has a steep learning curve and very complicated documentation. That’s why I need step-by-step guidance… unfortunately.

First EOS is a rolling release, as such you always get the most recent upstream packages, holding packages at specific versions (termed partial updates), although sometimes necessary for short periods because of regression error and such is not supported because it causes real issues with arch based systems.
All that aside from your post you need to create a development environment which mirrors your production environment, a very typical use case. The preferred way would be to use a virtual environment, either via a full VM or via docker / podman containers which would give you complete control of dev environment. Take a look at these two links https://enlear.academy/stop-using-xampp-a-step-by-step-guide-to-docker-for-php-and-mysql-b424f0a7ba41 , https://hub.docker.com/r/tomsik68/xampp/ both should help you set up a dev environment using docker
Also if you really want to install very specific version of apache, PHP, and MarianDB on your working EOS (which I don’t recomend), use downgrade to search and install the specific version you want. Make sure to allow downgrade to add the package to your pacman IgnorePkg list so they are not upgraded when you upgrade your system. Note because you system will be in a partially updated state there is no guarantee that the xampp packages will continue to run.
Again your best bet is learn how to use docker / podman to set up your dev environments. Good luck.

1 Like

One last note, because EOS is a rolling release and pinning package versions is not officially supported is one of the reasons Arch is generally not accepted as a good option for a server OS. That said I do use it in my home lab, but it’s just my stuff so if something breaks its not the end of the world. For a real server I would probably use RHEL, SUES, or Debian, and Docker for dev or just python virtual environments. Front end is less of an issue as every project is it’s own environment.
Also in your dev environment I would argue that the only thing that really matter would be the min PHP version. Apache is just apache, and although the version is important on the server for you dev env I would argue it makes no difference. For MariaDB again as long as you are supporting the min version and not using anything that specifically requires a newer version the exact version in your dev env and the server makes minimal difference so that leaves PHP. That said I would still invest in learning how to use Docker / Podman and just set up a proper dev env.

1 Like

Setting up dockers is not advanced magic and a good skill to have ;), but yes not easy to start with.
An easier way would be to use something like Virtualbox running Ubuntu Server edition.
That’s what students would do, to set up the server environment locally.
Install process already have the options to add everything needed like Server itself Database PHP remote interface e.t.c.
You will find easy tutorials for this scenario all over the web.

1 Like

:ok_hand:

1 Like

Thanks for the links. I visited both the links. But reading your reply and the ‘step-by-step guide to docker’ more questions have been arisen than answers. I have to go through that guide again and I might end up bombarding all of you with a lot of dumb questions. Please bear with me at that time.

I am not going to build a home server. I just want to develop website locally for my clients in an dev environment which will match with my online server environment. So, if something break, it will not be the end of the world for me but it will definitely hamper the time-frame of that particular project. Clients are impatient, you know that. As for MariaDB, I need that specific version because I develop websites with CMS like WordPress or Joomla and they break sometimes because sometimes MariaDB behaves strangely and gives too much pain. It happened with me earlier. But I don’t want to switch between two OS to do different jobs and I don’t want to install Ubuntu as well. So, let’s see how this problem can be solved.

Thanks for the advice. I will definitely search for some tutorials. In fact for Dockers / Podman, I have to look into Youtube anyway.

The more I think about it distrobox might be exactly what you need. You could easily create dev environment based on any distro you want. If you wanted to stick with Arch, you could create a dev specific environment, and again using downgrade install any specific versions you want. The great thing about distrobox is it completely abstracts away the creation of the Docker containter and leaves you with a shell that lets you do what you want without the fear of nuking your desktop.

1 Like

Sorry for delayed reply. Actually, I don’t want to use another Linux installation just to develop websites locally. I want to use the packages I need in the native installed EOS just like I do in Windows and just like Windows, to make them unchanged while updating the system. (Yes, I know that Linux is not Windows but I just use it as an example). Somewhere I read about putting those packages names in a certain file which will make them untouched by the system while updating but I forgot the procedure. I don’t think that if I make these particular packages unchanged, they will make the EOS system vulnerable as they are only needed for website development. Now regarding their dependencies, I don’t know whether updating those will impact these specific packages or not.

Couldn’t you just install XAMPP and—if really needed—ignore updates on that? (In /etc/pacman.conf, under IgnorePkg)

1 Like

How? And after that, how can I install specific versions of Apache, PHP, MariaDB and phpmyadmin in it and make them unchanged?

Installing xampp is all of them. You could probably install each separately, maybe even downgrade to a specific version.

But all that looks like much work for something that’ll break soon. On a rolling release, it’s not recommended sticking with old versions, since things will break. Not a question of if, but when

1 Like

As @joekamprad noted a while ago, a VM is a really good solution for this. It’s unlikely your web server is running Arch, and using a VM permits you to even more closely reproduce your webserver’s environment for development pruposes.

This has multiple benefits.

  • You avoid the conflict of purposes between a rolling release distro like Arch, and the unchanging requirements of your web server environment.
  • You’re not installing web services on your workstation, potentially opening it up to exploitation.
  • You have fine grained control over the VM’s OS, and hardware and network access.
  • A shared folder will permit both host (your workstation) and guest (the VM) to access the same files.
  • You can easily copy your entire VM to another system (eg: desktop to laptop) and keep going.
3 Likes

Or really use Docker, like this guy on GitHub did. Using a docker-compose.yml file allows you to pinpoint exactly the versions you require. Not rocket science.

I think I should experiment with the IgnorePkg way. As I have Windows 10 installation where I am currently developing Website using WAMP, there will be no harm on experimenting this.