Giter VIP home page Giter VIP logo

lamp-yum's Introduction

Description

LCMP (Linux + Caddy + MariaDB + PHP) is a powerful bash script for the installation of Caddy2 + MariaDB + PHP and so on.

You can install Caddy2 + MariaDB + PHP in a smaller memory VPS by yum or apt-get command, Just need to input numbers to choose what you want to install before installation.

And all things will be done in a few minutes.

Supported System

  • Enterprise Linux 7 (CentOS 7, RHEL 7)
  • Enterprise Linux 8 (CentOS Stream 8, RHEL 8, Rocky Linux 8, AlmaLinux 8, Oracle Linux 8)
  • Enterprise Linux 9 (CentOS Stream 9, RHEL 9, Rocky Linux 9, AlmaLinux 9, Oracle Linux 9)
  • Debian 10
  • Debian 11
  • Debian 12
  • Ubuntu 20.04
  • Ubuntu 22.04

System requirements

  • Hard disk space: 5GB
  • RAM: 512MB
  • Internet connection is required
  • Correct repository
  • User: root

Supported Software

  • Caddy 2
  • MariaDB 10.11
  • PHP-7.4, PHP-8.0, PHP-8.1, PHP-8.2, PHP-8.3

※ PHP rpm packages provided by remi Repository, deb packages provided by deb.sury.org

Installation

  • If your server's OS: Enterprise Linux 7 / 8 / 9
yum -y install wget git
git clone https://github.com/teddysun/lcmp.git
cd lcmp
chmod 755 *.sh
./lcmp.sh 2>&1 | tee lcmp.log
  • If your server's OS: Debian 10+ / Ubuntu 20.04+
apt-get -y install wget git
git clone https://github.com/teddysun/lcmp.git
cd lcmp
chmod 755 *.sh
./lcmp.sh 2>&1 | tee lcmp.log

Upgrade

  • If your server's OS: Enterprise Linux 7 / 8 / 9
yum update -y caddy
yum update -y MariaDB-*
yum update -y php-*
# Change PHP directory's group for Caddy again if you upgraded PHP version
chown root:caddy /var/lib/php/session
chown root:caddy /var/lib/php/wsdlcache
chown root:caddy /var/lib/php/opcache
  • If your server's OS: Debian 10+ / Ubuntu 20.04+
apt-get install --only-upgrade -y caddy
apt-get install --only-upgrade -y mariadb-*
# for example: php_ver=[8.0|8.1|8.2]
php_ver="8.2"
apt-get install --only-upgrade -y php${php_ver}-*

Uninstall

  • If your server's OS: Enterprise Linux 7 / 8 / 9
yum remove -y caddy
yum remove -y MariaDB-*
yum remove -y php-*
  • If your server's OS: Debian 10+ / Ubuntu 20.04+
apt-get remove -y caddy
apt-get remove -y mariadb-*
# for example: php_ver=[8.0|8.1|8.2]
php_ver="8.2"
apt-get remove -y php${php_ver}-*

Default Location

Caddy Location Path
Web root location /data/www/default
Main Configuration File /etc/caddy/Caddyfile
Sites Configuration Folder /etc/caddy/conf.d/
MariaDB Location Path
Data Location /var/lib/mysql
my.cnf File (rpm) /etc/my.cnf
my.cnf File (deb) /etc/mysql/my.cnf
PHP Location Path
php-fpm File (rpm) /etc/php-fpm.d/www.conf
php-fpm File (deb) /etc/php/${php_ver}/fpm/pool.d/www.conf
php.ini File (rpm) /etc/php.ini
php.ini File (deb) /etc/php/${php_ver}/fpm/php.ini

Process Management

Process Command
PHP (rpm) systemctl [start|stop|status|restart] php-fpm
PHP (deb) systemctl [start|stop|status|restart] php${php_ver}-fpm
Caddy systemctl [start|stop|status|restart] caddy
MariaDB systemctl [start|stop|status|restart] mariadb

lcmp Command

Command Description
lcmp start Start all of LCMP services
lcmp stop Stop all of LCMP services
lcmp restart Restart all of LCMP services
lcmp status Check all of LCMP services status
lcmp vhost add Create a new Caddy virtual host
lcmp vhost list List all of Caddy virtual hosts
lcmp vhost del Delete a Caddy virtual host
lcmp db add Create a MariaDB database and a user with same name
lcmp db list List all of MariaDB databases
lcmp db del Delete a MariaDB database and a user with same name
lcmp db edit Update a MariaDB database username's password

Bugs & Issues

Please feel free to report any bugs or issues to us, email to: [email protected] or open issues on Github.

License

Copyright (C) 2023 - 2024 Teddysun

Licensed under the GPLv3 License.

lamp-yum's People

Contributors

teddysun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lamp-yum's Issues

能整个备份脚本么

一键备份 /data/www和数据库还有caddy的配置?
然后装了新环境在整个一键导入?

Default host

Hello,

I want to run 1 website on local only, using the local IP. How do I need to add when run lcmp vhost add ?

用Debian GNU/Linux 10 (buster)安装过程出错

[Fri 24 Nov 2023 03:15:26 PM CST] VPS initialization start
[Fri 24 Nov 2023 03:15:26 PM CST] rm -f /etc/localtime
[Fri 24 Nov 2023 07:15:26 AM UTC] ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
[Fri 24 Nov 2023 03:15:26 PM CST] apt-get update
[Fri 24 Nov 2023 03:15:27 PM CST] apt-get -yq install lsb-release ca-certificates curl
[Fri 24 Nov 2023 03:15:27 PM CST] apt-get -yq install vim tar zip unzip net-tools bind9-utils screen git virt-what wget whois mtr traceroute iftop htop jq tree
E: Unable to locate package bind9-utils
[Fri 24 Nov 2023 03:15:27 PM CST] Execution command (apt-get -yq install vim tar zip unzip net-tools bind9-utils screen git virt-what wget whois mtr traceroute iftop htop jq tree) failed, please check it and try again.
是系统不兼容的问题吗?

Would like to add Armbian support

Hi
When I try to run lcmp.sh in armbian it says : Not supported OS, please change OS to Enterprise Linux 7+ or Debian 10+ or Ubuntu 20.04+ and try again.

https://github.com/ophub/amlogic-s9xxx-openwrt

I am using this project compiled by armbian
In addition the project has ubuntu server
also has the same problem
I think the problem is the absence of the debian/ubuntu keyword in /proc/version.


root@armbian:~/lcmp# cat /proc/version
Linux version 6.1.69-ophub (root@fv-az700-154) (aarch64-none-linux-gnu-gcc (Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 13.2.1 20231009, GNU ld (Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) 2.41.0.20231009) #1 SMP Thu Dec 21 01:55:19 EST 2023

root@armbian:~/lcmp# cat /etc/os-release
PRETTY_NAME="Armbian-unofficial 24.2.0-trunk bullseye"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.armbian.com"
SUPPORT_URL="https://forum.armbian.com"
BUG_REPORT_URL="https://www.armbian.com/bugs"
ARMBIAN_PRETTY_NAME="Armbian-unofficial 24.2.0-trunk bullseye"


I would appreciate it if you could add their support!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.