![]() |
刚分手的红薯 · Yocto/Mender: ...· 2 周前 · |
![]() |
胡子拉碴的绿豆 · Linux无管理员权限安装Anaconda3 ...· 2 周前 · |
![]() |
腼腆的烈马 · [Anaconda]——Linux下cond ...· 2 周前 · |
![]() |
冲动的香菇 · Mac 使用 tar 工具压缩到Linux ...· 1 周前 · |
![]() |
酷酷的金针菇 · 《GPAW学习笔记》之安装GPAW - ...· 1 周前 · |
![]() |
近视的金鱼 · “210kW高温燃料电池发电系统研发与应用示 ...· 2 月前 · |
![]() |
玩滑板的消炎药 · 4GE+USB+WiFi6 GPON ...· 3 月前 · |
![]() |
想出家的柠檬 · Mac用户必备翻译软件!Bob 0.5.3 ...· 6 月前 · |
![]() |
勤奋的雪糕 · “融”出新机遇 “合”出新动力_手机新浪网· 6 月前 · |
Alpine Linux is a Linux distro that is lightweight and security-focused. The main aim of alpine is to be minimalistic be it in scope or space. Since it is small in size it is used in those containers which require less time for booting. Unlike other distros which use GNU, Glibc alpine used musl, busybox. PHP is a general-purpose, server-side scripting language that is used for making dynamic and interactive websites. It was created by a danish programmer in 1993. PHP is short for PHP: HYPERTEXT PREPROCESSOR. Some features of PHP are:
Today we will be looking at the installation of PHP on alpine Linux. A Linux environment will be used in this article (UBUNTU) and it will be used docker to create an alpine container. So make sure to know the basic docker commands.
Step 1: Pull the alpine image from the docker hub.
docker pull alpine
Step 2: Now make a container from this image and enter it. The name of the container will be sample_cont for this article.
docker run -t -d –name <container_name> alpine
Now run commands inside this container using the “ exec” command. Keep in mind that alpine has a “sh” shell.
docker exec -it sample_cont /bin/sh
Make sure to upgrade and update the packages, using the apk command.
apk update && apk upgrade
Now write the command to install PHP.
apk add php ( you can specify the version also, by default it fetches the latest version)
To verify the installation and check the version type the command below.
php -v
So this is how PHP can be installed on an alpine Linux system, hope this article was helpful.
Like Article
![]() |
勤奋的雪糕 · “融”出新机遇 “合”出新动力_手机新浪网 6 月前 |