1、卸载:
apt-get remove MysqL* PHP* apache*
dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P
2、下载一键部署lamp:
apt-get -y install wget screen unzip
wget -O lamp.zip https://github.com/teddysun/lamp/archive/master.zip
unzip lamp.zip
cd lamp-master/
chmod +x *.sh
screen -S lamp
./lamp.sh
如何升级
注意:双斜杠//后的内容不要复制输入
./upgrade.sh // Select one to upgrade
./upgrade.sh apache // Upgrade Apache
./upgrade.sh db // Upgrade MysqL/MariaDB/Percona
./upgrade.sh PHP // Upgrade PHP
./upgrade.sh PHPmyadmin // Upgrade PHPMyAdmin
如何卸载
./uninstall.sh
程序目录
- MysqL 安装目录: /usr/local/MysqL
- MysqL 数据库目录:/usr/local/MysqL/data(默认,安装时可更改路径)
- MariaDB 安装目录: /usr/local/mariadb
- MariaDB 数据库目录:/usr/local/mariadb/data(默认,安装时可更改路径)
- Percona 安装目录: /usr/local/percona
- Percona 数据库目录:/usr/local/percona/data(默认,安装时可更改路径)
- PHP 安装目录: /usr/local/PHP
- Apache 安装目录: /usr/local/apache
命令一览
- MysqL 或 MariaDB 或 Percona 命令
/etc/init.d/MysqLd (start|stop|restart|status)
- Apache 命令
/etc/init.d/httpd (start|stop|restart|status)
- Memcached 命令(可选安装)
/etc/init.d/memcached (start|stop|restart|status)
- Redis 命令(可选安装)
/etc/init.d/redis-server (start|stop|restart|status)
网站根目录
原文链接:/ubuntu/353811.html默认的网站根目录: /data/www/default