Awesome

LemonSaaS

Ubuntu的LPAM搭配

《Ubuntu的LPAM搭配》

i.MaraiDB安装

1. sudo apt -y install mariadb-server mariadb-client
2. mysql_secure_installation
回答一些問題
Enter current password for root (enter for none): <– 按 enter
Set root password? [Y/n] <– y
New password: <– Enter the new MariaDB root password here
Re-enter new password: <– Repeat the password
Remove anonymous users? [Y/n] <– y
Disallow root login remotely? [Y/n] <– y
Reload privilege tables now? [Y/n] <– y
3. mysql -u root -p <–測試是否可登入

ii.Apache安装

sudo apt -y install apache2

iii.PHP7安装

1. sudo apt -y install php7.0 libapache2-mod-php7.0
2. systemctl restart apache2
3. echo “<?php phpinfo();” > /var/www/html/info.php && chown www-data:www-data /var/www/html/info.php

iiii.依赖的PHP模组

sudo apt install php7.0-mysql php7.0-curl php7.0-gd php7.0-intl php-imagick php7.0-imap php7.0-mcrypt php7.0-mbstring php-gettext php-zip

 

iiiii.启动SSL支援

1. a2enmod ssl
2. a2ensite default-ssl
3. systemctl restart apache2

iiiiii.phpyadmin安装

1. sudo apt install phpmyadmin
安裝過程要回答一些問題 :
Web server to configure automatically: <– Select the option: apache2
Configure database for phpmyadmin with dbconfig-common? <– Yes
MySQL application password for phpmyadmin: <– Press enter
2. echo “update user set plugin=” where User=’root’; flush privileges;” | mysql –defaults-file=/etc/mysql/debian.cnf mysql
因為MaraiDB 預設不讓root登入phpmyadmin,加入以上字串即可解除

打赏
微信
支付宝
微信二维码图片

微信扫描二维码打赏

支付宝二维码图片

支付宝扫描二维码打赏

本站文章未说明转载即为原创,转载请注明来源,LemonSaaS-A » Ubuntu的LPAM搭配,并请保留声明!
点赞

发表评论

电子邮件地址不会被公开。 必填项已用*标注